From 7c039b6f9a93bf342cb7baaf37f6dbd6609f8f21 Mon Sep 17 00:00:00 2001
From: mullins <476823686@qq.com>
Date: Thu, 18 Jun 2020 12:06:26 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5?=
=?UTF-8?q?=E8=A7=84=E6=A0=BC=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/myOrderPaying/myOrderPaying.vue | 75 ++++++++++++++++++++-----------
src/pages/user/user.vue | 27 ++++++++---
src/store/modules/orderRead.js | 47 ++++++++++++++-----
3 files changed, 107 insertions(+), 42 deletions(-)
diff --git a/src/pages/myOrderPaying/myOrderPaying.vue b/src/pages/myOrderPaying/myOrderPaying.vue
index 407390d..d873f1a 100644
--- a/src/pages/myOrderPaying/myOrderPaying.vue
+++ b/src/pages/myOrderPaying/myOrderPaying.vue
@@ -60,7 +60,7 @@
- 规格:玫瑰金 / 钛合金 / 防日光防紫外线 / 超薄超轻
+
+ {{skuList[index] ? skuList[0].sku_name.replace('_', '/') : ''}}
+
- {{Number(orderInfoListItem.nowPrice)/100}}
+ ¥{{Number(orderInfoListItem.nowPrice)/100}}
X {{orderInfoListItem.num}}
@@ -181,6 +183,13 @@ export default {
uid: uid,
openid: openid,
})
+ const { list } = this.orderInfo.order_info
+ for (let index = 0; index < list.length; index++) {
+ await store.dispatch('orderRead/goodDetails', {
+ pid: list[index].pid,
+ skId: list[index].sk_id,
+ })
+ }
this.totalPrice = this.orderInfo.total_fee
},
// 若从支付页面跳转过来,返回直接返回到首页
@@ -193,6 +202,10 @@ export default {
}
},
computed: {
+ // 规格列表
+ skuList () {
+ return this.$store.state.orderRead.skuList
+ },
orderInfo() {
return this.$store.state.orderRead.orderInfo
},
@@ -235,28 +248,29 @@ export default {
this.cancleOrder()
},
cancleOrder() {
- const uid = this.uid
- const openid = this.openid
- const keyname = this.orderInfo.order_info.keyname
- // console.log('keyname',this.orderInfo.keyname)
- uni.showModal({
- title: '提示',
- content: '现在取消,订单不可恢复哦,确认取消吗?',
- success: function(res) {
- if (res.confirm) {
- store.dispatch('cancelOrder/cancel', {
- keyname: keyname,
- uid: uid,
- openid: openid,
- })
- uni.navigateBack({
- delta: 1,
- })
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- },
- })
+ console.log('dddd', this.skuList)
+ // const uid = this.uid
+ // const openid = this.openid
+ // const keyname = this.orderInfo.order_info.keyname
+ // // console.log('keyname',this.orderInfo.keyname)
+ // uni.showModal({
+ // title: '提示',
+ // content: '现在取消,订单不可恢复哦,确认取消吗?',
+ // success: function(res) {
+ // if (res.confirm) {
+ // store.dispatch('cancelOrder/cancel', {
+ // keyname: keyname,
+ // uid: uid,
+ // openid: openid,
+ // })
+ // uni.navigateBack({
+ // delta: 1,
+ // })
+ // } else if (res.cancel) {
+ // console.log('用户点击取消')
+ // }
+ // },
+ // })
},
paylog() {
console.log('pay', this.orderInfo)
@@ -588,6 +602,7 @@ export default {
.buy-num {
font-size: 12px;
color: #999999;
+ margin-left: 0;
}
}
}
@@ -695,13 +710,21 @@ export default {
width: 19px;
height: 16px;
}
- text {
+ button {
// font-family: PingFangSC-Regular;
+ border: none;
+ border-radius: 0;
+ text-align: left;
margin-left: 20rpx;
font-size: 14px;
color: #333333;
letter-spacing: -0.26px;
line-height: 18px;
+ background-color: #fff;
+ padding: 0;
+ &::after {
+ border: 0;
+ }
}
}
}
diff --git a/src/pages/user/user.vue b/src/pages/user/user.vue
index 9150b6a..3b54951 100644
--- a/src/pages/user/user.vue
+++ b/src/pages/user/user.vue
@@ -77,7 +77,10 @@
>
-