You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
high-mini/member-Recharge/choicepage/choicepage.vue

73 lines
1.6 KiB

<template>
<view>
<image :src="imageUrl+item.img" mode="widthFix" class="width90 mart20" v-for="(item,index) in choicelist"
:key="index" @click="jumprechangeVip(item)">
</image>
</view>
</template>
<script>
import {
getListGoodsType
} from '../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
choicelist: [],
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
imageUrl: app.globalData.imgUrl
}
},
onLoad() {
this.getListGoodsType();
},
onReachBottom() {
this.getListGoodsType();
},
methods: {
//跳转充值
jumprechangeVip(item) {
uni.navigateTo({
url: '../home/home?id='+item.id
})
},
//查询品牌
getListGoodsType() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
pageNum: pagenum,
pageSize: this.pageSize,
userService: '会员充值'
}
getListGoodsType(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.choicelist = this.choicelist.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.choicelist = [];
}
})
},
}
}
</script>
<style lang="scss">
</style>