1.修改团油工会卡支付

yj-dev
杨杰 3 years ago
parent eb4cdcda19
commit 4feb309e5c
  1. 179
      pages/goods/refuel-confirm/refuel-confirm.vue
  2. 2
      pages/user/positioning/positioning.vue
  3. 4
      uni.scss

@ -32,11 +32,47 @@
</view>
</view>
<!-- // -->
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式</view>
<view class="line1"></view>
<view class="width100 backcorfff">
<!-- <view class="height50 width100 backcorfff" @tap="paytype='weixin'">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
微信支付
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
<radio :checked="paytype=='weixin'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5"></view> -->
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'">
<view class="width60 flleft fontwig6">
微信支付
</view>
<view class="flright width30 fotct">
<radio :checked="paytype=='weixin'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'">
<view class="width60 flleft fontwig6">
工会卡支付<text class="font14 fcor666 margle">余额: {{tongCardPrice}}</text>
</view>
<view class="flright width30 fotct">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
</view>
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
<view class="width95 paddleft10 font14 fcor999 mart5">1.<text
class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view>
<view class="width95 paddleft10 font14 fcor999 mart5">
2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view>
<view class="height80 width100"></view>
<!-- 底部按钮 -->
<view class="footer">
<view class="width50 flleft fcoreb5 padleft15 font15">
@ -44,26 +80,39 @@
</view>
<button class="reBtn flright" @click="orderToPay">去支付</button>
</view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle"/>
</view>
</template>
<script>
import {
getOrderById,
orderToPay
orderToPay,
getHuiLianTongCardBalance,
hltUnionCardPay
} from '../../../Utils/Api.js';
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
components: {
ssPaymentPassword
},
data() {
return {
orderNo: '',
couponId: '',
payprice: '',
orderList: '',
refulAdress: ''
refulAdress: '',
tongCardPrice: 0,
balanceCardNo: '',
user: '',
paytype: '',
PaymentPassword: '',
}
},
onLoad(e) {
@ -73,7 +122,81 @@
this.refulAdress = e.adres;
this.getOrderById();
},
onShow() {
let that = this;
that.paytype = '';
that.user = app.globalData.userInfo;
uni.getStorage({
key: 'balanceCardNo',
success(e) {
that.balanceCardNo = e.data;
that.getHuiLianTongCardBalance();
}
})
},
methods: {
//
submitHandle(e) {
this.PaymentPassword = e.value;
if(this.PaymentPassword == ''){
uni.showToast({
title: '请勿手动关闭弹窗',
icon: 'none',
duration: 2000
})
return;
}
uni.showLoading({
title: '支付中...'
})
let params = {
"orderId": this.orderNo,
"cardNo": this.balanceCardNo,
"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') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
},
//
changeRiado() {
if (!this.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
},
getOrderById() {
uni.showLoading({
title: '加载中...'
@ -88,9 +211,30 @@
}
})
},
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.balanceCardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
//
orderToPay() {
let that = this;
if (that.paytype == '') {
uni.showToast({
title: '请选择支付方式',
icon: 'none',
duration: 2000
})
return;
}
if (that.paytype == 'weixin') {
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
@ -115,8 +259,7 @@
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
url: '/pages/goods/refuel-succes/refuel-succes?id=' +that.orderNo
});
},
fail: function(err) {
@ -138,8 +281,36 @@
})
}
})
return;
}
if(that.paytype == 'gonghuika'){
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.$refs.paymentPassword.modalFun('show');
}
},
payRequest: function(self) {
let that = this;
uni.showLoading({
title: '支付中...'
})

@ -7,7 +7,7 @@
<view class="posacname actives mart20">{{posName}}</view>
<view class="width90 mart20 font14 fcor333">其他地区</view>
<view class="posheadname mart20 flleft font14" :class="{'actives':posId===item.regionId}"
v-for="(item,index) in posList" @click="change(item)">
v-for="(item,index) in posList" :key="index" @click="change(item)">
{{item.regionName}}
</view>
</view>

@ -151,10 +151,6 @@ $uni-font-size-paragraph:30upx;
margin-left: 6px;
}
.paddleft10 {
margin-left: 10px;
}
.margle20 {
margin-left: 20px;
}

Loading…
Cancel
Save