From 6a74afc8aab67bafbc0a3a02a75610eab81413b9 Mon Sep 17 00:00:00 2001 From: "Stormeye.Wu" Date: Fri, 24 Aug 2018 05:04:07 +0800 Subject: [PATCH] fix loading data issue --- pages/index/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/index/index.js b/pages/index/index.js index 58ffc36..1ae5186 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -26,6 +26,13 @@ Page({ onLoad: function (options) { var that = this; if (app.globalData.token && app.globalData.token != null) { + console.log("index ++ " + app.globalData.token); + if (that.couponChannelListCallback) { + that.couponChannelListCallback(res.data.token); + } + if (that.couponListCallback) { + that.couponListCallback(res.data.token); + } } else { // 由于是网络请求,可能会在 Page.onLoad 之后才返回 // 所以此处加入 callback 以防止这种情况