问卷调查修改描述显示

This commit is contained in:
zhouyanli
2026-08-31 15:23:47 +08:00
parent eaa61c52f6
commit c754d075e6
3 changed files with 14 additions and 21 deletions

View File

@@ -2,10 +2,7 @@
<view class="contentStyle">
<scroll-view class="page" scroll-y="true">
<view class="survey-title">{{ detailItem.title || '' }}</view>
<view class="survey-desc" v-if="questionList.length > 0">
为了给您提供更好的服务希望您能抽出几分钟时间将最近的感受和建议告诉我们
我们十分重视每位用户的宝贵意见期待您的参与
</view>
<view class="survey-desc">{{ detailItem.description || '' }}</view>
<view v-if="questionList.length === 0" class="empty-tip">
<text>暂无问卷内容</text>
@@ -142,7 +139,7 @@ page {
font-weight: 600;
color: #333;
text-align: center;
margin: 0px 0 20rpx 0;
margin: 0px 0 30rpx 0;
}
.survey-desc {
@@ -163,7 +160,8 @@ page {
}
.question-item {
margin-bottom: 30rpx;
/* margin-bottom: 30rpx; */
margin: 30rpx 0 ;
}
.question-title {

View File

@@ -11,11 +11,7 @@
<view class="survey-title">{{ detailItem.title || '' }}</view>
<!-- 问卷说明 -->
<!-- <view class="survey-desc">{{ detailItem.description || '' }}</view> -->
<view class="survey-desc" v-if="questionList.length >0">
为了给您提供更好的服务希望您能抽出几分钟时间将最近的感受和建议告诉我们
我们十分重视每位用户的宝贵意见期待您的参与
</view>
<view class="survey-desc">{{ detailItem.description || '' }}</view>
<!-- 空状态 -->
<view v-if="questionList.length === 0" class="empty-tip">
@@ -205,9 +201,9 @@ const handleSubmit = async () => {
const ans = answers.value[q.cid]
if (ans === undefined || ans === null || ans === '' || (Array.isArray(ans) && ans.length === 0)) {
uni.showToast({ title: `请填写第${questionList.value.indexOf(q) + 1}`, icon: 'none' })
return
}
}
return
}
}
}
const answerList = []
@@ -215,14 +211,14 @@ const handleSubmit = async () => {
const val = answers.value[q.cid]
if (val !== undefined && val !== null && val !== '' && !(Array.isArray(val) && val.length === 0)) {
answerList.push({ cid: q.cid, value: val })
}
}
}
uni.showLoading({ title: "提交中...", mask: true })
try {
let params = {
answerList,
villageId: uni.getStorageSync("currentVillageId")
}
}
const res = await submitQuestionnair(detailItem.value.id,params)
uni.hideLoading()
if (res.code === 200) {
@@ -232,7 +228,7 @@ const handleSubmit = async () => {
uni.showToast({ title: res.msg || '提交失败', icon: 'none' })
}
} catch (err) {
console.log('errrr',err)
// console.log('errrr',err)
uni.hideLoading()
uni.showToast({ title: err.msg || '网络异常', icon: 'none' })
}
@@ -297,7 +293,8 @@ page {
}
.question-item {
margin-bottom: 30rpx;
// margin-bottom: 30rpx;
margin: 30rpx 0;
.question-title {
font-size: 32rpx;
@@ -310,7 +307,7 @@ page {
color: #ff3b30;
font-size: 36rpx;
margin-right: 8rpx;
}
}
}
}