From a88092021b14abc67c2f2e53ce722d609632aeb5 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期二, 23 八月 2022 08:07:36 +0800
Subject: [PATCH] 修改日计划,我的待办,等相应bug
---
pages/login/login.vue | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/pages/login/login.vue b/pages/login/login.vue
index bc1020f..f441335 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -22,14 +22,22 @@
data() {
return {
formData:{
- username:'fyy',
- password:'123456!@#'
+ username:'',
+ password:''
}
};
},
+ onShow(){
+ // 娓呴櫎缂撳瓨
+ if(uni.getStorageSync('userInfo')||uni.getStorageSync('access_token')||uni.getStorageSync('refresh_token')){
+ this.$u.toast('鎴愬姛杩涘叆鐧诲綍椤�');
+ uni.clearStorageSync();
+ }
+ },
methods:{
loginSubmit(){
- // console.log('login');
+ console.log('鐐瑰嚮鐧诲綍');
+ // console.log('login');
uni.showLoading({
title:'鐧诲綍涓�...'
});
@@ -46,15 +54,22 @@
setTokenType(token_type);
setRefreshToken(refresh_token);
setScope(scope);
+ this.$store.dispatch('menus')
redirectHome();
uni.hideLoading();
} catch (e) {
// error
console.log(e);
}
+ } else{
+ uni.showToast({
+ title:response.data.msg,
+ icon:'error',
+ duration:2000
+ })
}
}
-
+
}
};
</script>
@@ -97,7 +112,7 @@
}
.loginBtn {
margin-top: vww(80);
-
+
button {
background-color: #007aff;
color: #ffffff;
--
Gitblit v1.9.1