|
@@ -158,13 +158,8 @@
|
|
|
<div class="f-row">
|
|
|
<label>充值金额:</label>
|
|
|
<div class="f-radio-wrap">
|
|
|
- <button class="f-radio checked">50元</button>
|
|
|
- <button class="f-radio">100元</button>
|
|
|
- <button class="f-radio">300元</button>
|
|
|
- <button class="f-radio">500元</button>
|
|
|
- <button class="f-radio">1000元</button>
|
|
|
- <button class="f-radio">5000元</button>
|
|
|
- <p><input type="text" placeholder="其它金额"> 元 <span>(10-200000之间整数)</span></p>
|
|
|
+ <button :class="['f-radio',{'checked':amountsIndex==index}]" v-for="(item,index) in amounts" :key="index" @click="chooseAmount(index)">{{item}}元</button>
|
|
|
+ <p><input type="text" placeholder="其它金额" v-model="amountInput" @input="inputAmount"> 元 <span>(10-200000之间整数)</span></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="f-row ext-text">
|
|
@@ -212,15 +207,35 @@ export default {
|
|
|
name: "pay",
|
|
|
data(){
|
|
|
return {
|
|
|
+ amounts: [50,100,300,500,1000,5000],//充值金额
|
|
|
+ amountsIndex: 0,//当前选中金额
|
|
|
+ amountInput:'',//填写金额
|
|
|
gameSelect:[false,false,false] //游戏/区服/角色下拉框
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ //select切换
|
|
|
toggleSelect(index){
|
|
|
for(let i=0;i<3;i++){
|
|
|
if(i==index) this.$set(this.gameSelect,i,!this.gameSelect[i])
|
|
|
else this.$set(this.gameSelect,i,false)
|
|
|
}
|
|
|
+ this.calculateMoney()
|
|
|
+ },
|
|
|
+ //选择金额
|
|
|
+ chooseAmount(index){
|
|
|
+ this.amountsIndex = index
|
|
|
+ this.amountInput = ''
|
|
|
+ this.calculateMoney()
|
|
|
+ },
|
|
|
+ //填入金额
|
|
|
+ inputAmount(){
|
|
|
+ this.amountsIndex = this.amountInput=='' ? 0 : 999
|
|
|
+
|
|
|
+ this.calculateMoney()
|
|
|
+ },
|
|
|
+ calculateMoney(){
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|