Browse Source

调整界面,修改问题

master
lqq 6 years ago
parent
commit
3640fe6154
  1. BIN
      pages/topics/interactive/cell/images/avatar.png
  2. 2
      pages/topics/interactive/cell/index.wxml
  3. 7
      pages/topics/interactive/cell/index.wxss
  4. 65
      pages/topics/interactive/topicArticle/index.js
  5. 4
      pages/topics/interactive/topicArticle/index.wxml
  6. 3
      pages/topics/interactive/topicArticle/index.wxss
  7. 2
      pages/user/myActivity/cell/index.wxml
  8. 34
      pages/user/myActivity/index.js
  9. 15
      utils/http.js

BIN
pages/topics/interactive/cell/images/avatar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

2
pages/topics/interactive/cell/index.wxml

@ -8,7 +8,7 @@
<view class="left-bottom-userInfo">
<view class="user-icon">
<image src="{{userIcon}}"></image>
<image src="{{userIcon || 'images/avatar.png'}}"></image>
</view>
<view class="userName">{{userName}}</view>
<view class="cell_info_meta">{{time}}</view>

7
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;

65
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({

4
pages/topics/interactive/topicArticle/index.wxml

@ -14,14 +14,14 @@
</view>
<view class="topic_userInfo">
<view class="user_icon">
<image src="{{userInfo.icon}}"></image>
<image src="{{userInfo.icon || '../cell/images/avatar.png'}}"></image>
</view>
<view class="user_text">
<view>
{{userInfo.name}}
</view>
<view>
{{userInfo.company + ' ' + userInfo.position}}
{{userInfo.company}} {{userInfo.position || ''}}
</view>
</view>
</view>

3
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;

2
pages/user/myActivity/cell/index.wxml

@ -12,7 +12,7 @@
</view>
</view>
</view>
<view class="right" wx:if="{{articleImg.length > 0}}">
<view class="right" wx:if="{{articleImg.length > 0 && articleImg !== 'null'}}">
<image class="articleImg" src="{{topicImg}}"></image>
</view>
</view>

34
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);

15
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)

Loading…
Cancel
Save