This commit is contained in:
BianLzhaoMin 2025-04-01 09:13:43 +08:00
parent f5504e6cd7
commit c253ee2750
2 changed files with 28 additions and 23 deletions

View File

@ -38,7 +38,7 @@ const getTaskDetailsData = async () => {
taskDescribe.value = res.data.taskDescribe
} else {
isError.value = true
uni.redirectTo({ url: `/pages/error/index?taskId=${taskId.value}` })
uni.redirectTo({ url: `/pages/error/index` })
}
}
@ -46,7 +46,7 @@ getTaskDetailsData()
//
const onSubmitOptions = () => {
uni.navigateTo({ url: '/pages/opinion/index' })
uni.navigateTo({ url: `/pages/opinion/index?taskId=${taskId.value}` })
}
</script>

View File

@ -76,14 +76,14 @@
<text class="success">提交成功</text>
<text class="thanks">感谢您宝贵的意见</text>
</view>
<view style="width: 100vw">
<!-- <view style="width: 100vw">
<up-button
type="primary"
text="返回"
@tap="onContinueFill"
style="width: 95%; margin: 30rpx auto"
/>
</view>
</view> -->
</template>
<up-modal
@ -134,23 +134,23 @@ const opinionRules = ref({
// message: '',
// },
// ],
// userPhone: [
// {
// type: 'string',
// required: true,
// message: '',
// trigger: ['blur', 'change'],
// },
userPhone: [
// {
// type: 'string',
// required: true,
// message: '',
// trigger: ['blur', 'change'],
// },
// {
// pattern: /^1[3-9]\d{9}$/,
// //
// transform(value) {
// return String(value)
// },
// message: '',
// },
// ],
{
pattern: /^1[3-9]\d{9}$/,
//
transform(value) {
return String(value)
},
message: '请填写正确的手机号码',
},
],
userOpinion: [
{
type: 'string',
@ -197,11 +197,16 @@ const onSubmitOptions = () => {
param: JSON.stringify(opinionModel.value),
},
success: (res) => {
console.log(res, 'res')
res = JSON.parse(res.data)
if (res.data === '添加成功') {
uni.$u.toast('添加成功')
uni.$u.toast('提交成功')
opinionModel.value = {
userName: '',
userPhone: '',
unit: '',
userOpinion: '',
}
fileList.value = []
isSuccess.value = true
} else {
uni.$u.toast('添加失败' + res.data)