|
@@ -20,12 +20,28 @@ Page({
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
if (options.type && options.type != 'my') {
|
|
|
+ let type = options.type
|
|
|
+ let emptyText = ''
|
|
|
+ let title = ''
|
|
|
+ if (type == 'follow') {
|
|
|
+ emptyText = '您还没有关注用户哦~'
|
|
|
+ title = '关注作品'
|
|
|
+ } else if (type == 'like') {
|
|
|
+ emptyText = '还没有点赞记录哦~'
|
|
|
+ title = '点赞'
|
|
|
+ } else if (type == 'collect') {
|
|
|
+ emptyText = '快去收藏喜欢的作品吧!'
|
|
|
+ title = '收藏作品'
|
|
|
+ } else if (type == 'comment') {
|
|
|
+ emptyText = '还没有收到评论哦~'
|
|
|
+ title = '作品评论'
|
|
|
+ }
|
|
|
this.setData({
|
|
|
- type: options.type,
|
|
|
- emptyText: options.type == 'follow' ? '您还没有关注用户哦' : '快去收藏喜欢的作品吧!'
|
|
|
+ type,
|
|
|
+ emptyText
|
|
|
})
|
|
|
wx.setNavigationBarTitle({
|
|
|
- title: options.type == 'follow' ? '关注作品' : '收藏作品'
|
|
|
+ title
|
|
|
})
|
|
|
}
|
|
|
if (options.id) {
|
|
@@ -48,10 +64,11 @@ Page({
|
|
|
loadMore() {
|
|
|
if (this.data.type == 'follow') {
|
|
|
this.getData(getFollowWorks, {})
|
|
|
- } else if (this.data.type == 'my') {
|
|
|
- this.getData(getSelfRead, {})
|
|
|
} else if (this.data.type == 'collect') {
|
|
|
this.getData(getFavoritesList, {})
|
|
|
+ } else {
|
|
|
+ console.log('zzz');
|
|
|
+ this.getData(this.getSelfRead, {})
|
|
|
}
|
|
|
},
|
|
|
getSelfRead(data) {
|