From 6b6dea66dc53ebee26ac5e6731d8e7f0bd6a9fe2 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 22 八月 2025 20:57:59 +0800
Subject: [PATCH] 111

---
 small-program/pages/index/index.vue |   93 +++++++++++++++++++++++++++++++++-------------
 1 files changed, 66 insertions(+), 27 deletions(-)

diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index f8c2695..5b2c779 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -415,18 +415,49 @@
 		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 = ''
+				this.orderFood = []
+			})
+			// 鍒锋柊棣栭〉鏁版嵁
+			uni.$on('refresh', () => {
+				this.getCategoryLists()
+				this.getDictInfo()
+				
+				if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+					this.form.linkPhone = this.userInfo.telephone
+				}
+			})
 		},
 		onShow(options) {
 			this.typeViewId = 0
@@ -461,7 +492,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 = ''
@@ -499,7 +530,9 @@
 			}
 		},
 		onReachBottom() {
-			this.getOrderList() 
+			if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}' && this.userInfo.useIdentity === 1) {
+				this.getOrderList()
+			}
 		},
 		methods: {
 			getDictInfo(){
@@ -649,24 +682,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
+									})
+								}
+							});
+						}
 					}
 				});
 			},
@@ -1232,12 +1266,16 @@
 							padding: 30rpx 0;
 							box-sizing: border-box;
 							flex-direction: column;
-							border-bottom: 1rpx solid #E5E5E5;
+							// border-bottom: 1rpx solid #E5E5E5;
 							.radio-item {
 								width: 100%;
 								display: flex;
 								align-items: self-end;
 								margin-bottom: 30rpx;
+								border-bottom: 1rpx solid #E5E5E5;
+								&:last-child {
+									border: none;
+								}
 								&:last-child {
 									margin: 0 !important;
 								}
@@ -1290,6 +1328,7 @@
 										align-items: center;
 										justify-content: flex-end;
 										margin-top: 42rpx;
+										margin-bottom: 34rpx;
 										text {
 											font-weight: 400;
 											font-size: 30rpx;
@@ -1697,7 +1736,7 @@
 										flex-shrink: 0;
 									}
 									text {
-										flex: 1;
+										width: 470rpx;
 										overflow: hidden;
 										text-overflow: ellipsis;
 										white-space: nowrap;

--
Gitblit v1.9.3