From b830b6a25e8aa0d2ee285d4efd5c12504a3f36a7 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 21 八月 2025 14:57:28 +0800
Subject: [PATCH] 前端

---
 small-program/pages/using-workers/using-workers.vue |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/small-program/pages/using-workers/using-workers.vue b/small-program/pages/using-workers/using-workers.vue
index a7bddd6..c49c649 100644
--- a/small-program/pages/using-workers/using-workers.vue
+++ b/small-program/pages/using-workers/using-workers.vue
@@ -195,18 +195,22 @@
 				this.$u.api.getDetail({
 					orderId: option.id
 				}).then(res => {
-					this.info = res.data
-					for (const key in this.form) {
-						this.form[key] = res.data[key]
+					if (res.code === 200) {
+						this.info = res.data
+						for (const key in this.form) {
+							this.form[key] = res.data[key]
+						}
+						this.form.days = res.data.totalDays
+						this.form.price = Number(this.form.price) / 100
+						if (!this.form.multifileList) {
+							this.form.multifileList = []
+						}
 					}
-					this.form.days = res.data.totalDays
-					this.form.price = Number(this.form.price) / 100
-					if (!this.form.multifileList) {
-						this.form.multifileList = []
-					}
+					
 				})
 			} else {
 				this.form.linkPhone = this.userInfo.telephone
+				this.form.linkName = this.userInfo.name
 				this.form.days = option.days
 				this.form.startDate = option.startDate
 				this.form.endDate = option.endDate
@@ -253,7 +257,7 @@
 								})
 								setTimeout(() => {
 									uni.navigateBack({ delta: 1 });
-									uni.$emit('refresh')
+									// uni.$emit('refresh')
 								}, 1500)
 								
 							}
@@ -271,8 +275,10 @@
 						type: this.form.type,
 						workType: this.form.workType
 					}).then(res => {
-						this.modify = true
-						this.form.estimatedAccount = res.data
+						if (res.code === 200) {
+							this.modify = true
+							this.form.estimatedAccount = res.data
+						}
 					})
 				}
 			},
@@ -300,7 +306,9 @@
 				this.$u.api.getCategoryList({
 					type: 0
 				}).then(res => {
-					this.cateList = [res.data]
+					if (res.code === 200) {
+						this.cateList = [res.data]
+					}
 				})
 			},
 			uploadImg() {

--
Gitblit v1.9.3