From c2efd87e150d0ab5d92d398c3b367345def3cc35 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期一, 20 三月 2023 11:18:59 +0800
Subject: [PATCH] 转发按钮

---
 pages/login/userPassword.vue                          |    9 ++++++---
 pages/customer-page/customer-index/customer-index.vue |    6 +++---
 pages/driver-page/driver-index/driver-index.vue       |    2 +-
 uni.scss                                              |    2 +-
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index fb836d1..5b11efb 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -9,8 +9,8 @@
 						寮�
 					</view>
 					<view class="card-left__utils">
-						<u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.cars2 == 0" shape="circle"></u-button>
-						<u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplus1 == 0"></u-button>
+						<u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.cars2 != item.carNum" shape="circle"></u-button>
+						<u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNum != item.carNumSurplus1"></u-button>
 					</view>
 				</template>
 				<template v-slot:right-top>
@@ -61,7 +61,7 @@
 <script>
 import card from '@/components/card/card.vue';
 import { customerId } from '@/utils/status';
-import colorGradient from '@/uni_modules/uview-ui/libs/function/colorGradient';
+// import colorGradient from '@/uni_modules/uview-ui/libs/function/colorGradient';
 import { todayDate } from '@/utils/util.js';
 export default {
 	components: {
diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index 41a08cd..a0867bd 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -16,7 +16,7 @@
 						<text>{{ item.carNum }}</text>
 						寮�
 					</view>
-					<view class="card-left__utils"><u-button @tap.stop="qiangDanBtn(item.orderPlanId)" text="鎶㈠崟" type="primary" shape="circle"></u-button></view>
+					<view class="card-left__utils"><u-button @tap.stop="qiangDan(item.orderPlanId)" text="鎶㈠崟" type="primary" shape="circle"></u-button></view>
 				</template>
 				<template v-slot:right-top>
 					<view class="right-top">
diff --git a/pages/login/userPassword.vue b/pages/login/userPassword.vue
index 5e3f0dc..51b35b9 100644
--- a/pages/login/userPassword.vue
+++ b/pages/login/userPassword.vue
@@ -43,8 +43,8 @@
 	},
 	data() {
 		return {
-			username: '18804050607',//瀹㈡埛
-			// username: '18805080506',//鐜嬫锛堝徃鏈猴級
+			username: '18804050607',// 瀹㈡埛
+			// username: '18805080506',// 鐜嬫锛堝徃鏈猴級
 			password: '123456',
 			remember: true,
 			baseUrl: ''
@@ -79,13 +79,13 @@
 					setRefreshToken(res.refresh_token);
 					if (this.btnText == 0) {
 						if (res.code != 1) {
-							this.$u.toast('鎭枩鎮紝鐧诲綍鎴愬姛锛�');
 							// 鐧婚檰鎴愬姛锛屽瓨鍌ㄧ浉鍏充俊鎭�
 							setToken(res.access_token);
 							setRefreshToken(res.refresh_token);
 							setUsernameKey(res.username);
 							//鏌ヨ鐢ㄦ埛璇︾粏淇℃伅骞跺偍瀛�
 							this.$reqGet('getUserEntity').then(res => {
+								this.$u.toast('鎭枩鎮紝鐧诲綍鎴愬姛锛�');
 								this.setUserTabbar(res.data.type);
 								uni.setStorageSync('roleType', res.data.type);
 								setCustomerId(res.data.customerid);
@@ -94,6 +94,9 @@
 								this.$nextTick(() => {
 									redirectHome();
 								});
+							}).catch(err=>{
+								this.$u.toast('鐧诲綍寮傚父锛�');
+								console.log(err);
 							});
 						} else {
 							uni.hideLoading();
diff --git a/uni.scss b/uni.scss
index 4602680..5a845fe 100644
--- a/uni.scss
+++ b/uni.scss
@@ -81,4 +81,4 @@
 }
 
 // uview鏍峰紡
-@import '@/uni_modules/uview-ui/theme.scss';
\ No newline at end of file
+@import '@/uni_modules/uview-ui/theme.scss';

--
Gitblit v1.9.1