2022-11-25 10:58:46 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="app">
|
2023-02-27 11:28:17 +08:00
|
|
|
<view class="user" v-if="appPersonallist">
|
2023-02-24 10:57:41 +08:00
|
|
|
<image v-if="appPersonallist.headPictureUrl" class="img" :src="baseurl+appPersonallist.headPictureUrl"
|
|
|
|
|
mode=""></image>
|
|
|
|
|
<image class="img" v-else src="../../static/user.png" mode=""></image>
|
|
|
|
|
<image class="bjimg" src="../../static/userbeijing.png" mode=""></image>
|
|
|
|
|
<view class="phone" v-if="appPersonallist.patientName">
|
|
|
|
|
{{appPersonallist.patientName}}
|
2023-03-03 14:24:09 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="nickname" style="top:250rpx">
|
2023-03-03 14:53:28 +08:00
|
|
|
<span style='padding-right: 10rpx;' v-if="appPersonallist.age!=null&&appPersonallist.age>=0">
|
2023-03-03 14:24:09 +08:00
|
|
|
{{appPersonallist.age}}
|
2023-03-03 14:53:28 +08:00
|
|
|
</span>
|
|
|
|
|
<span style='padding-right: 30rpx;' v-if="appPersonallist.age!=null&&appPersonallist.age>=0">
|
|
|
|
|
岁
|
|
|
|
|
</span>
|
|
|
|
|
{{appPersonallist.sex=='MALE'?'男':''}}
|
|
|
|
|
{{appPersonallist.sex=='FEMALE'?'女':''}}
|
2023-03-03 13:40:17 +08:00
|
|
|
</span>
|
2023-02-24 10:57:41 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="nickname">
|
|
|
|
|
{{appPersonallist.phone}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="modify" @tap='updatainfo()'>
|
|
|
|
|
修改信息
|
|
|
|
|
<image src="../../static/xg.png" mode=""></image>
|
2022-11-25 10:58:46 +08:00
|
|
|
</view>
|
2023-02-23 14:06:35 +08:00
|
|
|
</view>
|
2023-02-27 11:28:17 +08:00
|
|
|
<view class="user" v-else>
|
|
|
|
|
<image class="img" src="../../static/user.png" mode=""></image>
|
|
|
|
|
<image class="bjimg" src="../../static/userbeijing.png" mode=""></image>
|
|
|
|
|
<view class="login" @tap='gologin'>
|
|
|
|
|
登录
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-02-24 10:57:41 +08:00
|
|
|
<view class="userinfo">
|
|
|
|
|
<view class="item">
|
|
|
|
|
<image src="../../static/jkda.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
健康档案
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-02-24 14:35:29 +08:00
|
|
|
<view class="item" @tap='gointegral'>
|
2023-02-24 10:57:41 +08:00
|
|
|
<image src="../../static/jifen.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
积分
|
2023-03-03 10:04:13 +08:00
|
|
|
<span style='padding:0 5rpx' v-if="appPersonallist.integral&&appPersonallist.integral>=0">
|
|
|
|
|
{{appPersonallist.integral}}</span>
|
|
|
|
|
<span style='padding:0 5rpx' v-else>
|
|
|
|
|
0</span>
|
2023-02-24 10:57:41 +08:00
|
|
|
</view>
|
2022-11-25 10:58:46 +08:00
|
|
|
</view>
|
2023-02-24 15:45:25 +08:00
|
|
|
<view class="item" @tap="gocoupon">
|
2023-02-24 10:57:41 +08:00
|
|
|
<image src="../../static/yhj.png" mode=""></image>
|
|
|
|
|
<view class="text">
|
2023-03-02 11:22:01 +08:00
|
|
|
优惠券
|
2023-03-03 10:04:13 +08:00
|
|
|
<span style='padding:0 5rpx'
|
|
|
|
|
v-if="appPersonallist.patientCouponCount&&appPersonallist.patientCouponCount>=0">
|
|
|
|
|
{{appPersonallist.patientCouponCount}}</span>
|
|
|
|
|
<span style='padding:0 5rpx' v-else>
|
|
|
|
|
0</span>张
|
2023-02-24 10:57:41 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="content">
|
|
|
|
|
<view class="CommodityOrder" @tap="goorder">
|
|
|
|
|
<view class="title">
|
|
|
|
|
商品订单
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text">
|
|
|
|
|
查看全部
|
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="center">
|
|
|
|
|
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
|
|
|
|
|
<image src="/static/Tobepaid.png" mode=""></image>
|
|
|
|
|
<view class="title">待付款</view>
|
2023-02-27 14:39:18 +08:00
|
|
|
<view class="orderCount" v-if="appPersonallist.waitPayCount>0&&appPersonallist.waitPayCount<100">
|
|
|
|
|
{{appPersonallist.waitPayCount}}
|
2023-02-24 10:57:41 +08:00
|
|
|
</view>
|
2023-02-24 14:35:29 +08:00
|
|
|
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
|
2023-02-27 14:39:18 +08:00
|
|
|
v-if="appPersonallist.waitPayCount>=100">
|
2023-02-24 10:57:41 +08:00
|
|
|
99+
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
|
|
|
|
|
<image src="/static/received.png" mode=""></image>
|
|
|
|
|
<view class="title">待收货</view>
|
2023-02-27 14:39:18 +08:00
|
|
|
<view class="orderCount"
|
|
|
|
|
v-if="appPersonallist.waitReceivedGoodsCount>0&&appPersonallist.waitReceivedGoodsCount<100">
|
|
|
|
|
{{appPersonallist.waitReceivedGoodsCount}}
|
2023-02-24 10:57:41 +08:00
|
|
|
</view>
|
2023-02-24 14:35:29 +08:00
|
|
|
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
|
2023-02-27 14:39:18 +08:00
|
|
|
v-if="appPersonallist.waitReceivedGoodsCount>=100">
|
2023-02-24 10:57:41 +08:00
|
|
|
99+
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
|
|
|
|
|
<image src="/static/evaluated.png" mode=""></image>
|
|
|
|
|
<view class="title">待评价</view>
|
2023-02-27 14:39:18 +08:00
|
|
|
<view class="orderCount"
|
|
|
|
|
v-if="appPersonallist.receivedGoodsCount>0&&appPersonallist.receivedGoodsCount<100">
|
|
|
|
|
{{appPersonallist.receivedGoodsCount}}
|
2023-02-24 10:57:41 +08:00
|
|
|
</view>
|
2023-02-24 14:35:29 +08:00
|
|
|
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
|
|
|
|
|
v-if="list.receivedGoodsCount>=100">
|
2023-02-24 10:57:41 +08:00
|
|
|
99+
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')">
|
|
|
|
|
<image src="/static/finished.png" mode=""></image>
|
|
|
|
|
<view class="title">已完成</view>
|
|
|
|
|
<!-- <view class="orderCount" v-if="list.evaluatedCount>0&&list.evaluatedCount<100">
|
|
|
|
|
{{list.evaluatedCount}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderCount" v-if="list.evaluatedCount>=100">
|
|
|
|
|
99+
|
|
|
|
|
</view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="service" @tap="gonursestation">
|
|
|
|
|
<view class="serviceorder">护理站服务订单</view>
|
|
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
|
|
|
|
</view>
|
2023-02-27 11:28:17 +08:00
|
|
|
<view class="service" style="top:1100rpx" @tap='remove'>
|
|
|
|
|
<view class="serviceorder">退出账号</view>
|
2023-02-24 10:57:41 +08:00
|
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
2022-11-25 10:58:46 +08:00
|
|
|
</view>
|
2023-02-24 10:57:41 +08:00
|
|
|
<u-toast ref="uToast" />
|
2022-11-25 10:58:46 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2023-02-24 10:57:41 +08:00
|
|
|
import {
|
2023-03-02 11:22:01 +08:00
|
|
|
appPersonal,
|
2023-02-24 14:35:29 +08:00
|
|
|
} from '@/api/Personal/Personal.js';
|
2022-11-25 10:58:46 +08:00
|
|
|
import {
|
|
|
|
|
existPatientInfo
|
|
|
|
|
} from '@/api/startup/index.js'
|
2023-02-24 10:57:41 +08:00
|
|
|
import baseurl from '@/api/baseurl.js'
|
2022-11-25 10:58:46 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
2023-02-24 10:57:41 +08:00
|
|
|
return {
|
|
|
|
|
baseurl: '',
|
2023-02-27 11:28:17 +08:00
|
|
|
appPersonallist: null, //获取个人信息
|
2023-02-24 10:57:41 +08:00
|
|
|
timer: null,
|
|
|
|
|
list: {},
|
|
|
|
|
}
|
2022-11-25 10:58:46 +08:00
|
|
|
},
|
2023-02-24 10:57:41 +08:00
|
|
|
onShow() {
|
|
|
|
|
let that = this
|
|
|
|
|
this.baseurl = baseurl
|
|
|
|
|
this.myInfo()
|
|
|
|
|
const value = uni.getStorageSync('patientId');
|
2023-02-27 14:39:18 +08:00
|
|
|
if (value) {} else {
|
2023-02-27 11:28:17 +08:00
|
|
|
that.appPersonallist = null
|
2023-02-24 10:57:41 +08:00
|
|
|
that.$refs.uToast.show({
|
2023-02-27 11:28:17 +08:00
|
|
|
title: '请先登录',
|
2023-02-24 10:57:41 +08:00
|
|
|
type: 'error',
|
|
|
|
|
duration: '1000',
|
2022-11-25 10:58:46 +08:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-02-24 10:57:41 +08:00
|
|
|
onLoad(options) {},
|
2022-11-25 10:58:46 +08:00
|
|
|
methods: {
|
2023-02-24 10:57:41 +08:00
|
|
|
remove() {
|
|
|
|
|
let that = this
|
2023-03-02 11:22:01 +08:00
|
|
|
const value = uni.getStorageSync('patientId');
|
|
|
|
|
if (value) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '确认要退出此账号吗',
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
uni.removeStorageSync('patientId');
|
|
|
|
|
uni.removeStorageSync('openid');
|
|
|
|
|
uni.removeStorageSync('phone');
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
title: '退出账号成功',
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: '1000'
|
2023-02-24 10:57:41 +08:00
|
|
|
})
|
2023-03-02 11:22:01 +08:00
|
|
|
if (that.timer) {
|
|
|
|
|
clearTimeout(that.timer)
|
|
|
|
|
}
|
|
|
|
|
that.timer = setTimeout(e => {
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url: '/pages/homepage/homepage'
|
|
|
|
|
})
|
|
|
|
|
}, 1000)
|
|
|
|
|
}
|
2023-02-24 10:57:41 +08:00
|
|
|
}
|
2023-03-02 11:22:01 +08:00
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
that.$refs.uToast.show({
|
|
|
|
|
title: '您未登录',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: '1000'
|
|
|
|
|
})
|
|
|
|
|
}
|
2022-11-25 10:58:46 +08:00
|
|
|
},
|
2023-02-24 10:57:41 +08:00
|
|
|
removes() {
|
2023-02-27 14:39:18 +08:00
|
|
|
this.appPersonallist = null
|
2022-11-25 10:58:46 +08:00
|
|
|
uni.removeStorageSync('patientId');
|
|
|
|
|
uni.removeStorageSync('openid');
|
|
|
|
|
uni.removeStorageSync('phone');
|
2023-02-24 10:57:41 +08:00
|
|
|
uni.removeStorageSync('Refresh');
|
|
|
|
|
uni.navigateBack({
|
|
|
|
|
delta: 1
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//获取个人信息
|
|
|
|
|
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
|
2023-02-27 14:39:18 +08:00
|
|
|
if (!that.appPersonallist.integral) {
|
|
|
|
|
that.appPersonallist.integral = 0
|
|
|
|
|
}
|
2023-02-24 10:57:41 +08:00
|
|
|
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() {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/modify/modify`
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-02-24 10:57:41 +08:00
|
|
|
},
|
|
|
|
|
//护理站服务订单
|
|
|
|
|
gonursestation() {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-02-24 10:57:41 +08:00
|
|
|
},
|
|
|
|
|
//待收货
|
|
|
|
|
goreceive(item) {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-02-24 10:57:41 +08:00
|
|
|
},
|
|
|
|
|
//全部订单
|
|
|
|
|
goorder() {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/CommodityOrder/CommodityOrder'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//去登陆
|
|
|
|
|
gologin() {
|
2023-02-24 10:57:41 +08:00
|
|
|
uni.navigateTo({
|
2023-02-27 11:28:17 +08:00
|
|
|
url: '/pages/login/login'
|
2023-02-24 10:57:41 +08:00
|
|
|
})
|
|
|
|
|
},
|
2023-02-24 15:45:25 +08:00
|
|
|
//优惠卷
|
|
|
|
|
gocoupon() {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/coupon/coupon'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-02-24 15:45:25 +08:00
|
|
|
},
|
2023-02-24 14:35:29 +08:00
|
|
|
//积分页面
|
|
|
|
|
gointegral() {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
2023-03-02 11:22:01 +08:00
|
|
|
url: `/pages/integral/integral?integral=${this.appPersonallist.integral}`
|
2023-02-27 11:28:17 +08:00
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-02-24 14:35:29 +08:00
|
|
|
},
|
2023-02-24 10:57:41 +08:00
|
|
|
//已完成
|
|
|
|
|
goEVALUATED(item) {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-02-24 10:57:41 +08:00
|
|
|
},
|
|
|
|
|
//待评价
|
|
|
|
|
gocompleted(item) {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2023-02-24 10:57:41 +08:00
|
|
|
},
|
|
|
|
|
//待付款
|
|
|
|
|
gopaid(item) {
|
2023-02-27 11:28:17 +08:00
|
|
|
const value = uni.getStorageSync('openid');
|
|
|
|
|
const value2 = uni.getStorageSync('patientId');
|
|
|
|
|
if (value && value2) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.gologin();
|
|
|
|
|
}
|
2022-11-25 10:58:46 +08:00
|
|
|
},
|
2022-12-28 12:08:50 +08:00
|
|
|
},
|
2022-11-25 10:58:46 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss">
|
2023-02-24 10:57:41 +08:00
|
|
|
@import "./Personal.scss";
|
2022-11-25 10:58:46 +08:00
|
|
|
</style>
|