Browse Source

合并冲突

master
fanp 6 years ago
parent
commit
a4eaf5fe59
  1. 2
      components/image-button/index.wxml
  2. 1
      models/user.js
  3. 6
      pages/billboards/firm/index.js
  4. 1
      pages/billboards/firm/index.wxml
  5. 9
      pages/billboards/firm/index.wxss
  6. 16
      pages/billboards/policy/policy-list/index.js
  7. 2
      pages/home/index.wxml
  8. 1
      pages/topics/index.json
  9. BIN
      pages/topics/interactive/cell/images/avatar.png
  10. 2
      pages/topics/interactive/cell/index.wxml
  11. 7
      pages/topics/interactive/cell/index.wxss
  12. 47
      pages/topics/interactive/topicArticle/index.js
  13. 4
      pages/topics/interactive/topicArticle/index.wxml
  14. 3
      pages/topics/interactive/topicArticle/index.wxss
  15. 2
      pages/user/myActivity/cell/index.wxml
  16. 36
      pages/user/myActivity/index.js
  17. 2
      pages/user/myFavorite/index.js
  18. 11
      project.config.json
  19. 19
      utils/http.js

2
components/image-button/index.wxml

@ -1,5 +1,5 @@
<!--components/image-botton/index.wxml-->
<view class="image-button" bindtap="onTap">
<view class="image-button" bindtap="{{disable ? '' : 'onTap'}}">
<image class="image-btn-bg" src="{{disable ? 'images/btn_bg_disable.png':'images/btn_bg.png'}}"></image>
{{title}}
</view>

1
models/user.js

@ -14,6 +14,7 @@ class UserModel extends HTTP {
constructor () {
super()
}
getUserInfo(success){
let params = {
url: UserConst.user_getInfo_url,

6
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 => {

1
pages/billboards/firm/index.wxml

@ -13,4 +13,5 @@
bind:clickCardItem="clickCardItem"/>
</block>
</view>
<view wx:if="{{list.length <= 0}}" class="page_empty">暂无数据</view>
</view>

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

16
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'
})
}
})
}
})

2
pages/home/index.wxml

@ -11,5 +11,5 @@
showTop="{{item.showTop}}"
bind:clickListItem="clickListItem"/>
</block>
<e-empty loading="{{loading}}" empty="{{list.length == 0}}"/>
<e-empty loading="{{loading}}"/>
</view>

1
pages/topics/index.json

@ -1,5 +1,6 @@
{
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark",
"usingComponents": {
"e-segment":"/components/segment/index",
"message": "./message/index",

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;

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

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

@ -14,14 +14,14 @@
</view>
<view class="topic_userInfo">
<view class="user_icon">
<image src="{{groupAvator}}"></image>
<image src="{{groupAvator || '../cell/images/avatar.png'}}"></image>
</view>
<view class="user_text">
<view>
{{author}}
</view>
<view>
{{company + ' ' + position}}
{{company}} {{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>

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

2
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,

11
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
}
]

19
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)
},
}

Loading…
Cancel
Save