行业报告上方三个按钮的列表展示
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
<template>
|
||||
<view>
|
||||
<certifiedCj></certifiedCj>
|
||||
<view class="xw_content" v-for="(item,index) in cjsList" :key="index" @click="clickCj(item)">
|
||||
<u--image :src="imgUrl+item.cover" width="112rpx" height="112rpx" :lazy-load="true">
|
||||
</u--image>
|
||||
<view class="xw_right">
|
||||
<view class="xw_title">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view style="display: flex;">
|
||||
<!-- <text class="cj_tags" v-for="(tagsItem,tagsIndex) in item.tags" :key="tagsIndex">
|
||||
{{tagsItem.tag}}
|
||||
</text> -->
|
||||
<text class="cj_tags">{{item.tag}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="cjsShow" class="no-data">已经到底啦!</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -9,11 +23,38 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cjsShow: true
|
||||
cjsShow: true,
|
||||
cjsList: [],
|
||||
imgUrl: '',
|
||||
pageNum: 1, // 当前页
|
||||
pageSize: 4, // 每页条数
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCertifiedCj()
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pageNum++
|
||||
this.getCertifiedCj()
|
||||
},
|
||||
methods: {
|
||||
// this.cjsShow = this.list.length === 0 ? true : false
|
||||
// 获取认证厂家列表
|
||||
getCertifiedCj() {
|
||||
this.$apiServe.getCertifiedCj({
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum
|
||||
}).then(res => {
|
||||
// console.log('认证厂家', res)
|
||||
this.cjsList = [...this.cjsList, ...res.data.data]
|
||||
}).finally(_ => {})
|
||||
},
|
||||
// 跳转到认证厂家详情页
|
||||
clickCj(item) {
|
||||
uni.navigateTo({
|
||||
url: '../certifiedCjDetail/certifiedCjDetail?id=' + item.id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user