#
zhou zhou
7 天以前 bccdb8f81c07c8a9cdcd6838173dfd1c73c98d90
pages/login/login.vue
@@ -314,7 +314,7 @@
            this.showAuth = false
            this.loadSettings()
         } else {
            this.$refs.uToast.show({
            this.$showToast({
               type: 'error',
               message: this.$t('settings.authError') || '密码错误'
            })
@@ -327,7 +327,7 @@
            settings = {
               ip: '127.0.0.1',
               port: '8080',
               project: 'jshdasrs'
               project: 'wms'
            }
         }
         this.settings = settings
@@ -336,14 +336,16 @@
         uni.setStorageSync('app_settings', this.settings)
         console.log(this.settings)
         this.showSettings = false
         this.$refs.uToast.show({
         this.$showToast({
            type: 'success',
            position: 'top',
            duration: '1000',
            message: this.$t('settings.saved') || '设置已保存'
         })
      },
      async onLogin() {
         try {
            const res = await login(
            const { data } = await login(
               {
                  username: this.user.userName,
                  password: md5.hex_md5(this.user.password)
@@ -353,8 +355,8 @@
            this.loading = true
            this.loginButton = 'login.loging'
            uni.setStorageSync('token', res.data.accessToken)
            uni.setStorageSync('userData', res.data.username)
            uni.setStorageSync('token', data.token)
            uni.setStorageSync('userData', data.username)
            if (this.remberPassword) {
               uni.setStorageSync('user', this.user)
            } else {
@@ -367,7 +369,7 @@
      },
      goHome() {
         setTimeout(() => {
            this.$refs.uToast.show({
            this.$showToast({
               type: 'success',
               message: '登录成功',
               position: 'top'