| | |
| | | <switch :color="getTheme()" style="transform:scale(0.7);margin-right: -20rpx;" :checked="balanceType" |
| | | @change="switch2Change" /> |
| | | </view> |
| | | <view v-if="hasActivation" class="item"> |
| | | <view class="d-s-c"> |
| | | <view class="icon-box d-c-c mr10"><span style="color: #1774ff;font-size: 50rpx;" class="icon iconfont icon-erweima"></span></view> |
| | | <view class="key d-c-c"> |
| | | 激活码抵扣: |
| | | <input class="ml20 f32 flex-1 p10" style="border: 1px solid #999999 ;" name="activation_code" type="text" v-model="activation_code" placeholder-class="grary9" |
| | | placeholder="请输入激活码" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-btn" @click="submit"> |
| | | <button type="default">立即支付</button> |
| | |
| | | payPrice: '', |
| | | orderSn:'', |
| | | payData: [], // 半屏小程序相关 |
| | | activation_code:'',//激活码 |
| | | isFirst: false, |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | }, |
| | | hasActivation() { |
| | | if (this.order_type == 30) { |
| | | return false |
| | | } |
| | | let n = this.checkedPay.indexOf(50); |
| | | if (n == -1) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | }, |
| | | }, |
| | | onLoad(e) { |
| | |
| | | if (self.order_type == 50) { |
| | | url = 'plus.advance.Order/pay'; |
| | | } |
| | | if(self.order_type == 100){ |
| | | url = 'plus.business.Order/pay'; |
| | | } |
| | | // 供应商年卡订单 |
| | | if(self.order_type == 110){ |
| | | url = 'supplier.member/pay'; |
| | | } |
| | | let params = { |
| | | order_id: self.order_id, |
| | | pay_source: self.getPlatform() |
| | |
| | | if (self.order_type == 50) { |
| | | url = 'plus.advance.Order/pay'; |
| | | } |
| | | if(self.order_type == 100){ |
| | | url = 'plus.business.Order/pay'; |
| | | } |
| | | // 供应商年卡订单 |
| | | if(self.order_type == 110){ |
| | | url = 'supplier.member/pay'; |
| | | } |
| | | let use_balance = self.balanceType == true ? 1 : 0; |
| | | if (self.payPrice == 0) { |
| | | use_balance = 1; |
| | |
| | | pay_source: self.getPlatform(), |
| | | payType: self.pay_type, |
| | | use_balance: use_balance, |
| | | activation_code:self.activation_code |
| | | } |
| | | |
| | | self._post(url, params, |
| | | function(res) { |
| | | // 半屏小程序支付 by lyzflash |
| | | if (res.data.payment.is_embed) { |
| | | if (res.data.payment && res.data.payment.is_embed) { |
| | | // console.log(res.data.payment); |
| | | self.isFirst = true; |
| | | uni.openEmbeddedMiniProgram({ |
| | |
| | | self.showSuccess("支付成功", function() { |
| | | self.gotoPage('/pages/order/myorder', 'reLaunch'); |
| | | }) |
| | | } else |
| | | if(self.order_type == 100){ |
| | | self.showSuccess("支付成功", function() { |
| | | self.gotoPage('/pages/plus/business/detail?business_card_id=' + result.data.business_card_id, 'reLaunch'); |
| | | }) |
| | | } else if(self.order_type == 110){ |
| | | // 供应商年卡订单支付成功 |
| | | self.showSuccess("支付成功", function() { |
| | | self.gotoPage('/pages/tabBar/user/index', 'reLaunch'); |
| | | }) |
| | | } else { |
| | | self.gotoPage('/pages/order/pay-success/pay-success?order_id=' + self.order_id, |
| | | 'reLaunch'); |
| | |
| | | self.gotoPage('/pages/user/my_shop/my_shop', 'redirect'); |
| | | } else if (self.order_type == 50) { |
| | | self.gotoPage('/pages/order/myorder', 'redirect'); |
| | | }else if (self.order_type == 100) { |
| | | self.gotoPage('/pages/plus/business/detail?business_card_id=' + result.data.business_card_id, 'redirect'); |
| | | } else if(self.order_type == 110){ |
| | | // 供应商年卡订单支付失败 |
| | | self.gotoPage('/pages/user/my_shop/my_shop', 'redirect'); |
| | | } else { |
| | | self.gotoPage('/pages/order/myorder', 'redirect'); |
| | | } |
| | |
| | | align-items: center; |
| | | line-height: 116rpx; |
| | | } |
| | | </style> |
| | | </style> |