From d36eb757af8867278125c6999fcaa5bdb902151c Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期二, 21 三月 2023 17:38:45 +0800
Subject: [PATCH] 司机称重页面,签到页面
---
pages/login/userPassword.vue | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pages/login/userPassword.vue b/pages/login/userPassword.vue
index 1a37db5..4b8b3fd 100644
--- a/pages/login/userPassword.vue
+++ b/pages/login/userPassword.vue
@@ -43,7 +43,9 @@
},
data() {
return {
- username: '18812345677',
+ // username: '12222222222',// 瀹㈡埛
+ // username: '18805080506',// 鐜嬫锛堝徃鏈猴級
+ username: '13333333332',// driver
password: '123456',
remember: true,
baseUrl: ''
@@ -54,7 +56,7 @@
//鐧诲綍
async submit() {
uni.showLoading({
- title: '鐧婚檰涓�...'
+ title: '鐧诲綍涓�...'
});
//琛ㄥ崟鏍¢獙
if (this.username.length === 0) {
@@ -78,13 +80,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);
@@ -93,6 +95,9 @@
this.$nextTick(() => {
redirectHome();
});
+ }).catch(err=>{
+ this.$u.toast('鐧诲綍寮傚父锛�');
+ console.log(err);
});
} else {
uni.hideLoading();
--
Gitblit v1.9.1