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 16:54:12 4 + * @LastEditTime: 2022-11-01 09:28:54
5 * @FilePath: /swx/src/pages/index/index.vue 5 * @FilePath: /swx/src/pages/index/index.vue
6 * @Description: 首页 6 * @Description: 首页
7 --> 7 -->
...@@ -110,6 +110,10 @@ export default { ...@@ -110,6 +110,10 @@ export default {
110 // url: '../createActivity/index' 110 // url: '../createActivity/index'
111 // }) 111 // })
112 // } 112 // }
113 + // 绑定服务器时间,判断状态
114 + data.activity_list.forEach(item => {
115 + item.server_time = data.server_time;
116 + });
113 this.activity_list = data.activity_list; 117 this.activity_list = data.activity_list;
114 this.carousel = data.carousel; 118 this.carousel = data.carousel;
115 this.page = this.page + 1; 119 this.page = this.page + 1;
...@@ -159,6 +163,10 @@ export default { ...@@ -159,6 +163,10 @@ export default {
159 const { code, data } = await activityHomeAPI({ page: this.page, limit: this.limit }); 163 const { code, data } = await activityHomeAPI({ page: this.page, limit: this.limit });
160 if (code) { 164 if (code) {
161 if (data.activity_list.length) { 165 if (data.activity_list.length) {
166 + // 绑定服务器时间,判断状态
167 + data.activity_list.forEach(item => {
168 + item.server_time = data.server_time;
169 + });
162 this.activity_list = this.activity_list.concat(data.activity_list); 170 this.activity_list = this.activity_list.concat(data.activity_list);
163 this.page = this.page + 1; 171 this.page = this.page + 1;
164 this.flag = true; 172 this.flag = true;
......