|
@@ -71,7 +71,7 @@
|
|
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
|
|
import { verification } from '@/api/merchant.js';
|
|
|
import { getMoneyStyle } from '@/utils/rocessor.js';
|
|
|
-import { rechargeWechat } from '@/api/wallet.js';
|
|
|
+import { rechargeWechat, getRechargeList } from '@/api/wallet.js';
|
|
|
import { mapState, mapMutations} from 'vuex';
|
|
|
import { getUserInfo } from '@/api/login.js';
|
|
|
export default {
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- moneyList: [300, 200, 150, 100, 50],
|
|
|
+ moneyList: [],
|
|
|
choose: -1,
|
|
|
// #ifdef APP-PLUS
|
|
|
type: 'weixinapp',
|
|
@@ -108,7 +108,8 @@ export default {
|
|
|
onLoad(options) {
|
|
|
// #ifdef H5
|
|
|
this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
|
|
|
- // #endif
|
|
|
+ // #endif
|
|
|
+ this.getRechargeList()
|
|
|
},
|
|
|
computed: {
|
|
|
...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
|
|
@@ -116,7 +117,15 @@ export default {
|
|
|
...mapState(['weichatObj'])
|
|
|
// #endif
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ getRechargeList() {
|
|
|
+ getRechargeList().then(({data}) => {
|
|
|
+ console.log(data,'getRechargeList')
|
|
|
+ data.recharge_quota.forEach(item => {
|
|
|
+ this.moneyList.push(item.price*1)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 跳转
|
|
|
navTo(url) {
|
|
|
uni.navigateTo({
|