hookehuyr

fix

1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-10-28 13:02:31 4 + * @LastEditTime: 2022-10-28 16:54:12
5 * @FilePath: /swx/src/pages/index/index.vue 5 * @FilePath: /swx/src/pages/index/index.vue
6 * @Description: 首页 6 * @Description: 首页
7 --> 7 -->
...@@ -103,6 +103,13 @@ export default { ...@@ -103,6 +103,13 @@ export default {
103 // 获取活动和轮播信息 103 // 获取活动和轮播信息
104 const { code, data } = await activityHomeAPI({ page: this.page, limit: this.limit }); 104 const { code, data } = await activityHomeAPI({ page: this.page, limit: this.limit });
105 if (code) { 105 if (code) {
106 + // 如果首页为空,让用户新增活动
107 + // 第一次进入也不一定需要创建活动,需要讨论
108 + // if (!data.activity_list.length && !data.carousel.length) {
109 + // Taro.navigateTo({
110 + // url: '../createActivity/index'
111 + // })
112 + // }
106 this.activity_list = data.activity_list; 113 this.activity_list = data.activity_list;
107 this.carousel = data.carousel; 114 this.carousel = data.carousel;
108 this.page = this.page + 1; 115 this.page = this.page + 1;
......