From 7885f117b4c3e9aabb48309cb7fe2420bd404680 Mon Sep 17 00:00:00 2001
From: ltlzx <942659938@qq.com>
Date: Mon, 11 Jul 2022 05:41:11 -0400
Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=88=91=E7=9A=84=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E5=88=A0=E9=99=A4=E3=80=81=E8=AE=A2=E5=8D=95=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E3=80=81=E6=B6=88=E6=81=AF=E3=80=81=E7=BA=A2=E5=8C=85?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=81=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=AF=86=E7=A0=81=E5=8A=9F=E8=83=BD=E3=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/request.js | 2 +
pages/account/index.vue | 5 ++-
pages/account/message.vue | 15 +++++++-
pages/account/myOrders.vue | 44 +++++++++++++++-------
pages/index/pickUpCentre.vue | 17 ++++++++-
pages/login/verifyEmail.vue | 6 +--
pages/order/details.vue | 67 +++++++++++++++++++++++-----------
pages/productDetails/index.vue | 16 ++++++--
8 files changed, 126 insertions(+), 46 deletions(-)
diff --git a/api/request.js b/api/request.js
index 26b6a69..4cd3440 100644
--- a/api/request.js
+++ b/api/request.js
@@ -59,6 +59,7 @@ const httpRequest = (params) => {
uni.request({
...httpOptions,
success: res => {
+ // console.info(res)
uni.hideLoading();
// 进行解密
res.data=JSON.parse(decryptDes(res.data,'6780f04cf2e211ec86a8005056c00008'))
@@ -79,6 +80,7 @@ const httpRequest = (params) => {
resolve(res.data);
},
fail: err => {
+
uni.hideLoading();
reject(err);
}
diff --git a/pages/account/index.vue b/pages/account/index.vue
index c698cc9..ca79d5f 100644
--- a/pages/account/index.vue
+++ b/pages/account/index.vue
@@ -143,7 +143,10 @@
},
onShow() {
this.user_info=uni.getStorageSync('user_info')
- this.getUserInfo()
+ if(this.user_info){
+ this.getUserInfo()
+ }
+
}
}
diff --git a/pages/account/message.vue b/pages/account/message.vue
index de03360..d110539 100644
--- a/pages/account/message.vue
+++ b/pages/account/message.vue
@@ -35,16 +35,29 @@
diff --git a/pages/account/myOrders.vue b/pages/account/myOrders.vue
index 167d092..02348d6 100644
--- a/pages/account/myOrders.vue
+++ b/pages/account/myOrders.vue
@@ -9,7 +9,7 @@
-
+
Waiting for payment
@@ -35,14 +35,14 @@
Reward 10 points
-
-
+
+
-
+
cancelled
@@ -64,7 +64,7 @@
total:US${{item.order_amount}}
-
+
@@ -348,9 +348,7 @@
-
+
@@ -375,14 +373,19 @@
cancelQuery:{
_action:'cancelorder',
order_id:''
- }
+ },
+ // 弹出提示框的状态 0:取消订单 1、删除订单
+ tipsType:0,
+ tipsInfo:'',
+ tipsBut:''
}
},
methods:{
+
// 订单详情
- goDetails(index){
+ goDetails(index,id){
uni.navigateTo({
- url:'../order/details?details_index='+index
+ url:'../order/details?details_index='+index+'&id='+id
})
},
// 选择支付方式
@@ -420,14 +423,27 @@
this.payQuery.order_id=id
this.isPay=true
},
- // 取消订单
- cancelorder(id){
+ // 淡出提示
+ openTips(id,type){
+ this.tipsType=type
+ if(type==0){
+ this.tipsInfo='Are you sure you want to cancel this order? This order will be regarded as invalid after cancellation'
+ this.tipsBut='CancelOrder'
+ }else{
+ this.tipsInfo='Are you sure you want to delete this order?'
+ this.tipsBut='DeleteOrder'
+ }
this.cancelQuery.order_id=id
this.$refs.alertDialog.open()
},
- // 提示框点击确操作
+ // 提示框点击确操作 取消订单、删除订单
dialogConfirm(){
+ if(this.tipsType==0){
+ this.cancelQuery._action='cancelorder'
+ }else{
+ this.cancelQuery._action='deleteorder'
+ }
defaultRequest2(this.cancelQuery).then(res=>{
console.info(res)
if(res.error==0){
diff --git a/pages/index/pickUpCentre.vue b/pages/index/pickUpCentre.vue
index 758bf62..bbf1df2 100644
--- a/pages/index/pickUpCentre.vue
+++ b/pages/index/pickUpCentre.vue
@@ -1,7 +1,7 @@
-
+
@@ -31,16 +31,29 @@
diff --git a/pages/login/verifyEmail.vue b/pages/login/verifyEmail.vue
index d7244db..8cb5c44 100644
--- a/pages/login/verifyEmail.vue
+++ b/pages/login/verifyEmail.vue
@@ -17,7 +17,7 @@
@@ -37,7 +37,7 @@
query:{
_action:'sendresetcode',
username:'',
- password:'',
+ // password:'',
}
}
},
@@ -73,7 +73,7 @@
console.info(e)
this.type=e.type
if(e.type!=0){
- this.query.password=e.password
+ // this.query.password=e.password
this.query.username=e.email
}else{
diff --git a/pages/order/details.vue b/pages/order/details.vue
index 95c6a97..9e90ea3 100644
--- a/pages/order/details.vue
+++ b/pages/order/details.vue
@@ -65,12 +65,12 @@
- Nathanael
- 5838590290
+ {{goodsDate.consignee}}
+ {{goodsDate.mobile}}
- B Oakdale Mall
- Johnson City NEW YORKUnitedStates13790-1294
+ {{goodsDate.sign_building}}
+ {{goodsDate.address_detail}}
@@ -78,20 +78,22 @@