浏览代码

采美支付优化

zhengjinyi 3 年之前
父节点
当前提交
15202a562e

+ 3 - 2
components/cm-module/orderDetails/paymentRecord.vue

@@ -13,9 +13,9 @@
 			</view>
 			</view>
 			<view class="record-list" v-else>
 			<view class="record-list" v-else>
 				<view class="record-item" v-for="(item,index) in discernReceiptList" :key="index">
 				<view class="record-item" v-for="(item,index) in discernReceiptList" :key="index">
-					<view class="item-time mm">¥{{item.associateAmount.toFixed(2)}}</view>
-					<view class="item-time pp">{{payTypeText(item.payType)}}</view>
 					<view class="item-time tt">{{item.receiptDate}}</view>
 					<view class="item-time tt">{{item.receiptDate}}</view>
+					<view class="item-time pp">{{payTypeText(item.payType)}}</view>
+					<view class="item-time mm">¥{{item.associateAmount.toFixed(2)}}</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -132,6 +132,7 @@
 						&.mm{
 						&.mm{
 							flex: 3;
 							flex: 3;
 							color: $text-color;
 							color: $text-color;
+							text-align: right;
 						}
 						}
 						&.pp{
 						&.pp{
 							flex: 2;
 							flex: 2;

+ 0 - 2
components/cm-module/pageTemplate/templatePrice.vue

@@ -160,8 +160,6 @@ export default {
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.goods = data
 			this.goods = data
 			this.firstClubType = this.clubType
 			this.firstClubType = this.clubType
-			console.log('userIdentity',this.userIdentity)
-			console.log('firstClubType',this.firstClubType)
 		},
 		},
 		PromotionsFormat(promo) {
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
 			//促销活动类型数据处理

+ 1 - 0
pages/user/member/member-pay.vue

@@ -82,6 +82,7 @@ export default {
 			payType: 0,
 			payType: 0,
 			isPaySwitch: true,
 			isPaySwitch: true,
 			payParams: {
 			payParams: {
+				payType:'XCX',
 				code: 0,
 				code: 0,
 				vipRecordId: 0
 				vipRecordId: 0
 			},
 			},

+ 1 - 0
pages/user/member/member.vue

@@ -232,6 +232,7 @@ export default {
 				packageId: 0
 				packageId: 0
 			},
 			},
 			payParam: {
 			payParam: {
+				
 				userId: 0,
 				userId: 0,
 				packageId: 0
 				packageId: 0
 			},
 			},

+ 4 - 3
pages/user/order/order-pay.vue

@@ -222,10 +222,11 @@
 					}
 					}
 					console.log('this.payAmount',this.payAmount)
 					console.log('this.payAmount',this.payAmount)
 					let params ={
 					let params ={
-							payAmount:this.accMul(this.payAmount,100),
+							payAmount:this.payAmount,
+							payType:'XCX',
 							payWay:'WEIXIN',
 							payWay:'WEIXIN',
 							code:wechatcode,
 							code:wechatcode,
-							orderId:this.orderId
+							orderId:this.orderId,
 						}
 						}
 					this.PayService.WeChatMiniWxPay(params).then(response =>{
 					this.PayService.WeChatMiniWxPay(params).then(response =>{
 						// 友盟埋点收集微信支付
 						// 友盟埋点收集微信支付
@@ -237,7 +238,7 @@
 								Um_Key_PayOrderID:`${this.orderId}`
 								Um_Key_PayOrderID:`${this.orderId}`
 							})
 							})
 						}
 						}
-						let PayInfo = JSON.parse(response.data.data.payInfo)
+						let PayInfo = JSON.parse(response.data.rt10_payInfo)
 						this.WxRequestPayment(PayInfo)
 						this.WxRequestPayment(PayInfo)
 					}).catch(error =>{
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
 						this.$util.msg(error.msg,2000)

+ 2 - 2
pages/user/order/order-sharedetails.vue

@@ -76,7 +76,8 @@ export default {
 			popupShow: false,
 			popupShow: false,
 			handlerPros: {},
 			handlerPros: {},
 			btnState: {
 			btnState: {
-				isQuery: false
+				isQuery: false,
+				isPay:false
 			},
 			},
 			mapStateArr: [
 			mapStateArr: [
 				{ label: 'isQuery', val: [4, 5, 12, 13, 33, 22, 23, 32, 77], status: true },
 				{ label: 'isQuery', val: [4, 5, 12, 13, 33, 22, 23, 32, 77], status: true },
@@ -134,7 +135,6 @@ export default {
 			//监听根据付款状态做操作
 			//监听根据付款状态做操作
 			this.OrderService.OrderPaymentValidation({ orderId: orderId })
 			this.OrderService.OrderPaymentValidation({ orderId: orderId })
 				.then(response => {
 				.then(response => {
-					this.payModelData = response.data
 					if (response.data.code == -1) {
 					if (response.data.code == -1) {
 						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 					} else {
 					} else {

+ 17 - 4
pages/user/order/order-sharelogin.vue

@@ -13,7 +13,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="container-footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
 		<view class="container-footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
-			<view class="login-btn" @click.stop="btnConfirmPay">立即支付</view>
+			<view class="login-btn" v-if="btnState.isPay" @click.stop="btnConfirmPay">立即支付</view>
 			<view class="login-sub">
 			<view class="login-sub">
 				<view class="btn" @click.stop="goLogin(1)">账号登录查看</view>
 				<view class="btn" @click.stop="goLogin(1)">账号登录查看</view>
 				<view class="btn" @click.stop="goLogin(2)">使用分享码查看</view>
 				<view class="btn" @click.stop="goLogin(2)">使用分享码查看</view>
@@ -46,7 +46,13 @@ export default {
 				orderId: 0, //订单ID
 				orderId: 0, //订单ID
 				userId: 0, //机构用户ID
 				userId: 0, //机构用户ID
 				serviceProviderId: 0 //协销ID
 				serviceProviderId: 0 //协销ID
-			}
+			},
+			btnState: {
+				isPay:false
+			},
+			mapStateArr: [
+				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23, 111], status: true }
+			]
 		}
 		}
 	},
 	},
 	onLoad(e) {
 	onLoad(e) {
@@ -96,7 +102,15 @@ export default {
 			//查询订单商品信息s
 			//查询订单商品信息s
 			this.OrderService.OrderCommodityData({ orderId: this.params.orderId })
 			this.OrderService.OrderCommodityData({ orderId: this.params.orderId })
 				.then(response => {
 				.then(response => {
-					this.productList = response.data
+					const data =  response.data
+					this.productList = data.productList
+					this.mapStateArr.forEach(el => {
+						el.val.forEach(value => {
+							if (!data.payButton && data.orderStatus === value) {
+								this.btnState[el.label] = el.status
+							}
+						})
+					})
 					this.isShareStatus = true
 					this.isShareStatus = true
 				})
 				})
 				.catch(error => {
 				.catch(error => {
@@ -125,7 +139,6 @@ export default {
 			//监听根据付款状态做操作
 			//监听根据付款状态做操作
 			this.OrderService.OrderPaymentValidation({ orderId: orderId })
 			this.OrderService.OrderPaymentValidation({ orderId: orderId })
 				.then(response => {
 				.then(response => {
-					this.payModelData = response.data
 					if(response.data.code == -1){
 					if(response.data.code == -1){
 						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 					}else{
 					}else{

+ 2 - 2
services/config.env.js

@@ -1,11 +1,11 @@
 let URL_CONFIG = ''
 let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // 开发环境
-    // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
+    URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
     // URL_CONFIG = 'https://core-b.caimei365.com'
     // URL_CONFIG = 'https://core-b.caimei365.com'
-    URL_CONFIG = 'https://core.caimei365.com'
+    // URL_CONFIG = 'https://core.caimei365.com'
 }else{
 }else{
     // 生产环境
     // 生产环境
     // URL_CONFIG = 'https://core-b.caimei365.com'
     // URL_CONFIG = 'https://core-b.caimei365.com'

+ 1 - 1
services/pay.service.js

@@ -34,7 +34,7 @@ export default class PayService {
 	 */
 	 */
     WeChatMiniWxPay (data = {}) {
     WeChatMiniWxPay (data = {}) {
         return this.AjaxService.post({ 
         return this.AjaxService.post({ 
-            url:'/order/pay/wechat', 
+            url:'/order/pay/online', 
             data, 
             data, 
             isLoading: true ,
             isLoading: true ,