2023-09-20 10:42:44 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="app">
|
|
|
|
|
<view class="topbanner">
|
2023-09-20 14:07:06 +08:00
|
|
|
<!-- <view class="title">
|
2023-09-20 10:42:44 +08:00
|
|
|
我的
|
2023-09-20 14:07:06 +08:00
|
|
|
</view> -->
|
2023-09-20 10:42:44 +08:00
|
|
|
<image src="../../static/pages/userbanner.png" mode="" class="userbanner"></image>
|
2023-10-16 09:25:38 +08:00
|
|
|
<image :src="baseurl+appPersonallist.headPictureUrl" mode="" class="headsculpture" @tap='updatainfo'>
|
|
|
|
|
</image>
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="namesigning">
|
|
|
|
|
<span class="name">
|
2023-10-13 17:32:38 +08:00
|
|
|
{{appPersonallist.patientName}}
|
2023-09-20 11:30:45 +08:00
|
|
|
</span>
|
|
|
|
|
<view class="signing">
|
|
|
|
|
未签约
|
|
|
|
|
</view>
|
2023-09-20 10:42:44 +08:00
|
|
|
</view>
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="phone">
|
2023-10-13 17:32:38 +08:00
|
|
|
{{appPersonallist.phone}}
|
2023-09-20 11:30:45 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="switch btn">
|
|
|
|
|
切换家庭成员
|
|
|
|
|
</view>
|
2023-09-20 11:42:34 +08:00
|
|
|
<view class="manage btn" @click="gomanagefamily">
|
2023-09-20 11:30:45 +08:00
|
|
|
管理家庭成员
|
|
|
|
|
</view>
|
|
|
|
|
<view class="Threecategories">
|
2023-09-20 14:26:05 +08:00
|
|
|
<view class="item" @tap="goBehaviorpoints">
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="number">
|
|
|
|
|
0
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text">
|
|
|
|
|
行为积分
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-22 15:07:20 +08:00
|
|
|
<view class="item" @tap='gointegral'>
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="number">
|
|
|
|
|
0
|
2023-09-20 14:21:34 +08:00
|
|
|
</view>
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="text">
|
|
|
|
|
健康豆
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-20 13:52:08 +08:00
|
|
|
<view class="item" @tap='gocoupon'>
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="number">
|
|
|
|
|
0
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text">
|
|
|
|
|
优惠券
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="myorder">
|
|
|
|
|
<view class="title">
|
|
|
|
|
我的订单
|
|
|
|
|
</view>
|
2023-09-22 14:50:49 +08:00
|
|
|
<view class="righttitle" @tap="goorder(0,'')">
|
2023-09-20 11:30:45 +08:00
|
|
|
查看全部
|
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderStatus">
|
2023-09-22 14:50:49 +08:00
|
|
|
<view class="item" @tap="goorder(1,'WAIT_PAY')">
|
2023-09-20 11:30:45 +08:00
|
|
|
<image src="../../static/pages/daifukuan.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
待付款
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-22 14:50:49 +08:00
|
|
|
<view class="item" @tap="goorder(2,'WAIT_RECEIVED_GOODS')">
|
2023-09-20 11:30:45 +08:00
|
|
|
<image src="../../static/pages/daishouhuo.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
待收货
|
2023-09-20 14:21:34 +08:00
|
|
|
</view>
|
2023-09-20 11:30:45 +08:00
|
|
|
</view>
|
2023-09-22 14:50:49 +08:00
|
|
|
<view class="item" @tap="goorder(3,'RECEIVED_GOODS')">
|
2023-09-20 11:30:45 +08:00
|
|
|
<image src="../../static/pages/daipingjia.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
待评价
|
2023-09-20 14:21:34 +08:00
|
|
|
</view>
|
2023-09-20 11:30:45 +08:00
|
|
|
</view>
|
2023-09-22 14:50:49 +08:00
|
|
|
<view class="item" @tap="goorder(4,'EVALUATED')">
|
2023-09-20 11:30:45 +08:00
|
|
|
<image src="../../static/pages/yiwancheng.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
已完成
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="myorder">
|
|
|
|
|
<view class="title">
|
|
|
|
|
常用功能
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderStatus">
|
2023-10-09 13:29:39 +08:00
|
|
|
<view class="item" @tap='goHealthrecords'>
|
2023-09-20 11:30:45 +08:00
|
|
|
<image src="../../static/pages/jiankangdangan.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
健康档案
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="item">
|
|
|
|
|
<image src="../../static/pages/wodeyuyue.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
我的预约
|
2023-09-20 14:21:34 +08:00
|
|
|
</view>
|
2023-09-20 11:30:45 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="item">
|
|
|
|
|
<image src="../../static/pages/fuwupingjia.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
服务评价
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="item"></view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-22 15:29:53 +08:00
|
|
|
<view class="myorder titles" @tap="gonursestation">
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="title">
|
|
|
|
|
护理服务订单
|
|
|
|
|
</view>
|
|
|
|
|
<view class="righttitle">
|
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-27 16:38:01 +08:00
|
|
|
<view class="myorder titles" @tap="expertOrder">
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="title">
|
|
|
|
|
专家咨询订单
|
|
|
|
|
</view>
|
|
|
|
|
<view class="righttitle">
|
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
2023-09-20 10:42:44 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-20 11:30:45 +08:00
|
|
|
<view class="myorder titles">
|
|
|
|
|
<view class="title">
|
|
|
|
|
签约信息
|
|
|
|
|
</view>
|
|
|
|
|
<view class="righttitle">
|
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="myorder titles">
|
|
|
|
|
<view class="title">
|
|
|
|
|
退出登录
|
|
|
|
|
</view>
|
|
|
|
|
<view class="righttitle">
|
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
2023-09-20 10:42:44 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-22 14:07:12 +08:00
|
|
|
<u-toast ref="uToast" />
|
2023-09-20 10:42:44 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-09-22 15:07:20 +08:00
|
|
|
import {
|
|
|
|
|
mapActions
|
|
|
|
|
} from "vuex";
|
|
|
|
|
import {
|
|
|
|
|
appPersonal,
|
|
|
|
|
} from '@/api/pages/myinformation/myinformation.js';
|
|
|
|
|
import {
|
|
|
|
|
existPatientInfo
|
|
|
|
|
} from '@/api/pages/startup/index.js'
|
|
|
|
|
import {
|
|
|
|
|
createMobileToken
|
|
|
|
|
} from '@/api/pages/login/index.js'
|
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
2023-09-20 10:42:44 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-09-22 15:07:20 +08:00
|
|
|
baseurl: '',
|
|
|
|
|
appPersonallist: null, //获取个人信息
|
|
|
|
|
timer: null,
|
|
|
|
|
list: {},
|
2023-10-16 09:25:38 +08:00
|
|
|
|
2023-09-20 10:42:44 +08:00
|
|
|
};
|
2023-09-20 11:42:34 +08:00
|
|
|
},
|
2023-09-22 15:07:20 +08:00
|
|
|
onShow() {
|
|
|
|
|
// this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
|
|
|
|
|
let that = this
|
|
|
|
|
this.baseurl = baseurl
|
|
|
|
|
const value = uni.getStorageSync('patientId');
|
2023-10-16 09:25:38 +08:00
|
|
|
if (value) {
|
|
|
|
|
that.myInfo()
|
|
|
|
|
} else {
|
2023-09-22 15:07:20 +08:00
|
|
|
that.appPersonallist = null
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-09-20 11:42:34 +08:00
|
|
|
methods: {
|
2023-09-22 15:07:20 +08:00
|
|
|
remove() {
|
|
|
|
|
let that = this
|
|
|
|
|
const value = uni.getStorageSync('patientId');
|
|
|
|
|
if (value) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '确认要退出此账号吗',
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
uni.clearStorageSync();
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
title: '退出账号成功',
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: '1000'
|
|
|
|
|
})
|
|
|
|
|
createMobileToken().then(res => {
|
|
|
|
|
uni.setStorageSync("token", res.data.token)
|
|
|
|
|
})
|
|
|
|
|
if (that.timer) {
|
|
|
|
|
clearTimeout(that.timer)
|
|
|
|
|
}
|
|
|
|
|
that.timer = setTimeout(e => {
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url: '/pages/homepage/homepage'
|
|
|
|
|
})
|
|
|
|
|
}, 1000)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
title: '您未登录,请先登录',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: '1000'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
removes() {
|
|
|
|
|
this.appPersonallist = null
|
|
|
|
|
uni.removeStorageSync('patientId');
|
|
|
|
|
uni.removeStorageSync('openid');
|
|
|
|
|
uni.removeStorageSync('phone');
|
|
|
|
|
uni.removeStorageSync('Refresh');
|
2023-09-20 13:52:08 +08:00
|
|
|
},
|
2023-09-22 15:07:20 +08:00
|
|
|
//获取个人信息
|
|
|
|
|
myInfo() {
|
|
|
|
|
var that = this
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
existPatientInfo(value).then(res => {
|
|
|
|
|
if (res.code == 200 && res.msg == 'LOGIN') {
|
|
|
|
|
appPersonal(value2).then(Response => {
|
|
|
|
|
if (Response.code == 200) {
|
|
|
|
|
that.appPersonallist = Response.data
|
|
|
|
|
if (!that.appPersonallist.integral) {
|
|
|
|
|
that.appPersonallist.integral = 0
|
|
|
|
|
}
|
|
|
|
|
that.appPersonallist.homeLatitude = Number(that.appPersonallist
|
|
|
|
|
.homeLatitude)
|
|
|
|
|
that.appPersonallist.homeLongitude = Number(that.appPersonallist
|
|
|
|
|
.homeLongitude)
|
|
|
|
|
} else if (Response.code == 9999) {} else {
|
|
|
|
|
that.removes();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
that.removes();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
that.removes();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
updatainfo() {
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
2023-09-22 16:01:48 +08:00
|
|
|
url: `/pagesB/modify/modify`
|
2023-09-22 15:07:20 +08:00
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//护理站服务订单
|
|
|
|
|
gonursestation() {
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesB/Nursingstationserviceorder/Nursingstationserviceorder'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//去登陆
|
|
|
|
|
gologin() {
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
title: '您未登录,请先登录',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: '1000',
|
|
|
|
|
url: '/pages/login/login'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//优惠券
|
|
|
|
|
gocoupon() {
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesB/coupon/coupon'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-10-09 13:29:39 +08:00
|
|
|
//健康档案
|
|
|
|
|
goHealthrecords() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/Healthrecords/Healthrecords'
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-09-22 15:29:53 +08:00
|
|
|
//全部订单
|
|
|
|
|
goorder(index, item) {
|
2023-10-13 17:32:38 +08:00
|
|
|
// console.log(index, item)
|
|
|
|
|
// const value = uni.getStorageSync('openid');
|
|
|
|
|
// const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
// if (value && value2) {
|
2023-10-16 09:25:38 +08:00
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesB/CommodityOrder/CommodityOrder'
|
|
|
|
|
})
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
// url: `/pagesB/CommodityOrder/CommodityOrder?toindex=${index}&&orderStatus=${item}`
|
|
|
|
|
// })
|
2023-10-13 17:32:38 +08:00
|
|
|
// } else {
|
|
|
|
|
// this.gologin();
|
|
|
|
|
// }
|
2023-09-22 15:29:53 +08:00
|
|
|
},
|
|
|
|
|
//去登陆
|
|
|
|
|
gologin() {
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
title: '您未登录,请先登录',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: '1000',
|
|
|
|
|
url: '/pages/login/login'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//护理站服务订单
|
|
|
|
|
gonursestation() {
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesB/Nursingstationserviceorder/Nursingstationserviceorder'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//行为积分
|
|
|
|
|
goBehaviorpoints() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesB/Behaviorpoints/Behaviorpoints'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//管理家庭乘员
|
|
|
|
|
gomanagefamily() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesB/managefamily/managefamily'
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-09-22 15:07:20 +08:00
|
|
|
//积分页面
|
|
|
|
|
...mapActions(["integralopenPopup"]),
|
|
|
|
|
gointegral() {
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
2023-09-22 15:29:53 +08:00
|
|
|
this.integralopenPopup();
|
2023-09-22 15:07:20 +08:00
|
|
|
setTimeout(e => {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pagesB/healthybeans/healthybeans?integral=${this.appPersonallist.integral}`
|
|
|
|
|
})
|
|
|
|
|
}, 0)
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-09-22 15:29:53 +08:00
|
|
|
//修改信息
|
|
|
|
|
updatainfo() {
|
|
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pagesB/modify/modify`
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-09-20 13:52:08 +08:00
|
|
|
},
|
2023-09-27 16:38:01 +08:00
|
|
|
// 专家咨询订单
|
2023-10-09 13:29:39 +08:00
|
|
|
expertOrder() {
|
2023-09-27 16:38:01 +08:00
|
|
|
uni.navigateTo({
|
2023-10-09 13:29:39 +08:00
|
|
|
url: "/pagesB/ExpertlookOrder/ExpertlookOrder"
|
2023-09-27 16:38:01 +08:00
|
|
|
})
|
|
|
|
|
}
|
2023-09-20 10:42:44 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2023-09-20 11:33:09 +08:00
|
|
|
@import './myinformation.scss'
|
2023-10-16 09:25:38 +08:00
|
|
|
</style>
|