This commit is contained in:
曹辉 2022-11-23 16:41:09 +08:00
parent 60a2bbb405
commit 04af81f0c0
25 changed files with 313 additions and 89 deletions

View File

@ -0,0 +1,18 @@
import request from "../request.js"
export function insertGoodsEvaluate(data) {
return request({
url: `/nurseApp/orderEvaluate/insertGoodsEvaluate`,
method: 'POST',
data
})
}
//上传图片
export function uploadEvaluatePictureUrl(data) {
return request({
url: `/nurseApp/orderEvaluate/uploadEvaluatePictureUrl`,
method: 'POST',
data
})
}

7
api/startup/index.js Normal file
View File

@ -0,0 +1,7 @@
import request from "../request.js"
export function getExistPatientByPatientId(patientId) {
return request({
url: `/nurseApplet/login/getExistPatientByPatientId?patientId=${patientId}`,
method: 'GET'
})
}

View File

@ -9,7 +9,14 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},{
}, {
"path": "pages/goodsorderRate/goodsorderRate",
"style": {
"navigationBarTitleText": "发表评价",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/appointmenttime/appointmenttime",
"style": {
"navigationBarTitleText": "预约时间",

View File

@ -28,7 +28,7 @@
<view>订单编号{{Aftersalesorder.goOrderNo}}</view>
<view>申请金额{{Aftersalesorder.totalPrice}}</view>
<view>退款原因{{Aftersalesorder.dictLabel}}</view>
<view>申请时间{{Aftersalesorder.updateTime}}</view>
<view v-if="Aftersalesorder.appleTime">申请时间{{Aftersalesorder.appleTime}}</view>
</view>
</view>
<view class="evaluate">

View File

@ -12,7 +12,8 @@
<span v-if="item.orderStatus=='WAIT_REFUND'">退款中</span>
<span v-if="item.orderStatus=='CANCEL'">已取消</span>
<span v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">待收货</span>
<span v-if="item.orderStatus=='RECEIVED_GOODS'">已完成</span>
<span v-if="item.orderStatus=='RECEIVED_GOODS'">待评价</span>
<span v-if="item.orderStatus=='EVALUATED'">已完成</span>
<span v-if="item.orderStatus=='PAY'">待发货</span>
<span v-if="item.orderStatus=='REFUNDED'">退款成功</span>
<span v-if="item.orderStatus=='WAIT_RETURNED_GOODS'">待退货</span>
@ -44,6 +45,8 @@
去支付</view>
<view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
确认收货</view>
<view class="logistics harvest" @tap='rate(item)' v-if="item.orderStatus=='RECEIVED_GOODS'">
立即评价</view>
</view>
</view>
</view>
@ -99,6 +102,12 @@
}
},
methods: {
//
rate(item) {
uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}`
})
},
//
Receipts() {
confirmReceipt(this.orderNoitem.goOrderNo).then(res => {
@ -111,8 +120,11 @@
this.show = false
setTimeout(e => {
uni.navigateTo({
url: `/pages/orderDetails/orderDetails?goodsOrderId=${this.orderNoitem.goodsOrderId}`
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.orderNoitem)}`
})
// uni.navigateTo({
// url: `/pages/orderDetails/orderDetails?goodsOrderId=${this.orderNoitem.goodsOrderId}`
// })
}, 1000)
} else {}
})

View File

@ -8,7 +8,8 @@
{{item.orderStatus=='PAY'?'已付款':''}}
{{item.orderStatus=='WAIT_DISPATCH'?'待服务':''}}
{{item.orderStatus=='NOT_FINISH'?'待完成':''}}
{{item.orderStatus=='COMPLETE'?'服务完成':''}}
{{item.orderStatus=='COMPLETE'?'未评价':''}}
{{item.orderStatus=='EVALUATED'?'服务完成':''}}
{{item.orderStatus=='WAIT_REFUND'?'退款中':''}}
{{item.orderStatus=='REFUNDED'?'已退款':''}}
{{item.orderStatus=='CANCEL'?'已取消':''}}

View File

@ -26,25 +26,107 @@
<view class="item">
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
getExistPatientByPatientId
} from '@/api/startup/index.js'
export default {
data() {
return {};
return {
timer: null,
};
},
methods: {
goorder() {
uni.navigateTo({
url: '/pages/order/order'
})
const value = uni.getStorageSync('patientId');
var that = this
if (value) {
getExistPatientByPatientId(value).then(res => {
if (res.code == 200) {
if (res.msg == 'LOGIN') {
uni.navigateTo({
url: '/pages/order/order'
})
} else {
that.$refs.uToast.show({
title: '当前用户信息不存在,请重新登录',
type: 'error',
duration: '1500'
})
that.remove();
}
} else {
that.$refs.uToast.show({
title: '登录异常,请重新登录',
type: 'error',
duration: '1500'
})
that.remove();
}
})
} else {
that.remove();
that.$refs.uToast.show({
title: '请重新登录',
type: 'error',
duration: '1500'
})
}
},
remove() {
var that = this
uni.removeStorageSync('patientId');
uni.removeStorageSync('phone');
uni.removeStorageSync('password');
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.reLaunch({
url: '/pages/login/login'
})
}, 1500)
},
//
gouser() {
uni.navigateTo({
url: '/pages/user/user'
})
const value = uni.getStorageSync('patientId');
var that = this
if (value) {
getExistPatientByPatientId(value).then(res => {
if (res.code == 200) {
if (res.msg == 'LOGIN') {
uni.navigateTo({
url: '/pages/user/user'
})
} else {
that.$refs.uToast.show({
title: '当前用户信息不存在,请重新登录',
type: 'error',
duration: '1500'
})
that.remove();
}
} else {
that.$refs.uToast.show({
title: '登录异常,请重新登录',
type: 'error',
duration: '1500'
})
that.remove();
}
})
} else {
that.$refs.uToast.show({
title: '请重新登录',
type: 'error',
duration: '1500'
})
that.remove();
}
},
},
}

View File

@ -35,7 +35,7 @@
<view class="contacts">·联系人{{list.patientName}}</view>
<view class="contacts">·电话:{{list.patientPhone}}</view>
<view class="contacts">·地址{{list.serviceAddress}}</view>
<view class="contacts">·时间{{list.serviceDate}} {{list.serviceStartTime}}-{{list.serviceEndTime}}</view>
<view class="contacts">·时间{{list.serviceDate}} {{list.serviceStartTime}}-{{list.serviceEndTime}}</view>
</view>
<view class="Package">套餐信息
<span>{{list.nurseItemPrice}}</span>
@ -58,12 +58,31 @@
{{list.totalPrice}}
</view>
<view class="cancelorder" @tap="cancelorderment()"
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单</view>
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单
</view>
<!-- <view class="cancelorder " style="background: #4C7BC9;">评价</view> -->
<view class="cancelorder" @tap='buy' style="background-color: darkorange;" v-if="list.orderStatus=='WAIT_PAY'">
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
v-if="list.orderStatus=='WAIT_PAY'">
去支付
</view>
<view class="cancelorder" style="background: #4C7BC9;" @tap='rateshow= true'
v-if="list.orderStatus=='COMPLETE'">评价
</view>
</view>
<u-mask :show="rateshow" @tap="rateshow = false">
<view class="mask">
<view class="rateitem" @tap="taprate('SATISFIED')">
满意
</view>
<view class="rateitem" @tap="taprate('COMMONLY')">
一般
</view>
<view class="rateitem" @tap="taprate('DISSATISFIED')">
不满意
</view>
</view>
</u-mask>
<u-toast ref="uToast" />
</view>
</template>
@ -75,9 +94,12 @@
export default {
data() {
return {
rateshow: false, //
baseurl: '',
list: {},
orderNo: '',
patientId: '', //id
timer:null,
}
},
onLoad(options) {
@ -89,6 +111,30 @@
},
methods: {
//
taprate(item) {
var obj = {
"patientId": this.patientId,
"orderNo": this.orderNo,
"evaluateChannel": "PHONE_APP",
"evaluateSatisfaction": item,
}
addAppointmentEvaluate(obj).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '评价成功',
type: 'success',
duration: '1500'
})
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(e => {
this.getlist();
}, 1500)
}
})
},
getlist() {
getAppointmentDetailsInfo(this.orderNo).then(res => {
this.list = res.data

View File

@ -191,7 +191,7 @@
}
.radio-right {
height: 100rpx;
width: 100rpx;
.radio {
display: inline-block;
width: 35rpx;

View File

@ -28,7 +28,7 @@
margin-top: 20rpx;
width:92%;
font-size: 28rpx;
line-height: 32rpx;
line-height: 36rpx;
word-break:break-all;
}
.namephone{

View File

@ -6,7 +6,7 @@
width: 701rpx;
height: 811rpx;
background: #4C7BC9;
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin-top: 5%;
// left: 50%;

View File

@ -58,7 +58,7 @@
width: 701rpx;
height: 811rpx;
background: #4C7BC9;
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin-top: 5%;
// left: 50%;

View File

@ -63,6 +63,12 @@
if (this.diseaseother.diseaseName != '' || this.diseaseother.diseaseName) {
this.disease.push(this.diseaseother)
}
this.diseaselist.forEach(e => {
if (this.diseaseother.diseaseName == e.diseaseName) {
this.disease = this.disease.filter(el => el.diseaseName != e.diseaseName)
this.disease.push(e)
}
})
uni.$emit('disease', {
disease: JSON.stringify(this.disease)
})

View File

@ -45,32 +45,19 @@
pwdlogin() {
appLoginpwd(this.phone, this.password).then(res => {
if (res.code == 200) {
if (res.data.registerFlag == false) {
uni.setStorageSync("patientId", res.data.patientId)
uni.setStorageSync("phone", res.data.phone)
// uni.setStorage({
// key: 'patientId',
// data: res.data.patientId,
// success: function() {
// console.log('patientId');
// }
// });
this.$refs.uToast.show({
title: res.data.message,
type: 'success',
duration: '1500'
uni.setStorageSync("patientId", res.data.patientId)
uni.setStorageSync("phone", res.data.phone)
uni.setStorageSync("password", this.password)
this.$refs.uToast.show({
title: res.data.message,
type: 'success',
duration: '1500'
})
setTimeout(() => {
uni.switchTab({
url: '/pages/homepage/homepage',
})
setTimeout(() => {
uni.switchTab({
url: '/pages/homepage/homepage',
})
}, 1500);
} else {
this.$refs.uToast.show({
title: res.data.message,
type: 'error'
})
}
}, 1500);
} else {
this.$refs.uToast.show({
title: res.msg,

View File

@ -171,7 +171,6 @@
var that = this;
uni.chooseImage({
count: 1,
sizeType: ['original'],
sourceType: ['album'],
success(res) {
that.appPersonallist.headPictureUrl = res.tempFilePaths[0]

View File

@ -13,10 +13,10 @@
<image src="/static/received.png" mode=""></image>
<span>待收货</span>
</view>
<!-- <view class="OrderStatus">
<view class="OrderStatus" @tap="gorate('WAIT_RECEIVED_GOODS')">
<image src="/static/evaluated.png" mode=""></image>
<span>待评价</span>
</view> -->
</view>
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
<image src="/static/finished.png" mode=""></image>
<span>已完成</span>
@ -24,7 +24,7 @@
</view>
</view>
<view class="service" @tap="gonursestation">
<view class="serviceorder" >护理站服务订单</view>
<view class="serviceorder">护理站服务订单</view>
<view class="pictures">
<image src="../../static/jiantou.png" mode=""></image>
</view>
@ -40,6 +40,11 @@
}
},
methods: {
gorate(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
//
gonursestation() {
uni.navigateTo({

View File

@ -68,6 +68,7 @@
position: absolute;
top:50%;
transform: translateY(-50%);
width: 68%;
left:18%;
height:100rpx;
}

View File

@ -4,7 +4,7 @@
<view class="lefttext">
姓名
</view>
<input class="righttext" type="text" placeholder="请输入" maxlength="10" v-model="patientName" />
<input class="righttext" style="width: 80%;" type="text" placeholder="请输入" maxlength="10" v-model="patientName" />
</view>
<view class="item">
<view class="lefttext">
@ -24,7 +24,8 @@
<view class="lefttext">
手机号
</view>
<input class="righttext" style='left:23%' type="text" placeholder="请输入" maxlength="11" v-model="phone" />
<input class="righttext" style='left:23%;width: 77%;' type="text" placeholder="请输入" maxlength="11"
v-model="phone" />
</view>
<!-- <view class="item">
<view class="lefttext">

View File

@ -64,7 +64,7 @@
methods: {
getlocation() {
uni.getLocation({
type: 'gcj02',
type: 'wgs84',
success: res => {
this.latitude = res.latitude
this.longitude = res.longitude
@ -79,7 +79,6 @@
this.requestinfo();
},
fail: error => {
console.log("获取定位失败了", error)
uni.showModal({
title: '提示',
content: '获取定位失败,是否授权打开定位',
@ -174,20 +173,23 @@
const value = uni.getStorageSync('patientId');
if (value) {
getPatientInfo(value).then(res => {
if (res.data.homeLatitude && res.data.homeLongitude) {
that.latitude = res.data.homeLatitude
that.longitude = res.data.homeLongitude
that.markers.push({
id: 3,
latitude: res.data.homeLatitude,
longitude: res.data.homeLongitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
if (res.code == 200) {
if (res.data.homeLatitude && res.data.homeLongitude) {
that.latitude = res.data.homeLatitude
that.longitude = res.data.homeLongitude
that.markers.push({
id: 3,
latitude: res.data.homeLatitude,
longitude: res.data.homeLongitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
} else {
that.getlocation()
}
} else {
console.log(1)
that.getlocation()
}
})

View File

@ -8,22 +8,34 @@
</template>
<script>
import {
appLoginpwd
} from '../../api/login/index.js'
export default {
data() {
return {
};
return {};
},
onShow() {
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'
});
}, 2000);
const value = uni.getStorageSync('phone');
const value2 = uni.getStorageSync('password');
if (value && value2) {
appLoginpwd(value, value2).then(res => {
if (res.code == 200) {
setTimeout(() => {
uni.switchTab({
url: '/pages/homepage/homepage',
})
}, 2000);
} else {
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
});
}, 2000);
}
})
} else {
setTimeout(() => {
uni.reLaunch({
@ -61,9 +73,10 @@
</script>
<style lang="scss">
.app{
.app {
height: 100vh;
}
image {
width: 50%;
height: 200rpx;

View File

@ -104,11 +104,15 @@
appPersonal,
} from '@/api/user/user.js';
import baseurl from '@/api/baseurl.js'
import {
getExistPatientByPatientId
} from '@/api/startup/index.js'
export default {
data() {
return {
baseurl: '',
appPersonallist: [], //
timer: null,
}
},
onShow() {
@ -125,17 +129,7 @@
content: '确认要退出此账号吗',
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('patientId');
that.$refs.uToast.show({
title: '退出账号成功',
type: 'success',
duration: '1000'
})
setTimeout(e => {
uni.reLaunch({
url: '/pages/login/login'
})
}, 1000)
that.removeS();
} else if (res.cancel) {
that.$refs.uToast.show({
title: '退出账号失败',
@ -152,8 +146,37 @@
try {
const value = uni.getStorageSync('patientId');
if (value) {
appPersonal(value).then(res => {
that.appPersonallist = res.data
getExistPatientByPatientId(value).then(res => {
if (res.code == 200) {
if (res.msg == 'LOGIN') {
appPersonal(value).then(response => {
if (response.code == 200) {
that.appPersonallist = response.data
} else {
that.$refs.uToast.show({
title: '账号异常,请重新登录',
type: 'error',
duration: '1500'
})
that.removeS()
}
})
} else {
that.$refs.uToast.show({
title: '当前用户信息不存在,请重新登录',
type: 'error',
duration: '1500'
})
that.removeS()
}
} else {
that.removeS()
that.$refs.uToast.show({
title: '登录异常,请重新登录',
type: 'error',
duration: '1500'
})
}
})
}
} catch (e) {
@ -168,6 +191,20 @@
// }
// });
},
removeS() {
var that = this
uni.removeStorageSync('patientId');
uni.removeStorageSync('phone');
uni.removeStorageSync('password');
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.reLaunch({
url: '/pages/login/login'
})
}, 1500)
},
updatainfo() {
uni.navigateTo({
url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 121 KiB

BIN
static/gb2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
static/paishe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/video.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB