From 2abe8fe3bbe7ccb22b4ea772d2413b41466e3cc7 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期五, 16 十二月 2022 16:17:00 +0800 Subject: [PATCH] # --- pages/login/login.vue | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index 1e2fad5..d03e312 100644 --- a/pages/login/login.vue +++ b/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(()=> { -- Gitblit v1.9.1