1.优化2.0 车队油卡

yj-dev
杨杰 2 years ago
parent 1572fb165e
commit 6e88877847
  1. 4
      Utils/Api.js
  2. 170
      pages/goods/refuel-confirm/refuel-confirm.vue

@ -308,10 +308,6 @@ export const hltUnionCardPay = params => {
return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data); return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data);
} }
//车队油卡支付
export const fleetOilCardPay = params => {
return POST('POST', `${base}/order/fleetOilCardPay`, params).then(res => res.data);
}
//绑定卡包 //绑定卡包
export const bindHuiLianTongCard = params => { export const bindHuiLianTongCard = params => {

@ -182,22 +182,23 @@
<view class="flright width30 fotct" v-if="isUse"> <view class="flright width30 fotct" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> <radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view> </view>
</view>
<view class="line1" v-if="item ==7"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="item ==7"
@tap="paytype='7'">
<view class="width60 flleft font14">
车队油卡<text class="font14 fcor666 margle">余额: {{oilUserNoPrice}}</text>
</view>
<view class="flright width30 fotct" v-if="isUse">
<radio :checked="paytype=='7'" color="#0083f5" />
</view>
</view> </view>
</view> </view>
<view class="line1" v-if="oilUserCardlist"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="oilUserCardlist"
@tap="paytype='fleettruck'">
<view class="width60 flleft font14">
车队油卡<text class="font14 fcor666 margle">余额: {{oilUserNoPrice}}</text>
</view>
<view class="flright width30 fotct" v-if="isUse">
<radio :checked="paytype=='fleettruck'" color="#0083f5" />
</view>
</view>
<view v-if="paytype=='fleettruck'"> <view v-if="paytype=='7'" class="backcorfff">
<view class="heightl60 paddleft10 fcor333 fontwig6 font16 width100 backcorfff">车队油卡列表</view> <view class="heightl60 paddleft10 fcor333 fontwig6 font16 width100 backcorfff flleft">车队油卡列表</view>
<view class="line1"></view> <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-for="(item,index) in oilUserCardlist" <view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-for="(item,index) in oilUserCardlist"
:key="index"> :key="index">
@ -274,7 +275,7 @@
import { import {
wechatPay, wechatPay,
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
hltUnionCardPay, cardPay,
orderToGoldPay, orderToGoldPay,
findUser, findUser,
oilCardPay, oilCardPay,
@ -286,7 +287,6 @@
getRebateIntegral, getRebateIntegral,
getThirdPartyByDetail, getThirdPartyByDetail,
getUserCardList, getUserCardList,
fleetOilCardPay,
getCardListByCardNo getCardListByCardNo
} 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';
@ -658,10 +658,6 @@
} }
this.orderNo = res.return_data.orderNo; this.orderNo = res.return_data.orderNo;
// uni.reLaunch({
// url: '/pages/goods/refuel-succes/refuel-succes?id=' +
// this.orderNo
// });
uni.reLaunch({ uni.reLaunch({
url: '../../user/order_details/order_details?id=' + url: '../../user/order_details/order_details?id=' +
this.orderNo this.orderNo
@ -683,77 +679,13 @@
}) })
return; return;
} }
if (this.paytype == 'fleettruck') { if (this.paytype == '3' || this.paytype == '6' || this.paytype == '7') {
let params = {
"orderId": this.orderNo,
"password": this.PaymentPassword,
"cardNo": this.oilUserno,
"carLicensePlate": this.cardNoNumber,
}
fleetOilCardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../../user/order_details/order_details?id=' +
this.orderNo
})
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
// if (this.paytype == 'jifen') {
// let params = {
// "orderId": this.orderNo,
// "password": this.PaymentPassword
// }
// orderToGoldPay(params).then(res => {
// uni.hideLoading();
// if (res.return_code == '000000') {
// uni.showToast({
// title: ''
// })
// uni.reLaunch({
// url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
// });
// return;
// }
// if (res.return_code == '102130') {
// uni.navigateTo({
// url: '../../login/updatePas/updatePas'
// })
// return;
// }
// uni.showToast({
// title: res.return_msg,
// icon: 'none'
// })
// })
// return;
// }
if (this.paytype == '3' || this.paytype == '6') {
let params = { let params = {
"orderNo": this.orderNo, "orderNo": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
hltUnionCardPay(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({
@ -788,46 +720,6 @@
}) })
return; return;
} }
// if (this.paytype == '4') {
// let params = {
// "orderId": this.orderNo,
// "cardNo": this.user.oilCard.cardNo,
// "password": this.PaymentPassword
// }
// oilCardPay(params).then(res => {
// uni.hideLoading();
// if (res.return_code == '000000') {
// uni.showToast({
// title: ''
// })
// uni.reLaunch({
// url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
// });
// return;
// }
// if (res.return_code == '102130') {
// this.cancel();
// uni.navigateTo({
// url: '../../login/updatePas/updatePas'
// })
// return;
// }
// if (res.return_code == '102132') {
// this.cancel();
// uni.showToast({
// title: res.return_msg,
// icon: 'none'
// })
// return;
// }
// uni.showToast({
// title: res.return_msg,
// icon: 'none'
// })
// uni.navigateBack({})
// })
// return;
// }
}, },
// //
@ -851,22 +743,6 @@
}, },
// //
changeRiado() { changeRiado() {
// if (!this.user.isSetHltCard && this.paytype == 'gonghuika') {
// uni.showToast({
// icon: 'none',
// title: ',',
// duration: 2000,
// success() {
// setTimeout(() => {
// uni.navigateTo({
// url: '../../user/bindingCard/bindingCard'
// })
// }, 1000)
// }
// });
// return;
// }
if (!this.user.isSetOilCard) { if (!this.user.isSetOilCard) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -910,14 +786,8 @@
}) })
return; return;
} }
// if (this.orderNo) {
// this.wechatPay();
// if (this.orderNo) {
// this.orderToPay();
// return;
// }
if (this.paytype == 'fleettruck') { if (this.paytype == '7') {
let that = this; let that = this;
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
@ -1049,7 +919,7 @@
}) })
return; return;
} }
if (that.paytype == 'gonghuika') { if (that.paytype == '3') {
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../../login/updatePas/updatePas' url: '../../login/updatePas/updatePas'
@ -1074,7 +944,7 @@
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} }
if (that.paytype == 'fleettruck') { if (that.paytype == '7') {
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../../login/updatePas/updatePas' url: '../../login/updatePas/updatePas'
@ -1083,7 +953,7 @@
} }
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} }
if (that.paytype == 'oilcard') { if (that.paytype == '6') {
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../../login/updatePas/updatePas' url: '../../login/updatePas/updatePas'

Loading…
Cancel
Save