From 7c7c990bb45bf0fdb36e43ce07a6afd100354be0 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Fri, 27 Dec 2019 01:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=B6=20=E5=8A=A0=E5=85=A5token=20?= =?UTF-8?q?=E9=89=B4=E6=9D=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 3 ++- app.json | 1 - config/config.js | 10 +++++----- pages/enterCommunity/enterCommunity.js | 3 +-- utils/util.js | 5 +++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app.js b/app.js index 145be91..b416114 100644 --- a/app.js +++ b/app.js @@ -62,7 +62,7 @@ App({ success: function () { // 直接从Storage中获取用户信息 let userStorageInfo = wx.getStorageSync('userInfo'); - + console.log('用户信息',userStorageInfo); if (userStorageInfo) { that.globalData.userInfo = JSON.parse(userStorageInfo); } else { @@ -114,6 +114,7 @@ App({ console.log(res.userInfo); wx.setStorageSync('userInfo', JSON.stringify(res.userInfo)); wx.setStorageSync('loginFlag', res.sessionKey); + wx.setStorageSync('token', res.token); callback(); } else { that.showInfo(res.errmsg); diff --git a/app.json b/app.json index 0b3ac78..68d11ac 100644 --- a/app.json +++ b/app.json @@ -9,7 +9,6 @@ "pages/enterCommunity/enterCommunity", "pages/myBooks/myBooks", "pages/detail/detail", - "pages/comment/comment", "pages/notice/index", "pages/notice/detail/detail", "pages/repairList/repairList", diff --git a/config/config.js b/config/config.js index 5bb8652..614ccc1 100644 --- a/config/config.js +++ b/config/config.js @@ -19,14 +19,14 @@ const appInfo = { }; const urlInfo = { - areaUrl: baseUrl +"appApi/area.listAreas", - GetNoticeListUrl: baseUrl + 'appApi/api.queryNotices', + areaUrl: baseUrl +"app/area.listAreas", + GetNoticeListUrl: baseUrl + 'app/api.queryNotices', //报修接口 - saveOwnerRepair: baseUrl + 'appApi/ownerRepair.saveOwnerRepair', + saveOwnerRepair: baseUrl + 'app/ownerRepair.saveOwnerRepair', //查看报修 - listOwnerRepairs: baseUrl + 'appApi/ownerRepair.listOwnerRepairs', + listOwnerRepairs: baseUrl + 'app/ownerRepair.listOwnerRepairs', //家庭成员 - saveOwner: baseUrl + 'appApi/owner.saveOwner', + saveOwner: baseUrl + 'app/owner.saveOwner', } diff --git a/pages/enterCommunity/enterCommunity.js b/pages/enterCommunity/enterCommunity.js index 561ee00..594e2b7 100644 --- a/pages/enterCommunity/enterCommunity.js +++ b/pages/enterCommunity/enterCommunity.js @@ -46,8 +46,7 @@ Page({ let curLocation = wx.getStorageSync("currentLocation"); this.setData({ province: curLocation.province, - city: curLocation.city - + city: curLocation.city }) }, diff --git a/utils/util.js b/utils/util.js index 3e29a57..4f61efe 100644 --- a/utils/util.js +++ b/utils/util.js @@ -58,11 +58,12 @@ const getHeaders = function(){ transaction_id: wxuuid(), req_time: getDateYYYYMMDDHHMISS(), sign:'1234567', - user_id:'-1' - + user_id:'-1', + cookie: '_java110_token_=' + wx.getStorageSync('token') } } + module.exports = { formatTime: formatTime, getHeaders: getHeaders