diff --git a/components/certifiedCj/certifiedCj.vue b/components/certifiedCj/certifiedCj.vue
index 6adf96e..32222b6 100644
--- a/components/certifiedCj/certifiedCj.vue
+++ b/components/certifiedCj/certifiedCj.vue
@@ -33,7 +33,10 @@
methods: {
// 获取认证厂家列表
getCertifiedCj() {
- this.$apiServe.getCertifiedCj().then(res => {
+ this.$apiServe.getCertifiedCj({
+ pageSize: 2,
+ pageNum: 1
+ }).then(res => {
// console.log('认证厂家', res.data.data)
this.cjsList = res.data.data
}).finally(_ => {})
diff --git a/components/news/news.vue b/components/news/news.vue
index f7b78c9..af550a8 100644
--- a/components/news/news.vue
+++ b/components/news/news.vue
@@ -37,13 +37,16 @@
},
methods: {
getNews() {
- this.$apiServe.getNews().then(res => {
+ this.$apiServe.getNews({
+ pageSize: 3,
+ pageNum: 1
+ }).then(res => {
// console.log('行业新闻', res.data.data)
let newsData = res.data.data
for (const item of newsData) {
item.pub_time_str = dateFormat(item.pub_time_str)
}
- newsData = newsData.slice(0, 3)
+ // newsData = newsData.slice(0, 3)
this.newsList = newsData
}).finally(_ => {})
},
diff --git a/packageReport/certifiedCj/certifiedCj.vue b/packageReport/certifiedCj/certifiedCj.vue
index da2df04..bd0de80 100644
--- a/packageReport/certifiedCj/certifiedCj.vue
+++ b/packageReport/certifiedCj/certifiedCj.vue
@@ -1,6 +1,20 @@
-
+
+
+
+
+
+ {{item.name}}
+
+
+
+ {{item.tag}}
+
+
+
已经到底啦!
@@ -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
+ })
+ }
}
}
diff --git a/packageReport/newProductRelease/newProductRelease.vue b/packageReport/newProductRelease/newProductRelease.vue
index 9e313b1..c50a4a6 100644
--- a/packageReport/newProductRelease/newProductRelease.vue
+++ b/packageReport/newProductRelease/newProductRelease.vue
@@ -1,6 +1,9 @@
-
+
+
+ 没有更多数据了
@@ -8,11 +11,22 @@
export default {
data() {
return {
-
+ reachBottomLength: ''
}
},
+ onReachBottom() {
+ this.$refs.productsByTime.pageNum++
+ this.$refs.productsByTime.getProductsByTime()
+ },
+ onLoad() {
+ this.$refs.productsByTime.pageSize = 2
+ this.$refs.productsByTime.getProductsByTime()
+ },
methods: {
-
+ //获取按上架时间排列的产品列表length
+ getTimeLength(e) {
+ this.reachBottomLength = e
+ }
}
}
diff --git a/packageReport/newsList/newsList.vue b/packageReport/newsList/newsList.vue
index da2f81b..4538176 100644
--- a/packageReport/newsList/newsList.vue
+++ b/packageReport/newsList/newsList.vue
@@ -1,22 +1,68 @@
-
+
+
+
+
+
+ {{item.title}}
+
+
+
+ {{item.pub_time_str}}
+
+
+ {{item.pub_name}}
+
+
+
+
已经到底啦!
diff --git a/service/request.js b/service/request.js
index cfdfe8f..3956ffc 100644
--- a/service/request.js
+++ b/service/request.js
@@ -205,7 +205,7 @@ const toast = {
}
}
const apiService = {
- uploadImgUrl: serverHost + `/upload/image/`,
+ uploadImgUrl: serverHost + `/upload/image/`,
imgUrl: serverHost,
// login: data => {
// data = Object.assign(data || {}, {})
@@ -243,10 +243,10 @@ const apiService = {
})
},
// 获取行业新闻
- getNews() {
- const url = `/news/nlists/?pageSize=50&pageNum=1`
+ getNews(data) {
+ const url = `/news/nlists`
return new Promise((resolve, reject) => {
- resolve(service.get(url))
+ resolve(service.get(url, data))
})
},
// 获取行业新闻详情
@@ -257,10 +257,10 @@ const apiService = {
})
},
// 获取认证厂家列表
- getCertifiedCj() {
- const url = `/news/flists?pageSize=50&pageNum=1`
+ getCertifiedCj(data) {
+ const url = `/news/flists`
return new Promise((resolve, reject) => {
- resolve(service.get(url))
+ resolve(service.get(url, data))
})
},
// 获取认证厂家详情