|
@@ -19,27 +19,21 @@
|
|
|
</p>
|
|
|
</group>
|
|
|
<ul class="ad-hide list-content list-recharge" style="padding-top: 5px;padding-bottom: 5px;padding-left: 10%;">
|
|
|
- <li class="media" data-id="57f3485d9f5160bf048b4812" data-value="1000" data-index="0">
|
|
|
- <div>RMB:1000</div>
|
|
|
+ <li v-for="(item,index) in rechargeLists" class="media" @click="btnRechargeList(item, index)" v-bind:class="{on: index === isShow}">
|
|
|
+ <div v-if="item.denomination ===1 ">
|
|
|
+ <div class="input-title">其他数额</div>
|
|
|
+ <div class="input-rmb">RMB:</div>
|
|
|
+ <input type="text" maxlength="8" name="" v-model="otherAmount" value="otherAmount" class="rechange-input">
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <div>RMB:{{ item.denomination }}</div>
|
|
|
+ </div>
|
|
|
</li>
|
|
|
- <li class="media on" data-id="57f3486b9f5160c9048b47b2" data-value="3000" data-index="1">
|
|
|
- <div>RMB:3000</div>
|
|
|
- </li>
|
|
|
- <li class="media" data-id="57f3487b9f5160c4048b4713" data-value="5000" data-index="2">
|
|
|
- <div>RMB:5000</div>
|
|
|
- </li>
|
|
|
- <li class="media" data-id="582c38d49f5160ad048b56a1" data-value="10000" data-index="3">
|
|
|
- <div>RMB:10000</div>
|
|
|
- </li>
|
|
|
- <li class="media" data-id="5911c0f89f5160b3048b6be9" data-value="1" data-index="4">
|
|
|
- <div class="input-title">其他数额</div>
|
|
|
- <div class="input-rmb">RMB:</div>
|
|
|
- <input type="text" maxlength="8" name="" value="" class="rechange-input"></li>
|
|
|
</ul>
|
|
|
<div class="ad-hide" style="text-align: center;clear: both;margin-top: 9rem;"><span style="font-size: 0.6rem">点击立即充值,即表示您已经同意壹管家</span><span
|
|
|
style="font-size: 0.6rem;font-weight: 600;display: block;"></span><span style="font-size: 0.6rem;">《<span
|
|
|
class="pay-agreement" style="text-decoration: underline;color: #0A246A" @click="activity">充返活动协议</span>》</span></div>
|
|
|
- <div class="btn-add-recharge">立即去充值</div>
|
|
|
+ <div class="btn-add-recharge" @click="btnRecharge">立即去充值</div>
|
|
|
<div style="width: 100%;padding-bottom: 13%;"></div>
|
|
|
</scroller>
|
|
|
</div>
|
|
@@ -47,16 +41,61 @@
|
|
|
|
|
|
<script type="es6">
|
|
|
import {Group, Cell} from 'vux'
|
|
|
+ import {mapState, mapActions} from 'vuex'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- isActive: false
|
|
|
+ isActive: false,
|
|
|
+ isShow: -1,
|
|
|
+ rechargeLists: this.$store.state.recharge.rechargeList,
|
|
|
+ rechargeItem: {},
|
|
|
+ otherAmount: ''
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
Group, Cell
|
|
|
},
|
|
|
+ computed: mapState({
|
|
|
+ rechargeList: state => state.rechargeList
|
|
|
+ }),
|
|
|
+ beforeCreate () {
|
|
|
+ console.log(this.rechargeItem)
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.RECHARGELIST()
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ 'otherAmount': function(val) {
|
|
|
+ if(val !==undefined){
|
|
|
+ if (isNaN(val)) {
|
|
|
+ // 弹出提示框
|
|
|
+ $doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
|
+ message: '请输入数字'
|
|
|
+ }]);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(val)
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ ...mapActions([
|
|
|
+ 'RECHARGELIST'
|
|
|
+ ]),
|
|
|
+ btnRechargeList (item, index) {
|
|
|
+ if (index !== 4){
|
|
|
+ this.otherAmount = ''
|
|
|
+ }
|
|
|
+ if (this.isShow === index) {
|
|
|
+ this.isShow = -1
|
|
|
+ } else {
|
|
|
+ this.isShow = index
|
|
|
+ }
|
|
|
+ this.rechargeItem = item
|
|
|
+ },
|
|
|
+ btnRecharge () {
|
|
|
+
|
|
|
+ },
|
|
|
show (e) {
|
|
|
if (this.index !== e) {
|
|
|
this.isActive = e
|