#
whycq
2022-12-14 289e204f67b8ae0144772707e028a4aa82f2002a
pages/login/login.vue
@@ -48,14 +48,15 @@
         }
      },
      onLoad:function(){
         this.user.userName = uni.getStorageSync('userName')
         // #ifdef APP-PLUS
         var that=this
         plus.runtime.getProperty( plus.runtime.appid, function ( wgtinfo ) {
            that.version=wgtinfo.version
         });
         // #endif
         let that = this
         that.user.userName = uni.getStorageSync('userName')
      },
      methods: {
         changePassword: function() {
@@ -64,7 +65,7 @@
         onLogin() {
            let that = this
            uni.request({
               url: 'http://127.0.0.1:9528/login.action',
               url: 'http://localhost:9528/login.action',
               fail(result) {
                  uni.showToast({title: '请求失败'})
               },
@@ -82,6 +83,7 @@
                     that.load.btnText = '登录中';
                     uni.setStorageSync('token', res.data.token);
                     uni.setStorageSync('userName', that.user.userName);
                     uni.setStorageSync('baseUrl','http://localhost:9528')
                     setTimeout(()=> {
                        uni.showToast({title: '登录成功'})
                        setTimeout(()=> {