问卷调查修改描述显示
This commit is contained in:
@@ -2,10 +2,7 @@
|
|||||||
<view class="contentStyle">
|
<view class="contentStyle">
|
||||||
<scroll-view class="page" scroll-y="true">
|
<scroll-view class="page" scroll-y="true">
|
||||||
<view class="survey-title">{{ detailItem.title || '' }}</view>
|
<view class="survey-title">{{ detailItem.title || '' }}</view>
|
||||||
<view class="survey-desc" v-if="questionList.length > 0">
|
<view class="survey-desc">{{ detailItem.description || '' }}</view>
|
||||||
为了给您提供更好的服务,希望您能抽出几分钟时间,将最近的感受和建议告诉我们,
|
|
||||||
我们十分重视每位用户的宝贵意见,期待您的参与!
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view v-if="questionList.length === 0" class="empty-tip">
|
<view v-if="questionList.length === 0" class="empty-tip">
|
||||||
<text>暂无问卷内容</text>
|
<text>暂无问卷内容</text>
|
||||||
@@ -142,7 +139,7 @@ page {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px 0 20rpx 0;
|
margin: 0px 0 30rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.survey-desc {
|
.survey-desc {
|
||||||
@@ -163,7 +160,8 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.question-item {
|
.question-item {
|
||||||
margin-bottom: 30rpx;
|
/* margin-bottom: 30rpx; */
|
||||||
|
margin: 30rpx 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question-title {
|
.question-title {
|
||||||
|
|||||||
@@ -11,11 +11,7 @@
|
|||||||
<view class="survey-title">{{ detailItem.title || '' }}</view>
|
<view class="survey-title">{{ detailItem.title || '' }}</view>
|
||||||
|
|
||||||
<!-- 问卷说明 -->
|
<!-- 问卷说明 -->
|
||||||
<!-- <view class="survey-desc">{{ detailItem.description || '' }}</view> -->
|
<view class="survey-desc">{{ detailItem.description || '' }}</view>
|
||||||
<view class="survey-desc" v-if="questionList.length >0">
|
|
||||||
为了给您提供更好的服务,希望您能抽出几分钟时间,将最近的感受和建议告诉我们,
|
|
||||||
我们十分重视每位用户的宝贵意见,期待您的参与!
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 空状态 -->
|
<!-- 空状态 -->
|
||||||
<view v-if="questionList.length === 0" class="empty-tip">
|
<view v-if="questionList.length === 0" class="empty-tip">
|
||||||
@@ -205,9 +201,9 @@ const handleSubmit = async () => {
|
|||||||
const ans = answers.value[q.cid]
|
const ans = answers.value[q.cid]
|
||||||
if (ans === undefined || ans === null || ans === '' || (Array.isArray(ans) && ans.length === 0)) {
|
if (ans === undefined || ans === null || ans === '' || (Array.isArray(ans) && ans.length === 0)) {
|
||||||
uni.showToast({ title: `请填写第${questionList.value.indexOf(q) + 1}题`, icon: 'none' })
|
uni.showToast({ title: `请填写第${questionList.value.indexOf(q) + 1}题`, icon: 'none' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const answerList = []
|
const answerList = []
|
||||||
@@ -215,14 +211,14 @@ const handleSubmit = async () => {
|
|||||||
const val = answers.value[q.cid]
|
const val = answers.value[q.cid]
|
||||||
if (val !== undefined && val !== null && val !== '' && !(Array.isArray(val) && val.length === 0)) {
|
if (val !== undefined && val !== null && val !== '' && !(Array.isArray(val) && val.length === 0)) {
|
||||||
answerList.push({ cid: q.cid, value: val })
|
answerList.push({ cid: q.cid, value: val })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uni.showLoading({ title: "提交中...", mask: true })
|
uni.showLoading({ title: "提交中...", mask: true })
|
||||||
try {
|
try {
|
||||||
let params = {
|
let params = {
|
||||||
answerList,
|
answerList,
|
||||||
villageId: uni.getStorageSync("currentVillageId")
|
villageId: uni.getStorageSync("currentVillageId")
|
||||||
}
|
}
|
||||||
const res = await submitQuestionnair(detailItem.value.id,params)
|
const res = await submitQuestionnair(detailItem.value.id,params)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@@ -232,7 +228,7 @@ const handleSubmit = async () => {
|
|||||||
uni.showToast({ title: res.msg || '提交失败', icon: 'none' })
|
uni.showToast({ title: res.msg || '提交失败', icon: 'none' })
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('errrr',err)
|
// console.log('errrr',err)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({ title: err.msg || '网络异常', icon: 'none' })
|
uni.showToast({ title: err.msg || '网络异常', icon: 'none' })
|
||||||
}
|
}
|
||||||
@@ -297,7 +293,8 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.question-item {
|
.question-item {
|
||||||
margin-bottom: 30rpx;
|
// margin-bottom: 30rpx;
|
||||||
|
margin: 30rpx 0;
|
||||||
|
|
||||||
.question-title {
|
.question-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@@ -310,7 +307,7 @@ page {
|
|||||||
color: #ff3b30;
|
color: #ff3b30;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<uni-divider margin="10rpx 0"></uni-divider>
|
|
||||||
|
|
||||||
<view class="info-list">
|
<view class="info-list">
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="label">来访地址:</text>
|
<text class="label">来访地址:</text>
|
||||||
|
|||||||
Reference in New Issue
Block a user