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.
91 lines
2.0 KiB
91 lines
2.0 KiB
<template>
|
|
<view>
|
|
<template v-if="choicelist.length>0">
|
|
<image :src="imageUrl+item.img" mode="widthFix" class="height95 verc width40 imgs mart20 "
|
|
v-for="(item,index) in choicelist" :key="index" @click="jumprechangeVip(item)">
|
|
</image>
|
|
</template>
|
|
<template v-else>
|
|
<image :src="imageWxImg+noData" mode="widthFix" class="width100 pd-main border-box height220"></image>
|
|
</template>
|
|
</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,
|
|
imageWxImg:app.globalData.imageWxImg,
|
|
noData:'noorder.png'
|
|
}
|
|
},
|
|
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">
|
|
.imgs {
|
|
margin-left: 5%;
|
|
margin-right: 5%;
|
|
|
|
|
|
|
|
}
|
|
|
|
.height95{
|
|
height:90px;
|
|
}
|
|
|
|
</style>
|
|
|