This commit is contained in:
曹辉 2023-02-27 14:39:18 +08:00
parent 4ca1365325
commit 6490547078
3 changed files with 36 additions and 26 deletions

View File

@ -5,10 +5,3 @@ export function appPersonal(patientId) {
method: 'GET'
})
}
export function orderCount(patientId) {
return request({
url: `/nurseApp/login/orderCount?patientId=${patientId}`,
method: 'GET'
})
}

View File

@ -34,12 +34,14 @@
<image src="../../static/jifen.png" mode=""></image>
<view class="text">
积分
<span style='padding:0 5rpx'> {{appPersonallist.integral}}</span>
</view>
</view>
<view class="item" @tap="gocoupon">
<image src="../../static/yhj.png" mode=""></image>
<view class="text">
优惠卷
<span style='padding:0 5rpx'> {{appPersonallist.patientCouponCount}}</span>
</view>
</view>
</view>
@ -57,30 +59,32 @@
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
<image src="/static/Tobepaid.png" mode=""></image>
<view class="title">待付款</view>
<view class="orderCount" v-if="list.waitPayCount>0&&list.waitPayCount<100">
{{list.waitPayCount}}
<view class="orderCount" v-if="appPersonallist.waitPayCount>0&&appPersonallist.waitPayCount<100">
{{appPersonallist.waitPayCount}}
</view>
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
v-if="list.waitPayCount>=100">
v-if="appPersonallist.waitPayCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
<image src="/static/received.png" mode=""></image>
<view class="title">待收货</view>
<view class="orderCount" v-if="list.waitReceivedGoodsCount>0&&list.waitReceivedGoodsCount<100">
{{list.waitReceivedGoodsCount}}
<view class="orderCount"
v-if="appPersonallist.waitReceivedGoodsCount>0&&appPersonallist.waitReceivedGoodsCount<100">
{{appPersonallist.waitReceivedGoodsCount}}
</view>
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
v-if="list.waitReceivedGoodsCount>=100">
v-if="appPersonallist.waitReceivedGoodsCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
<image src="/static/evaluated.png" mode=""></image>
<view class="title">待评价</view>
<view class="orderCount" v-if="list.receivedGoodsCount>0&&list.receivedGoodsCount<100">
{{list.receivedGoodsCount}}
<view class="orderCount"
v-if="appPersonallist.receivedGoodsCount>0&&appPersonallist.receivedGoodsCount<100">
{{appPersonallist.receivedGoodsCount}}
</view>
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
v-if="list.receivedGoodsCount>=100">
@ -112,8 +116,7 @@
</template>
<script>
import {
appPersonal,
orderCount
appPersonal
} from '@/api/Personal/Personal.js';
import {
existPatientInfo
@ -133,11 +136,7 @@
this.baseurl = baseurl
this.myInfo()
const value = uni.getStorageSync('patientId');
if (value) {
orderCount(value).then(res => {
that.list = res.data
})
} else {
if (value) {} else {
that.appPersonallist = null
that.$refs.uToast.show({
title: '请先登录',
@ -176,6 +175,7 @@
});
},
removes() {
this.appPersonallist = null
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
@ -195,6 +195,9 @@
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

View File

@ -123,6 +123,14 @@
},
data() {
return {
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
timeshow: false, //
sexlist: [{
name: '男',
@ -187,10 +195,16 @@
that.address = that.appPersonallist.areaName
}
that.patientDiseaseInfoList = that.appPersonallist.patientDiseaseInfoList
that.patientDiseaseInfoList.forEach(e => {
e.id = e.diseaseId
if (that.patientDiseaseInfoList.length > 0) {
that.patientDiseaseInfoList.forEach(e => {
e.id = e.diseaseId
})
}
} else if (Response.code == 9999) {} else {
uni.navigateBack({
delta: 1
})
} else if (Response.code == 9999) {} else {}
}
})
} else {}
},
@ -205,7 +219,7 @@
},
//
timechange(e) {
this.query.birthDate = e.year + '-' + e.month + '-' + e.day
this.appPersonallist.birthDate = e.year + '-' + e.month + '-' + e.day
},
//
getpickerParentValue(e) {