|
|
@@ -2,7 +2,7 @@
|
|
|
<div class="prepaidRefill">
|
|
|
<div class="input_phone">
|
|
|
<div class="flex_r flex_jb flex_ac">
|
|
|
- <textarea v-model="qda.phoneno" placeholder="请输入手机号" class="inp dinB" :auto-height="true" @input="inphone" @blur="inphone" @confirm="inphone" placeholder-class="inpc" />
|
|
|
+ <textarea v-model="qda.phoneno" placeholder="请输入手机号" @input="inphone" @confirm="inphone" :auto-height="true" class="inp dinB" placeholder-class="inpc" />
|
|
|
<div class="ico iconfont" @click="openContact"></div>
|
|
|
</div>
|
|
|
<div class="phonemsg" v-if="gameArea">{{ gameArea }}</div>
|
|
|
@@ -10,27 +10,38 @@
|
|
|
<div class="items">
|
|
|
<div class="tit">充话费</div>
|
|
|
<div class="li flex_r">
|
|
|
- <div :class="{ li_it: 1, active: qda.cardnum == i }" v-for="(i, s) in CallingList" :key="s" @click="qda.cardnum = i" >{{ i }}元</div>
|
|
|
+ <div :class="{ li_it: 1, active: qda.cardnum == i.money }" v-for="(i, s) in CallingList" :key="s" @click="selectMoney(i)" >{{ i.money }}元</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="money card">
|
|
|
<div class="li flex_r flex_jb">
|
|
|
<span>消费金额</span>
|
|
|
- <span>¥{{ cartTotal || 0 }}</span>
|
|
|
+ <span>¥{{ selectItem.custom_price == 0 ? selectItem.money : selectItem.custom_price }}</span>
|
|
|
</div>
|
|
|
<div class="li flex_r flex_jb">
|
|
|
- <span>消费金抵扣<span class="corg">{{ Integral }}%</span></span>
|
|
|
- <span class="corg">-¥{{ deduction || 0 }}</span>
|
|
|
+ <span>消费金抵扣</span>
|
|
|
+ <span class="corg">-¥{{ selectItem.custom_integral || 0 }}</span>
|
|
|
</div>
|
|
|
<div class="li flex_r flex_jb">
|
|
|
<span>实付金额</span>
|
|
|
- <span>¥{{ actuallypaid || 0 }}</span>
|
|
|
+ <span>¥{{ selectItem.actual_price || 0 }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="money card mar_b60">
|
|
|
<div class="li flex_r flex_jb">
|
|
|
<span>赠送茶宝</span>
|
|
|
- <span>{{ chabao || 0 }}</span>
|
|
|
+ <span>{{ selectItem.chabao || 0 }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="msgbar">
|
|
|
+ <div class="tit">话费充值说明</div>
|
|
|
+ <div class="msg_con">
|
|
|
+ <p>1. 请您仔细核对号码,刷新页面后注意号码是否变动;若充错号码,建议您尽快联系机主自行协商解决。</p>
|
|
|
+ <p>2. 话费充值平均到账时间1-10分钟内,个别订单会因为运营商原因导致时间会长一些。若遇运营商系统维护、充值高峰期等,可能会有部分延迟。</p>
|
|
|
+ <p>3. 162、165、167、 170 、171 等虚拟运营商号码不支持充值,携号转网的手机号码充值失败率较高。</p>
|
|
|
+ <p>4. 若充值失败,系统将自动退还款项。</p>
|
|
|
+ <p>5. 充值发票由运营商提供,您可以到当地营业厅打印发票,或登陆网上营业厅下载电子发票,具体政策请咨询对应运营商客服。</p>
|
|
|
+ <p>6. 如有其他问题,可在“我的”->“我的服务”->“在线客服”联系客服。</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="footbtn" @click="onpay">立即支付</div>
|
|
|
@@ -49,18 +60,12 @@ export default {
|
|
|
return {
|
|
|
CallingList: [], //可充话费列表
|
|
|
qda: {
|
|
|
+ phoneno: "",
|
|
|
cardnum: 100,
|
|
|
},
|
|
|
- isvalid: false,
|
|
|
userinfo: uni.getStorageSync("userinfo"),
|
|
|
gameArea: "",
|
|
|
-
|
|
|
- ratio: {},
|
|
|
- cartTotal: 0,
|
|
|
- Integral: 0,
|
|
|
- deduction: 0,
|
|
|
- actuallypaid: 0,
|
|
|
- chabao: 0,
|
|
|
+ selectItem: {}
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -68,18 +73,25 @@ export default {
|
|
|
let that = this;
|
|
|
uni.chooseContact({
|
|
|
success: (res) => {
|
|
|
- that.qda.phoneno = res.phoneNumber;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.qda.phoneno = res.phoneNumber;
|
|
|
+ that.inphone();
|
|
|
+ }, 80);
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
console.log("获取通讯录失败:", err);
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ selectMoney(va){
|
|
|
+ this.selectItem = va
|
|
|
+ this.qda.cardnum = va.money;
|
|
|
+ },
|
|
|
getCallingList() {
|
|
|
post("local/ofpay/getMoney").then((res) => {
|
|
|
if (res.code == 0) {
|
|
|
this.CallingList = res.data;
|
|
|
- this.qda.cardnum = res.data[0];
|
|
|
+ this.selectMoney(res.data[0]);
|
|
|
this.inphone();
|
|
|
}
|
|
|
});
|
|
|
@@ -88,16 +100,14 @@ export default {
|
|
|
if (this.checkPhone(this.qda.phoneno)) {
|
|
|
post("local/ofpay/telCheck", this.qda).then((res) => {
|
|
|
if (res.code == 0) {
|
|
|
- this.isvalid = true;
|
|
|
post("local/ofpay/telQuery", this.qda).then((res) => {
|
|
|
if (res.code == 0) {
|
|
|
if (res.data.error_code == 0) {
|
|
|
this.gameArea = res.data.result.game_area;
|
|
|
- this.getIntegral();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- } else this.isvalid = false;
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -108,24 +118,6 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
|
- getIntegral() {
|
|
|
- post("local/getIntegral", { type: 6 }).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.ratio = res.data;
|
|
|
- this.computef();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- computef() {
|
|
|
- let { integral, chabao } = this.ratio;
|
|
|
- let i1 = integral,
|
|
|
- i2 = chabao;
|
|
|
- this.cartTotal = this.qda.cardnum;
|
|
|
- this.Integral = this.$h.Mul(i1, 100);
|
|
|
- this.deduction = this.$h.Mul(this.cartTotal, i1);
|
|
|
- this.actuallypaid = this.$h.Sub(this.cartTotal, this.deduction);
|
|
|
- this.chabao = this.$h.Mul(this.actuallypaid, i2).toFixed(2);
|
|
|
- },
|
|
|
onpay() {
|
|
|
post("local/ofpay/onlineorde", this.qda).then((res) => {
|
|
|
if (res.code == 0) {
|
|
|
@@ -145,15 +137,7 @@ export default {
|
|
|
this.qda.phoneno = this.userinfo.mobile;
|
|
|
this.getCallingList();
|
|
|
},
|
|
|
- watch: {
|
|
|
- 'qda.cardnum': {
|
|
|
- immediate: true,
|
|
|
- deep: true,
|
|
|
- handler(va) {
|
|
|
- this.computef();
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ watch: {},
|
|
|
onShow() {},
|
|
|
mounted() {},
|
|
|
};
|
|
|
@@ -231,6 +215,20 @@ export default {
|
|
|
margin-left: 12rpx;
|
|
|
}
|
|
|
}
|
|
|
+.msgbar{
|
|
|
+ padding-bottom: 160rpx;
|
|
|
+ .tit{
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 80rpx 0 20rpx;
|
|
|
+ }
|
|
|
+ .msg_con{
|
|
|
+ font-size: 26rpx;
|
|
|
+ p{
|
|
|
+ margin-bottom: 10rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
.card {
|
|
|
background-color: #fff;
|
|
|
border-radius: 16rpx;
|