diff --git a/components/image-button/index.wxml b/components/image-button/index.wxml index 77ad10e..a1c2bbb 100644 --- a/components/image-button/index.wxml +++ b/components/image-button/index.wxml @@ -1,5 +1,5 @@ - + {{title}} diff --git a/models/user.js b/models/user.js index c9a2e97..b9a82cc 100644 --- a/models/user.js +++ b/models/user.js @@ -14,6 +14,7 @@ class UserModel extends HTTP { constructor () { super() } + getUserInfo(success){ let params = { url: UserConst.user_getInfo_url, diff --git a/pages/billboards/firm/index.js b/pages/billboards/firm/index.js index 61f1778..284dce9 100644 --- a/pages/billboards/firm/index.js +++ b/pages/billboards/firm/index.js @@ -22,21 +22,21 @@ Page({ }, tapSegemnt (e) { console.log(e.detail) - const {index} = e.detail + const { index } = e.detail this.setData({ curCode: this.data.tags[index].code, currPage: 1, }) this.fetchList() }, - clickCardItem(e) { + clickCardItem (e) { console.log(e.detail) const { id } = e.detail wx.navigateTo({ url: `/pages/article/index?id=${id}`, }) }, - fetchList() { + fetchList () { const { curCode } = this.data const page = this.data.currPage billboard.fetchBailList(curCode, page, res => { diff --git a/pages/billboards/firm/index.wxml b/pages/billboards/firm/index.wxml index 6bfc840..44ff699 100644 --- a/pages/billboards/firm/index.wxml +++ b/pages/billboards/firm/index.wxml @@ -13,4 +13,5 @@ bind:clickCardItem="clickCardItem"/> + 暂无数据 diff --git a/pages/billboards/firm/index.wxss b/pages/billboards/firm/index.wxss index 665f520..b4629ac 100644 --- a/pages/billboards/firm/index.wxss +++ b/pages/billboards/firm/index.wxss @@ -23,4 +23,13 @@ .e_card { width: 45vw; margin-bottom: 13px; +} + +.page_empty { + width: 100%; + height: 100px; + margin-top: 20px; + font-size: 14px; + color: #aaa; + text-align: center; } \ No newline at end of file diff --git a/pages/billboards/policy/policy-list/index.js b/pages/billboards/policy/policy-list/index.js index 89ec41b..fa935d2 100644 --- a/pages/billboards/policy/policy-list/index.js +++ b/pages/billboards/policy/policy-list/index.js @@ -42,9 +42,19 @@ 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 { + this.setData({ + nodes: '' + }) + wx.showToast({ + title: res.message, + icon: 'none' + }) + } }) } }) \ No newline at end of file diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 4a88be0..20ab212 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -11,5 +11,5 @@ showTop="{{item.showTop}}" bind:clickListItem="clickListItem"/> - + diff --git a/pages/topics/index.json b/pages/topics/index.json index 64d42ad..eb096de 100644 --- a/pages/topics/index.json +++ b/pages/topics/index.json @@ -1,5 +1,6 @@ { "enablePullDownRefresh": true, + "backgroundTextStyle": "dark", "usingComponents": { "e-segment":"/components/segment/index", "message": "./message/index", diff --git a/pages/topics/interactive/cell/images/avatar.png b/pages/topics/interactive/cell/images/avatar.png new file mode 100644 index 0000000..ad25d84 Binary files /dev/null and b/pages/topics/interactive/cell/images/avatar.png differ diff --git a/pages/topics/interactive/cell/index.wxml b/pages/topics/interactive/cell/index.wxml index f398cc7..7727ad6 100644 --- a/pages/topics/interactive/cell/index.wxml +++ b/pages/topics/interactive/cell/index.wxml @@ -8,7 +8,7 @@ - + {{userName}} {{time}} diff --git a/pages/topics/interactive/cell/index.wxss b/pages/topics/interactive/cell/index.wxss index 62efd5d..50be128 100644 --- a/pages/topics/interactive/cell/index.wxss +++ b/pages/topics/interactive/cell/index.wxss @@ -9,7 +9,8 @@ .left{ display: flex; flex-direction: column; - width: 70%; + /* width: 70%; */ + flex:1; } .leftActive{ display: flex; @@ -30,8 +31,12 @@ width: 20px; height: 20px; border-radius: 50%; + border: 1px solid #ddd; background-color: #EEEEEE; } +.user-icon image { + border-radius: 50%; +} .userName{ margin: 0 5px 0 5px; font-size: 12px; diff --git a/pages/topics/interactive/topicArticle/index.js b/pages/topics/interactive/topicArticle/index.js index 0e76897..d4cf630 100644 --- a/pages/topics/interactive/topicArticle/index.js +++ b/pages/topics/interactive/topicArticle/index.js @@ -20,9 +20,7 @@ Page({ position:String, detail: String, imgArr:[], - comments:[], - unStar: '/images/common/star.png', star: '/images/common/star_light.png', isStar:false, @@ -46,42 +44,6 @@ Page({ this.fetchDetail() this.fetchDetailComment() }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - /** * 页面上拉触底事件的处理函数 */ @@ -92,17 +54,10 @@ Page({ }) this.fetchDetailComment() }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - }, fetchDetail(){ let topicId = this.data.topicId + console.log('议题详情' + topicId) topicModel.getTopicDetail(topicId,res => { - console.log('议题详情') console.log(res) let data = res.result this.setData({ diff --git a/pages/topics/interactive/topicArticle/index.wxml b/pages/topics/interactive/topicArticle/index.wxml index 61e6a41..5bb3b96 100644 --- a/pages/topics/interactive/topicArticle/index.wxml +++ b/pages/topics/interactive/topicArticle/index.wxml @@ -14,14 +14,14 @@ - + {{author}} - {{company + ' ' + position}} + {{company}} {{position || ''}} diff --git a/pages/topics/interactive/topicArticle/index.wxss b/pages/topics/interactive/topicArticle/index.wxss index d8ee2c9..6b4b154 100644 --- a/pages/topics/interactive/topicArticle/index.wxss +++ b/pages/topics/interactive/topicArticle/index.wxss @@ -45,6 +45,9 @@ image{ border-radius: 50%; background-color: #EFECE8; } +.user_icon image { + border-radius: 50%; +} .user_text{ display: flex; flex-direction: column; diff --git a/pages/user/myActivity/cell/index.wxml b/pages/user/myActivity/cell/index.wxml index e52b522..5ec0351 100644 --- a/pages/user/myActivity/cell/index.wxml +++ b/pages/user/myActivity/cell/index.wxml @@ -12,7 +12,7 @@ - + diff --git a/pages/user/myActivity/index.js b/pages/user/myActivity/index.js index dec8ca1..b2995a7 100644 --- a/pages/user/myActivity/index.js +++ b/pages/user/myActivity/index.js @@ -29,7 +29,7 @@ Page({ let tempDatas = [] datas.forEach(item => { tempDatas.push({ - articleId: item.collectionId, + articleId: item.contentId, title: item.title, articleImg: item.image, userName: item.author, @@ -61,33 +61,6 @@ Page({ wx.stopPullDownRefresh() }) }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, /** * 页面相关事件处理函数--监听用户下拉动作 @@ -110,13 +83,6 @@ Page({ this.fetchDataList() }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - }, - clickListItem(e) { const item = e.detail.item; console.log(item); diff --git a/pages/user/myFavorite/index.js b/pages/user/myFavorite/index.js index 47ffd16..e6cede1 100644 --- a/pages/user/myFavorite/index.js +++ b/pages/user/myFavorite/index.js @@ -32,7 +32,7 @@ Page({ let tempDatas = [] datas.forEach(item => { tempDatas.push({ - topicId: item.collectionId, + topicId: item.contentId, title: item.title, topicImg: item.image, userIcon: item.groupAvator, diff --git a/project.config.json b/project.config.json index 4eea4f9..05902ea 100644 --- a/project.config.json +++ b/project.config.json @@ -24,7 +24,7 @@ }, "compileType": "miniprogram", "libVersion": "2.8.1", - "appid": "wx3bcb2b4ced1544f7", + "appid": "wx8f4ebf5537cf4962", "projectname": "fqsb_wx", "debugOptions": { "hidedInDevtools": [] @@ -50,7 +50,7 @@ "list": [] }, "miniprogram": { - "current": 6, + "current": 7, "list": [ { "id": -1, @@ -98,6 +98,13 @@ "id": -1, "name": "User", "pathName": "pages/user/index", + "query": "", + "scene": null + }, + { + "id": -1, + "name": "Topics", + "pathName": "pages/topics/index", "scene": null } ] diff --git a/utils/http.js b/utils/http.js index 2af182e..bc23d7f 100644 --- a/utils/http.js +++ b/utils/http.js @@ -15,7 +15,6 @@ class HTTP { } request = (params) => { // 从缓存中读取 token - // let token = wx.getStorageSync(HTTPConst.TokenStoreKey) || '' const token = store.readToken() let url = this.baseUrl + params.url @@ -25,18 +24,20 @@ class HTTP { } // token 拼接到 请求体中 let data = params.data - console.log('请求参数:') - console.log({token: token, ...data}) + console.log('请求Header和Body参数:') + let header = { + 'token': token, + 'content-type': 'application/json', + } + console.log(header) + console.log(data) wx.request({ url: url, data: data, - header: { - 'token': token, - 'content-type': 'application/json', - }, + header: header, method: params.method, dataType: 'json', - success: function (res) { + success: (res) => { console.log(res.data) let code = res.statusCode.toString() let startCode = code.charAt(0) @@ -94,8 +95,6 @@ class HTTP { const { token, userInfo } = data.result store.saveToken(token) store.saveUserInfo(userInfo) - // wx.setStorageSync(HTTPConst.UserInfoStoreKey, userInfo) - // wx.setStorageSync(HTTPConst.TokenStoreKey, token) success(data) }, }