|
@@ -1,40 +1,67 @@
|
|
|
<template>
|
|
|
<view class="main">
|
|
|
- <view class="user" @click="go('/pages/user/bind/index')">
|
|
|
+ <view class="user">
|
|
|
<image :src="user.avatar ? ip + user.avatar : '../../static/favicon.png'" class="head"></image>
|
|
|
- <view class="con" v-if="user.id">
|
|
|
- <view class="nickName">
|
|
|
- {{ user.patientName ? user.patientName : '还未绑定就诊人' }}
|
|
|
- <text class="icon" v-if="user.bindUserList.length > 1" @click.stop="show = true">切换就诊人</text>
|
|
|
+ <view class="con" v-if="user.id || user.token">
|
|
|
+ <view v-if="user.doctor" @click="go('/pages/user/info')">
|
|
|
+ <view class="nickName">{{ user.nickName }}</view>
|
|
|
+ <view class="welcome">{{ user.dept.deptName || '欢迎使用岑溪人民医院小程序' }}</view>
|
|
|
+ </view>
|
|
|
+ <view v-else @click="go('/pages/user/bind/index')">
|
|
|
+ <view class="nickName">
|
|
|
+ <text>{{ user.patientName ? user.patientName : '还未绑定就诊人' }}</text>
|
|
|
+ <text class="icon" v-if="user.bindUserList" @click.stop="show = true">切换就诊人</text>
|
|
|
+ </view>
|
|
|
+ <view class="welcome">欢迎使用岑溪人民医院小程序</view>
|
|
|
</view>
|
|
|
- <view class="welcome">欢迎使用岑溪人民医院小程序</view>
|
|
|
</view>
|
|
|
- <view class="con" v-else>
|
|
|
+ <view class="con" v-else @click="go('/pages/user/info')">
|
|
|
<view class="nickName">你还没登录</view>
|
|
|
<view class="welcome">欢迎使用岑溪人民医院小程序</view>
|
|
|
</view>
|
|
|
<view class="icon edit"></view>
|
|
|
</view>
|
|
|
<view class="cmd">
|
|
|
- <view class="s_item" @click="go('/pages/follow/remind')">
|
|
|
- <text class="icon ic" style="color: #03a9f4"></text>
|
|
|
- <text class="title">复诊提醒</text>
|
|
|
- <text class="icon arrow"></text>
|
|
|
- </view>
|
|
|
- <view class="s_item" @click="go('/pages/follow/index')">
|
|
|
- <text class="icon ic" style="color: #607d8b"></text>
|
|
|
- <text class="title">我的回访</text>
|
|
|
- <text class="icon arrow"></text>
|
|
|
- </view>
|
|
|
- <view class="s_item" @click="go('/pages/visit/index')">
|
|
|
- <text class="icon ic" style="color: #03a9f4"></text>
|
|
|
- <text class="title">就诊记录</text>
|
|
|
- <text class="icon arrow"></text>
|
|
|
+ <!--医生菜单-->
|
|
|
+ <view v-if="user.doctor">
|
|
|
+ <view class="s_item" @click="go('/pages/follow/remind')">
|
|
|
+ <text class="icon ic" style="color: #03a9f4"></text>
|
|
|
+ <text class="title">复诊提醒</text>
|
|
|
+ <text class="icon arrow"></text>
|
|
|
+ </view>
|
|
|
+ <view class="s_item" @click="go('/pages/follow/index')">
|
|
|
+ <text class="icon ic" style="color: #607d8b"></text>
|
|
|
+ <text class="title">回访记录</text>
|
|
|
+ <text class="icon arrow"></text>
|
|
|
+ </view>
|
|
|
+ <view class="s_item" @click="go('/pages/follow/index')">
|
|
|
+ <text class="icon ic" style="color: #607d8b"></text>
|
|
|
+ <text class="title">我的知识库</text>
|
|
|
+ <text class="icon arrow"></text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="s_item" @click="go('/pages/detection/index')">
|
|
|
- <text class="icon ic" style="color: #ff9800"></text>
|
|
|
- <text class="title">检测报告</text>
|
|
|
- <text class="icon arrow"></text>
|
|
|
+ <!--患者菜单-->
|
|
|
+ <view v-else>
|
|
|
+ <view class="s_item" @click="go('/pages/follow/remind')">
|
|
|
+ <text class="icon ic" style="color: #03a9f4"></text>
|
|
|
+ <text class="title">复诊提醒</text>
|
|
|
+ <text class="icon arrow"></text>
|
|
|
+ </view>
|
|
|
+ <view class="s_item" @click="go('/pages/follow/index')">
|
|
|
+ <text class="icon ic" style="color: #607d8b"></text>
|
|
|
+ <text class="title">我的回访</text>
|
|
|
+ <text class="icon arrow"></text>
|
|
|
+ </view>
|
|
|
+ <view class="s_item" @click="go('/pages/visit/index')">
|
|
|
+ <text class="icon ic" style="color: #03a9f4"></text>
|
|
|
+ <text class="title">就诊记录</text>
|
|
|
+ <text class="icon arrow"></text>
|
|
|
+ </view>
|
|
|
+ <view class="s_item" @click="go('/pages/detection/index')">
|
|
|
+ <text class="icon ic" style="color: #ff9800"></text>
|
|
|
+ <text class="title">检测报告</text>
|
|
|
+ <text class="icon arrow"></text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<button class="s_item" open-type="share" @click="go('/pages/help/my')" hover-class="none">
|
|
|
<text class="icon ic" style="color: #f44336"></text>
|
|
@@ -69,10 +96,9 @@ export default {
|
|
|
token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI3ZjVlNDYwLThjY2YtNDkxZi1hNTBjLWI1MjQzNDUzNjFkZiJ9.VTDBJ3929h8qGWMZFkfq-dQAkWOptIfQk7f5CaIahgltFV4QACgf3QBabcswisGTMQZaJMkxt5uCzjv3AkN48w'
|
|
|
};
|
|
|
uni.setStorageSync('user', this.user); */
|
|
|
- if (this.hasLogin()) {
|
|
|
+ this.user = this.getUser();
|
|
|
+ if (this.hasLogin() && !this.user.doctor) {
|
|
|
this.getUserInfo();
|
|
|
- } else {
|
|
|
- this.user = {};
|
|
|
}
|
|
|
},
|
|
|
methods: {
|