1.修改话费充值价格

yj-dev
杨杰 3 years ago
parent 509bc70bc3
commit db4618b5a1
  1. 12
      pages/order/confirmation.vue
  2. 717
      subPages/recharge-centre/recharge-centre.vue
  3. 20
      subPages/unionComfirmation/unionComfirmation.vue

@ -209,7 +209,7 @@
}; };
}, },
onLoad(option) { onLoad(option) {
this.couponId = option.id; this.couponId = option.id;
this.getCouponById(); this.getCouponById();
}, },
onShow() { onShow() {
@ -271,7 +271,7 @@
couponId: this.couponId couponId: this.couponId
} }
getCouponById(params).then(res => { getCouponById(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.couponList = res.return_data; this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice; this.paytheprice = res.return_data.discountPrice;
uni.hideLoading() uni.hideLoading()
@ -670,11 +670,11 @@
uni.reLaunch({ uni.reLaunch({
url: '/pages/tabBar/user/user' url: '/pages/tabBar/user/user'
}); });
return; } else {
uni.reLaunch({
url: '../success/success?id=' + that.couponId
});
} }
uni.reLaunch({
url: '../success/success?id=' + that.couponId
});
}, },
cancel: function(r) {}, cancel: function(r) {},
fail: function(res) {} fail: function(res) {}

@ -1,357 +1,362 @@
<template> <template>
<view> <view>
<view class="width100 height100p backcorf06"> <view class="width100 height100p backcorf06">
<view class="block"> <view class="block">
<view class="content height60"> <view class="content height60">
<input type="number" class="my flleft font18 fcorfff" placeholder-style="color:#ffffff;" placeholder="请输入充值号码" v-model="inputPhone" /> <input type="number" class="my flleft font18 fcorfff" placeholder-style="color:#ffffff;"
</view> placeholder="请输入充值号码" v-model="inputPhone" />
<view class="line1 width100 backcorfff"></view> </view>
</view> <view class="line1 width100 backcorfff"></view>
</view> </view>
<view class="width90 font16 fcor333 fontwig6 mart40"> </view>
选择金额 <view class="width90 font16 fcor333 fontwig6 mart40">
</view> 选择金额
<view class="list"> </view>
<view class="box" :class="{'on':item.id == inputAmountId}" v-for="(item,index) in amountList" <view class="list">
:key="index" @click="select(item)"> <view class="box" :class="{'on':item.id == inputAmountId}" v-for="(item,index) in amountList" :key="index"
<view class="heTitle">{{item.price}}</view> @click="select(item)">
</view> <view class="heTitle">{{item.price}}</view>
</view> </view>
<view class="mart5 width90 font18 fcor333 fontwig6"> </view>
话费充值温馨提示 <view class="mart5 width90 font18 fcor333 fontwig6">
</view> 话费充值温馨提示
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> </view>
<view style="width: 5%;" class="flleft">1:</view> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="margin-left: 5%;">慢充话费与营业厅充值一样只是到账时间稍长充值过程中可能出现分批到账的情况但是总金额不会少请耐心等待</view> <view style="width: 5%;" class="flleft">1:</view>
</view> <view style="margin-left: 5%;">慢充话费与营业厅充值一样只是到账时间稍长充值过程中可能出现分批到账的情况但是总金额不会少请耐心等待</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> </view>
<view style="width: 5%;" class="flleft">2:</view> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="margin-left: 5%;">此业务为话费慢充日常72小时内到账如遇月初月末高峰期或系统更新到账时间会有一定延迟敬请谅解急单勿拍</view> <view style="width: 5%;" class="flleft">2:</view>
</view> <view style="margin-left: 5%;">此业务为话费慢充日常72小时内到账如遇月初月末高峰期或系统更新到账时间会有一定延迟敬请谅解急单勿拍</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> </view>
<view style="width: 5%;" class="flleft">3:</view> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="margin-left: 5%;">目前仅支持(移动联通电信三网号段) 运营商黑名单号码(长期欠费或非实名制认证)携号转网空号虚拟卡如165.167.170.171.162等等虚拟号段副卡号码或做过某些特殊套餐绑定的卡暂不支持充值请勿下单</view> <view style="width: 5%;" class="flleft">3:</view>
</view> <view style="margin-left: 5%;">目前仅支持(移动联通电信三网号段)
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> 运营商黑名单号码(长期欠费或非实名制认证)携号转网空号虚拟卡如165.167.170.171.162等等虚拟号段副卡号码或做过某些特殊套餐绑定的卡暂不支持充值请勿下单</view>
<view style="width: 5%;" class="flleft">4:</view> </view>
<view style="margin-left: 5%;">停机号码需要额外补缴欠费后慢充话费才能到账<text class="fcoreb5">此服务为虚拟充值类服务无特殊情况不支持退款下单前请确认充值的号码无误</text></view> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
</view> <view style="width: 5%;" class="flleft">4:</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view style="margin-left: 5%;">停机号码需要额外补缴欠费后慢充话费才能到账<text
<view style="width: 5%;" class="flleft">5:</view> class="fcoreb5">此服务为虚拟充值类服务无特殊情况不支持退款下单前请确认充值的号码无误</text></view>
<view style="margin-left: 5%;">空号错号充值后不支持退款请您务必核对确认号码无误后再进行充值非空号欠费可充欠费1个月导致空号的不能充值损失自负无法退款</view> </view>
</view> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view style="width: 5%;" class="flleft">5:</view>
<view style="width: 5%;" class="flleft">6:</view> <view style="margin-left: 5%;">空号错号充值后不支持退款请您务必核对确认号码无误后再进行充值非空号欠费可充欠费1个月导致空号的不能充值损失自负无法退款</view>
<view style="margin-left: 5%;"><text class="fcoreb5">本充值业务不提供发票</text>如需发票请在运营商手机客户端储开取电子发票也可以凭身份证到运营商实体营业厅打印发票</view> </view>
</view> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view style="width: 5%;" class="flleft">6:</view>
<view style="width: 5%;" class="flleft">7:</view> <view style="margin-left: 5%;"><text
<view style="margin-left: 5%;">如遇系统维护充值失败将72小时后原路退款到付款账户 </view> class="fcoreb5">本充值业务不提供发票</text>如需发票请在运营商手机客户端储开取电子发票也可以凭身份证到运营商实体营业厅打印发票</view>
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6 marb40" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">8:</view> <view style="width: 5%;" class="flleft">7:</view>
<view style="margin-left: 5%;">请登录所属运营商app手机营业厅查看充值号码的到账情况如金额有出入或未到账请截图充值记录明细反馈给客服</view> <view style="margin-left: 5%;">如遇系统维护充值失败将72小时后原路退款到付款账户 </view>
</view> </view>
<view class="height100p"></view> <view class="mart5 width80 font14 fcor999 fontwig6 marb40" style="list-style-type: decimal;">
<view class="bombtn width94 font16"> <view style="width: 5%;" class="flleft">8:</view>
<view class="width50 flleft payem">应付: {{inputAmount}}</view> <view style="margin-left: 5%;">请登录所属运营商app手机营业厅查看充值号码的到账情况如金额有出入或未到账请截图充值记录明细反馈给客服</view>
<view class="width50 flright paybtn" @click="addOrderPay">立即购买</view> </view>
</view> <view class="height100p"></view>
</view> <view class="bombtn width94 font16">
</template> <view class="width50 flleft payem">应付: {{inputAmount}}</view>
<view class="width50 flright paybtn" @click="addOrderPay">立即购买</view>
<script> </view>
// #ifdef H5 </view>
var jweixin = require('jweixin-module'); </template>
// #endif
let app = getApp(); <script>
import { // #ifdef H5
getListOutRechargePrice, var jweixin = require('jweixin-module');
addOrderPay, // #endif
orderToUNionPay let app = getApp();
} from '../../Utils/Api.js'; import {
export default { getListOutRechargePrice,
data() { addOrderPay,
return { orderToUNionPay
typeId: '', } from '../../Utils/Api.js';
inputAmountId: '', export default {
inputAmount: '', data() {
inputPhone: '', return {
amoutType: '', typeId: '',
codesVlues: '', inputAmountId: '',
amountList: [], inputAmount: '',
price:'' inputPhone: '',
} amoutType: '',
}, codesVlues: '',
onLoad(options) { amountList: [],
this.typeId = options.id; price: ''
if (this.typeId == 1) { }
uni.setNavigationBarTitle({ },
title: '中国移动' onLoad(options) {
}) this.typeId = options.id;
this.amoutType = 2; if (this.typeId == 1) {
this.getListOutRechargePrice(2); uni.setNavigationBarTitle({
return; title: '中国移动'
} })
if (this.typeId == 2) { this.amoutType = 2;
uni.setNavigationBarTitle({ this.getListOutRechargePrice(2);
title: '中国电信' return;
}) }
this.amoutType = 1; if (this.typeId == 2) {
this.getListOutRechargePrice(1); uni.setNavigationBarTitle({
return; title: '中国电信'
} })
if (this.typeId == 3) { this.amoutType = 1;
uni.setNavigationBarTitle({ this.getListOutRechargePrice(1);
title: '中国联通' return;
}) }
this.amoutType = 3; if (this.typeId == 3) {
this.getListOutRechargePrice(3); uni.setNavigationBarTitle({
return; title: '中国联通'
} })
this.amoutType = 3;
this.getListOutRechargePrice(3);
}, return;
methods: { }
select(amoutinfos) {
this.inputAmount = amoutinfos.realPrice;
this.price = amoutinfos.price; },
this.inputAmountId = amoutinfos.id; methods: {
}, select(amoutinfos) {
this.inputAmount = amoutinfos.realPrice;
/** this.price = amoutinfos.price;
* 查询价格 this.inputAmountId = amoutinfos.id;
*/ },
getListOutRechargePrice(item) {
uni.showLoading({ /**
title: '加载中...' * 查询价格
}) */
let params = { getListOutRechargePrice(item) {
type: item uni.showLoading({
} title: '加载中...'
getListOutRechargePrice(params).then(res => { })
uni.hideLoading() let params = {
if (res.return_code == '000000') { type: item
this.amountList = res.return_data; }
} getListOutRechargePrice(params).then(res => {
}) uni.hideLoading()
}, if (res.return_code == '000000') {
this.amountList = res.return_data;
/** }
* 提交订单 })
*/ },
addOrderPay() {
let that = this; /**
if (that.inputPhone == '') { * 提交订单
uni.showToast({ */
title: '请输入充值号码', addOrderPay() {
icon: "none" let that = this;
}); if (that.inputPhone == '') {
return; uni.showToast({
} title: '请输入充值号码',
if (that.inputAmount == '') { icon: "none"
uni.showToast({ });
title: '请选择价格', return;
icon: "none" }
}); if (that.inputAmount == '') {
return false; uni.showToast({
} title: '请选择价格',
// let params = { icon: "none"
// "orderPrice": this.inputAmount, });
// "payPrice": this.inputAmount, return false;
// "rechargeContent": this.inputPhone, }
// "rechargeModel": this.amoutType, // let params = {
// "agentKey": this.codesVlues, // "orderPrice": this.inputAmount,
// "objectId": this.inputAmountId, // "payPrice": this.inputAmount,
// } // "rechargeContent": this.inputPhone,
uni.showToast({ // "rechargeModel": this.amoutType,
title: '提交订单...', // "agentKey": this.codesVlues,
icon: 'none', // "objectId": this.inputAmountId,
duration: 2000, // }
success() { uni.showToast({
uni.navigateTo({ title: '提交订单...',
url: '../unionComfirmation/unionComfirmation?orderPrice=' + that.price + icon: 'none',
'&payPrice=' + that.inputAmount + '&rechargeContent=' + that.inputPhone + duration: 2000,
'&rechargeModel=' + that.amoutType + '&agentKey=' + that.codesVlues +'&objectId='+that.inputAmountId success() {
}) uni.navigateTo({
} url: '../unionComfirmation/unionComfirmation?orderPrice=' + that.price +
}) '&payPrice=' + that.inputAmount + '&rechargeContent=' + that.inputPhone +
'&rechargeModel=' + that.amoutType + '&agentKey=' + that.codesVlues +
'&objectId=' + that.inputAmountId
})
// uni.showLoading({ }
// title: '...' })
// })
// addOrderPay(params).then(res => {
// uni.hideLoading()
// if (res.return_code == '000000') { // uni.showLoading({
// let params = { // title: '...'
// "orderId": res.return_data.id, // })
// "openId": app.globalData.openId // addOrderPay(params).then(res => {
// } // uni.hideLoading()
// this.orderToUNionPay(params); // if (res.return_code == '000000') {
// } else { // let params = {
// uni.showToast({ // "orderId": res.return_data.id,
// title: res.return_msg, // "openId": app.globalData.openId
// icon: "none" // }
// }) // this.orderToUNionPay(params);
// } // } else {
// }) // uni.showToast({
// title: res.return_msg,
}, // icon: "none"
// // })
orderToUNionPay(item) { // }
orderToUNionPay(item).then(res => { // })
if (res.return_code == '000000') {
// },
// #ifdef H5 //
// orderToUNionPay(item) {
this.payRequest(res); orderToUNionPay(item).then(res => {
// #endif if (res.return_code == '000000') {
} else { //
uni.showToast({ // #ifdef H5
title: res.return_msg, //
icon: 'none' this.payRequest(res);
}) // #endif
} } else {
}) uni.showToast({
}, title: res.return_msg,
// icon: 'none'
payRequest: function(self) { })
uni.showLoading({ }
title: '支付中...' })
}) },
jweixin.config({ //
// debug: false, // ,apialertpclogpc payRequest: function(self) {
appId: self.return_data.appId, // uni.showLoading({
timestamp: self.return_data.timeStamp, // title: '支付中...'
nonceStr: self.return_data.nonceStr, // })
signature: self.return_data.sign, // 1 jweixin.config({
jsApiList: ['chooseWXPay'] // 使JSJS2 // debug: false, // ,apialertpclogpc
}); appId: self.return_data.appId, //
uni.hideLoading(); timestamp: self.return_data.timeStamp, //
jweixin.ready(function() { nonceStr: self.return_data.nonceStr, //
jweixin.checkJsApi({ signature: self.return_data.sign, // 1
jsApiList: ['chooseWXPay'], // JSJS2, jsApiList: ['chooseWXPay'] // 使JSJS2
success: function(res) {}, });
fail: function(res) {} uni.hideLoading();
}); jweixin.ready(function() {
jweixin.chooseWXPay({ jweixin.checkJsApi({
appId: self.return_data.appId, jsApiList: ['chooseWXPay'], // JSJS2,
timestamp: self.return_data success: function(res) {},
.timeStamp, // jssdk使timestamp使timeStampS fail: function(res) {}
nonceStr: self.return_data.nonceStr, // 32 });
package: self.return_data jweixin.chooseWXPay({
.package, // prepay_idprepay_id=*** appId: self.return_data.appId,
signType: 'MD5', // 'SHA1'使'MD5' timestamp: self.return_data
paySign: self.return_data.sign, // .timeStamp, // jssdk使timestamp使timeStampS
success: function(res) { nonceStr: self.return_data.nonceStr, // 32
// package: self.return_data
uni.showToast({ .package, // prepay_idprepay_id=***
title: '支付成功' signType: 'MD5', // 'SHA1'使'MD5'
}) paySign: self.return_data.sign, //
if (that.jumpType == 4) { success: function(res) {
uni.reLaunch({ //
url: '/pages/tabBar/user/user' uni.showToast({
}); title: '支付成功'
return; })
} if (that.jumpType == 4) {
uni.reLaunch({ uni.reLaunch({
url: '../success/success?id=' + that.couponId url: '/pages/tabBar/user/user'
}); });
}, } else {
cancel: function(r) {}, uni.reLaunch({
fail: function(res) {} url: '../success/success?id=' + that.couponId
}); });
}); }
},
jweixin.error(function(res) { cancel: function(r) {},
uni.showToast({ fail: function(res) {}
icon: 'none', });
title: '支付失败了', });
duration: 4000
}); jweixin.error(function(res) {
// configerrorconfigdebugresSPA uni.showToast({
/*alert("config信息验证失败");*/ icon: 'none',
}); title: '支付失败了',
}, duration: 4000
} });
} // configerrorconfigdebugresSPA
</script> /*alert("config信息验证失败");*/
});
<style lang="scss"> },
.block { }
width: 94%; }
padding: 60upx 3%; </script>
.my { <style lang="scss">
width: 80%; .block {
height: 120upx; width: 94%;
display: flex; padding: 60upx 3%;
align-items: center;
} .my {
width: 80%;
.uni-input-placeholder { height: 120upx;
color: #FFFFFF; display: flex;
} align-items: center;
} }
.list { .uni-input-placeholder {
width: 94%; color: #FFFFFF;
margin-left: 3%; }
display: flow-root; }
justify-content: space-between;
padding: 20upx 0; .list {
width: 94%;
.box { margin-left: 3%;
width: 30%; display: flow-root;
margin-left: 1%; justify-content: space-between;
margin-right: 2%; padding: 20upx 0;
margin-top: 20upx;
float: left; .box {
height: 120upx; width: 30%;
line-height: 120upx; margin-left: 1%;
justify-content: center; margin-right: 2%;
align-items: center; margin-top: 20upx;
text-align: center; float: left;
box-shadow: 0upx 0upx 4upx #666666; height: 120upx;
font-size: 36upx; line-height: 120upx;
color: #089bf5; justify-content: center;
align-items: center;
&.on { text-align: center;
background-color: #089bf5; box-shadow: 0upx 0upx 4upx #666666;
color: #ffffff; font-size: 36upx;
} color: #089bf5;
}
&.on {
.heTitle { background-color: #089bf5;
width: 100%; color: #ffffff;
font-size: 15px; }
} }
}
.heTitle {
.bombtn { width: 100%;
position: fixed; font-size: 15px;
height: 45px; }
bottom: 20px; }
border-radius: 6px;
.bombtn {
.payem { position: fixed;
height: 45px; height: 45px;
line-height: 45px; bottom: 20px;
text-align: center; border-radius: 6px;
background-color: #007AFF;
color: #FFFFFF; .payem {
border-radius: 6px 0 0 6px; height: 45px;
} line-height: 45px;
text-align: center;
.paybtn { background-color: #007AFF;
height: 45px; color: #FFFFFF;
line-height: 45px; border-radius: 6px 0 0 6px;
text-align: center; }
background-color: #F8A628;
border-radius: 0 6px 6px 0; .paybtn {
color: #FFFFFF; height: 45px;
} line-height: 45px;
} text-align: center;
background-color: #F8A628;
border-radius: 0 6px 6px 0;
color: #FFFFFF;
}
}
</style> </style>

@ -170,9 +170,9 @@
tongCardPrice: 0, tongCardPrice: 0,
// //
orderPrice: 0, orderPrice: 0,
payPrice: 0, payPrice: 0,
// //
saveprice:0, saveprice: 0,
rechargeContent: '', rechargeContent: '',
rechargeModel: '', rechargeModel: '',
agentKey: '', agentKey: '',
@ -183,7 +183,7 @@
}, },
onLoad(options) { onLoad(options) {
this.orderPrice = options.orderPrice; this.orderPrice = options.orderPrice;
this.payPrice = options.payPrice; this.payPrice = options.payPrice;
this.saveprice = options.payPrice; this.saveprice = options.payPrice;
this.rechargeContent = options.rechargeContent; this.rechargeContent = options.rechargeContent;
this.rechargeModel = options.rechargeModel; this.rechargeModel = options.rechargeModel;
@ -252,10 +252,10 @@
url: '/pages/login/register' url: '/pages/login/register'
}) })
}, },
radioChanges(item) { radioChanges(item) {
this.paytheprice = this.saveprice; this.paytheprice = this.saveprice;
if (this.memDiscountId == item.id) { // if (this.memDiscountId == item.id) { //
this.memDiscountId = ''; this.memDiscountId = '';
this.payPrice = this.saveprice; this.payPrice = this.saveprice;
this.deductionPrice = '0.00'; this.deductionPrice = '0.00';
} else { // } else { //
@ -577,11 +577,11 @@
uni.reLaunch({ uni.reLaunch({
url: '/pages/tabBar/user/user' url: '/pages/tabBar/user/user'
}); });
return; } else {
uni.reLaunch({
url: '../success/success?id=' + that.couponId
});
} }
uni.reLaunch({
url: '../success/success?id=' + that.couponId
});
}, },
cancel: function(r) {}, cancel: function(r) {},
fail: function(res) {} fail: function(res) {}

Loading…
Cancel
Save