diff --git a/main.js b/main.js index 722d53d..963f1c1 100644 --- a/main.js +++ b/main.js @@ -9,8 +9,8 @@ import { Vue.config.productionTip = false uni.$http = $http -$http.baseUrl = 'http://36.139.207.50:18083' -// $http.baseUrl = 'http://223.75.53.124:8002/chibirsvr/sys' +// $http.baseUrl = 'http://36.139.207.50:18083' +$http.baseUrl = 'http://223.75.53.124:8002/chibirsvr/sys' // 请求拦截器 $http.beforeRequest = function(options) { // uni.showLoading({ diff --git a/pages/homeIndex/headerUser.vue b/pages/homeIndex/headerUser.vue index d80ecb5..b871763 100644 --- a/pages/homeIndex/headerUser.vue +++ b/pages/homeIndex/headerUser.vue @@ -47,8 +47,9 @@ export default { methods: { async getSwiperList() { try { - const res = await uni.$http.get("/gunshiApp/xfflood/getLoginInfo"); + const res = await uni.$http.get("/getLoginInfo"); console.log("--c-", res.data); + this.userList = res.data; console.log("--cb-", this.userList); diff --git a/pages/homeIndex/index.vue b/pages/homeIndex/index.vue index f84940d..438a509 100644 --- a/pages/homeIndex/index.vue +++ b/pages/homeIndex/index.vue @@ -114,7 +114,7 @@ export default { methods: { async getSwiperList() { try { - const res = await uni.$http.get("/gunshiApp/xfflood/getLoginInfo"); + const res = await uni.$http.get("/getLoginInfo"); console.log("--1-", res.data); this.userList = res.data; diff --git a/pages/login/login.vue b/pages/login/login.vue index 73f4978..da1d232 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -156,14 +156,14 @@ export default { //提交表单 - uni.$http.post('/gunshiApp/xfflood/doLogin', postForm).then(res => { + uni.$http.post('/doLogin', postForm).then(res => { uni.showLoading({ title: '努力登录中...', mask: true }) if (res.data.code === 200) { //localStorage保存token if (res.data.data) { uni.setStorageSync('Gs-Token', res.data.data) - uni.$http.get('/gunshiApp/xfflood/getLoginInfo').then(res => { + uni.$http.get('/getLoginInfo').then(res => { console.log('sss', res.data.data) uni.setStorageSync('value', res.data.data) console.log('-----value------', res.data.data) diff --git a/pages/modifyPassword/modifyPassword.vue b/pages/modifyPassword/modifyPassword.vue index 622c68f..f0c611d 100644 --- a/pages/modifyPassword/modifyPassword.vue +++ b/pages/modifyPassword/modifyPassword.vue @@ -60,7 +60,7 @@ new_params.userId = uni.getStorageSync('value').userId // console.log(formData) - uni.$http.post('/gunshiApp/xfflood/user/updateSecretKey',new_params).then(res=>{ + uni.$http.post('/user/updateSecretKey',new_params).then(res=>{ console.log(res); if (res.data.code === 200) { uni.showToast({ diff --git a/pages/mypage/mypage.vue b/pages/mypage/mypage.vue index 171de2b..937cca8 100644 --- a/pages/mypage/mypage.vue +++ b/pages/mypage/mypage.vue @@ -89,19 +89,19 @@ }) // console.log('click',index,func[index].url) }, - async setInsert () { - try { - const params = { - createId: uni.getStorageSync('value').userId, - loginType:1, - menu1:'我的', - menu2:'我的', - } + // async setInsert () { + // try { + // const params = { + // createId: uni.getStorageSync('value').userId, + // loginType:1, + // menu1:'我的', + // menu2:'我的', + // } - const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params) - console.log('用户行为',params,data) - } catch (error) {} - }, + // const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params) + // console.log('用户行为',params,data) + // } catch (error) {} + // }, logout(){ if(uni.getStorageSync('loginChecked')===true){ uni.redirectTo({