| | |
| | | <switch :checked='remberPassword' color="#FFCC33" style="zoom:.5" @change="remberChange" /> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="button" @click="login" :loading="load.loading"> |
| | | {{load.btnText}} |
| | | </view> --> |
| | | <button class="button" @click="login()" :loading="load.loading">{{load.btnText}}</button> |
| | | </view> |
| | | <!-- 设置弹窗区域 --> |
| | |
| | | }, |
| | | methods: { |
| | | remberChange() { |
| | | |
| | | this.remberPassword = !this.remberPassword |
| | | |
| | | }, |
| | | settings() { |
| | | if (uni.getStorageSync('Network')) { |
| | |
| | | } |
| | | this.load.loading = true; |
| | | this.load.btnText = '登录中'; |
| | | uni.setStorageSync('user', this.user); |
| | | let res = await common.onLogin(this.user) |
| | | if (res.code === 200) { |
| | | setTimeout(() => { |
| | |
| | | url: `/pages/home/home`, |
| | | }); |
| | | }, 300) |
| | | if (!this.remberPassword) { |
| | | this.user.password = '' |
| | | } |
| | | uni.setStorageSync('user', this.user); |
| | | }, 700) |
| | | } else if (res.code === 0) { |
| | | this.load.loading = false; |