From 7b2847ac00849ffe33e4b1ca186fd9b6ad312dad Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 31 七月 2024 13:56:07 +0800
Subject: [PATCH] lll
---
wechat_jiaxuan/pages/index/index.js | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 3c1ace0..0e303f8 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/wechat_jiaxuan/pages/index/index.js
@@ -8,10 +8,7 @@
getZhongTaiVideoPage,
getZhongTaiProductNewsPage
} from '../../api/index'
-const {
- HYEventBus
-} = require('hy-event-store')
-const eventBus = new HYEventBus()
+import { eventBus } from '../../utils/eventBus'
const app = getApp()
Page({
@@ -56,21 +53,17 @@
},
onShow() {
let that = this
- const member = wx.getStorageSync('member') || {}
- if (member && member.id) {
+ setTimeout(() => {
getMemberInfo().then(res => {
this.setData({
member: res.data
})
})
- } else {
- this.setData({
- member
- })
- }
- eventBus.on("reloadHome", () => {
+ }, 500)
+ eventBus.once("reloadHome", () => {
console.log('reloadHome');
this.onLoad()
+ this.initData()
})
},
onLoad(options) {
--
Gitblit v1.9.3