From 72935b2a35765bcc3622561bb06f2eccd64caf83 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 16 五月 2023 16:49:00 +0800
Subject: [PATCH] 修改上传图片时页面跳转问题

---
 pages/customer-page/customer-my/customer-my.vue |   65 ++++++++++++++++++--------------
 1 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index 0b8994f..ebeef7a 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -16,7 +16,7 @@
 									<u-swipe-action-item
 										:options="options1"
 										v-for="(item, index) in huoDaiData"
-										:index="index"
+										:index="item.userId"
 										:name="item.userId"
 										:key="index"
 										@click="deleteHuoDaiClick"
@@ -43,7 +43,7 @@
 									<u-swipe-action-item
 										:options="options1"
 										v-for="(item, index) in fleetData"
-										:index="index"
+										:index="item.id"
 										:name="item.id"
 										:key="index"
 										@click="deleteFleetClick"
@@ -218,15 +218,19 @@
 				title: '鍔犺浇涓�...'
 			});
 			// 鏂板缓杞﹂槦
-			this.$reqPost('saveFleet', this.addGroupForm, 'params').then(res => {
-				uni.hideLoading();
-				if (res.code == 0) {
-					this.$u.toast('娣诲姞鎴愬姛');
+			this.$reqPost('saveFleet', this.addGroupForm, 'params')
+				.then(res => {
+					uni.hideLoading();
+					console.log(res, '鏂板缓杞﹂槦');
+					if (res.code == 0) {
+						this.$u.toast('娣诲姞鎴愬姛');
+					} else {
+						this.$u.toast(res.msg ? res.msg : '娣诲姞澶辫触');
+					}
+				})
+				.then(r => {
 					this.getFleet();
-				} else {
-					this.$u.toast(res.msg ? res.msg : '娣诲姞澶辫触');
-				}
-			});
+				});
 			this.updateGroupShow = false;
 		},
 		// 鍒犻櫎璐т唬
@@ -251,17 +255,18 @@
 			uni.showLoading({
 				title: '鍔犺浇涓�...'
 			});
-			this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params').then(res => {
-				uni.hideLoading();
-				if (res.code == 0) {
-					if (res.data) {
+			this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params')
+				.then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
 						this.$u.toast('鍒犻櫎鎴愬姛');
-						this.getAllHuoDaiByCustomerId();
 					} else {
-						this.$u.toast('鍒犻櫎澶辫触');
+						this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
 					}
-				}
-			});
+				})
+				.then(r => {
+					this.getAllHuoDaiByCustomerId();
+				});
 		},
 		// 鍒犻櫎杞﹂槦
 		deleteFleetClick(args) {
@@ -285,16 +290,19 @@
 			uni.showLoading({
 				title: '鍔犺浇涓�...'
 			});
-			this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params').then(res => {
-				console.log('鍒犻櫎杞﹂槦', res);
-				if (res.code == 0) {
-					this.$u.toast('鍒犻櫎鎴愬姛');
-				} else {
-					this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
-				}
-				uni.hideLoading();
-				this.getFleet();
-			});
+			this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params')
+				.then(res => {
+					console.log('鍒犻櫎杞﹂槦', res);
+					if (res.code == 0) {
+						this.$u.toast('鍒犻櫎鎴愬姛');
+					} else {
+						this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
+					}
+					uni.hideLoading();
+				})
+				.then(() => {
+					this.getFleet();
+				});
 		},
 		// 璐т唬璇︽儏
 		toFreightForwarderDetails(userId) {
@@ -364,7 +372,6 @@
 			width: 80rpx;
 			height: 37rpx;
 			font-size: 40rpx;
-			font-family: Adobe Heiti Std;
 			font-weight: normal;
 			color: #ffffff;
 			line-height: 69rpx;

--
Gitblit v1.9.1