From 9b479421aea721b15e6dc446298ccf545687e0f3 Mon Sep 17 00:00:00 2001 From: lqq Date: Fri, 18 Oct 2019 09:25:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/user.js | 1 - pages/billboards/policy/policy-list/index.js | 13 ++++++++++--- pages/topics/index.js | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/models/user.js b/models/user.js index 182887d..a11bfba 100644 --- a/models/user.js +++ b/models/user.js @@ -11,7 +11,6 @@ class UserModel extends HTTP { constructor () { super() } - getMyMessageList(page, success){ let params = { url: UserConst.user_myMessage_url, diff --git a/pages/billboards/policy/policy-list/index.js b/pages/billboards/policy/policy-list/index.js index 89ec41b..5927a27 100644 --- a/pages/billboards/policy/policy-list/index.js +++ b/pages/billboards/policy/policy-list/index.js @@ -42,9 +42,16 @@ Page({ fetchPolicyArtice () { policy.fetchPolicyArtice(this.data.curCode, res => { console.log(res) - this.setData({ - nodes: res.data.content || '' - }) + if (res.data) { + this.setData({ + nodes: res.data.content || '' + }) + } else { + wx.showToast({ + title: res.message, + icon: 'none' + }) + } }) } }) \ No newline at end of file diff --git a/pages/topics/index.js b/pages/topics/index.js index 05703e8..5baebfb 100644 --- a/pages/topics/index.js +++ b/pages/topics/index.js @@ -24,7 +24,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function () { - if (store.hasPhone()) { + if (!store.hasPhone()) { console.log('已经绑定手机号码') this.fetchTopicList(); } else {