From 50bf97fab25b7fa48bec6218799f3c20b5406cac Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Wed, 13 Sep 2023 17:50:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=AE=B0=E4=BD=8F=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/login.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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:"提示",