diff --git a/src/components/dynamicDiscuss.wpy b/src/components/dynamicDiscuss.wpy
index 306ee0e..5065e01 100644
--- a/src/components/dynamicDiscuss.wpy
+++ b/src/components/dynamicDiscuss.wpy
@@ -13,6 +13,12 @@
z-index: 2222;
}
+.ui-triangle-icon{
+ width: 8rpx;
+ height: 16rpx;
+ margin-left: 10rpx;
+}
+
.ui-no-data{
text-align: center;
padding-top: 200rpx;
@@ -76,14 +82,6 @@
display: block;
}
-.referencesIcon {
- width: 124rpx;
- height: 36rpx;
- display: block;
- margin-left: 16rpx;
- margin-top: 2rpx;
-}
-
.ui-content{
word-break: break-all;
}
@@ -204,10 +202,55 @@
border-radius: 12rpx;
}
}
+
+.dialogs {
+ width: 100%;
+ z-index: 1111;
+ max-height: 670rpx;
+ background: #FFFFFF;
+ position: relative;
+ border-radius: 24rpx 24rpx 0rpx 0rpx!important;
+
+ .cancelIcon{
+ width: 28rpx;
+ height: 28rpx;
+ position: absolute;
+ right: 30rpx;
+ top: 30rpx;
+ }
+
+ .ui-container{
+ height: 600rpx;
+ padding: 30rpx 30rpx 100rpx 30rpx;
+ overflow-x: hidden;
+ overflow-y: scroll;
+
+ .ui-like-member-pic{
+ width: 70rpx;
+ height: 70rpx;
+ border-radius: 50%;
+ display: block;
+ }
+
+ .ui-references-icon{
+ width: 124rpx;
+ height: 36rpx;
+ display: block;
+ margin-left: 16rpx;
+ margin-top: 2rpx;
+ }
+ }
+}
- 评论 · {{ list.length || 0 }}
+
+ 评论 · {{ list.length || 0 }}
+
+ {{detail.liker_count}}人赞过
+
+
+
还没有人评论,快来抢沙发吧
@@ -235,7 +278,6 @@
{{ item.nickname || '未设置名称' }}
-
{{ item.created_at }}
@@ -272,6 +314,21 @@
+
+
+ 赞过的人
+
+
+
+
+
+ {{item.nickname}}
+
+
+
+
+
+
diff --git a/src/components/dynamicList.wpy b/src/components/dynamicList.wpy
index 372743a..46e634e 100644
--- a/src/components/dynamicList.wpy
+++ b/src/components/dynamicList.wpy
@@ -270,8 +270,8 @@ scroll-view {
{{ item.commenter_count }}
-
-
+
+
{{ item.liker_count }}
@@ -350,15 +350,10 @@ scroll-view {
vm.$emit('signInVerify')
return
}
- let nowTime = new Date()
vm.$post({url: `${service.host}/moment/${e.id}/like`}).then(({code}) => {
wx.hideLoading()
if (code == 0) {
- vm.list[index].is_like = !vm.list[index].is_like
- vm.list[index].liker_count = vm.list[index].liker_count + (vm.list[index].is_like ? 1 : -1)
- if (vm.list[index].is_like) {
- vm.gifurl = `${vm.gifurl}?${nowTime}`
- }
+ vm.$emit('changListLiker', index)
}
}).catch(() => {
wx.hideLoading()
diff --git a/src/pages/dynamic/dynamicDetail.wpy b/src/pages/dynamic/dynamicDetail.wpy
index e8336f0..c737c23 100644
--- a/src/pages/dynamic/dynamicDetail.wpy
+++ b/src/pages/dynamic/dynamicDetail.wpy
@@ -7,7 +7,7 @@ page {
-
+
@@ -50,9 +50,10 @@ wepy.page({
if (result.topic) {
result.mt_name = result.topic.name
}
+ result.likeGif = 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'
result.create_time = commentTimeHandle(result.create_time)
vm.detail = result
- vm.dynamicList = [result]
+ vm.dynamicList = JSON.parse(JSON.stringify([result]))
}
wx.hideLoading()
}).catch(err => {
@@ -73,7 +74,6 @@ wepy.page({
item.likeGif = 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'
})
vm.list = data
- console.log(vm.list, '////')
}
}
wx.hideLoading()
@@ -82,6 +82,14 @@ wepy.page({
console.log(err)
})
},
+ // 列表和详情点赞回调
+ changListLiker (index) {
+ let vm = this
+ let nowTime = new Date()
+ vm.dynamicList[index].is_like = !vm.dynamicList[index].is_like
+ vm.dynamicList[index].liker_count = vm.dynamicList[index].liker_count + (vm.dynamicList[index].is_like ? 1 : -1)
+ vm.dynamicList[index].likeGif = `${vm.dynamicList[index].likeGif}?${nowTime}`
+ },
// 评论点赞回调
changLiker(index) {
let vm = this
diff --git a/src/pages/dynamic/hotTopic.wpy b/src/pages/dynamic/hotTopic.wpy
index 9cafa82..108630d 100644
--- a/src/pages/dynamic/hotTopic.wpy
+++ b/src/pages/dynamic/hotTopic.wpy
@@ -86,6 +86,27 @@ page {
position: relative;
z-index: 22;
}
+
+.ui-suspend-box{
+ position: fixed;
+ right: 44rpx;
+ bottom: 360rpx;
+ text-align: center;
+ z-index: 1000;
+
+ .ui-suspend-icon {
+ height: 124rpx;
+ width: 124rpx;
+ display: block;
+ }
+
+ .ui-bookDetail-icon{
+ height: 120rpx;
+ width: 120rpx;
+ display: block;
+ margin-bottom: 12rpx;
+ }
+}
@@ -113,6 +134,10 @@ page {
+
+
+
+
@@ -135,11 +160,13 @@ wepy.page({
admin: '1',
routerNum: 0, // 是否存在上一个页面路由
detail: {}, // 话题详情数据
+ rulesUrl: '',
+ rulesPic: '',
dynamicList: [], // 动态列表数据
selectData: {},
selectIndex: null,
- scrollTopHandle: -1,
+ scrollTopHandle: 0,
showBackTopBtn: false,
triggered: false,
no_more: false,
@@ -159,6 +186,10 @@ wepy.page({
vm.$get({url: `${service.host}/moment/topic/${vm.id}`}).then(({code, data}) => {
if (code === 0) {
vm.detail = data
+ if (data.moment_topics_activities) {
+ vm.rulesUrl = data.moment_topics_activities.goto_url
+ vm.rulesPic = data.moment_topics_activities.entrance_picture
+ }
vm.$nextTick(() => {
if (vm.detail.info) {
const query = wx.createSelectorQuery()
@@ -279,6 +310,13 @@ wepy.page({
},
handleBack() {
wx.navigateBack({delta: 1})
+ },
+ jumpPath(url, type) {
+ if (type == 'issue') {
+ wx.navigateTo({url: url})
+ } else {
+ wx.navigateTo({url: '/pages/books/bookDetail?url=' + encodeURIComponent(url)})
+ }
}
},
// 上拉获取更多数据
diff --git a/src/pages/dynamic/issue.wpy b/src/pages/dynamic/issue.wpy
index c26c6b7..70878d9 100644
--- a/src/pages/dynamic/issue.wpy
+++ b/src/pages/dynamic/issue.wpy
@@ -327,6 +327,7 @@ wepy.page({
mixins: [https, base],
data: {
+ from: '', // 从哪个页面进入
id: 0,
title: '',
hot: 0,
@@ -364,7 +365,9 @@ wepy.page({
// 发布成功后返回列表并且切换到最新tab
const pages = getCurrentPages()
const prevPage = pages[pages.length - 2]
- prevPage.$wepy.dynamicTabsIndex = 1
+ if (vm.from == 'dynamic') {
+ prevPage.$wepy.dynamicTabsIndex = 1
+ }
prevPage.$wepy.page = 1
prevPage.$wepy.scrollTopHandle = -1
prevPage.$wepy.getList()
@@ -498,7 +501,14 @@ wepy.page({
}
},
onShow() {},
- onLoad() {}
+ onLoad(e) {
+ let vm = this
+ vm.from = e.from
+ if (e.title) {
+ vm.title = e.title
+ vm.id = e.id
+ }
+ }
})
diff --git a/src/pages/tabBar/dynamic.wpy b/src/pages/tabBar/dynamic.wpy
index affa474..56ff5a3 100644
--- a/src/pages/tabBar/dynamic.wpy
+++ b/src/pages/tabBar/dynamic.wpy
@@ -194,13 +194,13 @@ page {
{{ item }}
-
+
-
+
@@ -262,6 +262,7 @@ wepy.page({
if (data.data && data.data.length > 0) {
data.data.forEach((item, index) => {
item.create_time = commentTimeHandle(item.create_time)
+ item.likeGif = 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'
let sty = typeof (item.photos)
if (sty == 'string') {
item.photos = JSON.parse(item.photos)
@@ -305,6 +306,14 @@ wepy.page({
console.log(err)
})
},
+ // 列表和详情点赞回调
+ changListLiker (index) {
+ let vm = this
+ let nowTime = new Date()
+ vm.dynamicList[index].is_like = !vm.dynamicList[index].is_like
+ vm.dynamicList[index].liker_count = vm.dynamicList[index].liker_count + (vm.dynamicList[index].is_like ? 1 : -1)
+ vm.dynamicList[index].likeGif = `${vm.dynamicList[index].likeGif}?${nowTime}`
+ },
// 选择某条动态操作弹框
changeSelect(e, index) {
let vm = this