123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <template>
- <view class="main">
- <view class="user" @click="go('/pages/user/bind/index')">
- <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>
- <view class="welcome">欢迎使用岑溪人民医院小程序</view>
- </view>
- <view class="con" v-else>
- <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/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 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: #607d8b"></text>
- <text class="title">检测报告</text>
- <text class="icon arrow"></text>
- </view>
- <view class="s_item" @click="go('/pages/help/my')">
- <text class="icon ic" style="color: #f44336"></text>
- <text class="title">分享应用</text>
- <text class="icon arrow"></text>
- </view>
- <view class="s_item" @click="go('/pages/help/my')">
- <text class="icon ic" style="color: #4caf50"></text>
- <text class="title">建议反馈</text>
- <text class="icon arrow"></text>
- </view>
- <view class="s_item" @click="go('/pages/other/setting')">
- <text class="icon ic" style="color: #9e9e9e"></text>
- <text class="title">设置</text>
- <text class="icon arrow"></text>
- </view>
- </view>
- <u-action-sheet round="20" title="切换就诊人" :actions="user.bindUserList" @select="selectClick" cancelText="取消" :show="show" @close="show = false"></u-action-sheet>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- ip: this.http.ip,
- user: {},
- show: false
- };
- },
- onShow() {
- /* this.user = {
- token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI3ZjVlNDYwLThjY2YtNDkxZi1hNTBjLWI1MjQzNDUzNjFkZiJ9.VTDBJ3929h8qGWMZFkfq-dQAkWOptIfQk7f5CaIahgltFV4QACgf3QBabcswisGTMQZaJMkxt5uCzjv3AkN48w'
- };
- uni.setStorageSync('user', this.user); */
- if (this.hasLogin()) {
- this.getUserInfo();
- } else {
- this.user = {};
- }
- },
- methods: {
- getUserInfo() {
- this.http.request({
- url: '/app/user/info',
- success: (res) => {
- this.user = res.data.data;
- }
- });
- },
- //切换就诊人
- selectClick(e) {
- uni.showModal({
- title: '提示',
- content: '确定切换就诊人',
- success: (res) => {
- if (res.confirm) {
- this.http.request({
- url: '/app/user/bind/change/' + e.id,
- success: (res) => {
- this.getUserInfo();
- }
- });
- }
- }
- });
- },
- go(url) {
- if (this.hasLogin()) {
- uni.navigateTo({ url: url });
- } else {
- uni.navigateTo({ url: '/pages/user/login' });
- }
- }
- },
- onShareAppMessage: function (res) {
- return {
- title: '岑溪人民医院小程序',
- path: '/pages/index/index',
- imageUrl: 'https://chenglantimes.com/prod-api/profile/upload/2024/06/16/blob_20240616055022A009.jpeg',
- success: (res) => {},
- fail: (res) => {}
- };
- }
- };
- </script>
- <style lang="scss">
- .main {
- padding: 5px 15px 25px 15px;
- .user {
- overflow: hidden;
- image {
- float: left;
- width: 60px;
- height: 60px;
- border-radius: 50%;
- }
- .con {
- float: left;
- padding-left: 15px;
- .nickName {
- padding-top: 5px;
- }
- .welcome {
- font-size: 14px;
- padding-top: 5px;
- color: #989898;
- .icon {
- padding-right: 3px;
- }
- }
- }
- .edit {
- float: right;
- margin-top: 14px;
- }
- }
- }
- </style>
|