|
@@ -89,9 +89,14 @@
|
|
|
onShow(){
|
|
onShow(){
|
|
|
this.form.username = uni.getStorageSync('username')
|
|
this.form.username = uni.getStorageSync('username')
|
|
|
this.form.password = uni.getStorageSync('password')
|
|
this.form.password = uni.getStorageSync('password')
|
|
|
- this.savePassword = uni.getStorageSync('savePassword')
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (uni.getStorageSync('savePassword')){
|
|
|
|
|
+ this.savePassword = uni.getStorageSync('savePassword')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
onLoad(e){
|
|
onLoad(e){
|
|
|
|
|
+
|
|
|
console.log('重定向获取到的参数',e)
|
|
console.log('重定向获取到的参数',e)
|
|
|
console.log('重定向的url',location.href)
|
|
console.log('重定向的url',location.href)
|
|
|
let code = this.getUrlCode('code')
|
|
let code = this.getUrlCode('code')
|
|
@@ -136,11 +141,15 @@
|
|
|
|
|
|
|
|
login() {
|
|
login() {
|
|
|
|
|
|
|
|
|
|
+ console.log('savePassword', this.savePassword)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if (this.requestStatus){
|
|
if (this.requestStatus){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.requestStatus=true
|
|
this.requestStatus=true
|
|
|
this.$refs.uForm.validate().then(res => {
|
|
this.$refs.uForm.validate().then(res => {
|
|
|
|
|
+ console.log('savePassword', this.savePassword)
|
|
|
if (this.savePassword){
|
|
if (this.savePassword){
|
|
|
uni.setStorageSync('savePassword', this.savePassword)
|
|
uni.setStorageSync('savePassword', this.savePassword)
|
|
|
uni.setStorageSync('username', this.form.username)
|
|
uni.setStorageSync('username', this.form.username)
|
|
@@ -160,7 +169,9 @@
|
|
|
this.requestStatus=false
|
|
this.requestStatus=false
|
|
|
uni.setStorageSync('accessToken', res.data.data.access_token)
|
|
uni.setStorageSync('accessToken', res.data.data.access_token)
|
|
|
this.$api.user.getUserInfo().then(res=>{
|
|
this.$api.user.getUserInfo().then(res=>{
|
|
|
-
|
|
|
|
|
|
|
+ if (res.data.data.img){
|
|
|
|
|
+ res.data.data.img = res.data.data.img.replace(/^http:/, "https:")
|
|
|
|
|
+ }
|
|
|
this.userInfo = res.data.data
|
|
this.userInfo = res.data.data
|
|
|
uni.setStorageSync('spreadUserInfo', this.userInfo)
|
|
uni.setStorageSync('spreadUserInfo', this.userInfo)
|
|
|
uni.showToast({
|
|
uni.showToast({
|