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