diff --git a/components/OrderGoods.vue b/components/OrderGoods.vue
index 18682ca..5669af9 100644
--- a/components/OrderGoods.vue
+++ b/components/OrderGoods.vue
@@ -15,7 +15,8 @@
class="attr line1"
v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.sku }}
- ¥{{ cart.truePrice }}
+ ¥{{ cart.truePrice }}
+ {{ cart.productInfo.attrInfo.integral }}积分
评价
@@ -26,6 +27,7 @@
export default {
name: "OrderGoods",
props: {
+ isIntegral:Boolean,
evaluate: Number,
cartInfo: {
type: Array,
diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue
index 457bf3d..561dd70 100644
--- a/pages/order/MyOrder/index.vue
+++ b/pages/order/MyOrder/index.vue
@@ -90,13 +90,16 @@
{{ cart.productInfo.storeName }}
-
+
¥{{
cart.productInfo.attrInfo
? cart.productInfo.attrInfo.price
: cart.productInfo.price
}}
+
+ {{order.payIntegral}}积分
+
x{{ cart.cartNum }}
@@ -104,7 +107,8 @@
共{{ order.cartInfo.length || 0 }}件商品,总金额
- ¥{{ order.payPrice }}
+ ¥{{ order.payPrice }}
+ {{order.payIntegral}}积分
diff --git a/pages/order/OrderDetails/index.vue b/pages/order/OrderDetails/index.vue
index b2d9044..385da6f 100644
--- a/pages/order/OrderDetails/index.vue
+++ b/pages/order/OrderDetails/index.vue
@@ -18,67 +18,44 @@
已完成
-
+ ]">
-
-
-
+
+
-
+
-
+
-
+
-
+
+ ]">
@@ -110,15 +87,9 @@
-
+
自提地址信息
-
@@ -134,7 +105,8 @@
{{ system_store.name}}
{{ system_store.phone }}
-
+
{{ system_store.address }}
@@ -142,7 +114,7 @@
-
+
订单编号:
@@ -223,10 +195,14 @@
-
+
支付金额:
¥{{ orderInfo.totalPrice }}
+
+ 支付积分:
+ {{ orderInfo.payIntegral }}积分
+
优惠券抵扣:
-¥{{ orderInfo.couponPrice }}
@@ -241,7 +217,8 @@
实付款:
- ¥{{ orderInfo.payPrice }}
+ ¥{{ orderInfo.payPrice }}
+ {{ orderInfo.payIntegral }}积分
@@ -255,26 +232,19 @@
- 查看物流
+ 查看物流
确认收货
- 查看物流
+ 查看物流
删除订单
- 查看物流
+ ">查看物流
查看拼团
@@ -282,355 +252,384 @@
-
+
diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue
index dbeeaa0..519bcc2 100644
--- a/pages/order/OrderSubmission/index.vue
+++ b/pages/order/OrderSubmission/index.vue
@@ -44,9 +44,9 @@
-
+
-
+
优惠券
{{ usableCoupon.couponTitle || "请选择" }}
@@ -65,7 +65,7 @@
当前积分
{{ userInfo.integral || 0 }}
-
+
@@ -101,7 +101,7 @@
-
+
支付方式
@@ -131,17 +131,18 @@
商品总价:
- ¥{{ orderPrice.totalPrice }}
+ ¥{{ orderPrice.totalPrice }}
+ {{ orderPrice.payIntegral }}积分
-
+
运费:
¥{{ orderPrice.payPostage }}
-
+
优惠券抵扣:
-¥{{ orderPrice.couponPrice }}
-
+
积分抵扣:
-¥{{ orderPrice.deductionPrice }}
@@ -150,7 +151,8 @@
@@ -324,6 +326,7 @@
contactsTel: "",
storeSelfMention: 0,
cartid: "",
+ isIntegral: false
};
},
computed: mapGetters(["userInfo", "storeItems"]),
@@ -346,6 +349,8 @@
if (that.$yroute.query.pinkid !== undefined) {
that.pinkId = that.$yroute.query.pinkid;
}
+ this.isIntegral = that.$yroute.query.isIntegral == 'true'
+ this.useIntegral = this.isIntegral
if (that.$yroute.query.id !== undefined) {
that.cartid = that.$yroute.query.id;
console.log(that.cartid);
@@ -372,6 +377,9 @@
},
changeUseIntegral: function (e) {
// this.computedPrice();
+ if (this.isIntegral) {
+ return
+ }
this.useIntegral = e.mp.detail.value[0];
},
computedPrice() {
@@ -460,8 +468,20 @@
this.computedPrice();
},
createOrder() {
+ if (this.isIntegral) {
+ // 积分支付
+ if (this.userInfo.integral < this.orderPrice.payIntegral) {
+ uni.showToast({
+ title: "积分不足",
+ icon: "none",
+ duration: 2000,
+ });
+ return
+ }
+ this.active = 'integral'
+ }
let shipping_type = this.shipping_type;
- if (!this.active) {
+ if (!this.isIntegral && !this.active) {
uni.showToast({
title: "请选择支付方式",
icon: "none",
diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue
index d554105..8ec7378 100644
--- a/pages/shop/GoodsCon/index.vue
+++ b/pages/shop/GoodsCon/index.vue
@@ -7,7 +7,7 @@
-
+
¥
{{
attr.productSelect.price || storeInfo.price
@@ -16,11 +16,16 @@
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">¥{{ attr.productSelect.vipPrice || storeInfo.vipPrice }}
+
+ {{
+ attr.productSelect.integral || storeInfo.integral
+ }}积分
+
{{ storeInfo.storeName }}
- 原价:¥{{ storeInfo.otPrice }}
+ 原价:¥{{ storeInfo.otPrice }}
库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}
销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}
@@ -311,7 +316,7 @@
qqmapsdk: null,
productConClass: "product-con",
tempName: "全国包邮",
- isIntegral: "false"
+ isIntegral: false
};
},
computed: mapGetters(["isLogin", "location"]),
@@ -331,6 +336,7 @@
} else {
this.id = this._route.query.id;
}
+ this.isIntegral = url.isIntegral == 'true'
this.productCon();
this.setOpenShare();
},
@@ -507,6 +513,7 @@
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
+ this.$set(this.attr.productSelect, "integral", productSelect.integral);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", value.sort().join(","));
this.$set(this, "attrTxt", "已选择");
@@ -518,6 +525,7 @@
);
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
+ this.$set(this.attr.productSelect, "integral", this.storeInfo.integral);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
@@ -532,6 +540,7 @@
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
+ this.$set(this.attr.productSelect, "integral", this.storeInfo.integral);
this.$set(
this.attr.productSelect,
"unique",
@@ -632,12 +641,14 @@
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
+ this.$set(this.attr.productSelect, "integral", productSelect.integral);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res.value);
this.$set(this, "attrTxt", "已选择");
} else {
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
+ this.$set(this.attr.productSelect, "integral", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
@@ -698,11 +709,11 @@
cartNum: that.attr.productSelect.cart_num,
new: news,
uniqueId: that.attr.productSelect !== undefined ?
- that.attr.productSelect.unique :
- "",
+ that.attr.productSelect.unique : "",
};
postCartAdd(q)
.then(function (res) {
+ console.log(res)
that.isOpen = false;
that.attr.cartAttr = false;
if (news) {
@@ -718,6 +729,7 @@
path: "/pages/order/OrderSubmission/index",
query: {
id: res.data.cartId,
+ isIntegral:that.isIntegral
},
});
} else {
@@ -732,9 +744,12 @@
}
})
.catch((error) => {
+ console.log(error)
that.isOpen = false;
uni.showToast({
- title: error.response.data.msg,
+ title: error.msg ||
+ error.response.data.msg ||
+ error.response.data.message,
icon: "none",
duration: 2000,
});