#
whycq
2024-02-26 5381a6cd7886fa04ea408b5a0889ba7cce6ae895
pages/LoginDemo/LoginDemo.vue
@@ -74,17 +74,12 @@
               username: '',
               password: ''
            },
            network: [{
                  name: 'wms',
                  ip: '192.168.1.1',
                  port: '8080',
                  address: 'pswms'
               },
            network: [
               {
                  name: 'wcs',
                  ip: '192.168.1.1',
                  ip: '10.10.10.200',
                  port: '9090',
                  address: 'pswcs'
                  address: 'jmwcs'
               }
            ],
            load: {
@@ -135,6 +130,10 @@
            this.$refs.settings.close()
         },
         async login() {
            // uni.reLaunch({
            //    url: `/pages/project/jmAGV/home`,
            // });
            // return
            if (!uni.getStorageSync('Network')) {
               uni.showToast({ icon: 'error', title: '请配置网络信息' }) 
               return
@@ -149,6 +148,7 @@
            }
            this.load.loading = true;
            this.load.btnText = '登录中';
            uni.setStorageSync('user', this.user);
            let res = await common.onLogin(this.user)
            if (res.code === 200) {
               setTimeout(() => {
@@ -163,7 +163,7 @@
                  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;