儿科患者端

This commit is contained in:
@zuopngfei 2025-07-04 20:50:40 +08:00
parent fc7f361661
commit c04555d8a8
4 changed files with 34 additions and 29 deletions

View File

@ -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);

View File

@ -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)
}

View File

@ -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`,

View File

@ -48,7 +48,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
},
@ -56,14 +56,14 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getList()
},
/**