From 4937c9cc69d2c771b34f83cd5c7f771628dad69d Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 21 八月 2025 19:21:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/index/index.vue |   72 +++++++++++++++++++++++------------
 1 files changed, 47 insertions(+), 25 deletions(-)

diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index f8c2695..ed7f456 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -415,18 +415,39 @@
 		async onLoad() { 
 			await this.$onLaunched;
 			
-			if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+			if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}' && this.userInfo.useIdentity === 1) {
 				this.getOrderList()
-				this.getCategoryLists()
+			}
+			
+			this.getCategoryLists()
+			this.getDictInfo()
+			
+			if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+				this.form.linkPhone = this.userInfo.telephone
 			}
 			
 			this.qqmapsdk = new QQMapWX({
 				key: '4PXBZ-JLBC7-LCLXG-P2SZX-C4HYE-LDBLQ'
 			});
 			
-			this.form.linkPhone = this.userInfo.telephone
-			
-			this.getDictInfo()
+			uni.$on('clear', (data) => {
+				this.form.startDate = ''
+				this.form.endDate = ''
+				this.form.latitude = ''
+				this.form.longitude = ''
+				this.form.location = ''
+				this.form.locationEnd = ''
+				this.form.wayInfoDTOList = []
+				this.form.workType = 0
+				this.form.days = ''
+				this.form.locationRemark = ''
+				this.form.supplement = ''
+				this.form.multifileList = []
+				this.form.linkName = ''
+				this.form.estimatedAccount = ''
+				this.form.price = ''
+				this.form.address = ''
+			})
 		},
 		onShow(options) {
 			this.typeViewId = 0
@@ -461,7 +482,7 @@
 					this.form.location = ''
 					this.form.locationEnd = ''
 					this.form.wayInfoDTOList = []
-					this.form.workType = ''
+					this.form.workType = 0
 					this.form.days = ''
 					this.form.locationRemark = ''
 					this.form.supplement = ''
@@ -649,24 +670,25 @@
 			uploadImg() {
 				uni.chooseImage({
 					success: (chooseImageRes) => {
-						const tempFilePaths = chooseImageRes.tempFilePaths;
-						uni.uploadFile({
-							url: this.$baseUrl + '/web/public/upload',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'folder': 'orders'
-							},
-							success: (uploadFileRes) => {
-								const res = JSON.parse(uploadFileRes.data)
-								this.form.multifileList.push({
-									fileurl: res.data.imgaddr,
-									name: res.data.originname,
-									url: res.data.url,
-									type: 0
-								})
-							}
-						});
+						for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
+							uni.uploadFile({
+								url: this.$baseUrl + '/web/public/upload',
+								filePath: chooseImageRes.tempFilePaths[i],
+								name: 'file',
+								formData: {
+									'folder': 'orders'
+								},
+								success: (uploadFileRes) => {
+									const res = JSON.parse(uploadFileRes.data)
+									this.form.multifileList.push({
+										fileurl: res.data.imgaddr,
+										name: res.data.originname,
+										url: res.data.url,
+										type: 0
+									})
+								}
+							});
+						}
 					}
 				});
 			},
@@ -1697,7 +1719,7 @@
 										flex-shrink: 0;
 									}
 									text {
-										flex: 1;
+										width: 470rpx;
 										overflow: hidden;
 										text-overflow: ellipsis;
 										white-space: nowrap;

--
Gitblit v1.9.3