YOS-DRVOGPU6U78\Administrator
2023-07-19 72ae3dbb48ddcd16b2311f5346120b178302a5a1
pages/login/login.vue
@@ -34,6 +34,12 @@
            }
         }
      },
      onLoad() {
         let user = uni.getStorageSync('userInfo')
         if (user) {
            this.userInfo.account = user.code
         }
      },
      methods: {
         login() {
            // 输入检验
@@ -53,7 +59,6 @@
               return
            }
            console.log(this.userInfo)
            login(this.userInfo.account, this.userInfo.password).then(response => {
               console.log(response)
@@ -64,17 +69,20 @@
                  })
                  return
               }
               uni.setStorageSync('userInfo', {
                  username: response.data.FNAME,
                  code: response.data.FCODE,
                  company: response.data.FCOMPANY,
                  factory: response.data.FFACTORY,
               })
               uni.navigateTo({
                  url:'/pages/index/index'
                  url: '/pages/index/index',
               })
            })
         }
      }
      },
   }
</script>
<style>
   .uni-input {
      height: 28px;