This commit is contained in:
曹辉 2022-12-27 09:22:42 +08:00
parent bf87728394
commit 941675105b
34 changed files with 1128 additions and 347 deletions

9
api/lookrate/index.js Normal file
View File

@ -0,0 +1,9 @@
import request from "../request.js"
// 修改信息
export function lookrate(orderNo) {
return request({
url: `/nurseApp/orderEvaluate/selectOrderEvaluate?orderNo=${orderNo}`,
method: 'GET'
})
}

View File

@ -4,6 +4,8 @@ import App from './App'
import Vue from 'vue' import Vue from 'vue'
import uView from "uview-ui"; import uView from "uview-ui";
Vue.use(uView); Vue.use(uView);
import share from './share.js'
Vue.mixin(share)
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'

View File

@ -9,6 +9,15 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/lookrate/lookrate",
"style": {
"navigationBarTitleText": "查看评价",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, { }, {
"path": "pages/ServiceDetails/ServiceDetails", "path": "pages/ServiceDetails/ServiceDetails",
"style": { "style": {
@ -68,12 +77,20 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/ratesuccess/ratesuccess",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, { }, {
"path": "pages/shopping/shopping", // "path": "pages/shopping/shopping", //
"style": { "style": {
"navigationBarTitleText": "医路优品", "navigationBarTitleText": "医路优品",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 20, // px "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true "enablePullDownRefresh": true //true
} }
}, { }, {
@ -81,7 +98,7 @@
"style": { "style": {
"navigationBarTitleText": "商品订单", "navigationBarTitleText": "商品订单",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 20, // px "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true "enablePullDownRefresh": true //true
} }
}, },
@ -141,7 +158,7 @@
"style": { "style": {
"navigationBarTitleText": "护理站服务订单", "navigationBarTitleText": "护理站服务订单",
"navigationBarBackgroundColor": "#ffffff", // "navigationBarBackgroundColor": "#ffffff", //
"onReachBottomDistance": 20, // px "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true "enablePullDownRefresh": true //true
} }
@ -236,7 +253,7 @@
"navigationBarTitleText": "医路优品", "navigationBarTitleText": "医路优品",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 20, // px "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true "enablePullDownRefresh": true //true
} }
}, },
@ -264,7 +281,7 @@
"navigationBarTitleText": "附近护理站", "navigationBarTitleText": "附近护理站",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff", // "navigationBarBackgroundColor": "#ffffff", //
"onReachBottomDistance": 20, // px "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true "enablePullDownRefresh": true //true
} }
}, },

View File

@ -54,7 +54,7 @@
order: {}, // order: {}, //
reasonlist: [], //退list reasonlist: [], //退list
dictname: '', //退 dictname: '', //退
timer:null, timer: null,
} }
}, },
methods: { methods: {
@ -69,6 +69,7 @@
type: 'error' type: 'error'
}) })
} else { } else {
uni.setStorageSync("Refresh", 'Refresh')
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '退款申请提交成功', title: '退款申请提交成功',
type: 'success', type: 'success',
@ -79,7 +80,7 @@
} }
this.timer = setTimeout(e => { this.timer = setTimeout(e => {
uni.navigateBack({ uni.navigateBack({
delta: 3 delta: 4
}) })
}, 1500) }, 1500)
} }

View File

@ -2,9 +2,12 @@
<view class="app"> <view class="app">
<u-swiper :list="info" height="750" style='background-size: 100%;'></u-swiper> <u-swiper :list="info" height="750" style='background-size: 100%;'></u-swiper>
<view class="Commodity common"> <view class="Commodity common">
<view class="name"> <view class="name" v-if="goodsDetailslist.goodsName">
{{goodsDetailslist.goodsName}} {{goodsDetailslist.goodsName}}
</view> </view>
<view class="name" v-else>
暂无
</view>
<view class="price"> <view class="price">
{{goodsPrice}} {{goodsPrice}}
</view> </view>
@ -222,6 +225,8 @@
that.buyshow = false that.buyshow = false
that.usershow = true that.usershow = true
} }
} else if(res.code==9999){
} else { } else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: res.msg, title: res.msg,
@ -297,9 +302,22 @@
}, },
// //
goodsDetailsinfo(goodsInfoId) { goodsDetailsinfo(goodsInfoId) {
let that = this
goodsDetails(goodsInfoId).then(res => { goodsDetails(goodsInfoId).then(res => {
res.data[0].goodsRemark = res.data[0].goodsRemark.replace(/\<img/gi, if (res.code == 200) {
"<br/> <img class='richPic'") try {
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
that.goodsList()
} else {}
} catch (e) {}
}
uni.removeStorageSync('Refresh');
if (res.data[0].goodsRemark) {
res.data[0].goodsRemark = res.data[0].goodsRemark.replace(/\<img/gi,
"<br/> <img class='richPic'")
}
res.data[0].goodsPictureUrl = this.baseurl + res.data[0].goodsPictureUrl res.data[0].goodsPictureUrl = this.baseurl + res.data[0].goodsPictureUrl
this.image = res.data[0].goodsPictureUrl this.image = res.data[0].goodsPictureUrl
var obj = { var obj = {
@ -351,19 +369,10 @@
this.goodsPrice = options.goodsPrice // this.goodsPrice = options.goodsPrice //
this.goodsInfoId = options.goodsInfoId this.goodsInfoId = options.goodsInfoId
}, },
onShow() { onShow() {
this.baseurl = baseurl this.baseurl = baseurl
this.usershow = false this.usershow = false
this.goodsDetailsinfo(this.goodsInfoId) this.goodsDetailsinfo(this.goodsInfoId)
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
that.goodsList()
} else {}
} catch (e) {}
}, },
} }
</script> </script>

View File

@ -40,6 +40,9 @@
</view> </view>
</view> </view>
<view class="anniu"> <view class="anniu">
<view class="logistics" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;"
@tap='goorderdetails(item)'>退款中
</view>
<view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流 <view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流
</view> </view>
<view class="logistics harvest" @tap='buy(item)' <view class="logistics harvest" @tap='buy(item)'
@ -47,8 +50,11 @@
去支付</view> 去支付</view>
<view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'"> <view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
确认收货</view> 确认收货</view>
<view class="logistics harvest" @tap='rate(item)' v-if="item.orderStatus=='RECEIVED_GOODS'"> <view class="logistics harvest" style="background-color: #60c5f1;" @tap='rate(item)'
立即评价</view> v-if="item.orderStatus=='RECEIVED_GOODS'">
去评价</view>
<view class="logistics harvest" v-if="item.orderStatus=='EVALUATED'" @tap='golookrate(item)'>
查看评价</view>
</view> </view>
</view> </view>
</view> </view>
@ -102,13 +108,19 @@
img: '', // img: '', //
orderStatus: '', // orderStatus: '', //
goodsOrderId: '', // goodsOrderId: '', //
pageSize: 10, // pageSize: 15, //
pageNum: 1, // pageNum: 1, //
goodsName: '', goodsName: '',
getCodeText: null, getCodeText: null,
} }
}, },
methods: { methods: {
//
golookrate(item) {
uni.navigateTo({
url: `/pages/lookrate/lookrate?item=${JSON.stringify(item)}`
})
},
// //
Receipts() { Receipts() {
confirmReceipt(this.orderNoitem.goOrderNo).then(res => { confirmReceipt(this.orderNoitem.goOrderNo).then(res => {
@ -119,15 +131,23 @@
duration: '1000' duration: '1000'
}) })
this.show = false this.show = false
uni.setStorageSync("Refresh", 'Refresh')
setTimeout(e => { setTimeout(e => {
uni.navigateTo({ uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.orderNoitem)}` url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.orderNoitem)}&delta=${3}`
}) })
// uni.navigateTo({ // uni.navigateTo({
// url: `/pages/orderDetails/orderDetails?goodsOrderId=${this.orderNoitem.goodsOrderId}` // url: `/pages/orderDetails/orderDetails?goodsOrderId=${this.orderNoitem.goodsOrderId}`
// }) // })
}, 1000) }, 1000)
} else {} } else {
this.$refs.uToast.show({
title: '收货失败',
type: 'error',
duration: '1000'
})
this.show = false
}
}) })
}, },
// //
@ -151,12 +171,13 @@
signType: response.data.signType, signType: response.data.signType,
paySign: response.data.paySign, paySign: response.data.paySign,
success: function(res) { success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '支付成功', title: '支付成功',
type: 'success', type: 'success',
toast: 1500, toast: 1500,
url: `/pages/paysuccess/paysuccess`,
}) })
that.goodsOrderinfo();
}, },
fail: function(err) { fail: function(err) {
that.$refs.uToast.show({ that.$refs.uToast.show({
@ -184,7 +205,7 @@
// //
rate(item) { rate(item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}` url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}&delta=${3}`
}) })
}, },
// //
@ -198,14 +219,17 @@
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
.goodsName).then( .goodsName).then(
res => { res => {
this.orderlist = res.rows if (res.code == 200) {
this.orderlist.forEach(e => { this.orderlist = res.rows
e.timestamp = null this.orderlist.forEach(e => {
var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24) e.timestamp = null
var times = new Date().getTime() / 1000 var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24)
e.timestamp = time - times var times = new Date().getTime() / 1000
}) e.timestamp = time - times
this.total = res.total })
uni.removeStorageSync('Refresh');
this.total = res.total
}
}) })
}, },
// //
@ -217,6 +241,7 @@
}, },
watch: { // watch: { //
goodsName() { goodsName() {
this.pageNum = 1
this.goodsOrderinfo() this.goodsOrderinfo()
}, },
}, },
@ -225,35 +250,45 @@
title: this.title, title: this.title,
}); });
}, },
onShow() {}, onShow() {
this.pageNum = 1;
this.baseurl = baseurl;
let that = this
try {
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsOrderinfo();
}
} catch (e) {}
},
onLoad(options) { // onLoad(options) { //
let that = this let that = this
try { try {
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
if (value) { const value2 = uni.getStorageSync('openid');
if (value && value2) {
that.patientId = value that.patientId = value
that.goodsOrderinfo(); that.openid = value2
if (options.orderStatus) {
that.orderStatus = options.orderStatus
if (options.orderStatus == 'WAIT_PAY') {
that.title = '待付款'
that.goodsOrderinfo();
} else if (options.orderStatus == 'WAIT_RECEIVED_GOODS') {
that.title = '待收货'
that.goodsOrderinfo();
} else if (options.orderStatus == 'RECEIVED_GOODS') {
that.title = '待评价'
that.goodsOrderinfo();
} else if (options.orderStatus == 'EVALUATED') {
that.title = '已完成'
that.goodsOrderinfo();
}
} else {
that.goodsOrderinfo();
}
} }
} catch (e) {} } catch (e) {}
try {
const value = uni.getStorageSync('openid');
if (value) {
that.openid = value
}
} catch (e) {}
this.baseurl = baseurl;
if (options.orderStatus) {
this.orderStatus = options.orderStatus
if (options.orderStatus == 'WAIT_PAY') {
this.title = '待付款'
} else if (options.orderStatus == 'WAIT_RECEIVED_GOODS') {
this.title = '待收货'
} else if (options.orderStatus == 'RECEIVED_GOODS') {
this.title = '待评价'
} else if (options.orderStatus == 'EVALUATED') {
this.title = '已完成'
}
}
}, },
onReachBottom() { // onReachBottom() { //
if (this.orderlist.length >= this.total) {} else { if (this.orderlist.length >= this.total) {} else {

View File

@ -1,5 +1,59 @@
.app { .app {
padding: 2%; padding: 2%;
.masks{
image{
position: absolute;
bottom:380rpx;
left:50%;
transform: translateX(-50%);
z-index: 999;
width: 250rpx;
border-radius: 25rpx;
height: 250rpx;
}
.ratetitle{
font-size: 34rpx;
position: absolute;
bottom:320rpx;
left:50%;
transform: translateX(-50%);
z-index: 999;
}
.mask{
position: absolute;
bottom:0;
width: 750rpx;
height: 703rpx;
background: #FFFFFF;
border-radius: 30rpx 30rpx 0px 0px;
display: flex;
justify-content: space-around;
.rateitem{
margin-top:200rpx;
width: 217rpx;
height: 222rpx;
line-height: 222rpx;
text-align: center;
color: #ffffff;
background: #BFBFBF;
font-size: 40rpx;
border-radius: 25rpx;
}
.lookrateitem{
font-size: 32rpx;
margin-top:440rpx;
width: 200rpx;
height: 200rpx;
line-height: 200rpx;
text-align: center;
color: #ffffff;
background: #BFBFBF;
border-radius: 25rpx;
}
}
}
.noorder{ .noorder{
margin-top: 20%; margin-top: 20%;
image{ image{

View File

@ -33,11 +33,9 @@
去支付 去支付
</view> </view>
<view class="submit" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;">退款中</view> <view class="submit" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;">退款中</view>
<!-- <view class="submit" v-if="item.orderStatus=='COMPLETE'" @tap='gorate(item)'>去评价</view> --> <view class="submit" v-if="item.orderStatus=='COMPLETE'" @tap='gorate(item)'
<!-- <view class="submit" style="background-color: #60c5f1;">立即评价</view>
v-if="item.orderStatus=='PAY'||item.orderStatus=='WAIT_DISPATCH'||item.orderStatus=='NOT_FINISH'"> <view class="submit" v-if="item.orderStatus=='EVALUATED'" @tap='lookrate(item)'>查看评价</view>
确认完成
</view> -->
</view> </view>
</view> </view>
<view class="noorder" v-else> <view class="noorder" v-else>
@ -47,55 +45,142 @@
</view> </view>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-mask :show="rateshow" @tap="rateshow = false" class='masks'>
<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-mask :show="lookrateshow" @tap="lookrateshow = false" class='masks'>
<image :src="baseurl+rateimgtitle.img" mode=""></image>
<view class="ratetitle">
{{rateimgtitle.title}}
</view>
<view class="mask">
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='SATISFIED'?'background: #4C7BC9':''">
满意
</view>
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='COMMONLY'?'background: #4C7BC9':''">
一般
</view>
<view class="lookrateitem"
:style="ratelist.evaluateSatisfaction=='DISSATISFIED'?'background: #4C7BC9':''">
不满意
</view>
</view>
</u-mask>
</view> </view>
</template> </template>
<script> <script>
import baseurl from '@/api/baseurl.js' import baseurl from '@/api/baseurl.js'
import {
lookrate
} from '@/api/lookrate/index.js'
import { import {
appletAppointmentOrderPay appletAppointmentOrderPay
} from '@/api/appointmenttime/appointmenttime.js' } from '@/api/appointmenttime/appointmenttime.js'
import {
addAppointmentEvaluate
} from '@/api/ServiceDetails/ServiceDetails.js'
import { import {
appServiceOrder appServiceOrder
} from '@/api/Nursingstationserviceorder/Nursingstationserviceorder.js' } from '@/api/Nursingstationserviceorder/Nursingstationserviceorder.js'
export default { export default {
data() { data() {
return { return {
rateimgtitle: {
img: null,
title: null,
},
ratelist: null, //list
rateshow: false, //
lookrateshow: false, //
baseurl: '', baseurl: '',
openid: null, openid: null,
patientId: null, patientId: null,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
pageSize: 10, pageSize: 15,
list: [], list: [],
orderNo: null,
timer: null,
} }
}, },
onShow() {}, onShow() {
onLoad() {
this.baseurl = baseurl
let that = this let that = this
this.baseurl = baseurl
this.pageNum = 1;
try { try {
const value = uni.getStorageSync('patientId'); const value3 = uni.getStorageSync('Refresh');
if (value) { if (value3) {
that.patientId = value that.getinfo();
that.getinfo()
} }
} catch (e) {} } catch (e) {}
},
onLoad() {
let that = this
this.pageNum = 1
try { try {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('patientId');
if (value) { const value2 = uni.getStorageSync('openid');
that.openid = value if (value && value2) {
that.patientId = value
that.openid = value2
that.getinfo()
} }
} catch (e) {} } catch (e) {}
}, },
methods: { methods: {
//
lookrate(item) {
this.rateimgtitle.img = item.itemPictureUrl
this.rateimgtitle.title = item.nurseItemName
this.lookrateshow = true
lookrate(item.orderNo).then(res => {
this.ratelist = res.data
})
},
// //
// gorate(){ gorate(item) {
// uni.navigateTo({ this.orderNo = item.orderNo
this.rateshow = true
// }) },
// }, //
taprate(item) {
var obj = {
"patientId": this.patientId,
"openid": this.openid,
"orderNo": this.orderNo,
"evaluateChannel": "WE_CHAT_APPLET",
"evaluateSatisfaction": item,
}
addAppointmentEvaluate(obj).then(res => {
if (res.code == 200) {
uni.setStorageSync("Refresh", 'Refresh')
this.orderNo = null
this.$refs.uToast.show({
title: '评价成功',
type: 'success',
duration: '1500'
})
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(e => {
uni.navigateTo({
url: `/pages/ratesuccess/ratesuccess`
})
}, 1500)
}
})
},
// //
buy(item) { buy(item) {
let obj = { let obj = {
@ -117,12 +202,13 @@
signType: response.data.signType, signType: response.data.signType,
paySign: response.data.paySign, paySign: response.data.paySign,
success: function(res) { success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '支付成功', title: '支付成功',
type: 'success', type: 'success',
toast: 1500, toast: 1500,
url: `/pages/paysuccess/paysuccess`,
}) })
that.getinfo()
}, },
fail: function(err) { fail: function(err) {
that.$refs.uToast.show({ that.$refs.uToast.show({
@ -143,14 +229,17 @@
}, },
getinfo() { getinfo() {
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => { appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
this.list = res.rows; if (res.code == 200) {
this.list.forEach(e => { uni.removeStorageSync('Refresh');
e.timestamp = null this.list = res.rows;
var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24) this.list.forEach(e => {
var times = new Date().getTime() / 1000 e.timestamp = null
e.timestamp = time - times var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24)
}) var times = new Date().getTime() / 1000
this.total = res.total e.timestamp = time - times
})
this.total = res.total
}
}) })
}, },
gofinished(item) { gofinished(item) {
@ -182,7 +271,6 @@
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
@import './Nursingstationserviceorder.scss'; @import './Nursingstationserviceorder.scss';
</style> </style>

View File

@ -44,7 +44,8 @@
var that = this var that = this
try { try {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
if (value) { const value3 = uni.getStorageSync('token');
if (value && value3) {
const value2 = uni.getStorageSync('patientId'); const value2 = uni.getStorageSync('patientId');
if (value2) {} else { if (value2) {} else {
uni.navigateTo({ uni.navigateTo({
@ -93,19 +94,16 @@
gouser() { gouser() {
try { try {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
const value3 = uni.getStorageSync('token');
var that = this var that = this
if (value) { if (value && value3) {
existPatientInfo(value).then(res => { existPatientInfo(value).then(res => {
if (res.code == 200) { if (res.code == 200 && res.msg == 'LOGIN') {
if (res.msg == 'LOGIN') { const value2 = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('patientId'); if (value2) {
if (value2) { uni.navigateTo({
uni.navigateTo({ url: '/pages/user/user'
url: '/pages/user/user' })
})
} else {
that.remove()
}
} else { } else {
that.remove() that.remove()
} }
@ -124,6 +122,7 @@
uni.removeStorageSync('patientId'); uni.removeStorageSync('patientId');
uni.removeStorageSync('openid'); uni.removeStorageSync('openid');
uni.removeStorageSync('phone'); uni.removeStorageSync('phone');
uni.removeStorageSync('token');
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/login' url: '/pages/login/login'
}) })

View File

@ -47,6 +47,15 @@
}) })
}, },
}, },
onShow() {
var that = this
try {
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsListinfo();
}
} catch (e) {}
},
onLoad(options) { // onLoad(options) { //
this.title = options.title // this.title = options.title //
this.goodsCategoryId = options.goodsCategoryId //id this.goodsCategoryId = options.goodsCategoryId //id
@ -56,11 +65,15 @@
methods: { methods: {
// //
goodsListinfo() { goodsListinfo() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => { goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
res.rows.forEach(e => { if (res.code == 200) {
this.goodsList.push(e) res.rows.forEach(e => {
}) this.goodsList.push(e)
this.total = res.total })
this.total = res.total
}
uni.removeStorageSync('Refresh');
}) })
}, },
// //
@ -78,7 +91,13 @@
onReachBottom() { // onReachBottom() { //
if (this.goodsList.length >= this.total) {} else { if (this.goodsList.length >= this.total) {} else {
this.pageNum++; this.pageNum++;
this.goodsListinfo(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName) goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
})
}
})
} }
}, },
onPullDownRefresh() { // onPullDownRefresh() { //

View File

@ -3,6 +3,7 @@
padding: 2% 2% 150rpx 2%; padding: 2% 2% 150rpx 2%;
padding-top: 10rpx; padding-top: 10rpx;
font-size: 34rpx; font-size: 34rpx;
position: relative;
.mask { .mask {
.information { .information {
width: 70%; width: 70%;

View File

@ -2,7 +2,9 @@
<view class="app"> <view class="app">
<view class="item"> <view class="item">
<image :src="list.itemPictureUrl"></image> <image :src="list.itemPictureUrl"></image>
<view class="huanyao">{{list.nurseItemName}} <view class="huanyao" v-if='list.nurseItemName'>{{list.nurseItemName}}
</view>
<view class="huanyao" v-else>暂无
</view> </view>
<!-- <view class="pingfen"> <!-- <view class="pingfen">
<u-rate :count="5" value="2"></u-rate> <u-rate :count="5" value="2"></u-rate>
@ -57,14 +59,20 @@
usershow: false, // usershow: false, //
list: [], //list list: [], //list
timer: null, timer: null,
stationId: null,
stationItemId: null,
stationItemPriceId: null,
} }
}, },
onLoad(options) { onLoad(options) {
// this.stationId = options.stationId
this.getlist(options.stationId, options.stationItemId, options.stationItemPriceId) this.stationItemId = options.stationItemId
this.stationItemPriceId = options.stationItemPriceId
}, },
onShow() { onShow() {
this.usershow = false this.usershow = false
//
this.getlist(this.stationId, this.stationItemId, this.stationItemPriceId)
}, },
methods: { methods: {
// //
@ -72,48 +80,35 @@
let that = this let that = this
try { try {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
if (value) { const value2 = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('patientId'); if (value && value2) {
if (value2) { AppIdentification(value2).then(res => {
AppIdentification(value2).then(res => { if (res.code == 200) {
if (res.code == 200) { if (res.data.loginFlag) {
if (res.data.loginFlag) { that.usershow = false
that.usershow = false uni.navigateTo({
uni.navigateTo({ url: `/pages/appointmenttime/appointmenttime?stationId=${this.list.stationId}&stationItemId=${this.list.stationItemId}&stationItemPriceId=${this.list.stationItemPriceId}`,
url: `/pages/appointmenttime/appointmenttime?stationId=${this.list.stationId}&stationItemId=${this.list.stationItemId}&stationItemPriceId=${this.list.stationItemPriceId}`,
})
} else {
that.usershow = true
}
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
}) })
if (that.timer) { } else {
clearTimeout(that.timer) that.usershow = true
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
} }
}) } else if (res.code == 9999) {
} else {
that.$refs.uToast.show({ } else {
title: '未登录,请先登录', that.$refs.uToast.show({
type: 'error' title: res.msg,
}) type: 'error'
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
}) })
}, 1500) if (that.timer) {
} clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
}
})
} else { } else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '未登录,请先登录', title: '未登录,请先登录',
@ -144,8 +139,10 @@
// //
getlist(stationId, stationItemId, stationItemPriceId) { getlist(stationId, stationItemId, stationItemPriceId) {
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => { getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
res.data.nurseItemContent = res.data.nurseItemContent.replace(/\<img/gi, if (res.data.nurseItemContent) {
"<br/> <img class='richPic'") res.data.nurseItemContent = res.data.nurseItemContent.replace(/\<img/gi,
"<br/> <img class='richPic'")
}
res.data.itemPictureUrl = baseurl + res.data.itemPictureUrl res.data.itemPictureUrl = baseurl + res.data.itemPictureUrl
this.list = res.data this.list = res.data
}) })

View File

@ -41,7 +41,7 @@
</view> </view>
<view class="content">服务信息 <view class="content">服务信息
<view class="contacts">·联系人{{list.patientName}}</view> <view class="contacts">·联系人{{list.patientName}}</view>
<view class="contacts">·电话:{{list.patientPhone}}</view> <view class="contacts">·电话{{list.patientPhone}}</view>
<view class="contacts">·地址{{list.serviceAddress}}</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>
@ -62,7 +62,7 @@
</view> </view>
<view class="remarks"> <view class="remarks">
<view>备注</view> <view>备注</view>
<input v-model='list.remark' :disabled="list.orderStatus=='PAY'?true :false"> <input v-model='list.remark' :disabled="list.orderStatus=='WAIT_PAY'?false :true">
</view> </view>
<view class="evaluate"> <view class="evaluate">
<view class="price"> <view class="price">
@ -71,13 +71,14 @@
<view class="cancelorder" @tap="cancelorderment()" <view class="cancelorder" @tap="cancelorderment()"
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单 v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单
</view> </view>
<view class="cancelorder" style="background: #4C7BC9;" @tap='rateshow= true' <view class="cancelorder" style="background: #60c5f1;" @tap='rateshow= true'
v-if="list.orderStatus=='COMPLETE'">评价 v-if="list.orderStatus=='COMPLETE'">立即评价
</view> </view>
<view class="cancelorder" @tap='buy' style="background-color: darkorange;" <view class="cancelorder" @tap='buy' style="background-color: darkorange;"
v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0"> v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
去支付 去支付
</view> </view>
<view class="cancelorder" style="background: #4C7BC9;" v-if="list.orderStatus=='EVALUATED'">查看评价</view>
</view> </view>
<u-mask :show="rateshow" @tap="rateshow = false"> <u-mask :show="rateshow" @tap="rateshow = false">
<view class="mask"> <view class="mask">
@ -118,22 +119,17 @@
} }
}, },
onLoad(options) { onLoad(options) {
this.baseurl = baseurl
this.orderNo = options.orderNo
var that = this var that = this
try { try {
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
if (value) { const value2 = uni.getStorageSync('openid');
if (value && value2) {
that.patientId = value that.patientId = value
that.openid = value2
} }
} catch (e) {} } catch (e) {}
try {
const value = uni.getStorageSync('openid');
if (value) {
that.openid = value
}
} catch (e) {}
this.orderNo = options.orderNo
this.baseurl = baseurl
this.getlist() this.getlist()
}, },
methods: { methods: {
@ -158,12 +154,14 @@
signType: response.data.signType, signType: response.data.signType,
paySign: response.data.paySign, paySign: response.data.paySign,
success: function(res) { success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
that.getlist()
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '支付成功', title: '支付成功',
type: 'success', type: 'success',
toast: 1500, toast: 1500,
url: `/pages/paysuccess/paysuccess?delta=${3}`
}) })
that.getlist()
}, },
fail: function(err) { fail: function(err) {
that.$refs.uToast.show({ that.$refs.uToast.show({
@ -199,23 +197,34 @@
type: 'success', type: 'success',
duration: '1500' duration: '1500'
}) })
uni.setStorageSync("Refresh", 'Refresh')
this.getlist();
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(e => { this.timer = setTimeout(e => {
this.getlist(); uni.navigateTo({
url: `/pages/ratesuccess/ratesuccess?delta=${3}`
})
}, 1500) }, 1500)
} else {
this.$refs.uToast.show({
title: '评价失败',
type: 'error',
duration: '1500'
})
} }
}) })
}, },
// //
gophone() { gophone() {
console.log(this.list)
var that = this var that = this
uni.getSystemInfo({ uni.getSystemInfo({
success: function(res) { success: function(res) {
if (res.platform == 'ios') { if (res.platform == 'ios') {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone // phoneNumber: that.list.stationPhone //
}); });
} else { } else {
uni.showActionSheet({ uni.showActionSheet({
@ -223,7 +232,7 @@
success: function(res) { success: function(res) {
if (res.tapIndex + 1 == 1) { if (res.tapIndex + 1 == 1) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone // phoneNumber: that.list.stationPhone //
}); });
} }
}, },

View File

@ -177,11 +177,6 @@
that.personInfo.address = that.useritem.address that.personInfo.address = that.useritem.address
} else {} } else {}
}) })
setTimeout(e => {
if (!that.useritem) {
that.userinfo();
}
}, 500)
}, },
onLoad(options) { onLoad(options) {
var that = this var that = this
@ -193,6 +188,7 @@
} catch (e) {} } catch (e) {}
// //
this.getPatientInfo(options.stationId, options.stationItemId, options.stationItemPriceId) this.getPatientInfo(options.stationId, options.stationItemId, options.stationItemPriceId)
that.userinfo();
}, },
methods: { methods: {
userinfo() { userinfo() {

View File

@ -49,7 +49,7 @@
} }
this.timer = setTimeout(e => { this.timer = setTimeout(e => {
uni.navigateBack({ uni.navigateBack({
delta: 2 delta: 3
}) })
}, 1500) }, 1500)
} }

View File

@ -74,6 +74,7 @@
right: 10rpx; right: 10rpx;
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
z-index: 999;
} }
.itemimg { .itemimg {

View File

@ -3,7 +3,8 @@
<view class="rate"> <view class="rate">
<view class="images"> <view class="images">
<view class="itemimgs" v-for="(item,index) in file"> <view class="itemimgs" v-for="(item,index) in file">
<image class="delimg" src="../../static/gb2.png" mode="" style="color: red;"></image> <image class="delimg" src="../../static/gb2.png" mode="" style="color: red;" @tap='delimg(item)'>
</image>
<image class="itemimg" :src="item" mode=""></image> <image class="itemimg" :src="item" mode=""></image>
</view> </view>
<view class="shot item" @tap='updataImage'> <view class="shot item" @tap='updataImage'>
@ -54,37 +55,41 @@
imgs: [], imgs: [],
patientId: null, patientId: null,
openid: null, openid: null,
timer:null, timer: null,
delta: null,
}; };
}, },
methods: { methods: {
async updata() { delimg(item) {
let that = this this.file = this.file.filter(e => e != item)
this.file.forEach(e => { },
uni.uploadFile({ updata() {
url: baseurl + '/nurseApp/orderEvaluate/uploadEvaluatePictureUrl', let that = this
filePath: e, if (this.file.length > 0) {
name: 'file', this.file.forEach(e => {
formData: { uni.uploadFile({
'orderNo': that.orderlist.goOrderNo url: baseurl + '/nurseApp/orderEvaluate/uploadEvaluatePictureUrl',
}, filePath: e,
timeout: 5000, name: 'file',
header: { formData: {
'Content-type': 'application/json;charset=utf-8' 'orderNo': that.orderlist.goOrderNo
}, },
success(res) { timeout: 5000,
var img = { success(res) {
evaluatePictureUrl: JSON.parse(res.data).imgUrl var img = {
} evaluatePictureUrl: JSON.parse(res.data).imgUrl
that.imgs.push(img) }
if (that.imgs.length == that.file.length) { that.imgs.push(img)
that.info(); if (that.imgs.length == that.file.length) {
} that.info();
} }
}) }
}) })
})
} else {
that.info();
}
}, },
info() { info() {
var that = this var that = this
var obj = { var obj = {
@ -98,6 +103,7 @@
} }
insertGoodsEvaluate(obj).then(res => { insertGoodsEvaluate(obj).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.setStorageSync("Refresh", 'Refresh')
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '评价成功', title: '评价成功',
type: 'success', type: 'success',
@ -108,8 +114,8 @@
} }
that.timer = setTimeout(e => { that.timer = setTimeout(e => {
that.imgs = [] that.imgs = []
uni.navigateBack({ uni.navigateTo({
delta: 1 url: `/pages/ratesuccess/ratesuccess?delta=${that.delta}`
}) })
}, 1500) }, 1500)
} else { } else {
@ -117,9 +123,6 @@
} }
}) })
}, },
updataImage() { updataImage() {
var that = this; var that = this;
uni.chooseImage({ uni.chooseImage({
@ -134,6 +137,7 @@
}, },
onLoad(options) { onLoad(options) {
this.orderlist = JSON.parse(options.item) this.orderlist = JSON.parse(options.item)
this.delta = options.delta
}, },
onShow() { onShow() {
this.baseurl = baseurl this.baseurl = baseurl

View File

@ -13,29 +13,35 @@
<script> <script>
import { import {
appLoginpwd, appLoginpwd,
getWeChatUser getWeChatUser,
} from '../../api/login/index.js' } from '../../api/login/index.js'
import {
createMobileToken
} from '@/api/login/index.js'
export default { export default {
data() { data() {
return { return {
phonecode: '', phonecode: '',
logincode: '', logincode: '',
timer:null, timer: null,
}; };
}, },
methods: { methods: {
getPhoneNumberp(val) { getPhoneNumberp(val) {
let that = this; let that = this;
this.phonecode = val.detail.code if (val.detail.code) {
wx.login({ that.phonecode = val.detail.code
provider: 'weixin', wx.login({
success: function(loginRes) { provider: 'weixin',
that.logincode = loginRes.code success: function(loginRes) {
that.pwdlogin(); that.logincode = loginRes.code
} that.pwdlogin();
}); }
});
}
}, },
pwdlogin() { login() {
getWeChatUser(this.logincode, this.phonecode).then(res => { getWeChatUser(this.logincode, this.phonecode).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.setStorageSync("openid", res.data.openid) uni.setStorageSync("openid", res.data.openid)
@ -46,6 +52,7 @@
type: 'success', type: 'success',
duration: '1500' duration: '1500'
}) })
uni.setStorageSync("Refresh", 'Refresh')
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
@ -54,7 +61,7 @@
delta: 1 delta: 1
}) })
}, 1500) }, 1500)
}else{ } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '登录失败', title: '登录失败',
type: 'error', type: 'error',
@ -63,6 +70,13 @@
} }
}) })
}, },
pwdlogin() {
var that = this
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
that.login()
})
},
}, },
toLogin() {} toLogin() {}
} }

View File

@ -52,7 +52,7 @@
.address { .address {
color: #969394; color: #969394;
padding: 32rpx 0; padding: 32rpx 20rpx;
} }
.border { .border {

View File

@ -0,0 +1,137 @@
.app {
padding: 0 0 50rpx 0;
.rate {
width: 95%;
margin: 0 auto;
height: 100%;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx 20rpx 0 0;
padding-bottom: 20rpx;
.itemimgs {
display: inline-block;
width: 30.5%;
height: 212rpx;
margin: 0 0 20rpx 2%;
position: relative;
padding-top: 20rpx;
.itemimg {
width: 100%;
height: 100%;
}
}
}
.score {
background-color: #FFFFFF;
width: 95%;
margin: 0 auto;
padding-top: 50rpx;
position: relative;
height: 500rpx;
border-radius: 0 0 20rpx 20rpx;
::v-deep .u-rate {
position: absolute;
top: 52rpx;
left: 200rpx;
}
.text {
margin-top: 20rpx;
::v-deep .uni-textarea-textarea {
width: 93%;
display: block;
margin: 0 20rpx;
}
::v-deep .u-input__textarea {
margin-left: 20rpx;
}
}
.title {
margin: 0 20rpx;
font-size: 36rpx;
color: #000000;
padding-bottom: 50rpx;
border-bottom: 1rpx solid #D8D4D4;
}
}
.content {
width: 95%;
background: #FFFFFF;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 30rpx auto;
position: relative;
padding-bottom: 130rpx;
.detailslist {
display: flex;
image {
width: 182rpx;
height: 182rpx;
margin: 20rpx 0 0 20rpx;
}
.model {
width: 70%;
margin: 30rpx 0 0 20rpx;
span {
font-size: 32rpx;
color: #000000;
}
span:nth-child(1) {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 70%;
}
span:nth-child(2) {
color: #969394;
float: right;
margin-right: 30rpx;
}
.bottom {
margin-top: 40rpx;
.box {
color: #969394;
font-size: 30rpx;
}
}
}
}
.payinfo {
width: 95%;
position: absolute;
left: 2.5%;
bottom: 20rpx;
.pay {
font-size: 30rpx;
color: #020000;
}
.price {
float: right;
font-size: 41rpx;
color: #D43953;
margin-right: 10rpx;
}
}
}
}

View File

@ -0,0 +1,66 @@
<template>
<view class="app">
<view class="content">
<view class="detailslist">
<image :src="baseurl+order.attributePitureUrl" mode=""></image>
<view class="model">
<view class="top">
<span>{{order.goodsName}}</span>
<span>{{order.goodsPrice}}</span>
</view>
<view class="bottom">
<span class="box">型号{{order.goodsAttributeName}}</span>
<span class="box">X{{order.goodsCount}}</span>
</view>
</view>
</view>
<view class="payinfo">
<text class="pay">实付款</text>
<text class="price">{{order.totalPrice}}</text>
</view>
</view>
<view class="rate">
<view class="itemimgs" v-for="(item,index) in ratelist.orderEvaluatePictureInfoList">
<image class="itemimg" :src="baseurl+item.evaluatePictureUrl" mode=""></image>
</view>
</view>
<view class="score">
<view class="title">
综合评分
</view>
<u-rate :count="count" v-model="ratelist.compositeScore" size='46' :disabled="true"></u-rate>
<view class="text">
<u-input v-model="ratelist.evaluateContent" type="textarea" placeholder=' ' :clearable='false'
:disabled="true" />
</view>
</view>
</view>
</template>
<script>
import {
lookrate
} from '@/api/lookrate/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
baseurl: null,
order: null,
ratelist: null,
count: 5,
};
},
onLoad(options) {
this.baseurl = baseurl
this.order = JSON.parse(options.item)
lookrate(this.order.goOrderNo).then(res => {
this.ratelist = res.data
})
},
}
</script>
<style lang="scss">
@import './lookrate.scss';
</style>

View File

@ -164,7 +164,7 @@
success: function(res) { success: function(res) {
if (res.platform == 'ios') { if (res.platform == 'ios') {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone // phoneNumber: that.list.stationPhone //
}); });
} else { } else {
uni.showActionSheet({ uni.showActionSheet({
@ -172,7 +172,7 @@
success: function(res) { success: function(res) {
if (res.tapIndex + 1 == 1) { if (res.tapIndex + 1 == 1) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: that.nursestationlist.phone // phoneNumber: that.list.stationPhone //
}); });
} }
}, },

View File

@ -71,7 +71,7 @@
export default { export default {
data() { data() {
return { return {
timer:null, timer: null,
isedit: true, // isedit: true, //
delshow: false, // delshow: false, //
content: '确认要删除信息吗?', content: '确认要删除信息吗?',
@ -94,10 +94,12 @@
updata: [], updata: [],
} }
}, },
onShow() {
this.goodsList()
},
onLoad(options) { onLoad(options) {
let that = this let that = this
this.updata = JSON.parse(options.updata) this.updata = JSON.parse(options.updata)
this.goodsList()
this.areaInfo() this.areaInfo()
}, },
methods: { methods: {
@ -135,7 +137,7 @@
} }
that.timer = setTimeout(e => { that.timer = setTimeout(e => {
uni.navigateBack({ uni.navigateBack({
delta:2 delta: 2
}) })
}, 1500) }, 1500)
} }
@ -147,10 +149,10 @@
if (that.isedit == true) { if (that.isedit == true) {
addnursingStation(that.infolist).then(res => { addnursingStation(that.infolist).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ that.$refs.uToast.show({
title: '新增成功', title: '新增成功',
duration: 1000 type: 'success'
}); })
that.show = false; that.show = false;
setTimeout(e => { setTimeout(e => {
that.goodsList() that.goodsList()
@ -159,14 +161,21 @@
}) })
} else { } else {
updatenursingStation(that.infolist).then(res => { updatenursingStation(that.infolist).then(res => {
uni.showToast({ if (res.code == 200) {
title: '修改成功', that.$refs.uToast.show({
duration: 1000 title: '修改成功',
}); type: 'success'
that.show = false; })
setTimeout(e => { that.show = false;
that.goodsList() setTimeout(e => {
}, 1000) that.goodsList()
}, 1000)
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}
}) })
} }
}, },

View File

@ -209,8 +209,8 @@
color: #666666; color: #666666;
padding-top: 30rpx; padding-top: 30rpx;
/deep/ .richPic { /deep/ .richPic {
width: 94% !important; width: 100% !important;
height: 94% !important; height: 100% !important;
} }
} }
.Introduction { .Introduction {

View File

@ -3,10 +3,16 @@
<view class="content"> <view class="content">
<view class="righttext"> <view class="righttext">
<image class="picture" :src="list.stationIntroducePcitureUrl"></image> <image class="picture" :src="list.stationIntroducePcitureUrl"></image>
<view class="title"> <view class="title" v-if="list.nurseStationName">
{{list.nurseStationName}} {{list.nurseStationName}}
</view> </view>
<view class="address">{{list.address}} </view> <view class="title" v-else>
暂无
</view>
<view class="address" v-if="list.address">{{list.address}} </view>
<view class="address" v-else>
暂无
</view>
<view class="call"> <view class="call">
<view class="callme" @tap="gophone()"> <view class="callme" @tap="gophone()">
<u-icon class='icon' name="phone-fill" color="#ffffff" size="30"></u-icon> <u-icon class='icon' name="phone-fill" color="#ffffff" size="30"></u-icon>
@ -130,60 +136,43 @@
}, },
onShow() { onShow() {
this.usershow = false this.usershow = false
this.getInfo()
}, },
onLoad(options) { onLoad(options) {
this.nurseStationId = options.nurseStationId this.nurseStationId = options.nurseStationId
this.getInfo()
this.serveinfo()
this.productinfo()
}, },
methods: { methods: {
goappointments(item) { goappointments(item) {
let that = this let that = this
try { try {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
if (value) { const value2 = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('patientId'); if (value && value2) {
if (value2) { AppIdentification(value2).then(res => {
AppIdentification(value2).then(res => { if (res.code == 200) {
if (res.code == 200) { if (res.data.loginFlag) {
if (res.data.loginFlag) { that.usershow = false
that.usershow = false uni.navigateTo({
uni.navigateTo({ url: `/pages/appointmenttime/appointmenttime?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
url: `/pages/appointmenttime/appointmenttime?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
})
} else {
that.usershow = true
}
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
}) })
if (that.timer) { } else {
clearTimeout(that.timer) that.usershow = true
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
} }
}) } else if (res.code == 9999) {} else {
} else { that.$refs.uToast.show({
that.$refs.uToast.show({ title: res.msg,
title: '未登录,请先登录', type: 'error'
type: 'error'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
}) })
}, 1500) if (that.timer) {
} clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
}
})
} else { } else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '未登录,请先登录', title: '未登录,请先登录',
@ -206,19 +195,25 @@
}, },
getInfo() { getInfo() {
introductionList(this.nurseStationId).then(res => { introductionList(this.nurseStationId).then(res => {
res.data.stationIntroducePcitureUrl = baseurl + res.data.stationIntroducePcitureUrl if (res.code == 200) {
res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/gi, this.serveinfo()
"<br/><img class='richPic'") this.productinfo()
// res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/, res.data.stationIntroducePcitureUrl = baseurl + res.data.stationIntroducePcitureUrl
// "<br/> <img class='richPic'") if (res.data.agencyIntroduce) {
this.list = res.data res.data.agencyIntroduce = res.data.agencyIntroduce.replace(/\<img/gi,
if (res.data.nurseStationLabelList) { "<br/><img class='richPic'")
this.nurseStationLabelList = res.data.nurseStationLabelList }
this.list = res.data
if (res.data.nurseStationLabelList) {
this.nurseStationLabelList = res.data.nurseStationLabelList
}
} }
}) })
}, },
serveinfo() { serveinfo() {
this.pageNum = 1
itemList(this.nurseStationId, this.pageSize, this.pageNum).then(res => { itemList(this.nurseStationId, this.pageSize, this.pageNum).then(res => {
uni.removeStorageSync('Refresh');
res.rows.forEach(e => { res.rows.forEach(e => {
e.itemPictureUrl = baseurl + e.itemPictureUrl e.itemPictureUrl = baseurl + e.itemPictureUrl
}) })
@ -227,7 +222,9 @@
}) })
}, },
productinfo() { productinfo() {
this.pageNum = 1
productInformation(this.nurseStationId, this.pageNum, this.pageSize).then(res => { productInformation(this.nurseStationId, this.pageNum, this.pageSize).then(res => {
uni.removeStorageSync('Refresh');
res.rows.forEach(e => { res.rows.forEach(e => {
e.goodsPictureUrl = baseurl + e.goodsPictureUrl e.goodsPictureUrl = baseurl + e.goodsPictureUrl
}) })

View File

@ -1,4 +1,73 @@
.app { .app {
padding: 0;
.submits {
width: 501rpx;
height: 71rpx;
background: #4C7BC9;
border-radius: 26rpx;
text-align: center;
line-height: 71rpx;
color: #ffffff;
font-size: 34rpx;
margin-top: 5%;
margin-left: 15%;
}
// 弹框确认收货
.chat {
.word {
font-size: 26rpx;
color: #010000;
line-height: 36rpx;
width: 70%;
margin: 50rpx auto;
text-align: center;
}
.image {
position: relative;
.blackground {
width: 183rpx;
height: 69rpx;
background: #030303;
opacity: 0.5;
color: #ffffff;
font-size: 36rpx;
text-align: center;
line-height: 69rpx;
position: absolute;
bottom: 0%;
left: 50%;
transform: translateX(-50%);
}
image {
width: 182rpx;
display: block;
margin: 0 auto;
height: 182rpx;
}
}
}
.payment {
width: 100%;
font-size: 42rpx;
color: #000000;
line-height: 120rpx;
text-align: center;
span {}
image {
width: 31rpx;
height: 31rpx;
position: absolute;
right: 5%;
top: 5%;
}
}
.time{ .time{
height: 80rpx; height: 80rpx;
width: 95%; width: 95%;
@ -26,7 +95,21 @@
bottom: 0; bottom: 0;
height: 100rpx; height: 100rpx;
width: 100%; width: 100%;
.logistics{
width: 216rpx;
height: 68rpx;
text-align: center;
color: #ffffff;
border-radius: 26rpx;
font-size: 36rpx;
line-height: 68rpx;
position: absolute;
right: 260rpx;
top: 50%;
background: #E1AE3C;
transform: translateY(-50%);
z-index: 999;
}
.pay { .pay {
width: 216rpx; width: 216rpx;
height: 68rpx; height: 68rpx;

View File

@ -72,7 +72,41 @@
去支付 去支付
</view> </view>
</view> </view>
<view class="buy" v-if="order.orderStatus == 'EVALUATED'" @tap='golookrate'>
<view class="pay" style="background-color: #4C7BC9;">
查看评价
</view>
</view>
<view class="buy" v-if="order.orderStatus == 'RECEIVED_GOODS'" @tap='rate'>
<view class="pay" style="background-color: #60c5f1;">
去评价
</view>
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_RECEIVED_GOODS'">
<view class="logistics" style="" @tap='gologistics'>查看物流
</view>
<view class="pay" style="background-color: #4C7BC9;" @tap='Receipt'>
确认收货
</view>
</view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<!-- // -->
<view class="frame">
<u-popup v-model="show" mode="bottom" length="45%" border-radius="30">
<view class="payment">
<span>确认收到货了吗</span>
<image src="../../static/gb.png" mode="" @tap="show = false"></image>
</view>
<view class="chat">
<view class="image">
<image :src="baseurl+order.attributePitureUrl" mode=""></image>
<view class="blackground">共1件</view>
</view>
<view class="word">为了保证你的售后权益请收到商品确认无误后再确认收货</view>
</view>
<view class="submits" @tap='Receipts'>确定</view>
</u-popup>
</view>
</view> </view>
</template> </template>
@ -80,6 +114,9 @@
import { import {
appletGoodsOrderPay appletGoodsOrderPay
} from '@/api/confirmOrder/index.js' } from '@/api/confirmOrder/index.js'
import {
confirmReceipt
} from '@/api/CommodityOrder/index.js'
import { import {
goodsOrder goodsOrder
} from '@/api/CommodityOrder/index.js' } from '@/api/CommodityOrder/index.js'
@ -91,13 +128,64 @@
order: null, order: null,
patientId: '', patientId: '',
openid: null, openid: null,
show: false, //
orderStatus: '', orderStatus: '',
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
timestamp: 0, timestamp: 0,
goodsOrderId: null,
} }
}, },
methods: { methods: {
//
golookrate() {
uni.navigateTo({
url: `/pages/lookrate/lookrate?item=${JSON.stringify(this.order)}`
})
},
//
Receipts() {
confirmReceipt(this.order.goOrderNo).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '收货成功',
type: 'success',
duration: '1000'
})
this.show = false
uni.setStorageSync("Refresh", 'Refresh')
this.goodsOrderinfo()
setTimeout(e => {
uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.order)}&delta=${4}`
})
}, 1000)
} else {
this.$refs.uToast.show({
title: '收货失败',
type: 'error',
duration: '1000'
})
this.show = false
}
})
},
//
Receipt() {
this.show = true
},
//
gologistics() {
uni.navigateTo({
url: `/pages/logistics/logistics?item=${JSON.stringify(this.order)}`
})
},
//
rate() {
uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.order)}&delta=${4}`
})
},
// //
pay() { pay() {
var that = this var that = this
@ -116,6 +204,8 @@
signType: response.data.signType, signType: response.data.signType,
paySign: response.data.paySign, paySign: response.data.paySign,
success: function(res) { success: function(res) {
uni.setStorageSync("Refresh", 'Refresh')
this.goodsOrderinfo()
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '支付成功', title: '支付成功',
type: 'success', type: 'success',
@ -146,8 +236,8 @@
url: `/pages/refundType/refundType?order=${JSON.stringify(this.order)}` url: `/pages/refundType/refundType?order=${JSON.stringify(this.order)}`
}) })
}, },
goodsOrderinfo(goodsOrderId) { goodsOrderinfo() {
goodsOrder(this.patientId, this.orderStatus, goodsOrderId, this.pageSize, this.pageNum).then(res => { goodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum).then(res => {
this.order = res.rows[0] this.order = res.rows[0]
var time = new Date(this.order.orderTime).getTime() / 1000 + (60 * 60 * 24) var time = new Date(this.order.orderTime).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000 var times = new Date().getTime() / 1000
@ -157,26 +247,25 @@
// //
goAftersalesdetails(item) { goAftersalesdetails(item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/Aftersalesdetails/Aftersalesdetails?goodsOrderId=${item.goodsOrderId}` url: `/pages/Aftersalesdetails/Aftersalesdetails?goodsOrderId=${this.order.goodsOrderId}`
}) })
}, },
}, },
onShow() {
this.goodsOrderinfo()
},
onLoad(options) { onLoad(options) {
this.baseurl = baseurl this.baseurl = baseurl
this.goodsOrderId = options.goodsOrderId
let that = this let that = this
try { try {
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
if (value) { const value2 = uni.getStorageSync('openid');
if (value && value2) {
that.patientId = value that.patientId = value
that.goodsOrderinfo(options.goodsOrderId) that.openid = value2
} }
} catch (e) {} } catch (e) {}
try {
const value = uni.getStorageSync('openid');
if (value) {
that.openid = value
} else {}
} catch (e) {}
} }
} }
</script> </script>

View File

@ -0,0 +1,100 @@
<template>
<view class="app">
<image src="../../static/paysuccess.png" mode=""></image>
<view class="success">
评价完成
</view>
<view class="goshopping" @tap='gos'>
返回上一级
</view>
<view class="gohomepage" @tap='gohome'>
去首页
</view>
</view>
</template>
<script>
export default {
data() {
return {
delta: null,
};
},
onLoad(options) {
this.delta = options.delta
},
methods: {
gos() {
var that = this
this.delta = Number(this.delta)
if (this.delta == 4) {
uni.navigateBack({
delta: 4
});
} else if (this.delta == 3) {
uni.navigateBack({
delta: 3
});
} else if (this.delta == 2) {
uni.navigateBack({
delta: 2
});
}else{
uni.navigateBack({
delta: 2
});
}
},
gohome() {
uni.switchTab({
url: '/pages/homepage/homepage'
});
},
},
}
</script>
<style lang="scss">
.app {
font-size: 30rpx;
height: 100vh;
.goshopping,
.gohomepage {
padding: 0 30rpx;
height: 70rpx;
line-height: 65rpx;
text-align: center;
position: absolute;
top: 50%;
color: #4C7BC9;
border: 1rpx solid #4C7BC9;
border-radius: 30rpx;
}
.goshopping {
left: 10%;
}
.gohomepage {
right: 10%;
}
.success {
font-size: 42rpx;
position: absolute;
top: 35%;
left: 50%;
transform: translateX(-50%);
}
image {
width: 230rpx;
height: 230rpx;
position: absolute;
top: 8%;
left: 50%;
transform: translateX(-50%);
}
}
</style>

View File

@ -45,6 +45,8 @@
}; };
}, },
onLoad(options) { // onLoad(options) { //
},
onShow() {
this.goodsCategory() this.goodsCategory()
}, },
methods: { methods: {
@ -57,10 +59,11 @@
// //
goodsCategory() { goodsCategory() {
goodsCategoryList(this.pageSize, this.pageNum).then(res => { goodsCategoryList(this.pageSize, this.pageNum).then(res => {
uni.removeStorageSync('Refresh');
res.rows.forEach(e => { res.rows.forEach(e => {
e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
this.goodsCategoryList.push(e)
}) })
this.goodsCategoryList = res.rows
this.total = res.total this.total = res.total
}) })
} }
@ -68,7 +71,13 @@
onReachBottom() { // onReachBottom() { //
if (this.goodsCategoryList.length >= this.total) {} else { if (this.goodsCategoryList.length >= this.total) {} else {
this.pageNum++; this.pageNum++;
this.goodsCategory() goodsCategoryList(this.pageSize, this.pageNum).then(res => {
res.rows.forEach(e => {
e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
this.goodsCategoryList.push(e)
})
this.total = res.total
})
} }
}, },
onPullDownRefresh() { // onPullDownRefresh() { //

View File

@ -84,8 +84,10 @@
}); });
}, },
requestinfo() { requestinfo() {
this.pageNum = 1;
nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseTypeCode).then(res => { nearbyList(this.pageSize, this.pageNum, this.longitude, this.latitude, this.nurseTypeCode).then(res => {
if (res.total > 0) { if (res.total > 0) {
uni.removeStorageSync('Refresh');
res.rows.forEach(e => { res.rows.forEach(e => {
e.stationPictureUrl = baseurl + e.stationPictureUrl e.stationPictureUrl = baseurl + e.stationPictureUrl
}) })
@ -142,8 +144,7 @@
// this.requestinfo() // this.requestinfo()
}, },
}, },
onShow() {}, onShow() {
onLoad() {
var that = this var that = this
try { try {
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
@ -183,6 +184,8 @@
} }
}); });
} }
} else if (res.code == 9999) {
} else { } else {
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
@ -228,6 +231,7 @@
} }
} catch (e) {} } catch (e) {}
}, },
onLoad() {},
} }
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -23,16 +23,6 @@
url: '/pages/homepage/homepage' url: '/pages/homepage/homepage'
}); });
}, 2000); }, 2000);
// const value = uni.getStorageSync('openid');
// if (value) {
// existPatientInfo(value).then(res => {
// if (res.code == 200) {
// if (res.msg == 'LOGIN') {
// uni.setStorageSync("LOGIN", res.msg)
// } else {}
// } else {}
// })
// } else {}
}, },
methods: {}, methods: {},
} }

View File

@ -119,8 +119,7 @@
this.baseurl = baseurl this.baseurl = baseurl
this.myInfo() this.myInfo()
}, },
onLoad(options) { onLoad(options) {},
},
methods: { methods: {
remove() { remove() {
let that = this let that = this
@ -128,11 +127,11 @@
title: '提示', title: '提示',
content: '确认要退出此账号吗', content: '确认要退出此账号吗',
success: function(res) { success: function(res) {
console.log(res)
if (res.confirm) { if (res.confirm) {
uni.removeStorageSync('patientId'); uni.removeStorageSync('patientId');
uni.removeStorageSync('openid'); uni.removeStorageSync('openid');
uni.removeStorageSync('phone'); uni.removeStorageSync('phone');
uni.removeStorageSync('token');
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '退出账号成功', title: '退出账号成功',
type: 'success', type: 'success',
@ -156,46 +155,39 @@
} }
}); });
}, },
removes() {
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.removeStorageSync('Refresh');
uni.removeStorageSync('token');
uni.navigateBack({
delta: 1
})
},
// //
myInfo() { myInfo() {
var that = this var that = this
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
if (value) { const value2 = uni.getStorageSync('patientId');
if (value && value2) {
existPatientInfo(value).then(res => { existPatientInfo(value).then(res => {
if (res.code == 200) { if (res.code == 200 && res.msg == 'LOGIN') {
if (res.msg == 'LOGIN') { appPersonal(value2).then(Response => {
uni.setStorageSync("LOGIN", res.msg) if (Response.code == 200) {
const value2 = uni.getStorageSync('patientId'); that.appPersonallist = Response.data
if (value2) { } else if (Response.code == 9999) {} else {
appPersonal(value2).then(Response => { that.removes();
if (Response.code == 200) {
that.appPersonallist = Response.data
} else {
uni.navigateBack({
delta: 1
})
}
})
} }
} else { })
that.remove()
}
} else { } else {
that.remove() that.removes();
} }
}) })
} else { } else {
that.remove() that.removes();
} }
}, },
remove() {
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.navigateBack({
delta: 1
})
},
updatainfo() { updatainfo() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}` url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`

50
share.js Normal file
View File

@ -0,0 +1,50 @@
export default {
data() {
return {
// 默认的全局分享内容
share: {
title: '泉医到家',
path: '/pages/homepage/homepage', // 全局分享的路径,比如 首页
// imageUrl: , // 全局分享的图片(可本地可网络)
}
}
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
// getCurrentPages() 函数用于获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath.split('?')[0]
if (url == '/pages/user/user' || url == '/pages/information/information' || url == '/pages/modify/modify') {
return {
title: this.share.title,
path: this.share.path,
imageUrl: '/static/192x192.png',
}
} else {
return {
title: this.share.title,
path: this.share.path,
// imageUrl: this.share.imageUrl,
}
}
},
//2.分享到朋友圈
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath.split('?')[0]
if (url == '/pages/user/user' || url == '/pages/information/information' || url == '/pages/modify/modify') {
return {
title: this.share.title,
path: this.share.path,
imageUrl: '/static/192x192.png',
}
} else {
return {
title: this.share.title,
path: this.share.path,
// imageUrl: this.share.imageUrl,
}
}
},
}

BIN
static/192x192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB