#
whycq
2023-03-21 f9b144cb4643e3edba5ce5df69afbe9da4960002
#
1个文件已修改
14 ■■■■ 已修改文件
pages/login/login.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue
@@ -46,7 +46,7 @@
                    <view>记住密码</view>
                </view>
                <view class="check-right">
                    <switch checked color="#FFCC33" style="zoom:.5" @change="remberChange"/>
                    <switch :checked='remberPassword' color="#FFCC33" style="zoom:.5" @change="remberChange"/>
                </view>
            </view>
        </view>
@@ -101,6 +101,7 @@
                version: '',
                showPassword: false,
                value: '',
                remberPassword: true,
                url: {
                    ip: '',
                    port: '',
@@ -122,7 +123,10 @@
            this.url = uni.getStorageSync('url')
            this.baseUrl = uni.getStorageSync('baseUrl')
            if (!this.user) {
                this.user = {userName: '',password: '',}
                this.user = {userName: '',password: ''}
            }
            if (!this.url) {
                this.url = {ip: '',port: '',project: ''}
            }
            
            // 手机端版本号
@@ -139,7 +143,7 @@
                this.showPassword = !this.showPassword;
            },
            remberChange(e) {
                console.log(e.detail);
                this.remberPassword = !this.remberPassword
            },
            // 设置窗口开启按钮
            settings() {
@@ -190,7 +194,11 @@
                            that.load.loading = true;
                            that.load.btnText = '登录中';
                            uni.setStorageSync('token', res.data.token);
                            if(that.remberPassword){
                            uni.setStorageSync('user', that.user);
                            }else{
                                uni.removeStorageSync('user');
                            }
                            setTimeout(() => {
                                uni.showToast({
                                    title: '登录成功'