|
@@ -90,7 +90,6 @@
|
|
|
import authorize from '@/common/config/authorize.js'
|
|
|
// import keyboard from "@/components/keyboard/keyboard.vue"
|
|
|
import thorui from "@/components/clipboard/clipboard.thorui.js"
|
|
|
- import { PayOrderCheckoutCounter,WeChatMiniWxPay,PayOrderPayLink } from "@/api/order.js"
|
|
|
export default{
|
|
|
components: {
|
|
|
// keyboard
|
|
@@ -145,7 +144,7 @@
|
|
|
this.GetPayOrderInfo()
|
|
|
},
|
|
|
GetPayOrderInfo(){
|
|
|
- PayOrderCheckoutCounter({orderId:this.orderID}).then(response =>{
|
|
|
+ this.PayService.PayOrderCheckoutCounter({orderId:this.orderID}).then(response =>{
|
|
|
this.isRepuest = true
|
|
|
this.discernReceipt = response.data.discernReceipt //支付记录
|
|
|
this.payTotalFee = response.data.order.payTotalFee //已付金额
|
|
@@ -163,14 +162,18 @@
|
|
|
this.MiniWxPayFor()
|
|
|
break;
|
|
|
case '1':
|
|
|
- this.isShowTip = true
|
|
|
this.BuildCatenate()
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
BuildCatenate(){
|
|
|
- PayOrderPayLink({unpaidAmount:this.payAmount,orderId:this.orderID}).then(response =>{
|
|
|
+ if(this.payAmount <=10){
|
|
|
+ this.$util.msg("企业网银支付的金额必须大于¥10.00",2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,orderId:this.orderID}).then(response =>{
|
|
|
this.payHttpUrl = response.data
|
|
|
+ this.isShowTip = true
|
|
|
})
|
|
|
},
|
|
|
MiniWxPayFor(){
|
|
@@ -180,41 +183,43 @@
|
|
|
this.$util.msg("请输入本次支付的金额",2000)
|
|
|
return
|
|
|
}
|
|
|
+ if(this.payAmount*100 < 2){
|
|
|
+ this.$util.msg("本次支付的金额必须大于¥0.02",2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
let params ={
|
|
|
payAmount:this.payAmount*100,
|
|
|
payWay:"WEIXIN",
|
|
|
- payType:"MINIAPP_WEIXIN",
|
|
|
code:wechatcode,
|
|
|
orderId:this.orderID
|
|
|
}
|
|
|
- WeChatMiniWxPay(params).then(response =>{
|
|
|
+ this.PayService.WeChatMiniWxPay(params).then(response =>{
|
|
|
let PayInfo = JSON.parse(response.data.data.payInfo);
|
|
|
- uni.setStorageSync('payInfo',PayInfo)
|
|
|
- console.log(PayInfo)
|
|
|
- wx.requestPayment({
|
|
|
- 'timeStamp': PayInfo.timeStamp,
|
|
|
- 'nonceStr': PayInfo.nonceStr,
|
|
|
- 'package': PayInfo.package,
|
|
|
- 'signType': PayInfo.signType,
|
|
|
- 'paySign': PayInfo.paySign,
|
|
|
- 'success':function(res){
|
|
|
- console.log('支付成功');
|
|
|
- wx.reLaunch({url: '/pages/tabBar/user/user'});
|
|
|
- },
|
|
|
- 'fail':function(res){
|
|
|
- self.$util.msg('订单支付已取消')
|
|
|
- },
|
|
|
- 'complete':function(res){
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
+ this.WxRequestPayment(PayInfo)
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ WxRequestPayment(data){
|
|
|
+ wx.requestPayment({
|
|
|
+ 'timeStamp': data.timeStamp,
|
|
|
+ 'nonceStr': data.nonceStr,
|
|
|
+ 'package': data.package,
|
|
|
+ 'signType': data.signType,
|
|
|
+ 'paySign': data.paySign,
|
|
|
+ 'success':function(res){
|
|
|
+ wx.reLaunch({url: '/pages/tabBar/user/user'});
|
|
|
+ },
|
|
|
+ 'fail':function(res){
|
|
|
+ self.$util.msg('订单支付已取消')
|
|
|
+ },
|
|
|
+ 'complete':function(res){
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
confirmEvent(value){//点击自定义键盘完成的回调函数
|
|
|
- console.log(value)
|
|
|
this.chechValue(value)
|
|
|
this.showDigitKeyboard = false
|
|
|
},
|