Browse Source

订单微信支付验证

yuwenjun1997 3 years ago
parent
commit
59a5125cf0
2 changed files with 19 additions and 11 deletions
  1. 9 9
      pages/user/order/create-order.vue
  2. 10 2
      pages/user/order/order-payment.vue

+ 9 - 9
pages/user/order/create-order.vue

@@ -214,10 +214,10 @@
 				isCheckedBeans:false,     // 是否抵扣采美豆
 				isCouponModel:false,	  // 兑换优惠券成功提示
 				ExchangeCouponData:{},	  // 兑换优惠券信息
-				contentModalText: '采购金额过小,将扣除500采美豆,建议您前往采美旗下“呵呵商城”小程序购买小额商品。',     //操作文字提示语句
+				contentModalText: '采购金额过小,将扣除500采美豆,建议您前往采美旗下“颜选美学”小程序购买小额商品。',     //操作文字提示语句
 				modalButton: [
 					{
-						text: '前往呵呵商城',
+						text: '前往颜选美学',
 						type: 'gray',
 						plain: true //是否空心
 					},
@@ -538,11 +538,11 @@
 			orderSubmitMit(){// 提交订单按钮点击事件
 				if(this.allPrice <1000){
 					this.showModal = true
-					this.contentModalText = '采购金额过小,将扣除500采美豆,建议您前往采美旗下“呵呵商城”小程序购买小额商品。'    //操作文字提示语句
+					this.contentModalText = '采购金额过小,将扣除500采美豆,建议您前往采美旗下“颜选美学”小程序购买小额商品。'    //操作文字提示语句
 					this.showModalstauts = 1
 					this.modalButton= [
 						{
-							text: '前往呵呵商城',
+							text: '前往颜选美学',
 							type: 'gray',
 							plain: true //是否空心
 						},
@@ -621,7 +621,7 @@
 					this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
 					if(error.code == -3){// 已提交2个小于1000元的订单提示
 						this.showModal = true
-						this.contentModalText = '您已有2个采购金额过小的订单,本次不能再进行采购。建议您前往采美旗下“呵呵商城”小程序购买小额商品。'  //操作文字提示语句
+						this.contentModalText = '您已有2个采购金额过小的订单,本次不能再进行采购。建议您前往采美旗下“颜选美学”小程序购买小额商品。'  //操作文字提示语句
 						this.showModalstauts = 3
 						this.modalButton=[
 							{
@@ -630,7 +630,7 @@
 								plain: true //是否空心
 							},
 							{
-								text: '前往呵呵商城',
+								text: '前往颜选美学',
 								customStyle: {
 									color: '#fff',
 									bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
@@ -640,7 +640,7 @@
 						]
 					}else if(error.code == -4){// 采美豆为负数
 						this.showModal = true
-						this.contentModalText = '采美豆不足,不能提交订单。建议您前往采美旗下“呵呵商城”小程序购买小额商品。'  //操作文字提示语句
+						this.contentModalText = '采美豆不足,不能提交订单。建议您前往采美旗下“颜选美学”小程序购买小额商品。'  //操作文字提示语句
 						this.showModalstauts = 3
 						this.modalButton=[
 							{
@@ -649,7 +649,7 @@
 								plain: true //是否空心
 							},
 							{
-								text: '前往呵呵商城',
+								text: '前往颜选美学',
 								customStyle: {
 									color: '#fff',
 									bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
@@ -691,7 +691,7 @@
 					}
 				}
 			},
-			handleClickHeHeMiniApplet(){ // 跳转呵呵商城小程序
+			handleClickHeHeMiniApplet(){ // 跳转颜选美学小程序
 				uni.navigateToMiniProgram({
 					appId: 'wx2c3b0a7f343235b1',
 					path: '/pages/tabBar/index/index',

+ 10 - 2
pages/user/order/order-payment.vue

@@ -62,7 +62,7 @@
 					<view class="pay-check">
 						<view class="check-title"><view class="text">选择支付方式</view></view>
 						<view class="pay-checked">
-							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 0}"   @click="tabClick(0)" >
+							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 0}"   @click="tabClick(0)" v-if="weChatFlag" >
 								<view class="item-l">
 									<view class="item-icon"><text class="iconfont icon-weixinzhifu"></text></view>
 									<view class="item-texts"><text>微信支付</text></view>
@@ -158,7 +158,8 @@
 				optionType:'',
 				payBringTitle:'本次交易暂不支持线上支付,请使用线下转账方式付款',
 				payStatusText:'使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。',
-				pageType:''
+				pageType:'',
+                weChatFlag: true // 判断微信支付是否可用
 			}
 		},
 		onLoad(option) {
@@ -238,6 +239,13 @@
 				this.PayService.PayOrderCheckoutShoporders({shopOrderId:shopOrderId}).then(response =>{
 					let data = response.data.shopOrder
 					this.payableAmount = data.obligation  //待付金额
+                    // 判断微信支付是否可用
+                    this.weChatFlag = response.data.weChatFlag === '1'
+                    if(!this.weChatFlag){
+                        this.tabCurrentIndex = 1
+                        this.btnColor='#034582'
+                        this.buttonText='使用企业网银支付'
+                    }
 					//判断线上线下显示
 					if(this.optionType == 'onlinePay'){
 						this.onlinePay = 2