儿科患者端
This commit is contained in:
parent
fc7f361661
commit
c04555d8a8
@ -1,5 +1,5 @@
|
||||
const baseUrl = 'http://1.15.53.35:9998/';
|
||||
|
||||
const baseUrl = 'https://ddbs.1024tool.vip/';
|
||||
let isNavigatingToLogin = false;
|
||||
function request(url, method = 'GET', data = {}) {
|
||||
const header = {
|
||||
'content-type': 'application/json',
|
||||
@ -21,9 +21,15 @@ 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',
|
||||
})
|
||||
if (!isNavigatingToLogin) {
|
||||
isNavigatingToLogin = true;
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
complete: () => {
|
||||
isNavigatingToLogin = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
reject(res.data);
|
||||
}
|
||||
reject(res.data);
|
||||
|
||||
@ -152,14 +152,17 @@ Page({
|
||||
|
||||
|
||||
onLoad(){
|
||||
this.getSfList()
|
||||
this.getChartData()
|
||||
this.getPersonalInfo()
|
||||
|
||||
},
|
||||
|
||||
onReady() {
|
||||
|
||||
},
|
||||
onShow(){
|
||||
this.getSfList()
|
||||
this.getChartData()
|
||||
this.getPersonalInfo()
|
||||
},
|
||||
|
||||
changeChart(e) {
|
||||
const index = e.currentTarget.dataset.index;
|
||||
@ -220,7 +223,7 @@ Page({
|
||||
|
||||
let totalList = []
|
||||
standardHeight.forEach(item => {
|
||||
props.xAxis.forEach(item2 => {
|
||||
this.data.xAxis.forEach(item2 => {
|
||||
if(item.age == item2) {
|
||||
totalList.push(item.value)
|
||||
}
|
||||
@ -289,7 +292,7 @@ Page({
|
||||
|
||||
let totalList = []
|
||||
standardWeight.forEach(item => {
|
||||
props.xAxis.forEach(item2 => {
|
||||
this.data.xAxis.forEach(item2 => {
|
||||
if(item.age == item2) {
|
||||
totalList.push(item.value)
|
||||
}
|
||||
|
||||
@ -15,17 +15,17 @@ Page({
|
||||
code: ''
|
||||
},
|
||||
onLoad() {
|
||||
wx.login({
|
||||
success(res) {
|
||||
console.log(res.code)
|
||||
if (res.code) {
|
||||
//发起网络请求
|
||||
// wx.login({
|
||||
// success(res) {
|
||||
// console.log(res.code)
|
||||
// if (res.code) {
|
||||
// //发起网络请求
|
||||
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg)
|
||||
}
|
||||
}
|
||||
})
|
||||
// } else {
|
||||
// console.log('登录失败!' + res.errMsg)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
async getPhoneNumber(e) {
|
||||
// console.log(e.detail.code) // 动态令牌
|
||||
@ -37,9 +37,7 @@ Page({
|
||||
})
|
||||
await wx.setStorageSync('access_token', res.token);
|
||||
if (res.is_personal_information_complete) {
|
||||
wx.switchTab({
|
||||
url: `/pages/my/index`,
|
||||
});
|
||||
wx.navigateBack();
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: `/pages/my/info-edit/index`,
|
||||
@ -143,9 +141,7 @@ Page({
|
||||
});
|
||||
await wx.setStorageSync('access_token', res.token);
|
||||
if (res.is_personal_information_complete) {
|
||||
wx.switchTab({
|
||||
url: `/pages/my/index`,
|
||||
});
|
||||
wx.navigateBack();
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: `/pages/my/info-edit/index`,
|
||||
|
||||
@ -48,7 +48,7 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.getList()
|
||||
|
||||
|
||||
},
|
||||
|
||||
@ -63,7 +63,7 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
this.getList()
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user