diff --git a/components/cell/index.js b/components/cell/index.js
index 071032c..6402e4c 100644
--- a/components/cell/index.js
+++ b/components/cell/index.js
@@ -4,6 +4,7 @@ Component({
* 组件的属性列表
*/
properties: {
+ index: Number,
cId: String,
title: String,
readed: {
@@ -14,14 +15,24 @@ Component({
showTop: {
type: Boolean,
value: false,
+ },
+ image: {
+ type: String,
+ value: ''
+ }
+ },
+ observers: {
+ readed (value) {
+ this.setData({
+ _readed: value
+ })
}
},
-
/**
* 组件的初始数据
*/
data: {
-
+ _readed: false,
},
/**
@@ -29,7 +40,10 @@ Component({
*/
methods: {
onTap () {
- this.triggerEvent('clickListItem', { id: this.properties.cId})
+ this.setData({
+ _readed: true
+ })
+ this.triggerEvent('clickListItem', { id: this.properties.cId, index: this.properties.index})
}
}
})
diff --git a/components/cell/index.wxml b/components/cell/index.wxml
index 072caf8..22d4902 100644
--- a/components/cell/index.wxml
+++ b/components/cell/index.wxml
@@ -1,8 +1,13 @@
- {{title}}
-
- {{time}}
-
+
+ {{title}}
+
+ {{time}}
+
+
+
+
+
diff --git a/components/cell/index.wxss b/components/cell/index.wxss
index 1e3e478..a4b6ba6 100644
--- a/components/cell/index.wxss
+++ b/components/cell/index.wxss
@@ -3,13 +3,24 @@
background-color: white;
border-bottom: 1px solid #E7E7E7;
display: flex;
+ flex-direction: row;
+ padding: 10px 20rpx;
+}
+.cell-left {
+ flex:1;
+ display: flex;
flex-direction: column;
- padding: 10px 20px;
+ justify-content: space-around;
}
.cell_title {
font-weight: 300;
font-size: 17px;
color: #000;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.cell_title_readed {
color: #9C9C9C;
@@ -27,4 +38,14 @@
padding: 0 10px;
width: 20px;
height: 12px;
+}
+.cell-right {
+ margin-left: 10rpx;
+ width: 30vw;
+ height: 100%;
+}
+.cell-image {
+ display: block;
+ width: 100%;
+ height: 160rpx;
}
\ No newline at end of file
diff --git a/components/empty/index.js b/components/empty/index.js
index 7519f39..2dd67c5 100644
--- a/components/empty/index.js
+++ b/components/empty/index.js
@@ -6,15 +6,15 @@ Component({
properties: {
loading: {
type: Boolean,
- value: true,
+ value: false,
},
empty: {
type: Boolean,
value: false,
},
message: {
- type: Boolean,
- value: '页面迷路了!'
+ type: String,
+ value: '暂无内容数据'
}
},
diff --git a/components/swiper/index.wxml b/components/swiper/index.wxml
index ea851fb..a3575ee 100644
--- a/components/swiper/index.wxml
+++ b/components/swiper/index.wxml
@@ -10,7 +10,9 @@
>
-
+
+ {{item.title}}
+
diff --git a/components/swiper/index.wxss b/components/swiper/index.wxss
index fd522bd..9ef836e 100644
--- a/components/swiper/index.wxss
+++ b/components/swiper/index.wxss
@@ -1,8 +1,24 @@
/* components/swiper/index.wxss */
+.e-swiper {
+ position: relative;
+}
.e-swiper>swiper {
height: 180px;
}
.swiper_icon {
width: 100%;
height: 100%;
+}
+.swiper_title {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 0 10rpx;
+ z-index: 10;
+ text-overflow: ellipsis;
+ color: white;
+ white-space: nowrap;
+ overflow: hidden;
+ background-color: rgba(0, 0, 0, 0.2);
}
\ No newline at end of file
diff --git a/pages/article/index.js b/pages/article/index.js
index 749eb23..56e2c00 100644
--- a/pages/article/index.js
+++ b/pages/article/index.js
@@ -12,6 +12,7 @@ Page({
nodes: '',
isStar: true, // 是否
showBtn: false,
+ image: '',
aId: '',
title: '',
date: '',
@@ -49,6 +50,7 @@ Page({
nodes: data.content,
title: data.title,
date: date,
+ image: data.titlePic,
origin: data.source,
isStar: data.isCollection ? true : false,
showBtn: data.typeFlag >= 2 ? true : false,
@@ -59,12 +61,12 @@ Page({
addOrRemoveCollectionApi () {
artice.addOrRemoveCollect(this.data.aId, res => {
console.log(res)
- this.setData({
- isStar: !this.data.isStar
- })
if (res.code == 200) {
+ this.setData({
+ isStar: !this.data.isStar
+ })
wx.showToast({
- title: res.message,
+ title: this.data.isStar ? '收藏成功' : '取消收藏成功',
icon: 'none'
})
}
diff --git a/pages/article/index.wxml b/pages/article/index.wxml
index da2c9be..a125279 100644
--- a/pages/article/index.wxml
+++ b/pages/article/index.wxml
@@ -3,10 +3,13 @@
{{title}}
- {{origin}}
- {{date}}
+ {{origin || ''}}
+ {{date || ''}}
+
+
+
diff --git a/pages/article/index.wxss b/pages/article/index.wxss
index 499b497..3f56206 100644
--- a/pages/article/index.wxss
+++ b/pages/article/index.wxss
@@ -8,6 +8,7 @@
flex-direction: column;
margin-bottom: 10px;
}
+/* 标题 */
.artice_title {
color: #373737;
font-size: 20px;
@@ -20,7 +21,11 @@
line-height: 27px;
}
.artice_origin {
+ max-width: 50vw;
color: #66708B;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
}
.artice_time {
color: #B3B3B3;
@@ -32,6 +37,16 @@
width: 20px;
height: 20px;
}
+
+.artice_image {
+ margin-top: 10rpx;
+}
+.title_image {
+ width: 100%;
+ height: 160px;
+}
+
+/* 底部 button 区域 */
.page_footer {
background-color: white;
border-top: 1px solid #f7f7f7;
diff --git a/pages/billboards/policy/index.json b/pages/billboards/policy/index.json
index 5b07c78..144aa75 100644
--- a/pages/billboards/policy/index.json
+++ b/pages/billboards/policy/index.json
@@ -4,6 +4,7 @@
"usingComponents": {
"w-searchbar": "/components/weui/searchbar/searchbar",
"e-cell": "/components/cell/index",
+ "e-empty": "/components/empty/index",
"e-tags": "components/tags/index"
}
}
\ No newline at end of file
diff --git a/pages/billboards/policy/index.wxml b/pages/billboards/policy/index.wxml
index 8cacdf2..c906a80 100644
--- a/pages/billboards/policy/index.wxml
+++ b/pages/billboards/policy/index.wxml
@@ -12,4 +12,5 @@
bind:clickListItem="clickListItem"
/>
+
diff --git a/pages/billboards/policy/policy-list/index.js b/pages/billboards/policy/policy-list/index.js
index fa935d2..be85474 100644
--- a/pages/billboards/policy/policy-list/index.js
+++ b/pages/billboards/policy/policy-list/index.js
@@ -50,10 +50,6 @@ Page({
this.setData({
nodes: ''
})
- wx.showToast({
- title: res.message,
- icon: 'none'
- })
}
})
}
diff --git a/pages/billboards/policy/policy-list/index.json b/pages/billboards/policy/policy-list/index.json
index 4107059..ac02898 100644
--- a/pages/billboards/policy/policy-list/index.json
+++ b/pages/billboards/policy/policy-list/index.json
@@ -1,6 +1,7 @@
{
"navigationBarTitleText": "人才政策",
"usingComponents": {
- "e-segment": "/components/segment/index"
+ "e-segment": "/components/segment/index",
+ "e-empty": "/components/empty/index"
}
}
\ No newline at end of file
diff --git a/pages/billboards/policy/policy-list/index.wxml b/pages/billboards/policy/policy-list/index.wxml
index ef9e20f..017dda3 100644
--- a/pages/billboards/policy/policy-list/index.wxml
+++ b/pages/billboards/policy/policy-list/index.wxml
@@ -10,4 +10,5 @@
+
diff --git a/pages/home/index.js b/pages/home/index.js
index 93fd5c0..aaed8ad 100644
--- a/pages/home/index.js
+++ b/pages/home/index.js
@@ -61,9 +61,10 @@ Page({
tempDatas.push({
id: item.id,
title: item.title,
+ image: item.titlePic,
showTop: item.isTop == 1 ? true : false,
time: dayjs(item.createTime).toNow(),
- readed: item.isRead == 0 ? 'false' : 'true'
+ readed: item.isRead == 0 ? false : true
})
})
if (page == 1) {
@@ -98,10 +99,10 @@ Page({
const datas = res.list
let tempBanners = []
datas.forEach(item => {
- console.log(item)
tempBanners.push({
id: item.id,
- image: item.titlePic
+ image: item.titlePic,
+ title: item.title
})
})
this.setData({
@@ -137,7 +138,8 @@ Page({
},
clickListItem (e) {
console.log(e.detail)
- this.gotoArticePage(e.detail.id)
+ const {id, index} = e.detail
+ this.gotoArticePage(id)
},
gotoArticePage (id) {
wx.navigateTo({
diff --git a/pages/home/index.wxml b/pages/home/index.wxml
index 20ab212..c6cb141 100644
--- a/pages/home/index.wxml
+++ b/pages/home/index.wxml
@@ -4,7 +4,9 @@
{
tempDatas.push({
topicId: item.id,
+ userIcon: item.groupAvator || '',
title: item.title,
userIcon: item.groupAvator,
userName: item.author,
diff --git a/pages/topics/interactive/cell/index.wxss b/pages/topics/interactive/cell/index.wxss
index 6fa2f38..ff94bfe 100644
--- a/pages/topics/interactive/cell/index.wxss
+++ b/pages/topics/interactive/cell/index.wxss
@@ -38,6 +38,10 @@
/* border-radius: 50%; */
}
.userName{
+ max-width: 120rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
margin: 0 5px 0 5px;
font-size: 12px;
color: #3B3B3B;
@@ -81,6 +85,12 @@ image{
font-weight: 300;
font-size: 17px;
color: #000;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
}
.cell_title_selected {
color: #9C9C9C;
diff --git a/pages/user/myActivity/cell/index.js b/pages/user/myActivity/cell/index.js
deleted file mode 100644
index f806a72..0000000
--- a/pages/user/myActivity/cell/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// pages/topics/common/interactive/common/imageCell/index.js
-Component({
- /**
- * 组件的属性列表
- */
- properties: {
- articleId: String,
- title: String,
- articleImg: String,
- userName: String,
- time: String,
- },
-
- /**
- * 组件的初始数据
- */
- data: {
-
- },
-
- /**
- * 组件的方法列表
- */
- methods: {
- onTap() {
- let item = {
- articleId: this.properties.articleId,
- title: this.properties.title,
- articleImg: this.properties.articleImg,
- userName: this.properties.userName,
- time: this.properties.time,
- }
- this.triggerEvent('clickListItem', { item: item })
- }
- }
-})
diff --git a/pages/user/myActivity/cell/index.json b/pages/user/myActivity/cell/index.json
deleted file mode 100644
index e8cfaaf..0000000
--- a/pages/user/myActivity/cell/index.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "component": true,
- "usingComponents": {}
-}
\ No newline at end of file
diff --git a/pages/user/myActivity/cell/index.wxml b/pages/user/myActivity/cell/index.wxml
deleted file mode 100644
index 5ec0351..0000000
--- a/pages/user/myActivity/cell/index.wxml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- {{title}}
-
-
-
-
- {{userName}}
- {{time}}
-
-
-
-
-
-
-
diff --git a/pages/user/myActivity/cell/index.wxss b/pages/user/myActivity/cell/index.wxss
deleted file mode 100644
index 3ad58a0..0000000
--- a/pages/user/myActivity/cell/index.wxss
+++ /dev/null
@@ -1,106 +0,0 @@
-/* pages/topics/common/interactive/common/imageCell/index.wxss */
-.cell {
-
- display: flex;
- flex-direction: row;
- padding: 10px 20px;
- box-sizing: border-box;
- align-items: center;
- position: relative;
-}
-.cell:after {
- content: "";
- position: absolute;
- bottom: 1px;
- left: 20px;
- right: 20px;
- border-bottom: 1px solid #E7E7E7;
-}
-.left{
- display: flex;
- flex-direction: column;
- width: 70%;
-}
-.leftActive{
- display: flex;
- flex-direction: column;
- width: 100%;
-}
-.left-bottom{
- display: flex;
- flex: row;
- justify-content: space-between;
-}
-.left-bottom-userInfo{
- display: flex;
- flex: row;
- align-items: center;
-}
-.user-icon{
- width: 20px;
- height: 20px;
- border-radius: 50%;
- background-color: #EEEEEE;
-}
-.userName{
- margin: 0 5px 0 0;
- font-size: 12px;
- color: #3B3B3B;
-}
-.left-bottom-comments{
- display: flex;
- flex: row;
- align-items: center;
- margin-right: 10px;
-}
-.comments-icon{
- width: 15px;
- height: 12px;
- line-height: 10px;
- margin-right: 5px;
-}
-.image_icon {
- width: 100%;
- height: 100%;
-}
-.commentNum{
- font-size: 12px;
- color: #3B3B3B;
-}
-.right{
- width: 30%;
- height: 70px;
- border-radius: 5px;
- background-color: #EEEEEE;
-}
-image{
- width: 100%;
- height: 100%;
-}
-.articleImg{
- width: 100%;
- height: 100%;
- border-radius: 5px;
-}
-.cell_title {
- font-weight: 300;
- font-size: 17px;
- color: #000;
-}
-.cell_title_selected {
- color: #9C9C9C;
-}
-.cell_info_meta {
- padding-top: 10rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- font-size: 12px;
- line-height: 12px;
- color: #D4D4D4;
-}
-.cell_info_top {
- padding: 0 10px;
- width: 20px;
- height: 12px;
-}
\ No newline at end of file
diff --git a/pages/user/myActivity/index.js b/pages/user/myActivity/index.js
index 7a0e15f..9a7e0bc 100644
--- a/pages/user/myActivity/index.js
+++ b/pages/user/myActivity/index.js
@@ -89,9 +89,7 @@ Page({
},
clickListItem(e) {
- const item = e.detail.item;
- console.log(item);
- let id = item.articleId
+ const {id} = e.detail
wx.navigateTo({
url: `/pages/article/index?id=${id}`,
})
diff --git a/pages/user/myActivity/index.json b/pages/user/myActivity/index.json
index d12f789..60736ca 100644
--- a/pages/user/myActivity/index.json
+++ b/pages/user/myActivity/index.json
@@ -2,6 +2,6 @@
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的活动",
"usingComponents": {
- "cell": "./cell/index"
+ "e-cell": "/components/cell/index"
}
}
\ No newline at end of file
diff --git a/pages/user/myActivity/index.wxml b/pages/user/myActivity/index.wxml
index 289e5bd..5f8e362 100644
--- a/pages/user/myActivity/index.wxml
+++ b/pages/user/myActivity/index.wxml
@@ -1,13 +1,12 @@
- |
diff --git a/pages/user/myFavorite/index.json b/pages/user/myFavorite/index.json
index 3b85f5b..2e2a22f 100644
--- a/pages/user/myFavorite/index.json
+++ b/pages/user/myFavorite/index.json
@@ -3,6 +3,7 @@
"navigationBarTitleText": "我的收藏",
"usingComponents": {
"cell": "../myTopics/myParticipant/cell/index",
+ "e-empty": "/components/empty/index",
"artice-cell": "/components/cell/index"
}
}
\ No newline at end of file
diff --git a/pages/user/myFavorite/index.wxml b/pages/user/myFavorite/index.wxml
index 672d77d..ebb8dc8 100644
--- a/pages/user/myFavorite/index.wxml
+++ b/pages/user/myFavorite/index.wxml
@@ -20,6 +20,6 @@
userIcon="{{item.userIcon}}"
bind:clickListItem="clickListItem"/>
-
+
diff --git a/pages/user/myIdea/index.js b/pages/user/myIdea/index.js
index b2f8f45..1ad053a 100644
--- a/pages/user/myIdea/index.js
+++ b/pages/user/myIdea/index.js
@@ -25,13 +25,6 @@ Page({
fetchMyIdeaList(){
let page = this.data.currentPage
userModel.goldenList(page,res=>{
- console.log(res)
- if (res.result.list.length == 0) {
- wx.showToast({
- title: '暂无数据',
- icon: 'none'
- })
- }
const datas = res.result.list
let tempDatas = []
datas.forEach(item => {
diff --git a/pages/user/myIdea/index.json b/pages/user/myIdea/index.json
index 2f60cec..3487628 100644
--- a/pages/user/myIdea/index.json
+++ b/pages/user/myIdea/index.json
@@ -3,6 +3,7 @@
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的金点子",
"usingComponents": {
+ "e-empty": "/components/empty/index",
"cell": "../../topics/goodIdea/cell/index"
}
}
\ No newline at end of file
diff --git a/pages/user/myIdea/index.wxml b/pages/user/myIdea/index.wxml
index 90493d2..d8dc085 100644
--- a/pages/user/myIdea/index.wxml
+++ b/pages/user/myIdea/index.wxml
@@ -5,4 +5,5 @@
itemData="{{item}}"
bind:clickListItem="clickListItem"/>
+
diff --git a/pages/user/myMessage/index.js b/pages/user/myMessage/index.js
index d93e0b5..cd88307 100644
--- a/pages/user/myMessage/index.js
+++ b/pages/user/myMessage/index.js
@@ -26,13 +26,6 @@ Page({
let page = this.data.currentPage
userModel.getMyMessageList(page,res=>{
console.log('我的消息')
- console.log(res)
- if (res.result.list.length == 0){
- wx.showToast({
- title: '暂无数据',
- icon: 'none'
- })
- }
const datas = res.result.list
let tempDatas = []
datas.forEach(item => {
diff --git a/pages/user/myMessage/index.json b/pages/user/myMessage/index.json
index b253fc9..1f1e624 100644
--- a/pages/user/myMessage/index.json
+++ b/pages/user/myMessage/index.json
@@ -2,6 +2,7 @@
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的消息",
"usingComponents": {
- "cell": "./cell/index"
+ "cell": "./cell/index",
+ "e-empty": "/components/empty/index"
}
}
\ No newline at end of file
diff --git a/pages/user/myMessage/index.wxml b/pages/user/myMessage/index.wxml
index dcb1d54..0f64a34 100644
--- a/pages/user/myMessage/index.wxml
+++ b/pages/user/myMessage/index.wxml
@@ -5,4 +5,5 @@
itemData="{{item}}"
bind:clickListItem="clickListItem"/>
+
diff --git a/pages/user/myTopics/index.js b/pages/user/myTopics/index.js
index 31c3605..d7b31ef 100644
--- a/pages/user/myTopics/index.js
+++ b/pages/user/myTopics/index.js
@@ -29,13 +29,6 @@ Page({
fetchMyTopicList(){
let page = this.data.currentPage
userModel.getMyTopics(page,this.data.selectedTitle+1,res=>{
- console.log(res)
- if (res.result.list.length == 0) {
- wx.showToast({
- title: '暂无数据',
- icon: 'none'
- })
- }
const datas = res.result.list
let tempDatas = []
datas.forEach(item => {
diff --git a/pages/user/myTopics/myParticipant/cell/index.wxss b/pages/user/myTopics/myParticipant/cell/index.wxss
index feb5cc7..913435c 100644
--- a/pages/user/myTopics/myParticipant/cell/index.wxss
+++ b/pages/user/myTopics/myParticipant/cell/index.wxss
@@ -3,7 +3,7 @@
display: flex;
flex-direction: row;
- padding: 10px 20px;
+ padding: 10px 20rpx;
box-sizing: border-box;
align-items: center;
position: relative;
@@ -47,6 +47,10 @@
height: 20px;
}
.userName{
+ max-width: 120rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
margin: 0 5px 0 5px;
font-size: 12px;
color: #3B3B3B;
diff --git a/pages/user/myTopics/myParticipant/index.json b/pages/user/myTopics/myParticipant/index.json
index d61ba3a..05e6bc5 100644
--- a/pages/user/myTopics/myParticipant/index.json
+++ b/pages/user/myTopics/myParticipant/index.json
@@ -1,6 +1,7 @@
{
"component": true,
"usingComponents": {
+ "e-empty": "/components/empty/index",
"cell": "./cell/index"
}
}
\ No newline at end of file
diff --git a/pages/user/myTopics/myParticipant/index.wxml b/pages/user/myTopics/myParticipant/index.wxml
index 8a503c9..f6823d7 100644
--- a/pages/user/myTopics/myParticipant/index.wxml
+++ b/pages/user/myTopics/myParticipant/index.wxml
@@ -11,4 +11,5 @@
commentNum="{{item.commentNum}}"
bind:clickListItem="clickListItem"/>
+