Browse Source

20124-1-20

cmy 1 year ago
parent
commit
ea3abc5110
3 changed files with 27 additions and 18 deletions
  1. 1 1
      components/payment/index.vue
  2. 25 16
      pages/goods/order_confirm/index.vue
  3. 1 1
      pages/goods_details/index.vue

+ 1 - 1
components/payment/index.vue

@@ -115,7 +115,7 @@
 				uni.showLoading({
 					title: '支付中'
 				});
-
+				return
 				orderPay({
 					uni: that.order_id,
 					paytype: paytype,

+ 25 - 16
pages/goods/order_confirm/index.vue

@@ -632,12 +632,16 @@
 				saleyg: {
 					list: [],
 				},
-				sale_yg: {}
+				sale_yg: {},
+				spid:'',
 			};
 		},
 		computed: mapGetters(['isLogin']),
 		onLoad: function(options) {
-			this.ptype = options.product_type
+			this.ptype = options.product_type;
+			if(options.spid){
+				this.spid = options.spid;
+			}
 			if (this.ptype == 6) {
 				this.getList()
 			}
@@ -704,6 +708,9 @@
 				this.getCodeData();
 			}
 			// #endif
+			
+			
+			
 		},
 		/**
 		 * 生命周期函数--监听页面显示
@@ -1101,23 +1108,24 @@
 				this.computedPrice()
 			},
 			computedPrice: function() {
-				let shippingType = this.shippingType;
-				postOrderComputed(this.orderKey, {
-					addressId: this.addressId,
-					useIntegral: this.useIntegral ? 1 : 0,
-					couponId: this.priceGroup.couponPrice == 0 ? 0 : this.couponId,
-					shipping_type: this.tableId ? 4 : parseInt(shippingType) + 1,
-					payType: this.payType
+				const that = this;
+				let shippingType = that.shippingType;
+				postOrderComputed(that.orderKey, {
+					addressId: that.addressId,
+					useIntegral: that.useIntegral ? 1 : 0,
+					couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
+					shipping_type: that.tableId ? 4 : parseInt(shippingType) + 1,
+					payType: that.payType
 				}).then(res => {
 					let result = res.data.result;
 					if (result) {
-						this.totalPrice = result.pay_price;
-						this.integral_price = result.deduction_price;
-						this.coupon_price = result.coupon_price;
-						this.promotions_detail = result.promotions_detail;
-						this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
-						this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
-						this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
+						that.totalPrice = result.pay_price;
+						that.integral_price = result.deduction_price;
+						that.coupon_price = result.coupon_price;
+						that.promotions_detail = result.promotions_detail;
+						that.integral = that.useIntegral ? result.SurplusIntegral : that.userInfo.integral;
+						that.$set(that.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
+						that.$set(that.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
 					}
 				}).catch(err => {
 					return that.$util.Tips({
@@ -1898,6 +1906,7 @@
 					title: '请选择支付方式'
 				});
 				data = {
+					sale:that.spid,
 					sale_uid: that.sale_yg.id || 0,
 					collate_code_id: that.collage_id || that.tableId,
 					custom_form: that.confirm,

+ 1 - 1
pages/goods_details/index.vue

@@ -1938,7 +1938,7 @@
 								url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cartId +
 									'&delivery_type=' + delivery_type + '&addressId=' + that.addressId +
 									'&store_id=' + that.store_id + '&store_name=' + that.store_name +
-									'&product_id=' + that.storeInfo.id + '&product_type=' + that.storeInfo.product_type
+									'&product_id=' + that.storeInfo.id + '&product_type=' + that.storeInfo.product_type+'&spid='+app.globalData.spid
 							});
 						} else {
 							that.$util.Tips({