This commit is contained in:
parent
f5504e6cd7
commit
c253ee2750
|
|
@ -38,7 +38,7 @@ const getTaskDetailsData = async () => {
|
||||||
taskDescribe.value = res.data.taskDescribe
|
taskDescribe.value = res.data.taskDescribe
|
||||||
} else {
|
} else {
|
||||||
isError.value = true
|
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 = () => {
|
const onSubmitOptions = () => {
|
||||||
uni.navigateTo({ url: '/pages/opinion/index' })
|
uni.navigateTo({ url: `/pages/opinion/index?taskId=${taskId.value}` })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,14 +76,14 @@
|
||||||
<text class="success">提交成功</text>
|
<text class="success">提交成功</text>
|
||||||
<text class="thanks">感谢您宝贵的意见</text>
|
<text class="thanks">感谢您宝贵的意见</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 100vw">
|
<!-- <view style="width: 100vw">
|
||||||
<up-button
|
<up-button
|
||||||
type="primary"
|
type="primary"
|
||||||
text="返回"
|
text="返回"
|
||||||
@tap="onContinueFill"
|
@tap="onContinueFill"
|
||||||
style="width: 95%; margin: 30rpx auto"
|
style="width: 95%; margin: 30rpx auto"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<up-modal
|
<up-modal
|
||||||
|
|
@ -134,23 +134,23 @@ const opinionRules = ref({
|
||||||
// message: '请填写正确的姓名',
|
// message: '请填写正确的姓名',
|
||||||
// },
|
// },
|
||||||
// ],
|
// ],
|
||||||
// userPhone: [
|
userPhone: [
|
||||||
// {
|
// {
|
||||||
// type: 'string',
|
// type: 'string',
|
||||||
// required: true,
|
// required: true,
|
||||||
// message: '请填写电话',
|
// message: '请填写电话',
|
||||||
// trigger: ['blur', 'change'],
|
// trigger: ['blur', 'change'],
|
||||||
// },
|
// },
|
||||||
|
|
||||||
// {
|
{
|
||||||
// pattern: /^1[3-9]\d{9}$/,
|
pattern: /^1[3-9]\d{9}$/,
|
||||||
// // 正则检验前先将值转为字符串
|
// 正则检验前先将值转为字符串
|
||||||
// transform(value) {
|
transform(value) {
|
||||||
// return String(value)
|
return String(value)
|
||||||
// },
|
},
|
||||||
// message: '请填写正确的手机号码',
|
message: '请填写正确的手机号码',
|
||||||
// },
|
},
|
||||||
// ],
|
],
|
||||||
userOpinion: [
|
userOpinion: [
|
||||||
{
|
{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|
@ -197,11 +197,16 @@ const onSubmitOptions = () => {
|
||||||
param: JSON.stringify(opinionModel.value),
|
param: JSON.stringify(opinionModel.value),
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res, 'res')
|
|
||||||
|
|
||||||
res = JSON.parse(res.data)
|
res = JSON.parse(res.data)
|
||||||
if (res.data === '添加成功') {
|
if (res.data === '添加成功') {
|
||||||
uni.$u.toast('添加成功')
|
uni.$u.toast('提交成功')
|
||||||
|
opinionModel.value = {
|
||||||
|
userName: '',
|
||||||
|
userPhone: '',
|
||||||
|
unit: '',
|
||||||
|
userOpinion: '',
|
||||||
|
}
|
||||||
|
fileList.value = []
|
||||||
isSuccess.value = true
|
isSuccess.value = true
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast('添加失败' + res.data)
|
uni.$u.toast('添加失败' + res.data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue