From c253ee275084d27e2d51ebda0090c2aae8dda295 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Tue, 1 Apr 2025 09:13:43 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/index/index.vue | 4 ++--
src/pages/opinion/index.vue | 47 ++++++++++++++++++++-----------------
2 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 68a0875..a51e07c 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -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}` })
}
diff --git a/src/pages/opinion/index.vue b/src/pages/opinion/index.vue
index eb636df..19c4838 100644
--- a/src/pages/opinion/index.vue
+++ b/src/pages/opinion/index.vue
@@ -76,14 +76,14 @@
提交成功
感谢您宝贵的意见
-
+
{
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)