修改小程序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(_ => {})
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="newsShow" class="no-data">已经到底啦!</view>
|
||||
<view v-if="newsShow==0" class="no-data">已经到底啦!</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -28,20 +28,23 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
newsShow: true,
|
||||
newsShow: '',
|
||||
imgUrl: '',
|
||||
newsList: [],
|
||||
pageNum: 1, // 当前页
|
||||
pageSize: 4, // 每页条数
|
||||
pageSize: 12, // 每页条数
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
this.getNews()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pageNum++
|
||||
this.getNews()
|
||||
console.log('触底下拉');
|
||||
if (this.newsShow !== 0) {
|
||||
this.pageNum++
|
||||
this.getNews()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getNews() {
|
||||
@@ -49,10 +52,12 @@
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum
|
||||
}).then(res => {
|
||||
// console.log('行业新闻', res.data.data)
|
||||
console.log('行业新闻', res.data)
|
||||
let newsData = res.data.data
|
||||
for (const item of newsData) {
|
||||
item.pub_time_str = dateFormat(item.pub_time_str)
|
||||
this.newsShow = item.length
|
||||
console.log('this.newsShow', this.newsShow);
|
||||
}
|
||||
this.newsList = [...this.newsList, ...newsData]
|
||||
}).finally(_ => {})
|
||||
|
||||
Reference in New Issue
Block a user