优化调试

This commit is contained in:
BianLzhaoMin 2025-04-08 18:01:00 +08:00
parent 34d22642ef
commit 689d9b0efd
3 changed files with 29 additions and 7 deletions

View File

@ -14,7 +14,8 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "意见收集"
"navigationBarTitleText": "custom",
"navigationStyle": "custom"
}
},
{

View File

@ -1,5 +1,5 @@
<template>
<view class="content" v-if="!isError">
<!-- <view class="content" v-if="!isError">
<text class="text-box"> &emsp;&emsp;{{ taskDescribe }} </text>
<view>
@ -10,7 +10,7 @@
@tap="onSubmitOptions"
/>
</view>
</view>
</view> -->
</template>
<script setup>
@ -36,8 +36,11 @@ const getTaskDetailsData = async () => {
taskType.value = res.type
if (res.code == 200) {
isError.value = false
taskDescribe.value = res.data.taskDescribe
// isError.value = false
// taskDescribe.value = res.data.taskDescribe
uni.redirectTo({
url: `/pages/opinion/index?taskId=${taskId.value}&taskType=${taskType.value}`,
})
} else {
isError.value = true
uni.redirectTo({ url: `/pages/error/index?code=${res.code}&time=${res.data.startTime}` })

View File

@ -1,5 +1,7 @@
<template>
<view class="content">
<text class="text-box"> &emsp;&emsp;{{ taskDescribe }} </text>
<!-- 意见收集 -->
<template v-if="!isSuccess">
<up-form
@ -106,11 +108,12 @@
</template>
<script setup>
import { submitOptionsApi } from '@/services/options.js'
import { submitOptionsApi, getTaskDetailsApi } from '@/services/options.js'
import { debounce } from 'lodash-es'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
const sendLoading = ref(false)
const taskDescribe = ref('')
//
const opinionModel = ref({
@ -148,9 +151,18 @@ const opinionRules = ref({
const isRequired = ref(false)
onLoad((option) => {
onLoad(async (option) => {
if (option.taskId) {
opinionModel.value.taskId = option.taskId
const { data: res } = await getTaskDetailsApi({
id: option.taskId,
})
if (res.code == 200) {
// isError.value = false
taskDescribe.value = res.data.taskDescribe
}
}
if (option.taskType && option.taskType == 1) {
isRequired.value = true
@ -327,6 +339,12 @@ const afterRead = async (event) => {
align-items: center;
background-color: #f5f5f5;
overflow-y: auto;
.text-box {
padding: 20px;
line-height: 2.2;
font-size: 12px;
letter-spacing: 2px;
}
}
::v-deep .opinion-form {
width: 90%;