|
|
@ -78,10 +78,11 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="width94 backcorfff mart10"> |
|
|
|
<view class="width100 backcorfff mart10"> |
|
|
|
<view class="width94 alijusstart height50 font14 fcor666"> |
|
|
|
<view class="width96 alijusstart height50 font14 fcor666"> |
|
|
|
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view> |
|
|
|
<view class="width40 fcor333 fontwig6 font16">邀请码</view> |
|
|
|
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" /> |
|
|
|
<input class="width60 fotrt font15" style="padding-right: 6%;" v-model="identificationCode" |
|
|
|
|
|
|
|
placeholder="请输入邀请码" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
@ -150,37 +151,37 @@ |
|
|
|
<!-- //支付方式 --> |
|
|
|
<!-- //支付方式 --> |
|
|
|
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式:</view> |
|
|
|
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式:</view> |
|
|
|
<view class="line1"></view> |
|
|
|
<view class="line1"></view> |
|
|
|
<view class="width100 backcorfff"> |
|
|
|
<view class="width100 backcorfff" v-for="(item,index) in paytypeList" :key="index"> |
|
|
|
|
|
|
|
|
|
|
|
<view class="line1"></view> |
|
|
|
<view class="line1" v-if="item == 4"></view> |
|
|
|
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'"> |
|
|
|
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="item == 4" @tap="paytype='4'"> |
|
|
|
<view class="width60 flleft font14"> |
|
|
|
<view class="width60 flleft font14"> |
|
|
|
银联支付 |
|
|
|
银联支付 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flright width30 fotct" v-if="isUse"> |
|
|
|
<view class="flright width30 fotct" v-if="isUse"> |
|
|
|
<radio :checked="paytype=='weixin'" color="#0083f5" /> |
|
|
|
<radio :checked="paytype=='4'" color="#0083f5" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="line1"></view> |
|
|
|
<view class="line1" v-if="item == 6"></view> |
|
|
|
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='oilcard'"> |
|
|
|
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="item == 6" @tap="paytype='6'"> |
|
|
|
<view class="width60 flleft font14"> |
|
|
|
<view class="width60 flleft font14"> |
|
|
|
油卡支付<text class="font14 fcor666 margle">余额: {{oilPirce}}元</text> |
|
|
|
油卡支付<text class="font14 fcor666 margle">余额: {{oilPirce}}元</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flright width30 fotct" v-if="isUse"> |
|
|
|
<view class="flright width30 fotct" v-if="isUse"> |
|
|
|
<radio :checked="paytype=='oilcard'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
<radio :checked="paytype=='6'" color="#0083f5" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <view class="line1"></view> |
|
|
|
<view class="line1" v-if="item == 3"></view> |
|
|
|
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'"> |
|
|
|
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="item == 3" @tap="paytype='3'"> |
|
|
|
<view class="width60 flleft fontwig6"> |
|
|
|
<view class="width60 flleft font14"> |
|
|
|
汇联通工会卡<text class="font14 fcor666 margle">余额: {{tongCardPrice}}元</text> |
|
|
|
汇联通工会卡<text class="font14 fcor666 margle">余额: {{tongCardPrice}}元</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flright width30 fotct"> |
|
|
|
<view class="flright width30 fotct" v-if="isUse"> |
|
|
|
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view> |
|
|
|
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view> |
|
|
@ -202,25 +203,23 @@ |
|
|
|
<wybPopup ref="popup" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true"> |
|
|
|
<wybPopup ref="popup" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true"> |
|
|
|
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view> |
|
|
|
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view> |
|
|
|
<view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="index" |
|
|
|
<view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="index" |
|
|
|
@click="radioChanges(items.highDiscount,items)"> |
|
|
|
@click="radioChanges(items,items)"> |
|
|
|
<image mode="widthFix" :src="imageUrl+items.highDiscount.discountImg"></image> |
|
|
|
<image mode="widthFix" :src="imageUrl+items.discountImg"></image> |
|
|
|
<view class="alijus width60 margle10"> |
|
|
|
<view class="alijus width60 margle10"> |
|
|
|
<view class="width80p"> |
|
|
|
<view class="width80p"> |
|
|
|
<view class="font16 fontwig6 fcor333 text1">{{items.highDiscount.discountName}}</view> |
|
|
|
<view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view> |
|
|
|
<view class="font13 fcor999 mart5"> |
|
|
|
<view class="font13 fcor999 mart5"> |
|
|
|
有效期:{{items.highDiscount.salesEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}} |
|
|
|
有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="width20 fotrt"> |
|
|
|
<view class="width20 fotrt"> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<radio |
|
|
|
<radio v-if="items.discountCondition && orderPrice >= items.discountCondition" |
|
|
|
v-if="items.highDiscount.discountCondition && orderPrice >= items.highDiscount.discountCondition" |
|
|
|
|
|
|
|
color="#c72a20" :checked="items.id == memDiscountId" /> |
|
|
|
color="#c72a20" :checked="items.id == memDiscountId" /> |
|
|
|
<radio |
|
|
|
<radio v-if="items.discountCondition && orderPrice < items.discountCondition" |
|
|
|
v-if="items.highDiscount.discountCondition && orderPrice < items.highDiscount.discountCondition" |
|
|
|
|
|
|
|
color="#c72a20" disabled="true" :checked="items.id == memDiscountId" /> |
|
|
|
color="#c72a20" disabled="true" :checked="items.id == memDiscountId" /> |
|
|
|
|
|
|
|
|
|
|
|
<radio v-if="!items.highDiscount.discountCondition" color="#c72a20" |
|
|
|
<radio v-if="!items.discountCondition" color="#c72a20" |
|
|
|
:checked="items.id == memDiscountId" /> |
|
|
|
:checked="items.id == memDiscountId" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -234,19 +233,17 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { |
|
|
|
import { |
|
|
|
orderToPay, |
|
|
|
|
|
|
|
getHuiLianTongCardBalance, |
|
|
|
getHuiLianTongCardBalance, |
|
|
|
hltUnionCardPay, |
|
|
|
cardPay, |
|
|
|
orderToGoldPay, |
|
|
|
|
|
|
|
findUser, |
|
|
|
findUser, |
|
|
|
oilCardPay, |
|
|
|
|
|
|
|
getUserOrderPreList, |
|
|
|
getUserOrderPreList, |
|
|
|
canUseDiscount, |
|
|
|
canUseDiscount, |
|
|
|
addOrder, |
|
|
|
create, |
|
|
|
cancelOrder, |
|
|
|
cancel, |
|
|
|
unionPay, |
|
|
|
unionPay, |
|
|
|
oilPriceDiscountCompute, |
|
|
|
oilPriceDiscountCompute, |
|
|
|
getRebateIntegral |
|
|
|
getRebateIntegral, |
|
|
|
|
|
|
|
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'; |
|
|
|
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; |
|
|
|
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; |
|
|
@ -267,10 +264,8 @@ |
|
|
|
imageUrl: app.globalData.imgUrl, |
|
|
|
imageUrl: app.globalData.imgUrl, |
|
|
|
oilPirce: 0, //油卡余额 |
|
|
|
oilPirce: 0, //油卡余额 |
|
|
|
user: '', |
|
|
|
user: '', |
|
|
|
paytype: 'weixin', |
|
|
|
paytype: '4', |
|
|
|
PaymentPassword: '', |
|
|
|
PaymentPassword: '', |
|
|
|
// timedeductionPrice: '0', //本次优惠金额 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
orderPrice: '', //原价 |
|
|
|
orderPrice: '', //原价 |
|
|
|
deductionPrice: '0.00', //优惠金额 |
|
|
|
deductionPrice: '0.00', //优惠金额 |
|
|
|
OrderPreList: [], //优惠券数据 |
|
|
|
OrderPreList: [], //优惠券数据 |
|
|
@ -282,8 +277,9 @@ |
|
|
|
availIntegal: 0, // 可用积分 |
|
|
|
availIntegal: 0, // 可用积分 |
|
|
|
gasOrderList: '', //存的订单信息 |
|
|
|
gasOrderList: '', //存的订单信息 |
|
|
|
rebateIntegral: '', //返回积分 |
|
|
|
rebateIntegral: '', //返回积分 |
|
|
|
Integrastu: 1 ,//返积分状态 |
|
|
|
Integrastu: 1, //返积分状态 |
|
|
|
identificationCode: '', //渠道商 |
|
|
|
identificationCode: '', //渠道商 |
|
|
|
|
|
|
|
paytypeList: [], //支付方式 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
onLoad(e) { |
|
|
@ -298,10 +294,34 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
// that.paytype = ''; |
|
|
|
|
|
|
|
that.findUser(); |
|
|
|
that.findUser(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
//查询支付方式 |
|
|
|
|
|
|
|
getThirdPartyByDetail() { |
|
|
|
|
|
|
|
let datas = { |
|
|
|
|
|
|
|
platformId: 3, |
|
|
|
|
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
|
|
|
|
productType: 6 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getThirdPartyByDetail(datas).then(res => { |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
this.rechargeDes = res.return_data; |
|
|
|
|
|
|
|
this.paytypeList = res.return_data.productPayType.split(','); |
|
|
|
|
|
|
|
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); |
|
|
|
|
|
|
|
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2); |
|
|
|
|
|
|
|
let pprice = parseFloat(this.payPrice * 100).toFixed(0) |
|
|
|
|
|
|
|
let payprice = parseFloat(this.payPrice * 100 * zkprice).toFixed( |
|
|
|
|
|
|
|
0); |
|
|
|
|
|
|
|
if (payprice > this.user.gold) { |
|
|
|
|
|
|
|
this.availIntegal = this.user.gold; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.availIntegal = payprice; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//查询我的资料 |
|
|
|
findUser() { |
|
|
|
findUser() { |
|
|
|
let params; |
|
|
|
let params; |
|
|
|
findUser(params).then(res => { |
|
|
|
findUser(params).then(res => { |
|
|
@ -312,6 +332,9 @@ |
|
|
|
this.oilPirce = res.return_data.oilCard.amount; |
|
|
|
this.oilPirce = res.return_data.oilCard.amount; |
|
|
|
} |
|
|
|
} |
|
|
|
this.canUseDiscount(); |
|
|
|
this.canUseDiscount(); |
|
|
|
|
|
|
|
if (this.user.isSetHltCard) { |
|
|
|
|
|
|
|
this.getHuiLianTongCardBalance(); |
|
|
|
|
|
|
|
} |
|
|
|
this.oilPriceDiscountCompute(); |
|
|
|
this.oilPriceDiscountCompute(); |
|
|
|
uni.setStorage({ |
|
|
|
uni.setStorage({ |
|
|
|
key: "user", |
|
|
|
key: "user", |
|
|
@ -363,14 +386,9 @@ |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.orderList = res.return_data; |
|
|
|
this.orderList = res.return_data; |
|
|
|
this.payPrice = res.return_data.payPrice; |
|
|
|
this.payPrice = res.return_data.payPrice; |
|
|
|
let payprice = parseFloat(this.payPrice * 100).toFixed( |
|
|
|
|
|
|
|
0); |
|
|
|
|
|
|
|
if (payprice > this.user.gold) { |
|
|
|
|
|
|
|
this.availIntegal = this.user.gold; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.availIntegal = payprice; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.getRebateIntegral(); |
|
|
|
this.getRebateIntegral(); |
|
|
|
|
|
|
|
this.getThirdPartyByDetail(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -502,24 +520,20 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
if (this.payPrice == 0 && !this.orderNo) { |
|
|
|
if (this.payPrice == 0 && !this.orderNo) { |
|
|
|
let goods = { |
|
|
|
let goods = { |
|
|
|
"identificationCode": this.gasOrderList.identificationCode, |
|
|
|
"childOrderList": [{ |
|
|
|
"promoteCode":this.identificationCode, |
|
|
|
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
|
|
|
"memDiscountId": this.memDiscountId, |
|
|
|
|
|
|
|
"payPwd": this.PaymentPassword, |
|
|
|
|
|
|
|
"highChildOrderList": [{ |
|
|
|
|
|
|
|
"goodsType": this.gasOrderList.highChildOrderList[0].goodsType, |
|
|
|
|
|
|
|
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId, |
|
|
|
|
|
|
|
"saleCount": 1, |
|
|
|
|
|
|
|
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice, |
|
|
|
|
|
|
|
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo, |
|
|
|
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo, |
|
|
|
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo, |
|
|
|
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo, |
|
|
|
"gasOilType": this.gasOrderList.highChildOrderList[0].gasOilType, |
|
|
|
"isTyAgent": this.gasOrderList.isTyAgent, |
|
|
|
"gasPriceGun": this.gasOrderList.highChildOrderList[0].gasPriceGun, |
|
|
|
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId, |
|
|
|
"gasPriceVip": this.gasOrderList.highChildOrderList[0].gasPriceVip, |
|
|
|
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice, |
|
|
|
}] |
|
|
|
"goodsType": 3, |
|
|
|
|
|
|
|
"saleCount": 1, |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
|
|
|
"promoteCode": this.identificationCode, |
|
|
|
|
|
|
|
"payPwd": this.PaymentPassword |
|
|
|
} |
|
|
|
} |
|
|
|
addOrder(goods).then(res => { |
|
|
|
create(goods).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (app.globalData.gasKey) { |
|
|
|
if (app.globalData.gasKey) { |
|
|
@ -533,36 +547,11 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.orderNo = res.return_data.id; |
|
|
|
this.orderNo = res.return_data.orderNo; |
|
|
|
uni.reLaunch({ |
|
|
|
uni.reLaunch({ |
|
|
|
url: '/pages/goods/refuel-succes/refuel-succes?id=' + |
|
|
|
url: '/pages/user/order_details/order_details?id=' + |
|
|
|
this.orderNo |
|
|
|
this.orderNo |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
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') { |
|
|
|
if (res.return_code == '102130') { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
@ -570,102 +559,72 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.paytype == 'gonghuika') { |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
"orderId": this.orderNo, |
|
|
|
|
|
|
|
"cardNo": this.user.hltCardNo.cardNo, |
|
|
|
|
|
|
|
"password": this.PaymentPassword |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
hltUnionCardPay(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.cancelOrder(); |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (res.return_code == '102132') { |
|
|
|
|
|
|
|
this.cancelOrder(); |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
uni.navigateBack({}) |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: res.return_msg, |
|
|
|
title: res.return_msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
duration: 2000 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.paytype == 'oilcard') { |
|
|
|
if (this.paytype == '3' || this.paytype == '6') { |
|
|
|
|
|
|
|
let cardNo; |
|
|
|
|
|
|
|
if (this.paytype == 3) { |
|
|
|
|
|
|
|
cardNo = this.user.hltCardNo.cardNo; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.paytype == 6) { |
|
|
|
|
|
|
|
cardNo = this.user.oilCard.cardNo; |
|
|
|
|
|
|
|
} |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"orderId": this.orderNo, |
|
|
|
"orderNo": this.orderNo, |
|
|
|
"cardNo": this.user.oilCard.cardNo, |
|
|
|
"cardNo": cardNo, |
|
|
|
"password": this.PaymentPassword |
|
|
|
"password": this.PaymentPassword |
|
|
|
} |
|
|
|
} |
|
|
|
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({ |
|
|
|
uni.reLaunch({ |
|
|
|
url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo |
|
|
|
url: '/pages/user/order_details/order_details?id=' + |
|
|
|
|
|
|
|
this.orderNo |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (res.return_code == '102130') { |
|
|
|
if (res.return_code == '102130') { |
|
|
|
this.cancelOrder(); |
|
|
|
this.cancel(); |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (res.return_code == '102132') { |
|
|
|
if (res.return_code == '102132') { |
|
|
|
this.cancelOrder(); |
|
|
|
this.cancel(); |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: res.return_msg, |
|
|
|
title: res.return_msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
uni.navigateBack({}) |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: res.return_msg, |
|
|
|
title: res.return_msg, |
|
|
|
icon: 'none' |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
}) |
|
|
|
uni.navigateBack({}) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
//取消订单 |
|
|
|
//取消订单 |
|
|
|
cancelOrder() { |
|
|
|
cancel() { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
orderId: this.orderNo |
|
|
|
orderNo: this.orderNo |
|
|
|
} |
|
|
|
} |
|
|
|
cancelOrder(params).then(res => { |
|
|
|
cancel(params).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.orderNo = ''; |
|
|
|
this.orderNo = ''; |
|
|
|
} |
|
|
|
} |
|
|
@ -674,23 +633,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
//获取选择支付方式 |
|
|
|
//获取选择支付方式 |
|
|
|
changeRiado() { |
|
|
|
changeRiado() { |
|
|
|
// if (!this.user.isSetHltCard && this.paytype == 'gonghuika') { |
|
|
|
if (!this.user.setHltCard) { |
|
|
|
// uni.showToast({ |
|
|
|
|
|
|
|
// icon: 'none', |
|
|
|
|
|
|
|
// title: '当前账号还未绑定,前往绑定', |
|
|
|
|
|
|
|
// duration: 2000, |
|
|
|
|
|
|
|
// success() { |
|
|
|
|
|
|
|
// setTimeout(() => { |
|
|
|
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
|
|
|
// url: '../../user/bindingCard/bindingCard' |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// }, 1000) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// return; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.user.isSetOilCard) { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
icon: 'none', |
|
|
|
icon: 'none', |
|
|
|
title: '当前账号还未绑定,前往绑定', |
|
|
|
title: '当前账号还未绑定,前往绑定', |
|
|
@ -719,7 +662,7 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//下单 |
|
|
|
//下单 |
|
|
|
addOrder() { |
|
|
|
create() { |
|
|
|
if (this.payPrice == 0) { |
|
|
|
if (this.payPrice == 0) { |
|
|
|
this.$refs.paymentPassword.modalFun('show'); |
|
|
|
this.$refs.paymentPassword.modalFun('show'); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -741,26 +684,23 @@ |
|
|
|
title: '提交订单中...' |
|
|
|
title: '提交订单中...' |
|
|
|
}) |
|
|
|
}) |
|
|
|
let goods = { |
|
|
|
let goods = { |
|
|
|
"identificationCode": this.gasOrderList.identificationCode, |
|
|
|
"childOrderList": [{ |
|
|
|
"promoteCode":this.identificationCode, |
|
|
|
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
|
|
|
"memDiscountId": this.memDiscountId, |
|
|
|
|
|
|
|
"highChildOrderList": [{ |
|
|
|
|
|
|
|
"goodsType": this.gasOrderList.highChildOrderList[0].goodsType, |
|
|
|
|
|
|
|
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId, |
|
|
|
|
|
|
|
"saleCount": 1, |
|
|
|
|
|
|
|
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice, |
|
|
|
|
|
|
|
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo, |
|
|
|
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo, |
|
|
|
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo, |
|
|
|
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo, |
|
|
|
"gasOilType": this.gasOrderList.highChildOrderList[0].gasOilType, |
|
|
|
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId, |
|
|
|
"gasPriceGun": this.gasOrderList.highChildOrderList[0].gasPriceGun, |
|
|
|
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice, |
|
|
|
"gasPriceVip": this.gasOrderList.highChildOrderList[0].gasPriceVip, |
|
|
|
"goodsType": 3, |
|
|
|
}] |
|
|
|
"saleCount": 1, |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
|
|
|
"promoteCode": this.identificationCode, |
|
|
|
|
|
|
|
"payPwd": this.PaymentPassword, |
|
|
|
|
|
|
|
"memDiscountId": this.memDiscountId |
|
|
|
} |
|
|
|
} |
|
|
|
addOrder(goods).then(res => { |
|
|
|
create(goods).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.orderNo = res.return_data.id; |
|
|
|
this.orderNo = res.return_data.orderNo; |
|
|
|
this.orderToPay(); |
|
|
|
this.orderToPay(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
@ -782,11 +722,11 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (that.paytype == 'weixin') { |
|
|
|
if (that.paytype == '4') { |
|
|
|
that.unionPay(); |
|
|
|
that.unionPay(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (that.paytype == 'gonghuika') { |
|
|
|
if (that.paytype == '6') { |
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
@ -811,7 +751,7 @@ |
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (that.paytype == 'oilcard') { |
|
|
|
if (that.paytype == '3') { |
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
@ -836,21 +776,11 @@ |
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (that.paytype == 'jifen') { |
|
|
|
|
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
//银联获取信息 |
|
|
|
//银联获取信息 |
|
|
|
unionPay() { |
|
|
|
unionPay() { |
|
|
|
let goods = { |
|
|
|
let goods = { |
|
|
|
"orderId": this.orderNo |
|
|
|
"orderNo": this.orderNo |
|
|
|
} |
|
|
|
} |
|
|
|
unionPay(goods).then(res => { |
|
|
|
unionPay(goods).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
@ -875,8 +805,8 @@ |
|
|
|
title: '支付成功' |
|
|
|
title: '支付成功' |
|
|
|
}) |
|
|
|
}) |
|
|
|
uni.reLaunch({ |
|
|
|
uni.reLaunch({ |
|
|
|
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that |
|
|
|
url: '/pages/user/order_details/order_details?id=' + |
|
|
|
.orderNo |
|
|
|
that.orderNo |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
fail: function(err) { |
|
|
|
fail: function(err) { |
|
|
@ -898,6 +828,8 @@ |
|
|
|
<style lang="less"> |
|
|
|
<style lang="less"> |
|
|
|
page { |
|
|
|
page { |
|
|
|
background-color: #f7f7f7; |
|
|
|
background-color: #f7f7f7; |
|
|
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
overflow-y: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.conImg { |
|
|
|
.conImg { |
|
|
|