diff --git a/api/request.js b/api/request.js index 90968ab..5e2894b 100644 --- a/api/request.js +++ b/api/request.js @@ -1,4 +1,4 @@ -const baseUrl = 'http://1.15.53.35:9998/'; +const baseUrl = 'https://ddbs.1024tool.vip/'; function request(url, method = 'GET', data = {}) { const header = { @@ -21,8 +21,11 @@ function request(url, method = 'GET', data = {}) { if (res.data.code) { if (res.data.code == 10103) { wx.removeStorageSync('access_token'); - wx.switchTab({ - url: '/pages/my/index', + // wx.switchTab({ + // url: '/pages/my/index', + // }) + wx.navigateTo({ + url: '/pages/login/login', }) reject(res.data); } diff --git a/pages/home/index.js b/pages/home/index.js index 4098ce1..638f269 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -153,7 +153,7 @@ Page({ let totalList = [] standardHeight.forEach(item => { - props.xAxis.forEach(item2 => { + this.data.xAxis.forEach(item2 => { if(item.age == item2) { totalList.push(item.value) } @@ -224,7 +224,7 @@ Page({ let totalList = [] standardWeight.forEach(item => { - props.xAxis.forEach(item2 => { + this.data.xAxis.forEach(item2 => { if(item.age == item2) { totalList.push(item.value) } diff --git a/pages/login/login.js b/pages/login/login.js index e9bbb6a..7932719 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -56,8 +56,8 @@ Page({ mobile: this.data.mobile }); await wx.setStorageSync('access_token', res.token); - wx.switchTab({ - url: `/pages/my/index`, + wx.navigateBack({ + delta: 1 }); },