|
|
@ -27,7 +27,7 @@ |
|
|
|
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="row" @tap="paytype='oilcard'"> |
|
|
|
<view class="row" @tap="paytype='6'" v-if="item == 6"> |
|
|
|
<view class="left"> |
|
|
|
<view class="left"> |
|
|
|
<image :src="imagewxUrl+imgadres1"></image> |
|
|
|
<image :src="imagewxUrl+imgadres1"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -35,9 +35,9 @@ |
|
|
|
油卡支付(余额:{{oilPirce}}元) |
|
|
|
油卡支付(余额:{{oilPirce}}元) |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<view class="right"> |
|
|
|
<radio :checked="paytype=='oilcard'" @click="changeRiado1()" color="#0083f5" /> |
|
|
|
<radio :checked="paytype=='6'" @click="changeRiado1()" color="#0083f5" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
<view class="row" @tap="paytype='4'" v-if="item == 4"> |
|
|
|
<view class="row" @tap="paytype='4'" v-if="item == 4"> |
|
|
|
<view class="left"> |
|
|
|
<view class="left"> |
|
|
|
<image src="../../static/img/unionpay.png"></image> |
|
|
|
<image src="../../static/img/unionpay.png"></image> |
|
|
@ -68,10 +68,9 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { |
|
|
|
import { |
|
|
|
getHuiLianTongCardBalance, |
|
|
|
getHuiLianTongCardBalance, |
|
|
|
oilCardPay, |
|
|
|
|
|
|
|
findUser, |
|
|
|
findUser, |
|
|
|
qianzhuorderToUnionPay, |
|
|
|
unionPay, |
|
|
|
czhltUnionCardPay, |
|
|
|
cardPay, |
|
|
|
getThirdPartyByDetail |
|
|
|
getThirdPartyByDetail |
|
|
|
} from '../../Utils/Api.js' |
|
|
|
} from '../../Utils/Api.js' |
|
|
|
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'; |
|
|
|
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'; |
|
|
@ -95,12 +94,12 @@ |
|
|
|
oilPirce: 0, //油卡金额 |
|
|
|
oilPirce: 0, //油卡金额 |
|
|
|
showType: 3, //支付方式 |
|
|
|
showType: 3, //支付方式 |
|
|
|
paytypeList: [], //支付选择 |
|
|
|
paytypeList: [], //支付选择 |
|
|
|
productType: '' //分类 星巴克 ,肯德基 |
|
|
|
productType: '' ,//分类 星巴克 ,肯德基 |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
onLoad(e) { |
|
|
|
this.orderNo = e.orderId; |
|
|
|
this.orderNo = e.orderId; |
|
|
|
this.productType = e.productType; |
|
|
|
this.productType = e.productType; |
|
|
|
this.amount = e.amount; |
|
|
|
this.amount = e.amount; |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
this.findUser() |
|
|
|
this.findUser() |
|
|
@ -119,8 +118,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
let datas = { |
|
|
|
let datas = { |
|
|
|
platformId: this.showType, |
|
|
|
platformId: this.showType, |
|
|
|
regionId: app.globalData.cityId, |
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
productType: this.productType |
|
|
|
productType: this.productType, |
|
|
|
|
|
|
|
productId: this.goodsid, |
|
|
|
} |
|
|
|
} |
|
|
|
getThirdPartyByDetail(datas).then(res => { |
|
|
|
getThirdPartyByDetail(datas).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
@ -203,9 +203,9 @@ |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
if (that.paytype == '4') { |
|
|
|
if (that.paytype == '4') { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"orderId": that.orderNo |
|
|
|
"orderNo": that.orderNo |
|
|
|
} |
|
|
|
} |
|
|
|
qianzhuorderToUnionPay(params).then(res => { |
|
|
|
unionPay(params).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
that.uniontopay(res.return_data.prepayid); |
|
|
|
that.uniontopay(res.return_data.prepayid); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -247,7 +247,7 @@ |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
} else if (that.paytype == 'oilcard') { |
|
|
|
} else if (that.paytype == '6') { |
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/login/updatePas/updatePas' |
|
|
|
url: '/pages/login/updatePas/updatePas' |
|
|
@ -288,9 +288,15 @@ |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '支付成功' |
|
|
|
title: '支付成功' |
|
|
|
}) |
|
|
|
}) |
|
|
|
uni.reLaunch({ |
|
|
|
if (that.productType == 1 || that.productType == 2 || that.productType == 3) { |
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + that.orderNo |
|
|
|
uni.reLaunch({ |
|
|
|
}) |
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + that.orderNo |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
|
|
url: '/pages/user/order_details/order_details?id=' + that.orderNo |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
fail: function(err) { |
|
|
|
fail: function(err) { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
@ -308,51 +314,35 @@ |
|
|
|
uni.showLoading({ |
|
|
|
uni.showLoading({ |
|
|
|
title: '支付中...' |
|
|
|
title: '支付中...' |
|
|
|
}) |
|
|
|
}) |
|
|
|
if (this.paytype == '3') { |
|
|
|
if (this.paytype == '3' || this.paytype == '6') { |
|
|
|
let params = { |
|
|
|
let cardNo; |
|
|
|
"orderId": this.orderNo, |
|
|
|
if (this.paytype == 3) { |
|
|
|
"cardNo": this.user.hltCardNo.cardNo, |
|
|
|
cardNo = this.user.hltCardNo.cardNo; |
|
|
|
"password": this.PaymentPassword |
|
|
|
} |
|
|
|
|
|
|
|
if (this.paytype == 6) { |
|
|
|
|
|
|
|
cardNo = this.user.oilCard.cardNo; |
|
|
|
} |
|
|
|
} |
|
|
|
czhltUnionCardPay(params).then(res => { |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: '支付成功' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (res.return_code == '102130') { |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
|
|
url: '/pages/login/updatePas/updatePas' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.paytype == 'oilcard') { |
|
|
|
|
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"orderId": this.orderNo, |
|
|
|
"orderNo": this.orderNo, |
|
|
|
"cardNo": this.user.oilCard.cardNo, |
|
|
|
"cardNo": cardNo, |
|
|
|
"password": this.PaymentPassword |
|
|
|
"password": this.PaymentPassword, |
|
|
|
|
|
|
|
"carLicensePlate": this.cardNoNumber |
|
|
|
} |
|
|
|
} |
|
|
|
oilCardPay(params).then(res => { |
|
|
|
cardPay(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '支付成功' |
|
|
|
title: '支付成功' |
|
|
|
}) |
|
|
|
}) |
|
|
|
uni.reLaunch({ |
|
|
|
if (this.productType == 1 || this.productType == 2 || this.productType == 3) { |
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo |
|
|
|
uni.reLaunch({ |
|
|
|
}) |
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
|
|
url: '/pages/user/order_details/order_details?id=' + this.orderNo |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (res.return_code == '102130') { |
|
|
|
if (res.return_code == '102130') { |
|
|
|