From 3640fe615407ee6fd5915f7f82b8b4c077e8e68f Mon Sep 17 00:00:00 2001 From: lqq Date: Fri, 18 Oct 2019 16:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=95=8C=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topics/interactive/cell/images/avatar.png | Bin 0 -> 2118 bytes pages/topics/interactive/cell/index.wxml | 2 +- pages/topics/interactive/cell/index.wxss | 7 +- .../topics/interactive/topicArticle/index.js | 65 ++++++++---------- .../interactive/topicArticle/index.wxml | 4 +- .../interactive/topicArticle/index.wxss | 3 + pages/user/myActivity/cell/index.wxml | 2 +- pages/user/myActivity/index.js | 34 --------- utils/http.js | 15 ++-- 9 files changed, 50 insertions(+), 82 deletions(-) create mode 100644 pages/topics/interactive/cell/images/avatar.png diff --git a/pages/topics/interactive/cell/images/avatar.png b/pages/topics/interactive/cell/images/avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..ad25d8428cdcce7a20688adcc02f9f4e49faf431 GIT binary patch literal 2118 zcmV-M2)Xx(P)LJdTNfJ(}1VILsNE_?UEKJM+DJ6;P2yZ7$0$#kaY zABNrE@BGf^p2zQZ&ud$${tSTD30nLCyZ~T-dBxX)Rz7{=n0W+FhZ9D<4kIQ#yj~9t`7MB_f?dQPz;gh8 z{>1lx6s+!9=hFyLg0bsq-obcy?umkvfKJ@qXiad?AXW()=P6GIn z5-<1z*azS@+aLcfG;#4tbSfHaG#cQr+i|n=3UqxR)7%6lx!@0A34q@G`-@Sqmhvk+ zVm6y$88c&SbOdcJ?<)=?e*jWqJx--GEh9551Qv@0=FwZA65G}+0z3iWHMxrg0?;xH z(;x^!9(f{fO(CM9qUGwAHIDWLgJEd02Q~w!ku@1WAOO;%yl8kQ;)HUM$+ zYP*Vx?>&u(dGnB*k_N+2|D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lKRAHa=6aveFsO=-julp{{v0#CFp!Zmcwp8<4irMN0BBK<$1UD*4fNdPeLgRn zxF7}QTf<`9)2>V5Vi+0#8J@Ll1(TLRH&`>vrvf0ELLgo3tr#&5Au%Z#3sOD<3K>;I zgm6zzE;Cy-3y=drd!RX9o3ysDh&mnega8^Zo)K7~6w_ExR1md)b&?Y8BC3CK%g!l1cNYYi-h-rvE wrn3?4Ns7xT74~1rd-h=)MF+jDvt9iC2bi&^UPJ`$4*&oF07*qoM6N<$f~@k_XaE2J literal 0 HcmV?d00001 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 2086a7e..ac23ba9 100644 --- a/pages/topics/interactive/topicArticle/index.js +++ b/pages/topics/interactive/topicArticle/index.js @@ -12,36 +12,36 @@ Page({ * 页面的初始数据 */ data: { - title:"市北区举行国际航运贸易金融创新中心核心区产业建设", - time:"6月7日", - userInfo:{ - icon:"", - name:"用户名", - company:"青岛誉群投资有限公司", - position:"董事长" - }, - detail:"9月16日晚7时,市北区委、区政府在区机关二楼会议厅举行国际航运贸易金融创新中心核心区产业招商工作方案答辩。这是市北区借鉴市委、市政府推动15个攻势作战经验,围绕创新中心核心区建设举行的首场答辩。区委书记张新竹主持答辩并讲话。", - imgArr:['http://bpic.588ku.com/element_origin_min_pic/16/10/30/528aa13209e86d5d9839890967a6b9c1.jpg', - 'http://bpic.588ku.com/element_origin_min_pic/16/10/30/54fcef525fa8f6037d180f3c26f3be65.jpg', - 'http://bpic.588ku.com/element_origin_min_pic/16/10/30/62e3ca3a02dddb002eff00482078d194.jpg', - 'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg' - ], + // title:"市北区举行国际航运贸易金融创新中心核心区产业建设", + // time:"6月7日", + // userInfo:{ + // icon:"", + // name:"用户名", + // company:"青岛誉群投资有限公司", + // position:"董事长" + // }, + // detail:"9月16日晚7时,市北区委、区政府在区机关二楼会议厅举行国际航运贸易金融创新中心核心区产业招商工作方案答辩。这是市北区借鉴市委、市政府推动15个攻势作战经验,围绕创新中心核心区建设举行的首场答辩。区委书记张新竹主持答辩并讲话。", + // imgArr:['http://bpic.588ku.com/element_origin_min_pic/16/10/30/528aa13209e86d5d9839890967a6b9c1.jpg', + // 'http://bpic.588ku.com/element_origin_min_pic/16/10/30/54fcef525fa8f6037d180f3c26f3be65.jpg', + // 'http://bpic.588ku.com/element_origin_min_pic/16/10/30/62e3ca3a02dddb002eff00482078d194.jpg', + // 'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg' + // ], comments:[ - { - userIcon:"", - userName:"用户名", - detail:"评论内容", - time:"刚刚", - praiseNum:"30" - }, - { - userIcon: "", - userName: "用户名", - detail: "评论内容", - time: "1小时前", - praiseNum: "30" - } + // { + // userIcon:"", + // userName:"用户名", + // detail:"评论内容", + // time:"刚刚", + // praiseNum:"30" + // }, + // { + // userIcon: "", + // userName: "用户名", + // detail: "评论内容", + // time: "1小时前", + // praiseNum: "30" + // } ], unStar: '/images/common/star.png', @@ -77,17 +77,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 532349b..d1a5538 100644 --- a/pages/topics/interactive/topicArticle/index.wxml +++ b/pages/topics/interactive/topicArticle/index.wxml @@ -14,14 +14,14 @@ - + {{userInfo.name}} - {{userInfo.company + ' ' + userInfo.position}} + {{userInfo.company}} {{userInfo.position || ''}} diff --git a/pages/topics/interactive/topicArticle/index.wxss b/pages/topics/interactive/topicArticle/index.wxss index 1ed69c0..a2cceb8 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..46b363d 100644 --- a/pages/user/myActivity/index.js +++ b/pages/user/myActivity/index.js @@ -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/utils/http.js b/utils/http.js index d0b8552..9be129d 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 @@ -26,17 +25,19 @@ class HTTP { // token 拼接到 请求体中 let data = params.data console.log('请求Header和Body参数:') - console.log({token: token, ...data}) + 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)