#
whycq
2024-09-21 c571fbd81c0b8b3f4aa707606546efbc8b227f33
pages/login/login.vue
@@ -190,6 +190,7 @@
             }
         },
         onLogin: function (){
            console.log(this.baseHttp + this.baseIP + ':' +this.basePORT + this.baseUrl + '/login.action');
            if(!this.userName || this.userName.length==0){
               uni.showToast({title: '请填写账号',icon: "none"})
               return;
@@ -199,10 +200,11 @@
               return;
            }
            uni.showLoading();
            uni.request({
                url: this.baseHttp + this.baseIP + ':' +this.basePORT + this.baseUrl + '/login.action',
                data: {
                  mobile:this.userName,
                  username:this.userName,
                  password:md5.hex_md5(this.password) 
                },
                header: {
@@ -226,7 +228,7 @@
                     }
                     uni.setStorageSync('token', res.data.token);
                     setTimeout(() => {
                        uni.navigateBack();      //   小程序用这个  把首页路由放第一个
                        // uni.navigateBack();      //   小程序用这个  把首页路由放第一个
                        uni.reLaunch({
                           url: '../index/index'
                        });