From 1a1a0de460229a16601012b61b7526349b8e5634 Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Thu, 6 Aug 2020 17:52:25 +0800
Subject: [PATCH 1/2] upgrade 8.6
---
common/api/user.js | 5 +-
common/http.interceptor.js | 2 +-
components/mine/order-item/index.vue | 5 +-
components/shop/group/index.vue | 2 +-
pageB/components/sdetails/guige.vue | 1 +
pageB/sdetails/index.vue | 66 ++++++++++++++++---------
pageC/cart/ConfirmOrder.vue | 7 ++-
pageC/cart/index.vue | 25 ++++++++--
pageC/components/merchant/image-top.vue | 2 +-
pageC/components/merchant/list-item.vue | 2 +-
pageC/merchant/goods.vue | 2 +-
pageC/merchant/index.vue | 58 ++++++++++++++++------
pageE/mine/EditUserInfo.vue | 8 ++-
pageE/order/Details.vue | 2 +-
pageE/order/Index.vue | 10 ++--
pageE/order/RefundOrder.vue | 49 +++++++++++++++---
pageE/tool/WashOrder.vue | 13 +++--
17 files changed, 183 insertions(+), 76 deletions(-)
diff --git a/common/api/user.js b/common/api/user.js
index 19d6fd8..46e4557 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -259,12 +259,13 @@ export default {
return vm.$u.post('Order/buyer_cancel', params);
},
// add_refund
- refundOrder({ order_id, goods_id, refund_amount, refund_type = 1 } = {}) {
+ refundOrder({ order_id, goods_id, goods_num, reason_info, refund_amount } = {}) {
return vm.$u.post('order/add_refund', {
order_id: order_id,
goods_id: goods_id,
refund_amount: refund_amount,
- refund_type: refund_type,
+ goods_num: goods_num,
+ reason_info: reason_info,
});
},
// 删除订单
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 5484ac8..551bdf3 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -36,7 +36,7 @@ const install = (Vue, vm) => {
} else {
// 如果返回false,则会调用Promise的reject回调,
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
- return false;
+ return res;
}
}
diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue
index c28721e..d2f0f48 100644
--- a/components/mine/order-item/index.vue
+++ b/components/mine/order-item/index.vue
@@ -25,7 +25,7 @@
- 申请退款
+ 申请退款
查看物流
确认收货
@@ -47,7 +47,7 @@ export default {
props: {
order: Object
},
- created() {
+ mounted() {
this.viewState();
},
methods: {
@@ -81,6 +81,7 @@ export default {
default:
break;
}
+ // console.log(state);
this.state = state;
},
cancelOrder() {
diff --git a/components/shop/group/index.vue b/components/shop/group/index.vue
index da692e1..1332e1f 100644
--- a/components/shop/group/index.vue
+++ b/components/shop/group/index.vue
@@ -10,7 +10,7 @@
-
+
diff --git a/pageB/components/sdetails/guige.vue b/pageB/components/sdetails/guige.vue
index 7ba8a6e..e156f6b 100644
--- a/pageB/components/sdetails/guige.vue
+++ b/pageB/components/sdetails/guige.vue
@@ -36,6 +36,7 @@
box-sizing: border-box;
border-radius: 6rpx;
margin-right: 26rpx;
+ margin-bottom: 20rpx;
}
.xuanzhong{
border: #ff780f 1rpx solid;
diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue
index 8b3237f..fc11d45 100644
--- a/pageB/sdetails/index.vue
+++ b/pageB/sdetails/index.vue
@@ -22,10 +22,17 @@
{{ goodsInfo.store_name }}
{{ goodsInfo.goods_name }}
-
- ¥{{ goodsInfo.goods_price }}
- ¥{{ goodsInfo.goods_marketprice }}
-
+
+
+ ¥{{ goodsInfo.goods_price }}
+ ¥{{ goodsInfo.goods_marketprice }}
+
+
+
+
+ 收藏
+
+
@@ -135,11 +142,11 @@
-
+
店铺
-
+
客服
@@ -154,7 +161,7 @@
-
+
店铺
@@ -222,7 +229,6 @@ export default {
// console.log(option);
this.type = Number(option.type);
this.id = option.id;
- this.getGoodsDetails(this.id);
this.setTitle();
},
onShow() {
@@ -230,6 +236,7 @@ export default {
this.showSpec = false;
this.showGroupUser = false;
this.showInvolvementUser = false;
+ this.getGoodsDetails(this.id);
},
onNavigationBarButtonTap(e) {
if(e.index == 0) this.$u.route('/pageC/cart/index');
@@ -331,6 +338,7 @@ export default {
this.glist = res.data.data.spec_list;
this.user_suc = res.data.data.user_suc;
this.groupUser =res.data.data.user;
+ console.log(this.groupUser);
}
})
},
@@ -372,13 +380,14 @@ export default {
}
if(this.type == 2) {
if(type == 'involvement') {
+ // const userId = uni.getStorageSync('user_info').member.member_id;
+ this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
+ console.log(this.$store.state.pintuangroup_headid);
Object.assign(params, {
pintuan_id: this.id,
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
})
} else {
- const userId = uni.getStorageSync('user_info').member.member_id;
- this.$store.commit('setGroupHeadId', userId);
Object.assign(params, {
pintuan_id: this.id,
})
@@ -552,18 +561,31 @@ export default {
line-height: 1.5;
}
}
- .pic{
- >text{
- font-size: 32rpx;
- color: #FF3131;
- }
- >s{
- font-size: 26rpx;
- color: #999;
- display: inline-block;
- margin-left: 30rpx;
- }
- }
+ .price-collect {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .pic{
+ >text{
+ font-size: 32rpx;
+ color: #FF3131;
+ }
+ >s{
+ font-size: 26rpx;
+ color: #999;
+ display: inline-block;
+ margin-left: 30rpx;
+ }
+ }
+ .collect {
+ margin-left: auto;
+ display: flex;
+ align-items: center;
+ > text {
+ margin-left: 12rpx;
+ }
+ }
+ }
}
.comment {
margin-top: 20rpx;
diff --git a/pageC/cart/ConfirmOrder.vue b/pageC/cart/ConfirmOrder.vue
index 5437805..0b5ee0c 100644
--- a/pageC/cart/ConfirmOrder.vue
+++ b/pageC/cart/ConfirmOrder.vue
@@ -179,12 +179,13 @@ export default {
let params = {
pintuan_id: this.orderInfo.pintuan_id,
}
- // console.log(this.involvemenGroupInfo);
+ // console.log(this.orderInfo);
+ // console.log(this.$store.state.pintuangroup_headid);
if(this.orderInfo.pintuangroup_id) {
Object.assign(params, { pintuangroup_headid: this.$store.state.pintuangroup_headid });
Object.assign(params, { pintuangroup_id: this.orderInfo.pintuangroup_id });
}
- // console.log(params);
+ console.log(params);
this.$u.api.withImmediate(params).then(res => {
this.showGroupUser = false;
this.showInvolvementUser = false;
@@ -200,7 +201,6 @@ export default {
if(!this.debounce) return;
this.debounce = false;
if(this.orderType == 2) {
- // this.sendOrder(0);
this.withImmediate();
} else if(this.orderType == 1) {
this.sendOrder(0);
@@ -256,7 +256,6 @@ export default {
// console.log(params);
this.$u.api.sendOrder(params).then(res => {
if(res.errCode == 0) {
- // this.withImmediate();
this.$u.route({
type: 'redirect',
url: '/pageC/cart/cashier',
diff --git a/pageC/cart/index.vue b/pageC/cart/index.vue
index d88b5bc..bb720dd 100644
--- a/pageC/cart/index.vue
+++ b/pageC/cart/index.vue
@@ -4,7 +4,7 @@
-
+
{{ store.store_name }}
@@ -12,9 +12,9 @@
-
-
-
+
+
+
{{ goods.goods_name }}
¥{{ goods.goods_price }}
@@ -204,6 +204,23 @@ export default {
})
this.list[value[1]].checked = checked;
this.storeChange();
+ },
+ viewStoreDetails(sid) {
+ this.$u.route({
+ url: 'pageC/merchant/index',
+ params: {
+ id: sid
+ }
+ })
+ },
+ viewGoodsDetails(gid) {
+ this.$u.route({
+ url: 'pageB/sdetails/index',
+ params: {
+ id: gid,
+ type: 1,
+ }
+ })
}
},
onNavigationBarButtonTap(btn) {
diff --git a/pageC/components/merchant/image-top.vue b/pageC/components/merchant/image-top.vue
index a061379..2435234 100644
--- a/pageC/components/merchant/image-top.vue
+++ b/pageC/components/merchant/image-top.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 4bc93d2..1dd2aa2 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -152,10 +152,6 @@ export default {
}
this.getUserInfo();
},
- // 下拉刷新
- onPullDownRefresh() {
- this.getUserInfo();
- },
onNavigationBarButtonTap() {
this.toOtherPage("/setting/Index");
},
diff --git a/pages/shop/index.vue b/pages/shop/index.vue
index 6b73706..76e2c08 100644
--- a/pages/shop/index.vue
+++ b/pages/shop/index.vue
@@ -48,8 +48,11 @@
+
+
+