diff --git a/pages/home/login.vue b/pages/home/login.vue index d62eac7..1125bc1 100644 --- a/pages/home/login.vue +++ b/pages/home/login.vue @@ -22,7 +22,8 @@ } } .u-checkbox-group{ - margin-left:30rpx; + justify-content: flex-end; + margin:0 30rpx; } .res{ @@ -49,9 +50,9 @@ - + + + @@ -80,7 +81,7 @@ import request,{host} from "@/common/request" export default { data(){ return{ - demo:[], + remember:false, formData:{ password:"", @@ -103,7 +104,7 @@ export default { } }, onLoad(options){ - this.formData.username=options.phone||"" + this.formData.username=options.phone||uni.getStorageSync('username')||"" if(process.env.NODE_ENV === 'development'){ this.formData.username="18788469459" this.formData.password="1qaz@WSX" @@ -124,6 +125,9 @@ export default { }) if(res.statu){ this.$store.dispatch("getUserInfo",res.data.token) + if(this.remember){ + uni.setStorageSync('username',this.formData.username) + } }else{ uni.showModal({ title:"提示",