|
@@ -19,7 +19,8 @@
|
|
|
</p>
|
|
|
</group>
|
|
|
<ul class="ad-hide list-content list-recharge" style="padding-top: 5px;padding-bottom: 5px;padding-left: 10%;">
|
|
|
- <li v-for="(item,index) in rechargeLists" class="media" @click="btnRechargeList(item, index)" v-bind:class="{on: index === isShow}">
|
|
|
+ <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>
|
|
@@ -32,7 +33,8 @@
|
|
|
</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>
|
|
|
+ class="pay-agreement" style="text-decoration: underline;color: #0A246A" @click="activity">充返活动协议</span>》</span>
|
|
|
+ </div>
|
|
|
<div class="btn-add-recharge" @click="btnRecharge">立即去充值</div>
|
|
|
<div style="width: 100%;padding-bottom: 13%;"></div>
|
|
|
</scroller>
|
|
@@ -41,60 +43,61 @@
|
|
|
|
|
|
<script type="es6">
|
|
|
import {Group, Cell} from 'vux'
|
|
|
- import {mapState, mapActions} from 'vuex'
|
|
|
+ import axios from 'axios'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
isActive: false,
|
|
|
- isShow: -1,
|
|
|
+ isShow: -1,
|
|
|
rechargeLists: this.$store.state.recharge.rechargeList,
|
|
|
- rechargeItem: {},
|
|
|
+ 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){
|
|
|
+ beforeCreate () {},
|
|
|
+ created () {
|
|
|
+// console.log(this.rechargeLists)
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ 'otherAmount': function (val) {
|
|
|
+ if (val !== undefined) {
|
|
|
if (isNaN(val)) {
|
|
|
// 弹出提示框
|
|
|
- $doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
|
- message: '请输入数字'
|
|
|
- }]);
|
|
|
- return;
|
|
|
+ this.otherAmount = ''
|
|
|
+ this.$vux.alert.show({
|
|
|
+ title: '输入错误',
|
|
|
+ content: '请输入数字',
|
|
|
+ onShow () {
|
|
|
+ },
|
|
|
+ onHide () {
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- console.log(val)
|
|
|
}
|
|
|
- },
|
|
|
+ },
|
|
|
methods: {
|
|
|
- ...mapActions([
|
|
|
- 'RECHARGELIST'
|
|
|
- ]),
|
|
|
btnRechargeList (item, index) {
|
|
|
- if (index !== 4){
|
|
|
- this.otherAmount = ''
|
|
|
- }
|
|
|
- if (this.isShow === index) {
|
|
|
+ if (index !== 4) {
|
|
|
+ this.otherAmount = ''
|
|
|
+ }
|
|
|
+ if (this.isShow === index) {
|
|
|
this.isShow = -1
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
this.isShow = index
|
|
|
}
|
|
|
this.rechargeItem = item
|
|
|
},
|
|
|
btnRecharge () {
|
|
|
-
|
|
|
+
|
|
|
+ axios.post('o2o/recharge/addRechargeorder').then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ // axios 1.创建充值卡订单 user_id: user.id, value:inputVal,
|
|
|
+ // 第二步
|
|
|
},
|
|
|
show (e) {
|
|
|
if (this.index !== e) {
|