From a223d5e29e9384f720ae98c44cbe10f8fa4f73e7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 21 八月 2025 13:42:16 +0800
Subject: [PATCH] 优化

---
 small-program/pages/packaging-worker/packaging-worker.vue |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/small-program/pages/packaging-worker/packaging-worker.vue b/small-program/pages/packaging-worker/packaging-worker.vue
index 3e044c9..eb714bb 100644
--- a/small-program/pages/packaging-worker/packaging-worker.vue
+++ b/small-program/pages/packaging-worker/packaging-worker.vue
@@ -211,16 +211,19 @@
 				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.clickType()
 					}
-					this.form.days = res.data.totalDays
-					this.form.price = Number(this.form.price) / 100
-					if (!this.form.multifileList) {
-						this.form.multifileList = []
-					}
-					// this.clickType()
+					
 				})
 			} else {
 				this.form.linkPhone = this.userInfo.telephone
@@ -266,7 +269,7 @@
 									uni.showToast({ title: '缂栬緫鎴愬姛', icon: 'success', mask: true, duration: 2000 })
 									setTimeout(() => {
 										uni.navigateBack({ delta: 1 });
-										uni.$emit('refresh')
+										// uni.$emit('refresh')
 									}, 1500)
 								}
 							}
@@ -283,7 +286,10 @@
 						type: this.form.type,
 						workType: this.form.workType
 					}).then(res => {
-						this.form.estimatedAccount = res.data
+						if (res.code === 200) {
+							this.form.estimatedAccount = res.data
+						}
+						
 					})
 				}
 			},
@@ -307,8 +313,10 @@
 				this.form.carType = id
 				if (id === 0) {
 					this.form.priceUnit = '鍏�/浜�/澶�'
-				} else {
+				} else if (id === 1) {
 					this.form.priceUnit = '鍏�/浜�/灏忔椂'
+				} else {
+					this.form.priceUnit = '鍏�/鏂�'
 				}
 			},
 			confirmCategary(e) {
@@ -320,7 +328,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