From bd7093d5a453f0020dfed4677bb9b4c1e84cb62a Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 18 九月 2024 15:42:00 +0800
Subject: [PATCH] update 订单刷新等
---
manifest.json | 2
pages/order/order.vue | 23 +++++++++++
pages/order/order-detail.vue | 87 +++++++++++++++++++++++++------------------
pages/user/address/address.vue | 4 ++
4 files changed, 78 insertions(+), 38 deletions(-)
diff --git a/manifest.json b/manifest.json
index 2848179..782394c 100644
--- a/manifest.json
+++ b/manifest.json
@@ -49,7 +49,7 @@
"quickapp" : {},
/* 快应用特有相关 */
"mp-weixin" : {
- "appid" : "wx1441324401626290",
+ "appid" : "wx6d0ecc4e18710458",
"setting" : {
"urlCheck" : false,
"es6" : true,
diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue
index 5526c16..4340a8b 100644
--- a/pages/order/order-detail.vue
+++ b/pages/order/order-detail.vue
@@ -41,48 +41,45 @@
pictureList: []
}
this.showSales = options.showsales && true || false
+ this.timer = setInterval(() => {
+ //倒计时
+ var nowdate = new Date().getTime() - 1000 * 60 * 5
+ var change = false
+ //计算倒计时
+ var diff = new Date(this.dto.createTime).getTime() - nowdate
+ console.log('diff', diff)
+ if (diff <= 2000 && true) {
+ //超过了5分钟
+ this.dto.statusBackend = 'CANCEL'
+ this.dto.statusBackendStr = '已取消'
+ this.dto.status = 'CANCEL'
+ this.dto.statusStr = '已取消'
- if (this.dto.statusBackend === 'PENDING') {
- this.timer = setInterval(() => {
- //倒计时
- var nowdate = new Date().getTime() - 1000 * 60 * 5
- var change = false
-
- //计算倒计时
- var diff = new Date(this.dto.createTime).getTime() - nowdate
- console.log('diff', diff)
- if (diff <= 2000 && true) {
- //超过了5分钟
- this.dto.statusBackend = 'CANCEL'
- this.dto.statusBackendStr = '已取消'
- this.dto.status = 'CANCEL'
- this.dto.statusStr = '已取消'
-
- this.dto.bctime = ''
- // console.log('change cancel', this.dto)
- change = true
- clearInterval(this.timer)
- this.timer = undefined
+ this.dto.bctime = ''
+ // console.log('change cancel', this.dto)
+ change = true
+ clearInterval(this.timer)
+ this.timer = undefined
+ } else {
+ //相差
+ var alltime = parseInt(diff / 1000)
+ var tt = 0
+ if (alltime > 60) {
+ tt = alltime - parseInt(alltime / 60) * 60
} else {
- //相差
- var alltime = parseInt(diff / 1000)
- var tt = 0
- if (alltime > 60) {
- tt = alltime - parseInt(alltime / 60) * 60
- } else {
- tt = alltime
- }
- this.dto.bctime = `0${parseInt(alltime / 60)}:${tt<10?'0':''}${tt}`
- change = true
-
+ tt = alltime
}
+ this.dto.bctime = `0${parseInt(alltime / 60)}:${tt<10?'0':''}${tt}`
+ change = true
+
+ }
- if (change)
- this.$forceUpdate()
- }, 1000)
- }
+ if (change)
+ this.$forceUpdate()
+ }, 1000)
+
}
@@ -93,7 +90,7 @@
}
}).then(res => {
var data = res.data;
-
+
let tmpData = data.map(item => ({
value: item.value,
label: item.label
@@ -136,6 +133,22 @@
// description: 'descriptiondescriptiondescriptiondescriptiondescription'
// }]
}
+ if (this.dto.statusBackend === 'PENDING') {
+ //先判断要不要字节变成已取消
+ var nowdate = new Date().getTime() - 1000 * 60 * 5
+ var diff = new Date(this.dto.createTime).getTime() - nowdate
+
+ if (diff <= 2000 && true) {
+ //超过了5分钟
+ this.dto.statusBackend = 'CANCEL'
+ this.dto.statusBackendStr = '已取消'
+ this.dto.status = 'CANCEL'
+ this.dto.statusStr = '已取消'
+ this.dto.bctime = ''
+ this.$forceUpdate()
+ }
+ }
+
}
},
async callTel() {
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 7152f84..6b31755 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -93,6 +93,29 @@
uni.stopPullDownRefresh()
},
methods: {
+ getList_after() {
+ var nowdate = new Date().getTime() - 1000 * 60 * 5
+ var change = false
+ for (var item of this.list) {
+ if (item.statusBackend === 'PENDING') {
+ //计算倒计时
+ var diff = new Date(item.createTime).getTime() - nowdate
+ if (diff <= 2000 && true) {
+ //超过了5分钟
+ item.statusBackend = 'CANCEL'
+ item.statusBackend = '已取消'
+ item.status = 'CANCEL'
+ item.statusStr = '已取消'
+
+ item.bctime = ''
+ change = true
+
+ }
+ }
+ }
+ if (change)
+ this.$forceUpdate()
+ },
toDetail(item) {
// 订单详情页面
// console.log(' toDetail item', item)
diff --git a/pages/user/address/address.vue b/pages/user/address/address.vue
index afcbe7f..c0fd7b2 100644
--- a/pages/user/address/address.vue
+++ b/pages/user/address/address.vue
@@ -403,6 +403,10 @@
this.$message.showToast('字段未填写完整')
return
}
+ if(!this.submitForm['province']||!this.submitForm['province']||!this.submitForm['province']){
+ this.$message.showToast('省市区未选择完整')
+ return
+ }
// 手机号码正则表达式,可以根据需要调整
const phoneRegex = /^[1][3-9][0-9]{9}$/;
--
Gitblit v1.9.3