1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 13:19:31 +08:00

fix: 修复首页分页失败问题,重新添加node依赖

This commit is contained in:
小莫唐尼
2024-07-16 10:54:55 +08:00
parent 62992b2688
commit bb228c6705
3 changed files with 44 additions and 5 deletions
+17 -4
View File
@@ -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;