mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-12 21:29:31 +08:00
fix: 修复首页分页失败问题,重新添加node依赖
This commit is contained in:
@@ -90,6 +90,7 @@ import tmIcons from '@/tm-vuetify/components/tm-icons/tm-icons.vue';
|
||||
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
|
||||
|
||||
import eSwiper from '@/components/e-swiper/e-swiper.vue';
|
||||
import qs from 'qs'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -208,10 +209,16 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
const paramsStr = qs.stringify(this.queryParams, {
|
||||
allowDots: true,
|
||||
encodeValuesOnly: true,
|
||||
skipNulls: true,
|
||||
encode: true,
|
||||
arrayFormat: 'repeat'
|
||||
})
|
||||
uni.request({
|
||||
url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts',
|
||||
url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?'+ paramsStr,
|
||||
method: 'GET',
|
||||
params: this.queryParams,
|
||||
success: (res) => {
|
||||
this.bannerList = _format(res.data.items);
|
||||
},
|
||||
@@ -239,10 +246,16 @@ export default {
|
||||
}
|
||||
this.loadMoreText = '加载中...';
|
||||
|
||||
const paramsStr = qs.stringify(this.queryParams, {
|
||||
allowDots: true,
|
||||
encodeValuesOnly: true,
|
||||
skipNulls: true,
|
||||
encode: true,
|
||||
arrayFormat: 'repeat'
|
||||
})
|
||||
uni.request({
|
||||
url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?',
|
||||
url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?' + paramsStr,
|
||||
method: 'GET',
|
||||
params: this.queryParams,
|
||||
success: (res) => {
|
||||
const data = res.data;
|
||||
this.result.hasNext = data.hasNext;
|
||||
|
||||
Reference in New Issue
Block a user