付延余
2022-08-03 910f2ef56d0d49a4ce24b2f33860dce4d739b1b4
pages/login/login.vue
@@ -24,12 +24,22 @@
         formData:{
            username:'fyy',
            password:'123456!@#'
        // username:'anjianwei',
        // password:'123456'
         }
      };
   },
  onShow(){
     // 清除缓存
    if(uni.getStorageSync('userInfo')||uni.getStorageSync('access_token')||uni.getStorageSync('refresh_token')){
      this.$u.toast('成功进入登录页');
      uni.clearStorageSync();
    }
  },
   methods:{
      loginSubmit(){
         // console.log('login');
      console.log('点击登录');
      // console.log('login');
         uni.showLoading({
            title:'登录中...'
         });
@@ -53,9 +63,15 @@
               // error
               console.log(e);
            }
         } else{
            uni.showToast({
               title:response.data.msg,
               icon:'error',
               duration:2000
            })
         }
      }
   }
};
</script>
@@ -98,7 +114,7 @@
      }
      .loginBtn {
         margin-top: vww(80);
         button {
            background-color: #007aff;
            color: #ffffff;