Przeglądaj źródła

fix:订单详情页支付修改

zhanghui 2 lat temu
rodzic
commit
3391d10a33

+ 2 - 3
common/js/api.js

@@ -300,11 +300,10 @@ export default {
         })
     },
     // get请求,查询充值优惠列表
-    getRechargeList(data) {
+    getRechargeList() {
         return request({
             url: '/business/wechat/getRechargeList',
-            method: 'GET',
-            data: data
+            method: 'GET'
         })
     },
 

+ 6 - 10
myPages/recharge/index.vue

@@ -165,8 +165,7 @@
 					orderType: 3, // 订单类型;1-服务订单 2-产品订单 3-充值订单
 					rechargeAmount: null, // 充值金额
 					strategyId: null, // 优惠策略的ID  测试id 1694514233806888962
-					remark: null,
-					storeId:''
+					remark: null
 				},
 				reqPayParm: {
 					auth: true,
@@ -197,11 +196,7 @@
 
 			// 获取充值面额
 			getRechargeList(){
-				let storeId = uni.getStorageSync('rechargeStoreId')
-				if (storeId){
-					this.reqOrderParm.storeId = uni.getStorageSync('rechargeStoreId')
-				}
-				this.$api.getRechargeList(this.reqOrderParm).then((res)=>{
+				this.$api.getRechargeList().then((res)=>{
 					this.rechargeList = res.data.data;
 				})
 			},
@@ -211,7 +206,7 @@
 
 				if(!this.isSelected){ // 是否确定协议
 					uni.showToast({
-            icon: 'none',
+            			icon: 'none',
 						title: '请同意充值协议!'
 					});
 					return;
@@ -219,12 +214,13 @@
 
 				if(this.reqOrderParm.strategyId == null){
 					uni.showToast({
-            icon: 'none',
+            		icon: 'none',
 						title: '请选择充值项目!'
 					});
 					return;
 				}
-
+				let promotionParam = uni.getStorageSync('promotionParam')
+				Object.assign(this.reqOrderParm,promotionParam)
 				// 提交订单
 				this.$api.commonGeneralOrder(this.reqOrderParm).then((res)=>{
 					console.log('+++++++++++commonGeneralOrder++++++++++',res)

+ 16 - 18
orderPages/orderDetail/index.vue

@@ -141,9 +141,9 @@
 			<view class="bottomBtn flex-row justify-between">
 				<view class=" flex-row">
 					<text  class="unpaid">合计</text>
-					<text  class="preferentialPrice">¥{{allPrice}}</text>
-					<text  class="unpaid">已优惠</text>
-					<text  class="originalPrice">¥{{totalDiscount}}</text>
+					<text  class="preferentialPrice">¥{{order.totalAmount}}</text>
+<!--					<text  class="unpaid">已优惠</text>-->
+<!--					<text  class="originalPrice">¥{{totalDiscount}}</text>-->
 					<!--                        <text  class="priceDetail">价格明细</text>-->
 				</view>
 
@@ -403,21 +403,19 @@
 			},
 
 			qenPayInfo(){
-
-				for(let i=0;i<this.order.child.length;i++){
-					if (this.order.child[i].status==3){
-						uni.$u.toast('子订单未审核结束')
-						return
-					}
-				}
-
-				this.getUserInfo();
-				let orderServiceIds = []
-				this.order.child.forEach(i=>{
-					if (i.status !=5){ //排除审核通过的子订单
-						orderServiceIds.push(i.orderServiceId)
-					}
-				})
+				//
+				// for(let i=0;i<this.order.child.length;i++){
+				// 	if (this.order.child[i].status==3){
+				// 		uni.$u.toast('子订单未审核结束')
+				// 		return
+				// 	}
+				// }
+				// let orderServiceIds = []
+				// this.order.child.forEach(i=>{
+				// 	if (i.status !=5){ //排除审核通过的子订单
+				// 		orderServiceIds.push(i.orderServiceId)
+				// 	}
+				// })
 				this.$api.oneClickPay({
 					orderId:this.order.orderId
 				}).then(res=>{

+ 1 - 0
pages/index/index.vue

@@ -295,6 +295,7 @@ export default {
       for (let i=0;i<b.length;i++){
         param[b[i].split('=')[0]] = b[i].split('=')[1]
       }
+      uni.setStorageSync('promotionParam',param)
       console.log('param==============>',param)
     }
 

+ 2 - 2
storePages/rights/index.vue

@@ -151,10 +151,10 @@
 			},
 
 			commonGeneralOrder(){
-				let storeId = uni.getStorageSync('cardStoreId')
+				let promotionParam = uni.getStorageSync('promotionParam')
 				this.$refs.popup.close()
 				this.$api.commonGeneralOrder({
-					storeId:storeId || '',
+					...promotionParam,
 					orderType: 5,
 					serviceObjectId: this.serviceObject.id,
 					equityCardId:this.orderRights.id