diff --git a/components/cell/index.js b/components/cell/index.js
index 149fe98..6402e4c 100644
--- a/components/cell/index.js
+++ b/components/cell/index.js
@@ -15,6 +15,10 @@ Component({
showTop: {
type: Boolean,
value: false,
+ },
+ image: {
+ type: String,
+ value: ''
}
},
observers: {
diff --git a/components/cell/index.wxml b/components/cell/index.wxml
index 1edd25e..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/pages/article/index.js b/pages/article/index.js
index 539939c..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,
diff --git a/pages/article/index.wxml b/pages/article/index.wxml
index ab21314..a125279 100644
--- a/pages/article/index.wxml
+++ b/pages/article/index.wxml
@@ -7,6 +7,9 @@
{{date || ''}}
+
+
+
diff --git a/pages/article/index.wxss b/pages/article/index.wxss
index 5a2396b..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;
@@ -36,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/home/index.js b/pages/home/index.js
index db2c24a..aaed8ad 100644
--- a/pages/home/index.js
+++ b/pages/home/index.js
@@ -61,6 +61,7 @@ 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
diff --git a/pages/home/index.wxml b/pages/home/index.wxml
index f5fdb4c..c6cb141 100644
--- a/pages/home/index.wxml
+++ b/pages/home/index.wxml
@@ -6,6 +6,7 @@
{
tempDatas.push({
topicId: item.id,
+ userIcon: item.groupAvator || '',
title: item.title,
userName: item.author,
commentNum: item.commentNum,
diff --git a/pages/topics/interactive/cell/index.wxss b/pages/topics/interactive/cell/index.wxss
index 50be128..6242966 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 5e96dbe..aa1219d 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 e83b735..c342ae8 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 07c439e..2f5ba4a 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;
@@ -43,6 +43,10 @@
background-color: #EEEEEE;
}
.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 e500879..62e2ec1 100644
--- a/pages/user/myTopics/myParticipant/index.wxml
+++ b/pages/user/myTopics/myParticipant/index.wxml
@@ -10,4 +10,5 @@
commentNum="{{item.commentNum}}"
bind:clickListItem="clickListItem"/>
+