修改小程序bug
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="cjsShow" class="no-data">已经到底啦!</view>
|
||||
<view v-if="cjsShow==0" class="no-data">已经到底啦!</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cjsShow: true,
|
||||
cjsShow: '',
|
||||
cjsList: [],
|
||||
imgUrl: '',
|
||||
pageNum: 1, // 当前页
|
||||
pageSize: 4, // 每页条数
|
||||
pageSize: 12, // 每页条数
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -35,8 +35,11 @@
|
||||
this.getCertifiedCj()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pageNum++
|
||||
this.getCertifiedCj()
|
||||
console.log('触底下拉');
|
||||
if (this.cjsShow !== 0) {
|
||||
this.pageNum++
|
||||
this.getCertifiedCj()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取认证厂家列表
|
||||
@@ -45,7 +48,12 @@
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum
|
||||
}).then(res => {
|
||||
// console.log('认证厂家', res)
|
||||
console.log('认证厂家', res)
|
||||
let cjsData = res.data.data
|
||||
for (const item of cjsData) {
|
||||
this.cjsShow = item.length
|
||||
console.log('this.cjsShow', this.cjsShow);
|
||||
}
|
||||
this.cjsList = [...this.cjsList, ...res.data.data]
|
||||
}).finally(_ => {})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user