From bf87728394cbb20e3b2012f6c65a3ff7d589fad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Tue, 6 Dec 2022 10:08:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/modifyAddress/modifyAddress.js | 1 + pages.json | 17 ++++----- pages/CommodityOrder/CommodityOrder.vue | 38 +++++++++++-------- .../Nursingstationserviceorder.vue | 19 ++++++++-- pages/ServiceDetails/ServiceDetails.scss | 9 +++++ pages/ServiceDetails/ServiceDetails.vue | 22 +++++++++-- pages/appointmenttime/appointmenttime.vue | 22 ++++++----- pages/menttimeorder/menttimeorder.vue | 26 +++++++------ pages/modifyAddress/modifyAddress.vue | 1 - pages/orderDetails/orderDetails.scss | 12 ++++++ pages/orderDetails/orderDetails.vue | 12 ++++-- pages/payorderDetails/payorderDetails.vue | 5 ++- pages/site/site.scss | 2 +- pages/site/site.vue | 4 +- pages/user/user.vue | 2 +- 15 files changed, 130 insertions(+), 62 deletions(-) diff --git a/api/modifyAddress/modifyAddress.js b/api/modifyAddress/modifyAddress.js index c26d6ee..b703176 100644 --- a/api/modifyAddress/modifyAddress.js +++ b/api/modifyAddress/modifyAddress.js @@ -1,4 +1,5 @@ import request from "../request.js" + // 根据被护理人id查询基本信息 export function goodPatientInfo(patientId){ return request({ diff --git a/pages.json b/pages.json index 7a64d21..79d3537 100644 --- a/pages.json +++ b/pages.json @@ -187,6 +187,14 @@ "navigationBarBackgroundColor": "#ffffff" } }, + { + "path": "pages/menttimeorder/menttimeorder", + "style": { + "navigationBarTitleText": "预约详情", + "enablePullDownRefresh": false + } + + }, { "path": "pages/homepage/homepage", "style": { @@ -292,15 +300,6 @@ "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#ffffff" } - } - - , { - "path": "pages/menttimeorder/menttimeorder", - "style": { - "navigationBarTitleText": "预约详情", - "enablePullDownRefresh": false - } - }, { "path": "pages/Geriatricdisease/Geriatricdisease", "style": { diff --git a/pages/CommodityOrder/CommodityOrder.vue b/pages/CommodityOrder/CommodityOrder.vue index 4b930f8..6651b4e 100644 --- a/pages/CommodityOrder/CommodityOrder.vue +++ b/pages/CommodityOrder/CommodityOrder.vue @@ -8,7 +8,8 @@ 店铺名称 - 待付款 + 待付款 + 订单已关闭 退款中 已取消 待收货 @@ -41,7 +42,8 @@ 查看物流 - + 去支付 确认收货 @@ -197,6 +199,12 @@ .goodsName).then( res => { this.orderlist = res.rows + this.orderlist.forEach(e => { + e.timestamp = null + var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24) + var times = new Date().getTime() / 1000 + e.timestamp = time - times + }) this.total = res.total }) }, @@ -217,7 +225,8 @@ title: this.title, }); }, - onShow() { + onShow() {}, + onLoad(options) { //开局调用 let that = this try { const value = uni.getStorageSync('patientId'); @@ -232,8 +241,6 @@ that.openid = value } } catch (e) {} - }, - onLoad(options) { //开局调用 this.baseurl = baseurl; if (options.orderStatus) { this.orderStatus = options.orderStatus @@ -252,22 +259,21 @@ if (this.orderlist.length >= this.total) {} else { this.pageNum++; ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this - .goodsName).then( - res => { - res.rows.forEach(e => { - this.orderlist.push(e) - }) - this.total = res.total + .goodsName).then(res => { + res.rows.forEach(e => { + e.timestamp = null + var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24) + var times = new Date().getTime() / 1000 + e.timestamp = time - times + this.orderlist.push(e) }) + this.total = res.total + }) } }, onPullDownRefresh() { //下拉刷新 this.pageNum = 1; - ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this.goodsName) - .then(res => { - this.orderlist = res.rows - this.total = res.total - }) + this.goodsOrderinfo(); setTimeout(function() { uni.stopPullDownRefresh(); }, 1000); diff --git a/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue b/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue index a163cb8..e24219f 100644 --- a/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue +++ b/pages/Nursingstationserviceorder/Nursingstationserviceorder.vue @@ -4,7 +4,8 @@ {{item.createTime}} - {{item.orderStatus=='WAIT_PAY'?'待付款':''}} + {{item.orderStatus=='WAIT_PAY'&&item.timestamp>0?'待付款':''}} + {{item.orderStatus=='WAIT_PAY'&&item.timestamp<=0?'订单已关闭':''}} {{item.orderStatus=='PAY'?'已付款':''}} {{item.orderStatus=='WAIT_DISPATCH'?'待服务':''}} {{item.orderStatus=='NOT_FINISH'?'待完成':''}} @@ -28,7 +29,7 @@ + v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp>0"> 去支付 退款中 @@ -69,7 +70,8 @@ list: [], } }, - onShow() { + onShow() {}, + onLoad() { this.baseurl = baseurl let that = this try { @@ -87,7 +89,6 @@ } } catch (e) {} }, - onLoad() {}, methods: { //去评价 // gorate(){ @@ -143,6 +144,12 @@ getinfo() { appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => { this.list = res.rows; + this.list.forEach(e => { + e.timestamp = null + var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24) + var times = new Date().getTime() / 1000 + e.timestamp = time - times + }) this.total = res.total }) }, @@ -157,6 +164,10 @@ this.pageNum++ appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => { res.rows.forEach(e => { + e.timestamp = null + var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24) + var times = new Date().getTime() / 1000 + e.timestamp = time - times this.list.push(e) }) }) diff --git a/pages/ServiceDetails/ServiceDetails.scss b/pages/ServiceDetails/ServiceDetails.scss index d0b3794..6c9a815 100644 --- a/pages/ServiceDetails/ServiceDetails.scss +++ b/pages/ServiceDetails/ServiceDetails.scss @@ -4,6 +4,15 @@ font-size: 36rpx; padding-top: 10rpx; font-size: 34rpx; + .time{ + height: 80rpx; + width: 95%; + text-align: center; + line-height: 80rpx; + background-color: #fff; + margin: 0 auto 10rpx; + border-radius: 20rpx; + } .mask{ position: absolute; bottom:0; diff --git a/pages/ServiceDetails/ServiceDetails.vue b/pages/ServiceDetails/ServiceDetails.vue index 515c1ba..8348f5f 100644 --- a/pages/ServiceDetails/ServiceDetails.vue +++ b/pages/ServiceDetails/ServiceDetails.vue @@ -1,5 +1,13 @@