hookehuyr

fix 列表接口新增服务器时间比对

<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-28 16:54:12
* @LastEditTime: 2022-11-01 09:28:54
* @FilePath: /swx/src/pages/index/index.vue
* @Description: 首页
-->
......@@ -110,6 +110,10 @@ export default {
// url: '../createActivity/index'
// })
// }
// 绑定服务器时间,判断状态
data.activity_list.forEach(item => {
item.server_time = data.server_time;
});
this.activity_list = data.activity_list;
this.carousel = data.carousel;
this.page = this.page + 1;
......@@ -159,6 +163,10 @@ export default {
const { code, data } = await activityHomeAPI({ page: this.page, limit: this.limit });
if (code) {
if (data.activity_list.length) {
// 绑定服务器时间,判断状态
data.activity_list.forEach(item => {
item.server_time = data.server_time;
});
this.activity_list = this.activity_list.concat(data.activity_list);
this.page = this.page + 1;
this.flag = true;
......