| | |
| | | }, |
| | | onLoad:function(){ |
| | | this.user.userName = uni.getStorageSync('userName') |
| | | this.user.password = uni.getStorageSync('password') |
| | | // #ifdef APP-PLUS |
| | | var that=this |
| | | plus.runtime.getProperty( plus.runtime.appid, function ( wgtinfo ) { |
| | |
| | | that.load.btnText = '登录中'; |
| | | uni.setStorageSync('token', res.data.token); |
| | | uni.setStorageSync('userName', that.user.userName); |
| | | uni.setStorageSync('password', that.user.password); |
| | | setTimeout(()=> { |
| | | uni.showToast({title: '登录成功'}) |
| | | setTimeout(()=> { |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="logOut" @click="logOut()"> |
| | | 退出登录 |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | console.log(res.data); |
| | | } |
| | | }) |
| | | }, |
| | | logOut() { |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | } |
| | | .item-right { |
| | | text-align: end; |
| | | color: #afafaf; |
| | | color: #6f6f6f; |
| | | } |
| | | .user-icons { |
| | | text-align: center; |
| | | } |
| | | .logOut { |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | text-align: center; |
| | | background-color: #fff; |
| | | margin-top: 30rpx; |
| | | } |
| | | </style> |