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