123
This commit is contained in:
parent
746614c2cc
commit
859b9851a9
@ -22,12 +22,9 @@ function request(url, method = 'GET', data = {}) {
|
||||
if (res.data.code) {
|
||||
if (res.data.code == 10103) {
|
||||
wx.removeStorageSync('access_token');
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
complete: () => {
|
||||
isNavigatingToLogin = false;
|
||||
}
|
||||
});
|
||||
// wx.navigateTo({
|
||||
// url: '/pages/login/login',
|
||||
// });
|
||||
reject(res.data);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -216,7 +216,14 @@ Page({
|
||||
url: '/pages/clockIn/index',
|
||||
})
|
||||
},
|
||||
toEmergency() {
|
||||
async toEmergency() {
|
||||
const token = await wx.getStorageSync('access_token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/emergency/index',
|
||||
})
|
||||
@ -459,6 +466,9 @@ Page({
|
||||
return chart;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleBack() {
|
||||
wx.navigateBack()
|
||||
},
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar"
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,17 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.t-navbar-content{
|
||||
z-index: 100;
|
||||
background-color: transparent;
|
||||
}
|
||||
.login-content{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.image-wrapper_1 {
|
||||
background: url('https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/top-bg.png') center center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
@ -35,10 +46,11 @@
|
||||
margin: 12rpx 12rpx 0 564rpx;
|
||||
}
|
||||
.image_3 {
|
||||
margin-top: 20vh;
|
||||
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
align-self: center;
|
||||
margin-top: 196rpx;
|
||||
border-radius: 160px;
|
||||
}
|
||||
.box_1 {
|
||||
@ -96,11 +108,11 @@
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.text-wrapper_3 {
|
||||
width: 520rpx;
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 552rpx 50rpx 0 52rpx;
|
||||
position: absolute;
|
||||
bottom: 10vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.text_4 {
|
||||
overflow-wrap: break-word;
|
||||
|
||||
@ -1,7 +1,14 @@
|
||||
<view class="page">
|
||||
<t-navbar
|
||||
t-class-placeholder="t-navbar-placeholder"
|
||||
t-class-content="t-navbar-content"
|
||||
left-arrow bind:go-back="handleBack"
|
||||
class="block"
|
||||
title="登录"
|
||||
/>
|
||||
<view class="login-content">
|
||||
|
||||
<view class="image-wrapper_1">
|
||||
<image src="" class="image_1"></image>
|
||||
<image src="" class="image_2"></image>
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/logo.jpg" class="image_3"></image>
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/top-bg.png" class="image_4"></image>
|
||||
</view>
|
||||
@ -17,4 +24,6 @@
|
||||
<text lines="1" class="text_5">《用户服务协议》</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -10,7 +10,7 @@ Page({
|
||||
// planId: '',
|
||||
},
|
||||
|
||||
async getList(){
|
||||
async getList() {
|
||||
const res = await request('patient/follow_plans', 'get', {
|
||||
page: 1,
|
||||
page_size: 100,
|
||||
@ -29,7 +29,7 @@ Page({
|
||||
}
|
||||
// If within 7 days and status is 1, update to 2
|
||||
if (diffDays <= 7 && diffDays >= 0 && item.status === 1) {
|
||||
return { ...item, status: 3, diffDays};
|
||||
return { ...item, status: 3, diffDays };
|
||||
}
|
||||
return item;
|
||||
});
|
||||
@ -103,14 +103,22 @@ Page({
|
||||
toQuestionnaire(e) {
|
||||
const { item } = e.currentTarget.dataset
|
||||
wx.navigateTo({
|
||||
url: `/pages/followUp/index?planId=${item.id}&name=${item.plan_name}&time=${item.plan_date}&questionnaire_id=${item.questionnaire_id}` ,
|
||||
url: `/pages/followUp/index?planId=${item.id}&name=${item.plan_name}&time=${item.plan_date}&questionnaire_id=${item.questionnaire_id}`,
|
||||
})
|
||||
},
|
||||
goQuestionnaire(e) {
|
||||
async goQuestionnaire(e) {
|
||||
// const data = this.data.dataList
|
||||
// const target = data.find(item => item.questionnaire_id == 0 && item.status == 2);
|
||||
const token = await wx.getStorageSync('access_token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/followUp/index?planId=0&name=&time=&questionnaire_id=0` ,
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
wx.navigateTo({
|
||||
url: `/pages/followUp/index?planId=0&name=&time=&questionnaire_id=0`,
|
||||
})
|
||||
},
|
||||
toRegister() {
|
||||
@ -118,7 +126,14 @@ Page({
|
||||
url: '/pages/register/index',
|
||||
})
|
||||
},
|
||||
toEmergency(){
|
||||
async toEmergency() {
|
||||
const token = await wx.getStorageSync('access_token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/emergency/index',
|
||||
})
|
||||
|
||||
@ -115,7 +115,14 @@ Page({
|
||||
if (url) return;
|
||||
this.onShowToast('#t-toast', name);
|
||||
},
|
||||
toPath(e){
|
||||
async toPath(e){
|
||||
const token = await wx.getStorageSync('access_token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: e.currentTarget.dataset.url,
|
||||
})
|
||||
@ -127,7 +134,14 @@ Page({
|
||||
|
||||
})
|
||||
},
|
||||
toEmergency(){
|
||||
async toEmergency(){
|
||||
const token = await wx.getStorageSync('access_token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/emergency/index',
|
||||
})
|
||||
|
||||
@ -78,13 +78,13 @@
|
||||
</view>
|
||||
<text class="iconfont icon-youjiantou thumbnail_3"></text>
|
||||
</view>
|
||||
<view class="block_7" data-url="/pages/mmp-7/index" bind:tap="toPath">
|
||||
<!-- <view class="block_7" data-url="/pages/mmp-7/index" bind:tap="toPath">
|
||||
<view class="image-text_6">
|
||||
<image src="https://image-fudan.oss-cn-beijing.aliyuncs.com/mini_images/my/jkjy.svg" class="thumbnail_4"></image>
|
||||
<text lines="1" class="text-group_7">MMP-7</text>
|
||||
</view>
|
||||
<text class="iconfont icon-youjiantou thumbnail_3"></text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -133,6 +133,13 @@ Page({
|
||||
if (options.scrm_userid) {
|
||||
await wx.setStorageSync('scrm_userid', options.scrm_userid);
|
||||
}
|
||||
const token = await wx.getStorageSync('access_token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
return
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getPersonalInfo()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user