|
|
@@ -20,7 +20,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-popover placement="top" width="300" v-model="visible">
|
|
|
- <el-input size="small" placeholder="输入充值金额" v-model="money" style="margin: 10px 0;"></el-input>
|
|
|
+ <el-input size="small" placeholder="输入充值金额" v-model="money" oninput="value=value.match(/\d+\.?\d{0,1}/,'')" style="margin: 10px 0;"></el-input>
|
|
|
<div style="float: left;" v-if="money">充值{{ money * 10 }}积分</div>
|
|
|
<div style="text-align: right; margin: 0">
|
|
|
<el-button size="small" @click="cancel()">取消</el-button>
|
|
|
@@ -85,10 +85,10 @@ export default {
|
|
|
return {
|
|
|
timer: null,
|
|
|
fullscreenLoading: false,
|
|
|
- money: '',
|
|
|
- integralMoney: 1,
|
|
|
+ money: undefined,
|
|
|
+ integralMoney: undefined,
|
|
|
visible: false,
|
|
|
- selected: 0,
|
|
|
+ selected: -2,
|
|
|
orderNo: undefined,
|
|
|
rate:undefined,
|
|
|
payList: [
|
|
|
@@ -133,10 +133,10 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getPayList();
|
|
|
- this.$nextTick (function () {
|
|
|
- this.handlePayWxQRcode()
|
|
|
- // this.qrcode(this.url);
|
|
|
- })
|
|
|
+ // this.$nextTick (function () {
|
|
|
+ // this.handlePayWxQRcode()
|
|
|
+ // // this.qrcode(this.url);
|
|
|
+ // })
|
|
|
},
|
|
|
methods: {
|
|
|
// 清空二维码,避免生成多个二维码
|
|
|
@@ -156,7 +156,7 @@ export default {
|
|
|
handlePayWxQRcode() { // 获取微信支付二维码
|
|
|
getWxPayCode({ // 这里根据不同的后端接口去修改
|
|
|
integral: this.integralMoney*this.rate,
|
|
|
- totalFee: this.integralMoney,
|
|
|
+ totalFee: this.integralMoney*1,
|
|
|
}).then(res => {
|
|
|
this.fullscreenLoading = false;
|
|
|
this.qrcode(res.data.payUrl); // 例如:res.data.url 的值为 "weixin://wxpay/bizpayurl?pr=......",根据这个值生成相对应的微信支付二维码
|
|
|
@@ -205,8 +205,9 @@ export default {
|
|
|
},
|
|
|
getPayList() {
|
|
|
payList().then(response => {
|
|
|
- this.rate = response.data.rate;
|
|
|
- this.payList = response.data.items;
|
|
|
+ console.log(response.data.data);
|
|
|
+ this.rate = response.data.data.rate;
|
|
|
+ this.payList = response.data.data.items;
|
|
|
})
|
|
|
},
|
|
|
},
|