#
whycq
2024-02-28 233fdc1cc07df94e54036fa421addf1e17cdff83
pages/LoginDemo/LoginDemo.vue
@@ -130,10 +130,10 @@
            this.$refs.settings.close()
         },
         async login() {
            uni.reLaunch({
               url: `/pages/project/jmAGV/home`,
            });
            return
            // uni.reLaunch({
            //    url: `/pages/project/jmAGV/home`,
            // });
            // return
            if (!uni.getStorageSync('Network')) {
               uni.showToast({ icon: 'error', title: '请配置网络信息' }) 
               return
@@ -148,7 +148,9 @@
            }
            this.load.loading = true;
            this.load.btnText = '登录中';
            uni.setStorageSync('user', this.user);
            let res = await common.onLogin(this.user)
            console.log(res);
            if (res.code === 200) {
               setTimeout(() => {
                  uni.showToast({
@@ -156,13 +158,13 @@
                  })
                  setTimeout(() => {
                     uni.reLaunch({
                        url: `/pages/home/home`,
                        url: `/pages/project/jmAGV/home`,
                     });
                  }, 300)
                  if (!this.remberPassword) {
                     this.user.password = ''
                  }
                  uni.setStorageSync('user', this.user);
                  // uni.setStorageSync('user', this.user);
               }, 700)
            } else if (res.code === 0) {
               this.load.loading = false;