southnote-mini-sdk 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +1 -22
- package/assets/file/badwords.js +1 -63008
- package/assets/file/rules.js +1 -38
- package/components/bottomSheet/bottomSheet.js +1 -473
- package/components/experience-item/experience-item.js +1 -105
- package/components/grid-item/grid-item.js +1 -8
- package/components/post-item/post-item.js +1 -1086
- package/components/wiki-renderer/wiki-renderer.js +1 -636
- package/components/wiki-tabs/wiki-tabs.js +1 -52
- package/index.js +1 -49
- package/package.json +2 -22
- package/pages/addGame/addGame.js +1 -454
- package/pages/addSubject/addSubject.js +1 -199
- package/pages/commonLogin/commonLogin.js +1 -269
- package/pages/copyOfficial/copyOfficial.js +1 -25
- package/pages/demo/demo.js +1 -23
- package/pages/game/game.js +1 -1305
- package/pages/home/home.js +1 -665
- package/pages/lottery-winners/lottery-winners.js +1 -60
- package/pages/message/messageCommentsAndAt/messageCommentsAndAt.js +1 -178
- package/pages/message/messageEntire/messageEntire.js +1 -112
- package/pages/message/messageLikeAndCollect/messageLikeAndCollect.js +1 -147
- package/pages/message/messageNewFans/messageNewFans.js +1 -139
- package/pages/officialWebview/officialWebview.js +1 -13
- package/pages/post/post.js +1 -1856
- package/pages/post-editor/post-editor.js +1 -465
- package/pages/postDialog/postDialog.js +1 -560
- package/pages/report-category/report-category.js +1 -29
- package/pages/report-form/report-form.js +1 -65
- package/pages/sevenDaySignDetail/sevenDaySignDetail.js +1 -273
- package/pages/topic/topic.js +1 -266
- package/pages/user/user.js +1 -939
- package/pages/userDatum/userDatum.js +1 -24
- package/pages/userGameLib/userGameLib.js +1 -105
- package/pages/webview/webview.js +1 -25
- package/pages/wheelActivivty/wheelActivivty.js +1 -492
- package/pages/wiki/wiki.js +1 -138
- package/request/JKRequest.js +1 -177
- package/services/home.js +1 -603
- package/utils/auth.js +1 -17
- package/utils/base64.js +1 -67
- package/utils/compressImage.js +1 -41
- package/utils/exp.js +1 -49
- package/utils/formatPost.js +1 -18
- package/utils/parseContent.js +1 -191
- package/utils/query-select.js +1 -9
- package/utils/sensitive.js +1 -82
|
@@ -1,1086 +1 @@
|
|
|
1
|
-
export const emojiMap = {
|
|
2
|
-
1: "smile001.png",
|
|
3
|
-
2: "smile002.png",
|
|
4
|
-
3: "smile003.png",
|
|
5
|
-
4: "smile004.png",
|
|
6
|
-
5: "smile005.png",
|
|
7
|
-
6: "smile006.png",
|
|
8
|
-
7: "smile007.png",
|
|
9
|
-
8: "smile008.png",
|
|
10
|
-
9: "smile009.png",
|
|
11
|
-
10: "smile010.png",
|
|
12
|
-
11: "smile011.png",
|
|
13
|
-
12: "smile012.png",
|
|
14
|
-
13: "smile013.png",
|
|
15
|
-
14: "smile014.png",
|
|
16
|
-
15: "smile015.png",
|
|
17
|
-
16: "smile016.png",
|
|
18
|
-
17: "smile017.png",
|
|
19
|
-
18: "smile018.png",
|
|
20
|
-
19: "smile019.png",
|
|
21
|
-
20: "smile020.png",
|
|
22
|
-
21: "smile021.png",
|
|
23
|
-
22: "smile022.png",
|
|
24
|
-
23: "smile023.png",
|
|
25
|
-
24: "smile024.png",
|
|
26
|
-
25: "smile025.png",
|
|
27
|
-
26: "smile026.png",
|
|
28
|
-
27: "smile027.png",
|
|
29
|
-
28: "smile028.png",
|
|
30
|
-
29: "smile029.png",
|
|
31
|
-
30: "smile030.png",
|
|
32
|
-
31: "smile031.png",
|
|
33
|
-
32: "smile032.png",
|
|
34
|
-
33: "smile033.png",
|
|
35
|
-
34: "smile034.png",
|
|
36
|
-
35: "smile035.png",
|
|
37
|
-
36: "smile036.png",
|
|
38
|
-
37: "smile037.png",
|
|
39
|
-
38: "smile038.png",
|
|
40
|
-
39: "smile039.png",
|
|
41
|
-
40: "smile040.png",
|
|
42
|
-
41: "smile041.png",
|
|
43
|
-
42: "smile042.png",
|
|
44
|
-
43: "smile043.png",
|
|
45
|
-
44: "smile044.png",
|
|
46
|
-
45: "smile045.png",
|
|
47
|
-
46: "smile046.png",
|
|
48
|
-
47: "smile047.png",
|
|
49
|
-
48: "smile048.png",
|
|
50
|
-
49: "smile049.png",
|
|
51
|
-
50: "smile050.png",
|
|
52
|
-
51: "smile051.png",
|
|
53
|
-
52: "smile052.png"
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
import {
|
|
57
|
-
followUser,
|
|
58
|
-
likePost,
|
|
59
|
-
deleteContent,
|
|
60
|
-
collectPost,
|
|
61
|
-
setUserPostTop,
|
|
62
|
-
queryPostVideo
|
|
63
|
-
} from "../../services/home"
|
|
64
|
-
import {
|
|
65
|
-
checkLogin
|
|
66
|
-
} from "../../utils/auth"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Component({
|
|
70
|
-
properties: {
|
|
71
|
-
item: Object,
|
|
72
|
-
itemType: {
|
|
73
|
-
type: String,
|
|
74
|
-
value: ''
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
data: {
|
|
78
|
-
isOwner: false,
|
|
79
|
-
contentParts: [],
|
|
80
|
-
sharedContentParts: [], // 转发原始帖解析后的内容
|
|
81
|
-
commentedContentParts: [], // 评论格式化内容
|
|
82
|
-
showFull: true,
|
|
83
|
-
needShowReadMore: false, // 是否需要显示全文按钮
|
|
84
|
-
isLongImage: false, //是否是长图
|
|
85
|
-
isSuperLongImage: false, //是否是超长图
|
|
86
|
-
isHorizonImage: false, //是否是长>宽的图
|
|
87
|
-
showSheet: false,
|
|
88
|
-
sheetActions: [{
|
|
89
|
-
name: '删除帖子',
|
|
90
|
-
color: '#ee0a24',
|
|
91
|
-
action: 'delete'
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: '举报',
|
|
95
|
-
action: 'report'
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: '收藏',
|
|
99
|
-
action: 'favorite'
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
|
|
103
|
-
showPinButton: false, // 是否显示置顶按钮
|
|
104
|
-
isPinned: 0, // 当前帖是否置顶,1=已置顶,0=未置顶
|
|
105
|
-
|
|
106
|
-
hotContentParts: [], //热评
|
|
107
|
-
|
|
108
|
-
isCurrentPlaying: false, //当前帖子视频是否在播放
|
|
109
|
-
|
|
110
|
-
isVoteEnded: false,
|
|
111
|
-
isLotteryEnded: false,
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
observers: {
|
|
117
|
-
'item.post.vote.end_time, item.post.lottery.end_time': function () {
|
|
118
|
-
this.checkActivityStatus(false);
|
|
119
|
-
},
|
|
120
|
-
'item.shared.post.vote.end_time, item.shared.post.lottery.end_time': function () {
|
|
121
|
-
this.checkActivityStatus(true);
|
|
122
|
-
},
|
|
123
|
-
'item.user.id': function (userId) {
|
|
124
|
-
const currentUserId = wx.getStorageSync('appuid');
|
|
125
|
-
|
|
126
|
-
this.setData({
|
|
127
|
-
isOwner: currentUserId && userId && Number(currentUserId) === Number(userId)
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
'item.hot.comment.content': function (content) {
|
|
131
|
-
if (!content) return;
|
|
132
|
-
|
|
133
|
-
const parts = this.parseContent(content);
|
|
134
|
-
|
|
135
|
-
this.setData({
|
|
136
|
-
hotContentParts: parts
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
'item.post.content': function (content) {
|
|
140
|
-
if (content) {
|
|
141
|
-
const parts = this.parseContent(content);
|
|
142
|
-
|
|
143
|
-
// 如果是转发贴,把自己的图片转成 [查看图片]
|
|
144
|
-
if (this.data.item.shared && this.data.item.post.imageArray?.length) {
|
|
145
|
-
this.data.item.post.imageArray.forEach((src, idx) => {
|
|
146
|
-
parts.push({
|
|
147
|
-
text: '[查看图片]',
|
|
148
|
-
type: 'view_img',
|
|
149
|
-
src,
|
|
150
|
-
index: idx,
|
|
151
|
-
from: 'post',
|
|
152
|
-
color: '#406ce3'
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (this.data.item.post.title) {
|
|
158
|
-
parts.unshift({
|
|
159
|
-
text: this.data.item.post.title,
|
|
160
|
-
color: '#000',
|
|
161
|
-
type: 'title'
|
|
162
|
-
});
|
|
163
|
-
if (this.data.item.post.vote) {
|
|
164
|
-
parts.push({
|
|
165
|
-
type: 'vote',
|
|
166
|
-
voteData: this.data.item.post.vote
|
|
167
|
-
});
|
|
168
|
-
};
|
|
169
|
-
// 再补一个换行(确保标题独占一行)
|
|
170
|
-
parts.splice(1, 0, {
|
|
171
|
-
type: 'br'
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
this.setData({
|
|
176
|
-
contentParts: parts
|
|
177
|
-
}, () => {
|
|
178
|
-
this.checkNeedShowReadMore();
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
'item.shared.post.content': function (content) {
|
|
184
|
-
if (content) {
|
|
185
|
-
const parts = this.parseContent(content);
|
|
186
|
-
this.setData({
|
|
187
|
-
sharedContentParts: parts
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
'item.commented': function (commentedArr) {
|
|
192
|
-
if (Array.isArray(commentedArr) && commentedArr.length > 0) {
|
|
193
|
-
const commented = commentedArr[0]; // 取第一个对象
|
|
194
|
-
const parts = [];
|
|
195
|
-
|
|
196
|
-
// 添加 @user.nickname
|
|
197
|
-
if (commented.user?.nickname) {
|
|
198
|
-
parts.push({
|
|
199
|
-
text: `@${commented.user.nickname}`,
|
|
200
|
-
color: '#406ce3',
|
|
201
|
-
type: 'at',
|
|
202
|
-
userId: commented.user.id
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// 如果有 reply_nickname
|
|
207
|
-
if (commented.post?.reply_nickname) {
|
|
208
|
-
parts.push({
|
|
209
|
-
text: ' 回复 ',
|
|
210
|
-
color: '#333'
|
|
211
|
-
});
|
|
212
|
-
parts.push({
|
|
213
|
-
text: `@${commented.post.reply_nickname}`,
|
|
214
|
-
color: '#406ce3'
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// 补冒号
|
|
219
|
-
if (commented.post?.status !== 3) {
|
|
220
|
-
parts.push({
|
|
221
|
-
text: ': ',
|
|
222
|
-
color: '#333'
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// 拼接正文
|
|
227
|
-
if (commented.post?.content) {
|
|
228
|
-
|
|
229
|
-
parts.push(...this.parseContent(commented.post.content));
|
|
230
|
-
}
|
|
231
|
-
if (commented.post?.status === 3) {
|
|
232
|
-
parts.push({
|
|
233
|
-
text: '[原文已被删除]',
|
|
234
|
-
color: '#999',
|
|
235
|
-
type: 'deleted'
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// 图片数组转成 [查看图片]
|
|
240
|
-
if (commented.post?.images) {
|
|
241
|
-
const imgArray = commented.post.images.split(',');
|
|
242
|
-
imgArray.forEach((src, idx) => {
|
|
243
|
-
parts.push({
|
|
244
|
-
text: '[查看图片]',
|
|
245
|
-
type: 'view_img',
|
|
246
|
-
src,
|
|
247
|
-
index: idx,
|
|
248
|
-
from: 'commented',
|
|
249
|
-
color: '#406ce3'
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
this.setData({
|
|
255
|
-
// needShowReadMore: commented.post.content.length > 200,
|
|
256
|
-
commentedContentParts: parts
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
methods: {
|
|
262
|
-
|
|
263
|
-
checkActivityStatus(isShared) {
|
|
264
|
-
const post = isShared ? this.data.item?.shared?.post : this.data.item?.post;
|
|
265
|
-
if (!post) return;
|
|
266
|
-
|
|
267
|
-
const now = Math.floor(Date.now() / 1000); // 当前时间(秒)
|
|
268
|
-
|
|
269
|
-
let isVoteEnded = false;
|
|
270
|
-
let isLotteryEnded = false;
|
|
271
|
-
|
|
272
|
-
// 投票判断
|
|
273
|
-
if (post.vote && post.vote.end_time) {
|
|
274
|
-
isVoteEnded = now >= Number(post.vote.end_time);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// 抽奖判断
|
|
278
|
-
if (post.lottery && post.lottery.end_time) {
|
|
279
|
-
isLotteryEnded = now >= Number(post.lottery.end_time);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
this.setData({
|
|
283
|
-
isVoteEnded,
|
|
284
|
-
isLotteryEnded
|
|
285
|
-
});
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
-
// 链接跳转
|
|
289
|
-
onJumpUrlTap(e) {
|
|
290
|
-
const url = e.currentTarget.dataset.url;
|
|
291
|
-
|
|
292
|
-
if (!url) return;
|
|
293
|
-
this.triggerEvent('pauseAllVideo')
|
|
294
|
-
|
|
295
|
-
wx.navigateTo({
|
|
296
|
-
url: `../../pages/webview/webview?url=${encodeURIComponent(url)}`
|
|
297
|
-
});
|
|
298
|
-
},
|
|
299
|
-
/** 点击 #话题# 跳转 */
|
|
300
|
-
onTopicTap(e) {
|
|
301
|
-
const topicText = e.currentTarget.dataset.topic;
|
|
302
|
-
const topicName = topicText.replace(/#/g, ''); // 去掉首尾 #
|
|
303
|
-
this.triggerEvent('pauseAllVideo')
|
|
304
|
-
|
|
305
|
-
wx.navigateTo({
|
|
306
|
-
url: `../../pages/topic/topic?topic_name=${encodeURIComponent(topicName)}`
|
|
307
|
-
});
|
|
308
|
-
},
|
|
309
|
-
gotoWiki(e) {
|
|
310
|
-
const gameId = e.currentTarget.dataset.id
|
|
311
|
-
const name = e.currentTarget.dataset.name
|
|
312
|
-
wx.navigateTo({
|
|
313
|
-
url: `../../pages/wiki/wiki?game_id=${gameId}&name=${encodeURIComponent(name)}`
|
|
314
|
-
})
|
|
315
|
-
},
|
|
316
|
-
/** 点击 @某人 跳转 */
|
|
317
|
-
onUserTap(e) {
|
|
318
|
-
const userId = e.currentTarget.dataset.userid;
|
|
319
|
-
if (!userId) return;
|
|
320
|
-
this.triggerEvent('pauseAllVideo')
|
|
321
|
-
|
|
322
|
-
wx.navigateTo({
|
|
323
|
-
url: `../../pages/user/user?id=${userId}`
|
|
324
|
-
});
|
|
325
|
-
},
|
|
326
|
-
gotoGameCenter(e) {
|
|
327
|
-
const gameId = e.currentTarget.dataset.id;
|
|
328
|
-
this.triggerEvent('pauseAllVideo')
|
|
329
|
-
|
|
330
|
-
wx.navigateTo({
|
|
331
|
-
url: `../../pages/game/game?id=${gameId}`
|
|
332
|
-
});
|
|
333
|
-
},
|
|
334
|
-
goDetail(e) {
|
|
335
|
-
|
|
336
|
-
if (e.target.dataset.video === '1') return
|
|
337
|
-
const postId = e.currentTarget.dataset.id;
|
|
338
|
-
this.triggerEvent('pauseAllVideo')
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
wx.navigateTo({
|
|
342
|
-
url: `../../pages/post/post?id=${postId}`
|
|
343
|
-
});
|
|
344
|
-
},
|
|
345
|
-
goUserDetail(e) {
|
|
346
|
-
const userId = e.currentTarget.dataset.id;
|
|
347
|
-
this.triggerEvent('pauseAllVideo')
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
wx.navigateTo({
|
|
351
|
-
url: `../../pages/user/user?id=${userId}`
|
|
352
|
-
// url: '../../pages/customNavPage/customNavPage'
|
|
353
|
-
|
|
354
|
-
});
|
|
355
|
-
},
|
|
356
|
-
|
|
357
|
-
goSharedDetail(e) {
|
|
358
|
-
if (e.target.dataset.video === '1') return
|
|
359
|
-
|
|
360
|
-
const postId = e.currentTarget.dataset.id;
|
|
361
|
-
this.triggerEvent('pauseAllVideo')
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
wx.navigateTo({
|
|
365
|
-
url: `../../pages/post/post?id=${postId}`
|
|
366
|
-
});
|
|
367
|
-
},
|
|
368
|
-
// 关注点击
|
|
369
|
-
onFollowTap(e) {
|
|
370
|
-
this.triggerEvent('pauseAllVideo')
|
|
371
|
-
if (!checkLogin()) return;
|
|
372
|
-
|
|
373
|
-
const user = e.currentTarget.dataset.user;
|
|
374
|
-
const userId = user.id;
|
|
375
|
-
const isFans = user.is_fans ?? 0;
|
|
376
|
-
const nType = isFans === 1 ? 2 : 1;
|
|
377
|
-
|
|
378
|
-
// 调用接口
|
|
379
|
-
followUser(userId, nType).then(res => {
|
|
380
|
-
if (res.code === 0) {
|
|
381
|
-
// 通知父组件
|
|
382
|
-
this.triggerEvent('followChanged', {
|
|
383
|
-
userId,
|
|
384
|
-
isFans: nType === 1 ? 1 : 0
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
},
|
|
389
|
-
// 转发点击
|
|
390
|
-
shareTap() {
|
|
391
|
-
this.triggerEvent('pauseAllVideo')
|
|
392
|
-
if (!checkLogin()) return;
|
|
393
|
-
|
|
394
|
-
this.triggerEvent('myShareTap', {
|
|
395
|
-
item: this.data.item
|
|
396
|
-
})
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
// 评论点击
|
|
400
|
-
commonTap() {
|
|
401
|
-
this.triggerEvent('pauseAllVideo')
|
|
402
|
-
if (!checkLogin()) return;
|
|
403
|
-
|
|
404
|
-
const postId = this.data.item.post.id;
|
|
405
|
-
wx.navigateTo({
|
|
406
|
-
url: `../../pages/post/post?id=${postId}&isCommentIn=true`
|
|
407
|
-
});
|
|
408
|
-
},
|
|
409
|
-
// 点赞点击
|
|
410
|
-
likeTap(e) {
|
|
411
|
-
this.triggerEvent('pauseAllVideo')
|
|
412
|
-
if (!checkLogin()) return;
|
|
413
|
-
|
|
414
|
-
const post = this.data.item.post;
|
|
415
|
-
const isLiked = post.is_like === 1;
|
|
416
|
-
const newLikeStatus = isLiked ? 0 : 1;
|
|
417
|
-
const newLikeCount = isLiked ? post.like_count - 1 : post.like_count + 1;
|
|
418
|
-
|
|
419
|
-
// 1️⃣ 立即更新前端数据(防止点击后延迟)
|
|
420
|
-
this.setData({
|
|
421
|
-
'item.post.is_like': newLikeStatus,
|
|
422
|
-
'item.post.like_count': newLikeCount
|
|
423
|
-
});
|
|
424
|
-
|
|
425
|
-
// 2️⃣ 动画效果(缩放+回弹)
|
|
426
|
-
const animation = wx.createAnimation({
|
|
427
|
-
duration: 200,
|
|
428
|
-
timingFunction: 'ease-in-out'
|
|
429
|
-
});
|
|
430
|
-
animation.scale(1.5).step();
|
|
431
|
-
animation.scale(1.0).step();
|
|
432
|
-
|
|
433
|
-
this.setData({
|
|
434
|
-
likeAnimation: animation.export()
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
// 3️⃣ 调用后端接口(type: 1点赞, 2取消点赞)
|
|
438
|
-
likePost(post.id, newLikeStatus === 1 ? 1 : 2).then(res => {
|
|
439
|
-
|
|
440
|
-
if (res.code !== 0) {
|
|
441
|
-
// 如果失败,回滚状态
|
|
442
|
-
this.setData({
|
|
443
|
-
'item.post.is_like': isLiked ? 1 : 0,
|
|
444
|
-
'item.post.like_count': post.like_count
|
|
445
|
-
});
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
} else {
|
|
451
|
-
const pages = getCurrentPages();
|
|
452
|
-
|
|
453
|
-
pages.forEach(page => {
|
|
454
|
-
// 首页:更新 posts 中对应用户的 is_fans
|
|
455
|
-
if (page.route === 'pages/home/home') {
|
|
456
|
-
|
|
457
|
-
const posts = page.data.posts.map(p => {
|
|
458
|
-
if (p.post.id === post.id) {
|
|
459
|
-
p.post.is_like = newLikeStatus;
|
|
460
|
-
p.post.like_count = newLikeCount
|
|
461
|
-
}
|
|
462
|
-
return p;
|
|
463
|
-
});
|
|
464
|
-
page.setData({
|
|
465
|
-
posts
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
})
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
onImageLoad(e) {
|
|
482
|
-
const {
|
|
483
|
-
width,
|
|
484
|
-
height
|
|
485
|
-
} = e.detail;
|
|
486
|
-
if (height / width > 3 && height / width <= 4) {
|
|
487
|
-
this.setData({
|
|
488
|
-
isLongImage: true
|
|
489
|
-
});
|
|
490
|
-
} else if (height / width < 1) {
|
|
491
|
-
this.setData({
|
|
492
|
-
isHorizonImage: true
|
|
493
|
-
});
|
|
494
|
-
} else if (height / width > 4) {
|
|
495
|
-
this.setData({
|
|
496
|
-
isSuperLongImage: true
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
},
|
|
501
|
-
// 转发文字中的 [查看图片] 点击
|
|
502
|
-
onPreviewImage(e) {
|
|
503
|
-
const src = e.currentTarget.dataset.src;
|
|
504
|
-
wx.previewImage({
|
|
505
|
-
current: src, // 当前显示图片的http链接
|
|
506
|
-
urls: [src] // 需要预览的图片http链接列表
|
|
507
|
-
});
|
|
508
|
-
},
|
|
509
|
-
|
|
510
|
-
// 查看大图
|
|
511
|
-
previewImageMultiple(e) {
|
|
512
|
-
const {
|
|
513
|
-
type,
|
|
514
|
-
index,
|
|
515
|
-
from
|
|
516
|
-
} = e.currentTarget.dataset;
|
|
517
|
-
let imgList = [];
|
|
518
|
-
if (type === 'shared') {
|
|
519
|
-
imgList = this.data.item.shared.post.imageArray;
|
|
520
|
-
} else if (type === 'commented') {
|
|
521
|
-
imgList = this.data.item.commented.post.imageArray;
|
|
522
|
-
} else {
|
|
523
|
-
imgList = this.data.item.post.imageArray;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
wx.previewImage({
|
|
527
|
-
current: imgList[index],
|
|
528
|
-
urls: imgList
|
|
529
|
-
});
|
|
530
|
-
},
|
|
531
|
-
|
|
532
|
-
pushWithLineBreak(parts, text) {
|
|
533
|
-
const segments = text.split(/(\r\n|\n|\r)/);
|
|
534
|
-
segments.forEach(seg => {
|
|
535
|
-
if (seg === '\n' || seg === '\r' || seg === '\r\n') {
|
|
536
|
-
parts.push({
|
|
537
|
-
type: 'br'
|
|
538
|
-
});
|
|
539
|
-
} else if (seg.length > 0) {
|
|
540
|
-
parts.push({
|
|
541
|
-
text: seg,
|
|
542
|
-
color: '#333'
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
});
|
|
546
|
-
},
|
|
547
|
-
checkNeedShowReadMore() {
|
|
548
|
-
// 先展开,测量真实高度
|
|
549
|
-
this.setData({
|
|
550
|
-
showFull: true
|
|
551
|
-
}, () => {
|
|
552
|
-
const query = this.createSelectorQuery();
|
|
553
|
-
query.select('#postContent').boundingClientRect(rect => {
|
|
554
|
-
if (!rect) return;
|
|
555
|
-
|
|
556
|
-
const maxHeight = this.rpxToPx(270); // 6 行 px 高
|
|
557
|
-
|
|
558
|
-
const need = rect.height > maxHeight;
|
|
559
|
-
|
|
560
|
-
this.setData({
|
|
561
|
-
needShowReadMore: need,
|
|
562
|
-
showFull: false // 测完高度后再折叠回去
|
|
563
|
-
});
|
|
564
|
-
}).exec();
|
|
565
|
-
});
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
// rpx 转 px(你已经在用这个技巧)
|
|
569
|
-
rpxToPx(rpx) {
|
|
570
|
-
return rpx * wx.getWindowInfo().windowWidth / 750;
|
|
571
|
-
},
|
|
572
|
-
parseContent(content) {
|
|
573
|
-
|
|
574
|
-
const parts = [];
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
const regex = /(#[^#]+#)|(\{@(.*?)\|(\d+)\})|<font bold=true>|<font bold=false>|<sign_line>|<feature_blog>|<img src='([^']+)'>|<click_img src='[^']+' text='([^']+)'>|<color_grey text='([^']+)'>|<local_img src='([^']+).image'>|<jump_url url='([^']+)'>|(\[\/\d+\])|{\$([^|]+)\|([^}]+)}|{\?([^|]+)\|([^}]+)}/g;
|
|
578
|
-
|
|
579
|
-
let lastIndex = 0,
|
|
580
|
-
match;
|
|
581
|
-
while ((match = regex.exec(content)) !== null) {
|
|
582
|
-
if (match.index > lastIndex) {
|
|
583
|
-
const plainText = content.slice(lastIndex, match.index);
|
|
584
|
-
this.pushWithLineBreak(parts, plainText);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
if (match[1]) {
|
|
588
|
-
// #话题#
|
|
589
|
-
parts.push({
|
|
590
|
-
text: match[1],
|
|
591
|
-
color: '#406ce3',
|
|
592
|
-
type: 'topic'
|
|
593
|
-
});
|
|
594
|
-
} else if (match[2]) {
|
|
595
|
-
// @用户(带id)
|
|
596
|
-
parts.push({
|
|
597
|
-
text: `@${match[3]}`,
|
|
598
|
-
color: '#406ce3',
|
|
599
|
-
type: 'at',
|
|
600
|
-
userId: match[4] // 从 {@nickname|userId} 中提取的id
|
|
601
|
-
});
|
|
602
|
-
} else if (match[5]) {
|
|
603
|
-
parts.push({
|
|
604
|
-
text: '[图片]',
|
|
605
|
-
src: match[5],
|
|
606
|
-
type: 'img'
|
|
607
|
-
});
|
|
608
|
-
} else if (match[6]) {
|
|
609
|
-
parts.push({
|
|
610
|
-
text: match[6],
|
|
611
|
-
src: match[6],
|
|
612
|
-
type: 'click_img'
|
|
613
|
-
});
|
|
614
|
-
} else if (match[7]) {
|
|
615
|
-
parts.push({
|
|
616
|
-
text: match[7],
|
|
617
|
-
color: '#999'
|
|
618
|
-
});
|
|
619
|
-
} else if (match[8]) {
|
|
620
|
-
parts.push({
|
|
621
|
-
text: '',
|
|
622
|
-
src: match[8],
|
|
623
|
-
type: 'local_img'
|
|
624
|
-
});
|
|
625
|
-
} else if (match[9]) {
|
|
626
|
-
parts.push({
|
|
627
|
-
text: '§网页链接',
|
|
628
|
-
url: match[9],
|
|
629
|
-
type: 'jump_url',
|
|
630
|
-
color: '#406ce3'
|
|
631
|
-
});
|
|
632
|
-
} else if (match[10]) {
|
|
633
|
-
const code = match[10].match(/\[\/(\d+)\]/)[1];
|
|
634
|
-
const file = emojiMap[code];
|
|
635
|
-
if (file) {
|
|
636
|
-
parts.push({
|
|
637
|
-
type: 'emoji',
|
|
638
|
-
src: `../../assets/images/emoji/${file}`
|
|
639
|
-
});
|
|
640
|
-
} else {
|
|
641
|
-
parts.push({
|
|
642
|
-
text: match[10],
|
|
643
|
-
color: '#333'
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
} else if (match[11] && match[12]) {
|
|
647
|
-
parts.push({
|
|
648
|
-
text: `$${match[11]}`,
|
|
649
|
-
gameId: match[12],
|
|
650
|
-
type: 'game',
|
|
651
|
-
color: '#406ce3'
|
|
652
|
-
});
|
|
653
|
-
} else if (match[13] && match[14]) {
|
|
654
|
-
parts.push({
|
|
655
|
-
text: `?${match[13]}`,
|
|
656
|
-
guideName: match[13],
|
|
657
|
-
guideGameId: match[14],
|
|
658
|
-
type: 'guide',
|
|
659
|
-
color: '#406ce3'
|
|
660
|
-
});
|
|
661
|
-
} else if (match[0] === '<font bold=true>') {
|
|
662
|
-
parts.push({
|
|
663
|
-
text: '',
|
|
664
|
-
bold: true
|
|
665
|
-
});
|
|
666
|
-
} else if (match[0] === '<font bold=false>') {
|
|
667
|
-
parts.push({
|
|
668
|
-
text: '',
|
|
669
|
-
bold: false
|
|
670
|
-
});
|
|
671
|
-
} else if (match[0] === '<sign_line>') {
|
|
672
|
-
parts.push({
|
|
673
|
-
text: '————',
|
|
674
|
-
type: 'line'
|
|
675
|
-
});
|
|
676
|
-
} else if (match[0] === '<feature_blog>') {
|
|
677
|
-
parts.push({
|
|
678
|
-
text: '[加精]',
|
|
679
|
-
type: 'feature'
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
lastIndex = regex.lastIndex;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
if (lastIndex < content.length) {
|
|
687
|
-
const plainText = content.slice(lastIndex);
|
|
688
|
-
this.pushWithLineBreak(parts, plainText);
|
|
689
|
-
}
|
|
690
|
-
return parts;
|
|
691
|
-
},
|
|
692
|
-
|
|
693
|
-
showFull() {
|
|
694
|
-
this.setData({
|
|
695
|
-
showFull: true,
|
|
696
|
-
needShowReadMore: false,
|
|
697
|
-
_stopCheckMore: true // 增加一个标记
|
|
698
|
-
});
|
|
699
|
-
},
|
|
700
|
-
|
|
701
|
-
// 点击更多按钮
|
|
702
|
-
onMoreTap() {
|
|
703
|
-
this.triggerEvent('pauseAllVideo')
|
|
704
|
-
if (!checkLogin()) return;
|
|
705
|
-
|
|
706
|
-
this.triggerEvent('moreTap', {
|
|
707
|
-
|
|
708
|
-
item: this.data.item
|
|
709
|
-
});
|
|
710
|
-
},
|
|
711
|
-
|
|
712
|
-
// 点击更多按钮
|
|
713
|
-
// onMoreTap() {
|
|
714
|
-
// const currentUserId = wx.getStorageSync('appuid'); // 当前登录用户id
|
|
715
|
-
// const isOwner = this.data.item.user.id === currentUserId;
|
|
716
|
-
|
|
717
|
-
// // 获取当前页面信息
|
|
718
|
-
// const pages = getCurrentPages();
|
|
719
|
-
// const currentPage = pages[pages.length - 1];
|
|
720
|
-
// const isUserCenterPage = currentPage.route === 'pages/user/user'; // 根据你的路由修改
|
|
721
|
-
|
|
722
|
-
// // 判断是否显示置顶按钮
|
|
723
|
-
// const showPinButton = isUserCenterPage && isOwner;
|
|
724
|
-
// const isPinned = this.data.item.post.is_user_top === 1;
|
|
725
|
-
|
|
726
|
-
// this.setData({
|
|
727
|
-
// showSheet: true,
|
|
728
|
-
// isOwner,
|
|
729
|
-
// showPinButton,
|
|
730
|
-
// isPinned
|
|
731
|
-
// });
|
|
732
|
-
// },
|
|
733
|
-
|
|
734
|
-
onPinTap() {
|
|
735
|
-
const post = this.data.item.post;
|
|
736
|
-
const type = this.data.isPinned ? 2 : 1; // 1置顶,2取消置顶
|
|
737
|
-
|
|
738
|
-
wx.showLoading({
|
|
739
|
-
title: '处理中...'
|
|
740
|
-
});
|
|
741
|
-
setUserPostTop(post.id, type).then(res => {
|
|
742
|
-
wx.hideLoading();
|
|
743
|
-
if (res.code === 0) {
|
|
744
|
-
wx.showToast({
|
|
745
|
-
title: type === 1 ? '置顶成功' : '取消置顶成功',
|
|
746
|
-
icon: 'success'
|
|
747
|
-
});
|
|
748
|
-
|
|
749
|
-
// 更新当前组件状态
|
|
750
|
-
this.setData({
|
|
751
|
-
'item.post.is_user_top': type === 1 ? 1 : 0,
|
|
752
|
-
isPinned: type === 1 ? 1 : 0
|
|
753
|
-
});
|
|
754
|
-
|
|
755
|
-
this.onCloseSheet();
|
|
756
|
-
|
|
757
|
-
// 如果置顶,则需要移动帖子到列表第一位,取消其他帖子置顶,并滚动到顶部
|
|
758
|
-
if (type === 1) {
|
|
759
|
-
const pages = getCurrentPages();
|
|
760
|
-
const currentPage = pages[pages.length - 1];
|
|
761
|
-
|
|
762
|
-
if (currentPage.route === 'pages/user/user') {
|
|
763
|
-
let postsData = currentPage.data.posts;
|
|
764
|
-
|
|
765
|
-
if (Array.isArray(postsData)) {
|
|
766
|
-
// 先取消其他帖子置顶
|
|
767
|
-
postsData = postsData.map(p => {
|
|
768
|
-
if (p.post.id !== post.id && p.post.is_user_top === 1) {
|
|
769
|
-
p.post.is_user_top = 0;
|
|
770
|
-
}
|
|
771
|
-
return p;
|
|
772
|
-
});
|
|
773
|
-
|
|
774
|
-
// 找到当前帖子在数组中的索引
|
|
775
|
-
const currentIndex = postsData.findIndex(p => p.post.id === post.id);
|
|
776
|
-
if (currentIndex > -1) {
|
|
777
|
-
const [pinnedPost] = postsData.splice(currentIndex, 1);
|
|
778
|
-
pinnedPost.post.is_user_top = 1
|
|
779
|
-
// 插入到数组第一个位置
|
|
780
|
-
postsData.unshift(pinnedPost);
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
currentPage.setData({
|
|
784
|
-
posts: postsData
|
|
785
|
-
});
|
|
786
|
-
|
|
787
|
-
// 页面滚动到顶部
|
|
788
|
-
wx.pageScrollTo({
|
|
789
|
-
scrollTop: 0,
|
|
790
|
-
duration: 300
|
|
791
|
-
});
|
|
792
|
-
} else if (postsData && typeof postsData === 'object') {
|
|
793
|
-
const newPostsObj = {};
|
|
794
|
-
Object.keys(postsData).forEach(key => {
|
|
795
|
-
if (Array.isArray(postsData[key])) {
|
|
796
|
-
// 取消其他帖子置顶
|
|
797
|
-
let arr = postsData[key].map(p => {
|
|
798
|
-
if (p.post.id !== post.id && p.post.is_user_top === 1) {
|
|
799
|
-
p.post.is_user_top = 0;
|
|
800
|
-
}
|
|
801
|
-
return p;
|
|
802
|
-
});
|
|
803
|
-
|
|
804
|
-
// 将当前帖子移动到第一个
|
|
805
|
-
const currentIndex = arr.findIndex(p => p.post.id === post.id);
|
|
806
|
-
if (currentIndex > -1) {
|
|
807
|
-
const [pinnedPost] = arr.splice(currentIndex, 1);
|
|
808
|
-
pinnedPost.post.is_user_top = 1
|
|
809
|
-
arr.unshift(pinnedPost);
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
newPostsObj[key] = arr;
|
|
813
|
-
} else {
|
|
814
|
-
newPostsObj[key] = postsData[key];
|
|
815
|
-
}
|
|
816
|
-
});
|
|
817
|
-
|
|
818
|
-
currentPage.setData({
|
|
819
|
-
posts: newPostsObj
|
|
820
|
-
});
|
|
821
|
-
|
|
822
|
-
wx.pageScrollTo({
|
|
823
|
-
scrollTop: 0,
|
|
824
|
-
duration: 300
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
} else {
|
|
830
|
-
wx.showToast({
|
|
831
|
-
title: res.msg || '操作失败',
|
|
832
|
-
icon: 'error'
|
|
833
|
-
});
|
|
834
|
-
}
|
|
835
|
-
});
|
|
836
|
-
},
|
|
837
|
-
// 关闭弹窗
|
|
838
|
-
onCloseSheet() {
|
|
839
|
-
this.setData({
|
|
840
|
-
showSheet: false
|
|
841
|
-
});
|
|
842
|
-
},
|
|
843
|
-
|
|
844
|
-
// 弹窗选项点击
|
|
845
|
-
onDelete() {
|
|
846
|
-
const postId = this.data.item.post.id;
|
|
847
|
-
deleteContent(postId).then(res => {
|
|
848
|
-
if (res.code === 0) {
|
|
849
|
-
wx.showToast({
|
|
850
|
-
title: '删除成功',
|
|
851
|
-
icon: 'success'
|
|
852
|
-
});
|
|
853
|
-
|
|
854
|
-
// 删除父页面列表里的帖子(兼容数组和对象)
|
|
855
|
-
const pages = getCurrentPages();
|
|
856
|
-
const currentPage = pages[pages.length - 1]; // 当前页
|
|
857
|
-
|
|
858
|
-
const postsData = currentPage.data.posts;
|
|
859
|
-
if (Array.isArray(postsData)) {
|
|
860
|
-
// posts 是数组
|
|
861
|
-
currentPage.setData({
|
|
862
|
-
posts: postsData.filter(p => p.post.id !== postId)
|
|
863
|
-
});
|
|
864
|
-
} else if (postsData && typeof postsData === 'object') {
|
|
865
|
-
// posts 是对象,每个 value 都可能是帖子数组
|
|
866
|
-
const newPosts = {};
|
|
867
|
-
Object.keys(postsData).forEach(key => {
|
|
868
|
-
if (Array.isArray(postsData[key])) {
|
|
869
|
-
newPosts[key] = postsData[key].filter(p => p.post.id !== postId);
|
|
870
|
-
} else {
|
|
871
|
-
newPosts[key] = postsData[key]; // 保留原值
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
currentPage.setData({
|
|
875
|
-
posts: newPosts
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
this.triggerEvent('deletePost', {
|
|
881
|
-
post: this.data.item.post
|
|
882
|
-
});
|
|
883
|
-
this.onCloseSheet();
|
|
884
|
-
} else {
|
|
885
|
-
wx.showToast({
|
|
886
|
-
title: res.msg || '删除失败',
|
|
887
|
-
icon: 'error'
|
|
888
|
-
});
|
|
889
|
-
}
|
|
890
|
-
});
|
|
891
|
-
},
|
|
892
|
-
|
|
893
|
-
// 举报帖子
|
|
894
|
-
onReport() {
|
|
895
|
-
this.triggerEvent('pauseAllVideo')
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
wx.navigateTo({
|
|
899
|
-
url: `../../pages/report-category/report-category?postId=${this.data.item.post.id}`,
|
|
900
|
-
})
|
|
901
|
-
|
|
902
|
-
this.triggerEvent('reportPost', {
|
|
903
|
-
post: this.data.item.post
|
|
904
|
-
});
|
|
905
|
-
this.onCloseSheet();
|
|
906
|
-
},
|
|
907
|
-
|
|
908
|
-
// 收藏/取消收藏
|
|
909
|
-
onFavorite() {
|
|
910
|
-
const post = this.data.item.post;
|
|
911
|
-
const nType = post.is_collect === 1 ? 2 : 1; // 1收藏,2取消收藏
|
|
912
|
-
|
|
913
|
-
collectPost(post.id, nType).then(res => {
|
|
914
|
-
if (res.code === 0) {
|
|
915
|
-
wx.showToast({
|
|
916
|
-
title: nType === 1 ? '已收藏' : '取消收藏',
|
|
917
|
-
icon: 'success'
|
|
918
|
-
});
|
|
919
|
-
|
|
920
|
-
// 更新本地状态
|
|
921
|
-
this.setData({
|
|
922
|
-
'item.post.is_collect': nType === 1 ? 1 : 0
|
|
923
|
-
});
|
|
924
|
-
|
|
925
|
-
this.onCloseSheet();
|
|
926
|
-
} else {
|
|
927
|
-
wx.showToast({
|
|
928
|
-
title: res.msg || (nType === 1 ? '收藏失败' : '取消收藏失败'),
|
|
929
|
-
icon: 'error'
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
});
|
|
933
|
-
},
|
|
934
|
-
|
|
935
|
-
onHotLike() {
|
|
936
|
-
this.triggerEvent('pauseAllVideo')
|
|
937
|
-
if (!checkLogin()) return;
|
|
938
|
-
|
|
939
|
-
const hot = this.data.item.hot;
|
|
940
|
-
const comment = hot.comment;
|
|
941
|
-
|
|
942
|
-
const isLiked = comment.is_like === 1;
|
|
943
|
-
const newStatus = isLiked ? 0 : 1;
|
|
944
|
-
const newCount = isLiked ?
|
|
945
|
-
comment.like_count - 1 :
|
|
946
|
-
comment.like_count + 1;
|
|
947
|
-
|
|
948
|
-
// 立即更新 UI
|
|
949
|
-
this.setData({
|
|
950
|
-
'item.hot.comment.is_like': newStatus,
|
|
951
|
-
'item.hot.comment.like_count': newCount
|
|
952
|
-
});
|
|
953
|
-
likePost(comment.id, newStatus === 1 ? 1 : 2).then(res => {
|
|
954
|
-
if (res.code !== 0) {
|
|
955
|
-
// 回滚
|
|
956
|
-
this.setData({
|
|
957
|
-
'item.hot.comment.is_like': isLiked ? 1 : 0,
|
|
958
|
-
'item.hot.comment.like_count': comment.like_count
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
});
|
|
962
|
-
},
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
// 获取视频链接
|
|
966
|
-
async onBannerVideoPlay(e) {
|
|
967
|
-
|
|
968
|
-
const id = e.currentTarget.dataset.id;
|
|
969
|
-
const type = e.currentTarget.dataset.type;
|
|
970
|
-
const sharedId = e.currentTarget.dataset.sharedid;
|
|
971
|
-
|
|
972
|
-
// 是否是带转发的原始帖的视频
|
|
973
|
-
const isShared = type === 'shared'
|
|
974
|
-
let getVideoId = isShared ? sharedId : id
|
|
975
|
-
|
|
976
|
-
try {
|
|
977
|
-
const res = await queryPostVideo(getVideoId);
|
|
978
|
-
|
|
979
|
-
if (res.code === 0 && res.data) {
|
|
980
|
-
let key = isShared ? 'item.shared.post.videoUrl' : 'item.post.videoUrl';
|
|
981
|
-
|
|
982
|
-
this.setData({
|
|
983
|
-
[key]: res.data,
|
|
984
|
-
isCurrentPlaying: true
|
|
985
|
-
}, () => {
|
|
986
|
-
// 2️⃣ video 渲染完成后再创建 IntersectionObserver
|
|
987
|
-
this.setupVideoObserver();
|
|
988
|
-
})
|
|
989
|
-
|
|
990
|
-
// 此处传的是外层唯一id,也就是当且贴id
|
|
991
|
-
this.triggerEvent('videoPlay', {
|
|
992
|
-
id
|
|
993
|
-
});
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
} else {
|
|
997
|
-
throw new Error('无视频地址');
|
|
998
|
-
}
|
|
999
|
-
} catch (err) {
|
|
1000
|
-
wx.showToast({
|
|
1001
|
-
title: '视频加载失败',
|
|
1002
|
-
icon: 'none'
|
|
1003
|
-
});
|
|
1004
|
-
} finally {}
|
|
1005
|
-
},
|
|
1006
|
-
|
|
1007
|
-
setupVideoObserver() {
|
|
1008
|
-
const postId = this.data.item.post.id;
|
|
1009
|
-
const observer = this.createIntersectionObserver({
|
|
1010
|
-
thresholds: [0.6] // 关注完全不可见
|
|
1011
|
-
});
|
|
1012
|
-
|
|
1013
|
-
observer.relativeToViewport({
|
|
1014
|
-
top: 0,
|
|
1015
|
-
bottom: 0
|
|
1016
|
-
}).observe(
|
|
1017
|
-
`#bannerVideo-${postId}`,
|
|
1018
|
-
(res) => {
|
|
1019
|
-
const videoContext = wx.createVideoContext(`bannerVideo-${postId}`, this);
|
|
1020
|
-
if (res.intersectionRatio <= 0.6) {
|
|
1021
|
-
videoContext.pause();
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
);
|
|
1025
|
-
},
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
handlePlayVideo() {
|
|
1029
|
-
|
|
1030
|
-
const id = this.data.item.post.id;
|
|
1031
|
-
const videoContext = wx.createVideoContext(`bannerVideo-${id}`, this);
|
|
1032
|
-
|
|
1033
|
-
// 统一逻辑:播放前先通知父页面暂停其他视频
|
|
1034
|
-
|
|
1035
|
-
this.triggerEvent('videoPlay', {
|
|
1036
|
-
id
|
|
1037
|
-
});
|
|
1038
|
-
|
|
1039
|
-
// 播放自己
|
|
1040
|
-
videoContext.play();
|
|
1041
|
-
|
|
1042
|
-
// 标记自己为当前播放的视频
|
|
1043
|
-
this.setData({
|
|
1044
|
-
isCurrentPlaying: true
|
|
1045
|
-
});
|
|
1046
|
-
},
|
|
1047
|
-
// 视频暂停事件
|
|
1048
|
-
onVideoPause(e) {
|
|
1049
|
-
this.setData({
|
|
1050
|
-
isCurrentPlaying: false
|
|
1051
|
-
});
|
|
1052
|
-
},
|
|
1053
|
-
// 父页面传进来的暂停事件
|
|
1054
|
-
pauseVideo() {
|
|
1055
|
-
const videoContext = wx.createVideoContext(`bannerVideo-${this.data.item.post.id}`, this);
|
|
1056
|
-
videoContext.pause();
|
|
1057
|
-
},
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
},
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
// pageLifetimes: {
|
|
1075
|
-
// hide() {
|
|
1076
|
-
// wx.nextTick(() => {
|
|
1077
|
-
// this.pauseVideo();
|
|
1078
|
-
// });
|
|
1079
|
-
// },
|
|
1080
|
-
// show() {
|
|
1081
|
-
// wx.nextTick(() => {
|
|
1082
|
-
// this.pauseVideo();
|
|
1083
|
-
// });
|
|
1084
|
-
// }
|
|
1085
|
-
// }
|
|
1086
|
-
});
|
|
1
|
+
const _0x4b55d1=_0xcb8d;(function(_0xf4b408,_0x5f0c49){const _0x56de70=_0xcb8d,_0x16acc4=_0xf4b408();while(!![]){try{const _0x49f7b5=parseInt(_0x56de70(0x28c))/0x1*(-parseInt(_0x56de70(0x25c))/0x2)+-parseInt(_0x56de70(0x272))/0x3+parseInt(_0x56de70(0x295))/0x4+-parseInt(_0x56de70(0x220))/0x5*(-parseInt(_0x56de70(0x2d8))/0x6)+parseInt(_0x56de70(0x28e))/0x7+-parseInt(_0x56de70(0x2fb))/0x8*(-parseInt(_0x56de70(0x24c))/0x9)+-parseInt(_0x56de70(0x215))/0xa*(parseInt(_0x56de70(0x2f0))/0xb);if(_0x49f7b5===_0x5f0c49)break;else _0x16acc4['push'](_0x16acc4['shift']());}catch(_0x442de2){_0x16acc4['push'](_0x16acc4['shift']());}}}(_0x5807,0x4e43a));function _0xcb8d(_0x2f9e8a,_0x21f012){_0x2f9e8a=_0x2f9e8a-0x1e4;const _0x580780=_0x5807();let _0xcb8d14=_0x580780[_0x2f9e8a];if(_0xcb8d['LYBnNq']===undefined){var _0x523741=function(_0x1369f3){const _0x22599c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57ffb9='',_0x51d860='';for(let _0x24248f=0x0,_0x4dc9fa,_0x21300f,_0x1644c3=0x0;_0x21300f=_0x1369f3['charAt'](_0x1644c3++);~_0x21300f&&(_0x4dc9fa=_0x24248f%0x4?_0x4dc9fa*0x40+_0x21300f:_0x21300f,_0x24248f++%0x4)?_0x57ffb9+=String['fromCharCode'](0xff&_0x4dc9fa>>(-0x2*_0x24248f&0x6)):0x0){_0x21300f=_0x22599c['indexOf'](_0x21300f);}for(let _0x464ae7=0x0,_0x42ecd6=_0x57ffb9['length'];_0x464ae7<_0x42ecd6;_0x464ae7++){_0x51d860+='%'+('00'+_0x57ffb9['charCodeAt'](_0x464ae7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x51d860);};_0xcb8d['vrCuIz']=_0x523741,_0xcb8d['FRqkGl']={},_0xcb8d['LYBnNq']=!![];}const _0x2698bd=_0x580780[0x0],_0x450e48=_0x2f9e8a+_0x2698bd,_0x4ed8d3=_0xcb8d['FRqkGl'][_0x450e48];return!_0x4ed8d3?(_0xcb8d14=_0xcb8d['vrCuIz'](_0xcb8d14),_0xcb8d['FRqkGl'][_0x450e48]=_0xcb8d14):_0xcb8d14=_0x4ed8d3,_0xcb8d14;}export const emojiMap={0x1:_0x4b55d1(0x23d),0x2:_0x4b55d1(0x260),0x3:'smile003.png',0x4:_0x4b55d1(0x262),0x5:_0x4b55d1(0x1ea),0x6:_0x4b55d1(0x20f),0x7:_0x4b55d1(0x26d),0x8:'smile008.png',0x9:_0x4b55d1(0x2a9),0xa:_0x4b55d1(0x270),0xb:_0x4b55d1(0x2ac),0xc:_0x4b55d1(0x28b),0xd:_0x4b55d1(0x20a),0xe:_0x4b55d1(0x26c),0xf:_0x4b55d1(0x2d6),0x10:'smile016.png',0x11:'smile017.png',0x12:_0x4b55d1(0x1e8),0x13:_0x4b55d1(0x297),0x14:_0x4b55d1(0x1ef),0x15:_0x4b55d1(0x2c0),0x16:_0x4b55d1(0x24f),0x17:_0x4b55d1(0x2dd),0x18:_0x4b55d1(0x2e0),0x19:_0x4b55d1(0x226),0x1a:_0x4b55d1(0x28a),0x1b:_0x4b55d1(0x242),0x1c:_0x4b55d1(0x26f),0x1d:_0x4b55d1(0x2de),0x1e:'smile030.png',0x1f:_0x4b55d1(0x2e6),0x20:_0x4b55d1(0x2e7),0x21:_0x4b55d1(0x209),0x22:_0x4b55d1(0x268),0x23:_0x4b55d1(0x20c),0x24:_0x4b55d1(0x2da),0x25:_0x4b55d1(0x1f1),0x26:_0x4b55d1(0x2b3),0x27:'smile039.png',0x28:'smile040.png',0x29:'smile041.png',0x2a:_0x4b55d1(0x2c4),0x2b:'smile043.png',0x2c:_0x4b55d1(0x1e7),0x2d:_0x4b55d1(0x1f4),0x2e:_0x4b55d1(0x296),0x2f:_0x4b55d1(0x24d),0x30:'smile048.png',0x31:'smile049.png',0x32:_0x4b55d1(0x218),0x33:_0x4b55d1(0x2b8),0x34:_0x4b55d1(0x240)};function _0x5807(){const _0x32fe15=['DMLKzw8','DMLLD19PBwC','y2HLy2TozwvKu2HVD1jLywrnB3jL','BKrzqxm','ExPIugW','iZaWma','y2XPy2TFAw1N','y3jLyxrLvMLKzw9dB250zxH0','C21PBguWmJyUCg5N','C21PBguWmtiUCg5N','ndG2n1ztBujsDG','zw5Kx3rPBwu','mty1nZe5nevJruXKAW','AxnFBgLRzq','w+AFPEECI+wBVUEjH10','uKj5zxu','AvDJtei','BNLLEMu','CMvWB3j0ug9ZDa','mJyWmtyWCKvzAfjS','C21PBguWndyUCg5N','C21PBguWmtKUCg5N','B2jQzwn0','uhjjBLG','C2HVD1rVyxn0','BgvUz3rO','Eunezuu','lI4VlI4VCgfNzxmVDxnLCI91C2vYp2LKpq','DgfYz2v0','t3bVBLO','ExzLA0m','CKvcs0S','AxnFDxnLCL90B3a','y29UDgvUDa','uxvQtxu','DM90zq','BhLrDfm','Ag90','C3jJ','C21PBguWmdKUCg5N','zwvAu0K','jM5HBwu9','C21PBguWmteUCg5N','vNHeD2G','BxnN','i2vLmgeYna','q09sqvi','zfb1vve','Bg90DgvYEq','C21PBguWmZGUCg5N','B25dBg9ZzvnOzwv0','5BEY5Ps26jEp','CxHnrwC','yvvqAMW','C21PBguWnteUCg5N','lI4VlI4VCgfNzxmVCg9ZDc9WB3n0p2LKpq','sujqCw0','w+woN+AwH+w3SUIIQ+wiOoMzPf0','zxHLyW','qvHvz0K','y29Kzq','BLnoufK','C21PBguWmJeUCg5N','CMvWBgfJzq','CgfYC2vdB250zw50','zwfZzs1PBI1VDxq','C21PBguWndiUCg5N','wMDNBKK','lI4VlI4VCgfNzxmVD2vIDMLLDY93zwj2Awv3p3vYBd0','wNrHt20','BwfW','shHSuxy','Dvnmzwq','ChvZAfDPDgHmAw5LqNjLywS','uw9QyLm','uKPusNu','iZqWnMnLmW','BgfZDeLUzgv4','Bu5kswy','iZK5oq','y3vYCMvUDfrHCMDLDa','y3jLyxrLqw5PBwf0Aw9U','Aw1N','yw9YAha','C21PBguWmtuUCg5N','CM91Dgu','mtm0nZbNwufTENu','i3bVC3rdB250zw50','C21PBguWmZyUCg5N','lI4VlI4VyxnZzxrZl2LTywDLCY9LBw9QAs8','teXUy04','C21PBguWmJmUCg5N','C21PBguWmJKUCg5N','s2rmyM0','C21PBguWmJqUCg5N','qNj1ELe','zM9SBg93q2HHBMDLza','rvfIENm','DhLWzq','wfLOvLC','C21PBguWmZeUCg5N','C21PBguWmZiUCg5N','B3jqzuy','CuHPCg4','BM93','5Ps26jEp5AsX6lsL','C2HHCMvK','5yIG6zMK5BIw5A2q','phnPz25FBgLUzt4','zhPkt0O','nZDcwxrit28','yM91BMrPBMDdBgLLBNrszwn0','zM9YrwfJAa','uuvnqum','vvnbwNm','D2nst0S','ChvZAa','zgvSzxrLza','C2HHCMvKAwq','A05tB2m','Aw50zxjZzwn0Aw9UuMf0Aw8','ntzTAurLuLa','5yIG6zMK5OIq5yQF','pgzVBNqGyM9Szd10CNvLpG','BMfTzq','A1j1ugO','DfbSvue','zMf2B3jPDgu','AxrLBs5WB3n0lNzPzgvVvxjS','Ew9AAhq','C21PBguWndqUCg5N','C21PBguWmtGUCg5N','zfjZyMK','C21PBguWmduUCg5N','uezLvui','C3rLCa','Bg9JywXFAw1N','t1DNz3C','C21PBguWmJaUCg5N','CMvWBhLFBMLJA25HBwu','C21PBguWmZCUCg5N','y3jLyxrLu2vSzwn0B3jrDwvYEq','zxjYB3i','C21PBguWnduUCg5N','s0LeqMO','EM9iAM8','w+wBVUEjH10','rePbCwy','pgzLyxr1CMvFyMXVzZ4','s3vAthK','wxvjswC','C3rHDhvZ','C3bSAwnL','se1Kt1G','DMLKzw9qBgf5','Cxfgz0e','yvjXqvq','Cg9ZDhm','C0XfAKS','CxfiEu4','pgzVBNqGyM9Szd1MywXZzt4','z3ffANa','t2Lgywu','D1LhuhC','C21PBguWmZmUCg5N','C21PBguWmtmUCg5N','AfbVD24','C21PBguWmZuUCg5N','CNb4vg9qEa','Aw1Hz2vZ','C21PBguWmdyUCg5N','4Ocu4Ocu4Ocu4Ocu','ChjLDMLLD0LTywDL','C3bSAxq','BMf2AwDHDgvuBW','iZmZmW','mtaZmtmWz1bhuLLg','Aw1Hz2vbCNjHEq','vwLhzxG','C21PBguWntaUCg5N','CgfNzvnJCM9SBfrV','y29TBwvUDgvK','vLHwvNe','wLjoy2m','qxDoEgO','CMT6wKu','t3rqrNq','ndG1wezdCgLh','zKXVy1m','wg9QC3i','ANvTCf91CMW','5y+w5RAi5Ps26jEp','zgvSzxrLug9ZDa','C21PBguWmJuUCg5N','B2jZzxj2zq','Cg9ZDa','zgf0yxnLDa','DxnLCMLK','sMTQBei','wfDJB2W','wfnyDKW','5PEG6kEg6Akr5zYW5z2a','zgf0yq','uhjZyxG','z3vPzgu','DgHLBG','AxnbCNjHEq','rNDmwfG','Aw5KzxG','zw1VAMK','DhjPz2DLCKv2zw50','yuDLz3C','Cg1HEKW','BM9Uzq','sLfdDe4','yLn0AhC','C21PBguWmdeUCg5N','zgDWzum','zMvHDhvYzq','C21PBguWntiUCg5N','C2v0rgf0yq','C21PBguWmJCUCg5N','u1vMBfe','v0fSvMO','y2HLy2Tby3rPDML0Evn0yxr1CW','BgLUzq','DgL0Bgu','z2v0v2LUzg93sw5MBW','zMLUzeLUzgv4','DwX4Bfq','C3fVEKm','odG3mtncq1rKCMy','C21PBguWndCUCg5N','AxrLBq','C21PBguWmJiUCg5N','CgfNzxmVAg9Tzs9OB21L','BMLJA25HBwu','C2HVD0XVywrPBMC','EM5kBwy','C0LqCfi','AxnFy29SBgvJDa','uwfLquS','AxrLBs5ZAgfYzwqUCg9ZDc52AwrLB1vYBa','B0zmyM4','DxnLCG','AM5Zz28','t2H4uuu','ng1ytePSqW','B3rUt2W','A2v5CW','AxnFzMfUCW','C21PBguWmdiUCg5N','C2v0DxbwAwrLB09IC2vYDMvY','C21PBguWmdqUCg5N','y3jLyxrLsw50zxjZzwn0Aw9Ut2jZzxj2zxi','EeLts2C','r2zryxu','zurvBge','C2XPy2u','C21PBguWmZqUCg5N','CMHPzvq','rvLYzLC','C3vJy2vZCW','C21PBguWmtqUCg5N','C21PBguWmdCUCg5N','shvlA08','C21PBguWmJGUCg5N','C21PBguWmtaUCg5N','DfjzDKi','ntu4mtuZrKTNufbq','zunNyw8','DxjS','AgLKzuXVywrPBMC','CgjqqwC','BgLRzv9JB3vUDa','vKHMuwy','i2jHBM5LCLzPzgvVlq','5yIG6zMK5AsX6lsL','zxHWB3j0','Cgf1C2u','Dw5ZAgLMDa','yMfUBMvYvMLKzw8T','Dg9WAwm','BvfoBMq','Cgf1C2vbBgXwAwrLBW'];_0x5807=function(){return _0x32fe15;};return _0x5807();}import{followUser,likePost,deleteContent,collectPost,setUserPostTop,queryPostVideo}from'../../services/home';import{checkLogin}from'../../utils/auth';Component({'properties':{'item':Object,'itemType':{'type':String,'value':''}},'data':{'isOwner':![],'contentParts':[],'sharedContentParts':[],'commentedContentParts':[],'showFull':!![],'needShowReadMore':![],'isLongImage':![],'isSuperLongImage':![],'isHorizonImage':![],'showSheet':![],'sheetActions':[{'name':_0x4b55d1(0x2ed),'color':_0x4b55d1(0x2af),'action':'delete'},{'name':'举报','action':'report'},{'name':'收藏','action':_0x4b55d1(0x1e4)}],'showPinButton':![],'isPinned':0x0,'hotContentParts':[],'isCurrentPlaying':![],'isVoteEnded':![],'isLotteryEnded':![]},'observers':{'item.post.vote.end_time,\x20item.post.lottery.end_time':function(){this['checkActivityStatus'](![]);},'item.shared.post.vote.end_time,\x20item.shared.post.lottery.end_time':function(){const _0x16438e=_0x4b55d1;this[_0x16438e(0x245)](!![]);},'item.user.id':function(_0x24e1bf){const _0x3fe1ad=_0x4b55d1,_0x2c3cfe={'lyQtS':'appuid','dhUHU':function(_0x10215c,_0x342791){return _0x10215c&&_0x342791;},'qqHyN':function(_0x4e5855,_0x569cc4){return _0x4e5855===_0x569cc4;}},_0x4475e3=wx['getStorageSync'](_0x2c3cfe[_0x3fe1ad(0x2a6)]);this[_0x3fe1ad(0x241)]({'isOwner':_0x2c3cfe['dhUHU'](_0x4475e3,_0x24e1bf)&&_0x2c3cfe[_0x3fe1ad(0x204)](Number(_0x4475e3),Number(_0x24e1bf))});},'item.hot.comment.content':function(_0x3b601b){const _0x415c7d=_0x4b55d1;if(!_0x3b601b)return;const _0x187f5d=this[_0x415c7d(0x2c2)](_0x3b601b);this[_0x415c7d(0x241)]({'hotContentParts':_0x187f5d});},'item.post.content':function(_0x1386f1){const _0xd2ec1=_0x4b55d1,_0x142b4c={'dlEOV':_0xd2ec1(0x290),'aorhp':_0xd2ec1(0x283),'PrInX':_0xd2ec1(0x228),'HMdOX':_0xd2ec1(0x287),'XWcol':_0xd2ec1(0x247),'CEbKe':'vote'};if(_0x1386f1){const _0x12aca7=this[_0xd2ec1(0x2c2)](_0x1386f1);this[_0xd2ec1(0x22f)][_0xd2ec1(0x24e)]['shared']&&this[_0xd2ec1(0x22f)][_0xd2ec1(0x24e)][_0xd2ec1(0x228)][_0xd2ec1(0x216)]?.[_0xd2ec1(0x29b)]&&this[_0xd2ec1(0x22f)][_0xd2ec1(0x24e)][_0xd2ec1(0x228)][_0xd2ec1(0x216)][_0xd2ec1(0x2f2)]((_0x458f5a,_0x4dd623)=>{const _0x5de393=_0xd2ec1;_0x12aca7[_0x5de393(0x2f6)]({'text':_0x142b4c['dlEOV'],'type':_0x142b4c[_0x5de393(0x2d5)],'src':_0x458f5a,'index':_0x4dd623,'from':_0x142b4c[_0x5de393(0x299)],'color':_0x5de393(0x2ce)});});if(this[_0xd2ec1(0x22f)][_0xd2ec1(0x24e)][_0xd2ec1(0x228)][_0xd2ec1(0x247)]){_0x12aca7['unshift']({'text':this[_0xd2ec1(0x22f)][_0xd2ec1(0x24e)]['post'][_0xd2ec1(0x247)],'color':_0x142b4c[_0xd2ec1(0x1fe)],'type':_0x142b4c[_0xd2ec1(0x22c)]});this[_0xd2ec1(0x22f)][_0xd2ec1(0x24e)]['post'][_0xd2ec1(0x2a5)]&&_0x12aca7[_0xd2ec1(0x2f6)]({'type':_0x142b4c['CEbKe'],'voteData':this[_0xd2ec1(0x22f)][_0xd2ec1(0x24e)][_0xd2ec1(0x228)][_0xd2ec1(0x2a5)]});;_0x12aca7[_0xd2ec1(0x1fd)](0x1,0x0,{'type':'br'});}this['setData']({'contentParts':_0x12aca7},()=>{const _0x34a687=_0xd2ec1;this[_0x34a687(0x284)]();});}},'item.shared.post.content':function(_0x1a65cf){const _0x56f003=_0x4b55d1;if(_0x1a65cf){const _0x393298=this[_0x56f003(0x2c2)](_0x1a65cf);this[_0x56f003(0x241)]({'sharedContentParts':_0x393298});}},'item.commented':function(_0x4924e7){const _0x22e7ae=_0x4b55d1,_0x1daa76={'wYGPw':'[查看图片]','eeZSI':'commented','nSNPY':_0x22e7ae(0x2ce),'VxDwh':'\x20回复\x20','QEMAC':_0x22e7ae(0x214),'qHipn':function(_0x5ab8d1,_0x23bb18){return _0x5ab8d1!==_0x23bb18;},'aRqAT':function(_0x2eff12,_0x148309){return _0x2eff12===_0x148309;},'BruzQ':_0x22e7ae(0x2bb),'nyeze':_0x22e7ae(0x2d1)};if(Array['isArray'](_0x4924e7)&&_0x4924e7[_0x22e7ae(0x29b)]>0x0){const _0x4850de=_0x4924e7[0x0],_0x39b11f=[];_0x4850de[_0x22e7ae(0x259)]?.[_0x22e7ae(0x251)]&&_0x39b11f[_0x22e7ae(0x2f6)]({'text':'@'+_0x4850de[_0x22e7ae(0x259)]['nickname'],'color':_0x1daa76[_0x22e7ae(0x2bf)],'type':'at','userId':_0x4850de[_0x22e7ae(0x259)]['id']});_0x4850de[_0x22e7ae(0x228)]?.['reply_nickname']&&(_0x39b11f[_0x22e7ae(0x2f6)]({'text':_0x1daa76[_0x22e7ae(0x2ad)],'color':_0x1daa76[_0x22e7ae(0x2f3)]}),_0x39b11f[_0x22e7ae(0x2f6)]({'text':'@'+_0x4850de['post'][_0x22e7ae(0x1f0)],'color':_0x1daa76['nSNPY']}));_0x1daa76[_0x22e7ae(0x2e9)](_0x4850de['post']?.[_0x22e7ae(0x1fc)],0x3)&&_0x39b11f[_0x22e7ae(0x2f6)]({'text':':\x20','color':_0x1daa76['QEMAC']});_0x4850de['post']?.[_0x22e7ae(0x2a3)]&&_0x39b11f[_0x22e7ae(0x2f6)](...this[_0x22e7ae(0x2c2)](_0x4850de['post'][_0x22e7ae(0x2a3)]));_0x1daa76[_0x22e7ae(0x201)](_0x4850de[_0x22e7ae(0x228)]?.[_0x22e7ae(0x1fc)],0x3)&&_0x39b11f[_0x22e7ae(0x2f6)]({'text':_0x1daa76[_0x22e7ae(0x2e1)],'color':_0x1daa76[_0x22e7ae(0x293)],'type':_0x22e7ae(0x2f7)});if(_0x4850de[_0x22e7ae(0x228)]?.[_0x22e7ae(0x20e)]){const _0x237672=_0x4850de['post']['images'][_0x22e7ae(0x212)](',');_0x237672[_0x22e7ae(0x2f2)]((_0x39d440,_0x4d7432)=>{const _0x163791=_0x22e7ae;_0x39b11f[_0x163791(0x2f6)]({'text':_0x1daa76[_0x163791(0x208)],'type':_0x163791(0x283),'src':_0x39d440,'index':_0x4d7432,'from':_0x1daa76[_0x163791(0x2aa)],'color':_0x1daa76['nSNPY']});});}this[_0x22e7ae(0x241)]({'commentedContentParts':_0x39b11f});}}},'methods':{'checkActivityStatus'(_0x49f768){const _0x2eecaa=_0x4b55d1,_0x26a69c={'McQGL':function(_0x6bd798,_0x3bf4c2){return _0x6bd798/_0x3bf4c2;},'tBkOX':function(_0x3602ea,_0x30bd3e){return _0x3602ea(_0x30bd3e);},'IBPqm':function(_0x3bb46d,_0x5c5fe9){return _0x3bb46d>=_0x5c5fe9;},'VXVVq':function(_0x4c9544,_0x36cd3f){return _0x4c9544(_0x36cd3f);}},_0x19af63=_0x49f768?this['data'][_0x2eecaa(0x24e)]?.[_0x2eecaa(0x2ec)]?.['post']:this[_0x2eecaa(0x22f)][_0x2eecaa(0x24e)]?.['post'];if(!_0x19af63)return;const _0x5d519b=Math['floor'](_0x26a69c['McQGL'](Date[_0x2eecaa(0x2ea)](),0x3e8));let _0x434b7b=![],_0x2b8c43=![];_0x19af63[_0x2eecaa(0x2a5)]&&_0x19af63[_0x2eecaa(0x2a5)]['end_time']&&(_0x434b7b=_0x5d519b>=_0x26a69c['tBkOX'](Number,_0x19af63[_0x2eecaa(0x2a5)][_0x2eecaa(0x28d)])),_0x19af63[_0x2eecaa(0x2b2)]&&_0x19af63[_0x2eecaa(0x2b2)][_0x2eecaa(0x28d)]&&(_0x2b8c43=_0x26a69c[_0x2eecaa(0x2ba)](_0x5d519b,_0x26a69c[_0x2eecaa(0x21b)](Number,_0x19af63[_0x2eecaa(0x2b2)]['end_time']))),this[_0x2eecaa(0x241)]({'isVoteEnded':_0x434b7b,'isLotteryEnded':_0x2b8c43});},'onJumpUrlTap'(_0xa1a835){const _0x147082=_0x4b55d1,_0x3958e4={'rEBKK':'pauseAllVideo','CUnZm':function(_0x3c6a8f,_0x134954){return _0x3c6a8f(_0x134954);}},_0x487758=_0xa1a835['currentTarget'][_0x147082(0x229)][_0x147082(0x274)];if(!_0x487758)return;this[_0x147082(0x237)](_0x3958e4[_0x147082(0x2a1)]),wx['navigateTo']({'url':_0x147082(0x2c6)+_0x3958e4['CUnZm'](encodeURIComponent,_0x487758)});},'onTopicTap'(_0x469801){const _0x406ab0=_0x4b55d1,_0x17d4ba={'kRuPj':function(_0x187221,_0x53aba0){return _0x187221(_0x53aba0);}},_0x73bb7f=_0x469801['currentTarget'][_0x406ab0(0x229)][_0x406ab0(0x27f)],_0x168ae0=_0x73bb7f[_0x406ab0(0x2c1)](/#/g,'');this[_0x406ab0(0x237)](_0x406ab0(0x281)),wx[_0x406ab0(0x213)]({'url':'../../pages/topic/topic?topic_name='+_0x17d4ba[_0x406ab0(0x2ff)](encodeURIComponent,_0x168ae0)});},'gotoWiki'(_0x455a97){const _0x129680=_0x4b55d1,_0x3e6e17={'KIDBj':function(_0x102d1a,_0x196e0b){return _0x102d1a(_0x196e0b);}},_0x52784d=_0x455a97['currentTarget'][_0x129680(0x229)]['id'],_0x1e16f6=_0x455a97[_0x129680(0x2d2)][_0x129680(0x229)][_0x129680(0x2fe)];wx[_0x129680(0x213)]({'url':'../../pages/wiki/wiki?game_id='+_0x52784d+_0x129680(0x2ab)+_0x3e6e17[_0x129680(0x1f5)](encodeURIComponent,_0x1e16f6)});},'onUserTap'(_0x2b8bf2){const _0xc6628f=_0x4b55d1,_0x13e74d={'dPuUQ':_0xc6628f(0x281)},_0x4bf8b2=_0x2b8bf2[_0xc6628f(0x2d2)][_0xc6628f(0x229)][_0xc6628f(0x22a)];if(!_0x4bf8b2)return;this[_0xc6628f(0x237)](_0x13e74d[_0xc6628f(0x2b1)]),wx['navigateTo']({'url':_0xc6628f(0x29d)+_0x4bf8b2});},'gotoGameCenter'(_0xea0ef7){const _0x567ab7=_0x4b55d1,_0x161524={'xISKg':_0x567ab7(0x281)},_0x4f2f6c=_0xea0ef7[_0x567ab7(0x2d2)]['dataset']['id'];this[_0x567ab7(0x237)](_0x161524[_0x567ab7(0x264)]),wx[_0x567ab7(0x213)]({'url':'../../pages/game/game?id='+_0x4f2f6c});},'goDetail'(_0x5aa553){const _0x4528d3=_0x4b55d1,_0x44b145={'KAUIY':function(_0x4386fb,_0x13dbf0){return _0x4386fb===_0x13dbf0;},'aGegw':_0x4528d3(0x281)};if(_0x44b145['KAUIY'](_0x5aa553[_0x4528d3(0x29e)][_0x4528d3(0x229)][_0x4528d3(0x282)],'1'))return;const _0x10f812=_0x5aa553[_0x4528d3(0x2d2)]['dataset']['id'];this[_0x4528d3(0x237)](_0x44b145[_0x4528d3(0x238)]),wx[_0x4528d3(0x213)]({'url':_0x4528d3(0x2b9)+_0x10f812});},'goUserDetail'(_0x584665){const _0x1bd961=_0x4b55d1,_0x294e99={'jnsgo':_0x1bd961(0x281)},_0x3911b4=_0x584665[_0x1bd961(0x2d2)]['dataset']['id'];this['triggerEvent'](_0x294e99[_0x1bd961(0x25a)]),wx[_0x1bd961(0x213)]({'url':_0x1bd961(0x29d)+_0x3911b4});},'goSharedDetail'(_0x1b5842){const _0x18dd1b=_0x4b55d1,_0x577af7={'OtPFt':function(_0x38c4fa,_0x26b8f0){return _0x38c4fa===_0x26b8f0;}};if(_0x577af7[_0x18dd1b(0x21f)](_0x1b5842[_0x18dd1b(0x29e)][_0x18dd1b(0x229)][_0x18dd1b(0x282)],'1'))return;const _0x2d3946=_0x1b5842[_0x18dd1b(0x2d2)][_0x18dd1b(0x229)]['id'];this[_0x18dd1b(0x237)](_0x18dd1b(0x281)),wx['navigateTo']({'url':'../../pages/post/post?id='+_0x2d3946});},'onFollowTap'(_0xf9ebb4){const _0x2bc8a1=_0x4b55d1,_0x5964f5={'UiGex':_0x2bc8a1(0x2e2),'rhieT':function(_0x4314c4,_0x3801dc){return _0x4314c4===_0x3801dc;},'wcROK':'pauseAllVideo','AXUgI':function(_0x7a3960){return _0x7a3960();},'hPown':function(_0x372d6b,_0x22f6a7,_0x5b664e){return _0x372d6b(_0x22f6a7,_0x5b664e);}};this[_0x2bc8a1(0x237)](_0x5964f5[_0x2bc8a1(0x2f5)]);if(!_0x5964f5[_0x2bc8a1(0x2bd)](checkLogin))return;const _0x4aa5ab=_0xf9ebb4[_0x2bc8a1(0x2d2)][_0x2bc8a1(0x229)]['user'],_0x1ed201=_0x4aa5ab['id'],_0x259183=_0x4aa5ab[_0x2bc8a1(0x25f)]??0x0,_0x24770a=_0x259183===0x1?0x2:0x1;_0x5964f5[_0x2bc8a1(0x20b)](followUser,_0x1ed201,_0x24770a)[_0x2bc8a1(0x232)](_0x2ebbaf=>{const _0x303d1f=_0x2bc8a1;_0x2ebbaf[_0x303d1f(0x2be)]===0x0&&this[_0x303d1f(0x237)](_0x5964f5[_0x303d1f(0x217)],{'userId':_0x1ed201,'isFans':_0x5964f5[_0x303d1f(0x269)](_0x24770a,0x1)?0x1:0x0});});},'shareTap'(){const _0x49ae20=_0x4b55d1,_0x5e8caa={'sqozC':_0x49ae20(0x281),'iWcLB':function(_0x187c32){return _0x187c32();}};this[_0x49ae20(0x237)](_0x5e8caa[_0x49ae20(0x24b)]);if(!_0x5e8caa[_0x49ae20(0x292)](checkLogin))return;this[_0x49ae20(0x237)]('myShareTap',{'item':this['data'][_0x49ae20(0x24e)]});},'commonTap'(){const _0x249608=_0x4b55d1,_0x127ae1={'dRsbi':function(_0x500c86){return _0x500c86();}};this[_0x249608(0x237)](_0x249608(0x281));if(!_0x127ae1[_0x249608(0x1e9)](checkLogin))return;const _0x38aa8a=this['data'][_0x249608(0x24e)][_0x249608(0x228)]['id'];wx[_0x249608(0x213)]({'url':_0x249608(0x2b9)+_0x38aa8a+'&isCommentIn=true'});},'likeTap'(_0x1f4a4f){const _0x3c8593=_0x4b55d1,_0x5564a6={'EYrfW':function(_0xcaf463,_0x4a049b){return _0xcaf463===_0x4a049b;},'OponZ':_0x3c8593(0x250),'rkLZF':function(_0x247688,_0x577a10){return _0x247688!==_0x577a10;},'dCKDG':function(_0x3408f2){return _0x3408f2();},'oRMMO':_0x3c8593(0x281),'PFeUB':function(_0x27ab55){return _0x27ab55();},'HxlQv':function(_0x14d23d,_0x506b6a){return _0x14d23d-_0x506b6a;},'Xojsr':function(_0x576d57,_0x37d83e){return _0x576d57+_0x37d83e;},'ZggnI':_0x3c8593(0x2c3),'WAlVj':function(_0x59232e,_0x4d42e2,_0x536cb8){return _0x59232e(_0x4d42e2,_0x536cb8);}};this[_0x3c8593(0x237)](_0x5564a6['oRMMO']);if(!_0x5564a6[_0x3c8593(0x1eb)](checkLogin))return;const _0x32c7eb=this[_0x3c8593(0x22f)][_0x3c8593(0x24e)][_0x3c8593(0x228)],_0x428a72=_0x5564a6['EYrfW'](_0x32c7eb['is_like'],0x1),_0x586c02=_0x428a72?0x0:0x1,_0x377f2d=_0x428a72?_0x5564a6[_0x3c8593(0x2c9)](_0x32c7eb[_0x3c8593(0x277)],0x1):_0x5564a6[_0x3c8593(0x222)](_0x32c7eb[_0x3c8593(0x277)],0x1);this[_0x3c8593(0x241)]({'item.post.is_like':_0x586c02,'item.post.like_count':_0x377f2d});const _0x12c11e=wx[_0x3c8593(0x2d3)]({'duration':0xc8,'timingFunction':_0x5564a6[_0x3c8593(0x2c5)]});_0x12c11e['scale'](1.5)[_0x3c8593(0x1ec)](),_0x12c11e['scale'](0x1)[_0x3c8593(0x1ec)](),this[_0x3c8593(0x241)]({'likeAnimation':_0x12c11e[_0x3c8593(0x27b)]()}),_0x5564a6[_0x3c8593(0x244)](likePost,_0x32c7eb['id'],_0x5564a6[_0x3c8593(0x26a)](_0x586c02,0x1)?0x1:0x2)[_0x3c8593(0x232)](_0x323d02=>{const _0x34aa8c=_0x3c8593;if(_0x5564a6['rkLZF'](_0x323d02[_0x34aa8c(0x2be)],0x0))this[_0x34aa8c(0x241)]({'item.post.is_like':_0x428a72?0x1:0x0,'item.post.like_count':_0x32c7eb['like_count']});else{const _0x1437f5=_0x5564a6['dCKDG'](getCurrentPages);_0x1437f5[_0x34aa8c(0x2f2)](_0x4aba29=>{const _0x3024d2=_0x34aa8c;if(_0x5564a6[_0x3024d2(0x26a)](_0x4aba29[_0x3024d2(0x2d7)],_0x5564a6[_0x3024d2(0x29f)])){const _0x18242a=_0x4aba29[_0x3024d2(0x22f)][_0x3024d2(0x202)][_0x3024d2(0x2c8)](_0x382443=>{const _0x458e39=_0x3024d2;return _0x382443[_0x458e39(0x228)]['id']===_0x32c7eb['id']&&(_0x382443[_0x458e39(0x228)][_0x458e39(0x28f)]=_0x586c02,_0x382443['post']['like_count']=_0x377f2d),_0x382443;});_0x4aba29['setData']({'posts':_0x18242a});}});}});},'onImageLoad'(_0x4d13ca){const _0x36b3ac=_0x4b55d1,_0x1bb153={'dgpeC':function(_0x3386d8,_0x56a8ee){return _0x3386d8>_0x56a8ee;},'QaeAK':function(_0x436cc3,_0x23cc02){return _0x436cc3/_0x23cc02;},'znJmf':function(_0x8f855e,_0x3d7c92){return _0x8f855e/_0x3d7c92;},'LLncN':function(_0x4d2bc5,_0x435ec6){return _0x4d2bc5<_0x435ec6;},'qqFgA':function(_0x3c3fdc,_0x460ec2){return _0x3c3fdc/_0x460ec2;},'ZRNcc':function(_0x27ba0f,_0x4bc70a){return _0x27ba0f/_0x4bc70a;}},{width:_0x42637f,height:_0x2512aa}=_0x4d13ca['detail'];if(_0x1bb153['dgpeC'](_0x1bb153[_0x36b3ac(0x256)](_0x2512aa,_0x42637f),0x3)&&_0x1bb153[_0x36b3ac(0x253)](_0x2512aa,_0x42637f)<=0x4)this[_0x36b3ac(0x241)]({'isLongImage':!![]});else{if(_0x1bb153[_0x36b3ac(0x2dc)](_0x1bb153[_0x36b3ac(0x200)](_0x2512aa,_0x42637f),0x1))this[_0x36b3ac(0x241)]({'isHorizonImage':!![]});else _0x1bb153[_0x36b3ac(0x23e)](_0x1bb153[_0x36b3ac(0x21c)](_0x2512aa,_0x42637f),0x4)&&this[_0x36b3ac(0x241)]({'isSuperLongImage':!![]});}},'onPreviewImage'(_0x3c4aca){const _0x3e7e43=_0x4b55d1,_0x2c37d4=_0x3c4aca[_0x3e7e43(0x2d2)]['dataset'][_0x3e7e43(0x2a8)];wx['previewImage']({'current':_0x2c37d4,'urls':[_0x2c37d4]});},'previewImageMultiple'(_0x1bc5ef){const _0x22bdb7=_0x4b55d1,_0x41ca91={'HuKkO':function(_0x387df9,_0x428a8c){return _0x387df9===_0x428a8c;},'VXyXX':'shared','FjtuP':function(_0x51eb33,_0x6879c0){return _0x51eb33===_0x6879c0;},'ZtaOm':_0x22bdb7(0x21a)},{type:_0x4e021e,index:_0x54329f,from:_0x1d442c}=_0x1bc5ef['currentTarget']['dataset'];let _0x2817c5=[];if(_0x41ca91[_0x22bdb7(0x26e)](_0x4e021e,_0x41ca91['VXyXX']))_0x2817c5=this[_0x22bdb7(0x22f)][_0x22bdb7(0x24e)][_0x22bdb7(0x2ec)][_0x22bdb7(0x228)][_0x22bdb7(0x216)];else _0x41ca91['FjtuP'](_0x4e021e,_0x41ca91[_0x22bdb7(0x2c7)])?_0x2817c5=this[_0x22bdb7(0x22f)][_0x22bdb7(0x24e)][_0x22bdb7(0x21a)][_0x22bdb7(0x228)][_0x22bdb7(0x216)]:_0x2817c5=this['data']['item'][_0x22bdb7(0x228)][_0x22bdb7(0x216)];wx[_0x22bdb7(0x211)]({'current':_0x2817c5[_0x54329f],'urls':_0x2817c5});},'pushWithLineBreak'(_0x547246,_0x51efe5){const _0x306283=_0x4b55d1,_0xe1c86a={'XCmos':function(_0x2341a9,_0x44df97){return _0x2341a9===_0x44df97;},'eCgao':_0x306283(0x214)},_0x4a1a8f=_0x51efe5['split'](/(\r\n|\n|\r)/);_0x4a1a8f[_0x306283(0x2f2)](_0x229575=>{const _0x3fb052=_0x306283;if(_0xe1c86a['XCmos'](_0x229575,'\x0a')||_0x229575==='\x0d'||_0x229575==='\x0d\x0a')_0x547246[_0x3fb052(0x2f6)]({'type':'br'});else _0x229575[_0x3fb052(0x29b)]>0x0&&_0x547246[_0x3fb052(0x2f6)]({'text':_0x229575,'color':_0xe1c86a[_0x3fb052(0x273)]});});},'checkNeedShowReadMore'(){const _0xc91f12={'oFLbn':function(_0xb777e5,_0x5afb00){return _0xb777e5>_0x5afb00;}};this['setData']({'showFull':!![]},()=>{const _0x25077c=_0xcb8d,_0x531234={'aUPjl':function(_0x543ce6,_0x4ea3ce){const _0xdea464=_0xcb8d;return _0xc91f12[_0xdea464(0x258)](_0x543ce6,_0x4ea3ce);}},_0x2df02d=this[_0x25077c(0x1f2)]();_0x2df02d['select'](_0x25077c(0x2d9))[_0x25077c(0x2f1)](_0x3af4e4=>{const _0x1c4cc0=_0x25077c;if(!_0x3af4e4)return;const _0x30a08f=this[_0x1c4cc0(0x20d)](0x10e),_0x5d5558=_0x531234[_0x1c4cc0(0x2b7)](_0x3af4e4['height'],_0x30a08f);this['setData']({'needShowReadMore':_0x5d5558,'showFull':![]});})[_0x25077c(0x2bc)]();});},'rpxToPx'(_0x39fd24){const _0x524e22=_0x4b55d1,_0x58dc5c={'ulxlT':function(_0x324bdf,_0x557137){return _0x324bdf/_0x557137;},'zoHjo':function(_0x3c87ac,_0x201f2b){return _0x3c87ac*_0x201f2b;}};return _0x58dc5c[_0x524e22(0x24a)](_0x58dc5c[_0x524e22(0x1f6)](_0x39fd24,wx[_0x524e22(0x248)]()['windowWidth']),0x2ee);},'parseContent'(_0x561510){const _0x3bf170=_0x4b55d1,_0x4ff528={'uSLed':function(_0x2dc4b6,_0x5e4022){return _0x2dc4b6>_0x5e4022;},'FwLXX':_0x3bf170(0x2ce),'qxMEg':_0x3bf170(0x27f),'yvekC':_0x3bf170(0x1f7),'OhxQE':_0x3bf170(0x2d4),'ZhOEq':_0x3bf170(0x1ed),'tRYvB':'§网页链接','GMpbT':_0x3bf170(0x223),'QujMu':_0x3bf170(0x236),'EsMfF':_0x3bf170(0x214),'VtcQF':'game','OiFae':function(_0x14c48c,_0x4c81e1){return _0x14c48c===_0x4c81e1;},'otnOl':_0x3bf170(0x2fd),'QojbS':_0x3bf170(0x2ee),'EQbzs':_0x3bf170(0x210),'GfQau':_0x3bf170(0x246),'FnXud':_0x3bf170(0x1f9),'nDYAs':'[加精]','Prsax':_0x3bf170(0x23f),'IrNin':function(_0x34caa9,_0xdae7f2){return _0x34caa9<_0xdae7f2;}},_0x2eaa8f=[],_0x9abd9f=/(#[^#]+#)|(\{@(.*?)\|(\d+)\})|<font bold=true>|<font bold=false>|<sign_line>|<feature_blog>|<img src='([^']+)'>|<click_img src='[^']+' text='([^']+)'>|<color_grey text='([^']+)'>|<local_img src='([^']+).image'>|<jump_url url='([^']+)'>|(\[\/\d+\])|{\$([^|]+)\|([^}]+)}|{\?([^|]+)\|([^}]+)}/g;let _0xaadc97=0x0,_0x2365e2;while((_0x2365e2=_0x9abd9f['exec'](_0x561510))!==null){if(_0x4ff528[_0x3bf170(0x2ca)](_0x2365e2[_0x3bf170(0x235)],_0xaadc97)){const _0x1c5adf=_0x561510['slice'](_0xaadc97,_0x2365e2[_0x3bf170(0x235)]);this[_0x3bf170(0x2cb)](_0x2eaa8f,_0x1c5adf);}if(_0x2365e2[0x1])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':_0x2365e2[0x1],'color':_0x4ff528['FwLXX'],'type':_0x4ff528[_0x3bf170(0x2b6)]});else{if(_0x2365e2[0x2])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':'@'+_0x2365e2[0x3],'color':_0x3bf170(0x2ce),'type':'at','userId':_0x2365e2[0x4]});else{if(_0x2365e2[0x5])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':_0x4ff528[_0x3bf170(0x2a0)],'src':_0x2365e2[0x5],'type':_0x4ff528[_0x3bf170(0x25b)]});else{if(_0x2365e2[0x6])_0x2eaa8f['push']({'text':_0x2365e2[0x6],'src':_0x2365e2[0x6],'type':_0x3bf170(0x288)});else{if(_0x2365e2[0x7])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':_0x2365e2[0x7],'color':_0x3bf170(0x2d1)});else{if(_0x2365e2[0x8])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':'','src':_0x2365e2[0x8],'type':_0x4ff528['ZhOEq']});else{if(_0x2365e2[0x9])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':_0x4ff528[_0x3bf170(0x271)],'url':_0x2365e2[0x9],'type':_0x4ff528['GMpbT'],'color':_0x4ff528[_0x3bf170(0x234)]});else{if(_0x2365e2[0xa]){const _0x4e80d8=_0x2365e2[0xa]['match'](/\[\/(\d+)\]/)[0x1],_0x467bff=emojiMap[_0x4e80d8];_0x467bff?_0x2eaa8f[_0x3bf170(0x2f6)]({'type':_0x4ff528[_0x3bf170(0x2a4)],'src':_0x3bf170(0x2db)+_0x467bff}):_0x2eaa8f[_0x3bf170(0x2f6)]({'text':_0x2365e2[0xa],'color':_0x4ff528['EsMfF']});}else{if(_0x2365e2[0xb]&&_0x2365e2[0xc])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':'$'+_0x2365e2[0xb],'gameId':_0x2365e2[0xc],'type':_0x4ff528['VtcQF'],'color':_0x4ff528[_0x3bf170(0x234)]});else{if(_0x2365e2[0xd]&&_0x2365e2[0xe])_0x2eaa8f['push']({'text':'?'+_0x2365e2[0xd],'guideName':_0x2365e2[0xd],'guideGameId':_0x2365e2[0xe],'type':_0x3bf170(0x231),'color':_0x4ff528['FwLXX']});else{if(_0x4ff528[_0x3bf170(0x207)](_0x2365e2[0x0],_0x4ff528[_0x3bf170(0x25d)]))_0x2eaa8f[_0x3bf170(0x2f6)]({'text':'','bold':!![]});else{if(_0x2365e2[0x0]===_0x3bf170(0x205))_0x2eaa8f[_0x3bf170(0x2f6)]({'text':'','bold':![]});else{if(_0x2365e2[0x0]===_0x4ff528[_0x3bf170(0x2cc)])_0x2eaa8f[_0x3bf170(0x2f6)]({'text':_0x4ff528[_0x3bf170(0x2e3)],'type':_0x4ff528[_0x3bf170(0x265)]});else _0x4ff528[_0x3bf170(0x207)](_0x2365e2[0x0],_0x4ff528['FnXud'])&&_0x2eaa8f[_0x3bf170(0x2f6)]({'text':_0x4ff528[_0x3bf170(0x285)],'type':_0x4ff528[_0x3bf170(0x230)]});}}}}}}}}}}}}_0xaadc97=_0x9abd9f[_0x3bf170(0x2cf)];}if(_0x4ff528['IrNin'](_0xaadc97,_0x561510[_0x3bf170(0x29b)])){const _0x52b08a=_0x561510[_0x3bf170(0x267)](_0xaadc97);this[_0x3bf170(0x2cb)](_0x2eaa8f,_0x52b08a);}return _0x2eaa8f;},'showFull'(){const _0x1546d6=_0x4b55d1;this[_0x1546d6(0x241)]({'showFull':!![],'needShowReadMore':![],'_stopCheckMore':!![]});},'onMoreTap'(){const _0x54b7b1=_0x4b55d1,_0x472492={'UwMrB':_0x54b7b1(0x281)};this[_0x54b7b1(0x237)](_0x472492['UwMrB']);if(!checkLogin())return;this['triggerEvent']('moreTap',{'item':this[_0x54b7b1(0x22f)]['item']});},'onPinTap'(){const _0x5eb057=_0x4b55d1,_0xbd9d56={'jsNAF':function(_0xcd6e85,_0x4db763){return _0xcd6e85!==_0x4db763;},'sLEjK':function(_0x4d352d,_0x22c36f){return _0x4d352d!==_0x22c36f;},'OWggw':function(_0x52f623,_0x5bab39){return _0x52f623>_0x5bab39;},'KuZLy':function(_0x3b2f23,_0x42be6e){return _0x3b2f23===_0x42be6e;},'dzJOJ':'置顶成功','VHfQf':'取消置顶成功','USAZs':'success','RByeu':function(_0x1505da,_0x58f0c1){return _0x1505da===_0x58f0c1;},'oVPuy':function(_0x3805e0,_0x5798ca){return _0x3805e0===_0x5798ca;},'soGuW':function(_0x19bd48){return _0x19bd48();},'pbPAg':function(_0x44c947,_0x167936){return _0x44c947-_0x167936;},'XYhVW':'pages/user/user','XSXvL':function(_0x42725b,_0x1d732b){return _0x42725b===_0x1d732b;},'fLocS':_0x5eb057(0x298),'mNJIf':'操作失败','tPlUA':_0x5eb057(0x1f3),'yoZht':function(_0x2394c5,_0x94003b,_0x9e9784){return _0x2394c5(_0x94003b,_0x9e9784);}},_0x4e7b3e=this[_0x5eb057(0x22f)][_0x5eb057(0x24e)]['post'],_0x156b03=this['data']['isPinned']?0x2:0x1;wx[_0x5eb057(0x252)]({'title':'处理中...'}),_0xbd9d56[_0x5eb057(0x1e6)](setUserPostTop,_0x4e7b3e['id'],_0x156b03)[_0x5eb057(0x232)](_0x4fe99f=>{const _0x51a171=_0x5eb057;wx[_0x51a171(0x275)]();if(_0x4fe99f[_0x51a171(0x2be)]===0x0){wx['showToast']({'title':_0xbd9d56[_0x51a171(0x1fa)](_0x156b03,0x1)?_0xbd9d56[_0x51a171(0x2ef)]:_0xbd9d56[_0x51a171(0x278)],'icon':_0xbd9d56[_0x51a171(0x2f4)]}),this[_0x51a171(0x241)]({'item.post.is_user_top':_0xbd9d56[_0x51a171(0x291)](_0x156b03,0x1)?0x1:0x0,'isPinned':_0xbd9d56[_0x51a171(0x291)](_0x156b03,0x1)?0x1:0x0}),this[_0x51a171(0x2b4)]();if(_0xbd9d56['oVPuy'](_0x156b03,0x1)){const _0x5d25f3=_0xbd9d56['soGuW'](getCurrentPages),_0x5e1f03=_0x5d25f3[_0xbd9d56[_0x51a171(0x276)](_0x5d25f3[_0x51a171(0x29b)],0x1)];if(_0x5e1f03[_0x51a171(0x2d7)]===_0xbd9d56[_0x51a171(0x2e5)]){let _0x4778b7=_0x5e1f03[_0x51a171(0x22f)][_0x51a171(0x202)];if(Array['isArray'](_0x4778b7)){_0x4778b7=_0x4778b7[_0x51a171(0x2c8)](_0x550c20=>{const _0x1196f8=_0x51a171;return _0xbd9d56['jsNAF'](_0x550c20[_0x1196f8(0x228)]['id'],_0x4e7b3e['id'])&&_0x550c20[_0x1196f8(0x228)]['is_user_top']===0x1&&(_0x550c20[_0x1196f8(0x228)][_0x1196f8(0x2a2)]=0x0),_0x550c20;});const _0x3692fa=_0x4778b7['findIndex'](_0x1ecfdc=>_0x1ecfdc[_0x51a171(0x228)]['id']===_0x4e7b3e['id']);if(_0x3692fa>-0x1){const [_0xcc5836]=_0x4778b7[_0x51a171(0x1fd)](_0x3692fa,0x1);_0xcc5836[_0x51a171(0x228)][_0x51a171(0x2a2)]=0x1,_0x4778b7[_0x51a171(0x27d)](_0xcc5836);}_0x5e1f03[_0x51a171(0x241)]({'posts':_0x4778b7}),wx[_0x51a171(0x219)]({'scrollTop':0x0,'duration':0x12c});}else{if(_0x4778b7&&_0xbd9d56[_0x51a171(0x22d)](typeof _0x4778b7,_0xbd9d56[_0x51a171(0x221)])){const _0x308a06={};Object[_0x51a171(0x25e)](_0x4778b7)[_0x51a171(0x2f2)](_0x4b1598=>{const _0x2fcffa=_0x51a171,_0x2e872e={'bTqHq':function(_0x312d24,_0x13aca4){const _0x1e9ac0=_0xcb8d;return _0xbd9d56[_0x1e9ac0(0x203)](_0x312d24,_0x13aca4);},'RJTJu':function(_0x2960c6,_0x576828){return _0x2960c6===_0x576828;}};if(Array[_0x2fcffa(0x233)](_0x4778b7[_0x4b1598])){let _0x21005f=_0x4778b7[_0x4b1598][_0x2fcffa(0x2c8)](_0x5a462a=>{const _0x87d54e=_0x2fcffa;return _0x2e872e['bTqHq'](_0x5a462a['post']['id'],_0x4e7b3e['id'])&&_0x2e872e[_0x87d54e(0x2cd)](_0x5a462a['post'][_0x87d54e(0x2a2)],0x1)&&(_0x5a462a['post'][_0x87d54e(0x2a2)]=0x0),_0x5a462a;});const _0x54a30d=_0x21005f[_0x2fcffa(0x249)](_0x58fa06=>_0x58fa06[_0x2fcffa(0x228)]['id']===_0x4e7b3e['id']);if(_0xbd9d56[_0x2fcffa(0x1ee)](_0x54a30d,-0x1)){const [_0x4a58af]=_0x21005f[_0x2fcffa(0x1fd)](_0x54a30d,0x1);_0x4a58af[_0x2fcffa(0x228)][_0x2fcffa(0x2a2)]=0x1,_0x21005f[_0x2fcffa(0x27d)](_0x4a58af);}_0x308a06[_0x4b1598]=_0x21005f;}else _0x308a06[_0x4b1598]=_0x4778b7[_0x4b1598];}),_0x5e1f03[_0x51a171(0x241)]({'posts':_0x308a06}),wx[_0x51a171(0x219)]({'scrollTop':0x0,'duration':0x12c});}}}}}else wx[_0x51a171(0x29a)]({'title':_0x4fe99f[_0x51a171(0x2ae)]||_0xbd9d56[_0x51a171(0x2d0)],'icon':_0xbd9d56[_0x51a171(0x300)]});});},'onCloseSheet'(){const _0xad87e3=_0x4b55d1;this[_0xad87e3(0x241)]({'showSheet':![]});},'onDelete'(){const _0x4c1c11=_0x4b55d1,_0x3f8920={'SUflQ':_0x4c1c11(0x2fc),'CORAR':function(_0x2e9c83){return _0x2e9c83();},'kSVJg':function(_0x95d9a8,_0x59ecf3){return _0x95d9a8-_0x59ecf3;},'sIPpR':function(_0x478d3e,_0x17fb0e){return _0x478d3e===_0x17fb0e;},'ULHVa':_0x4c1c11(0x298),'quNTp':_0x4c1c11(0x27a),'mQNnd':'error','pmazL':function(_0x4e4bc7,_0x38b069){return _0x4e4bc7(_0x38b069);}},_0xf09d5c=this[_0x4c1c11(0x22f)][_0x4c1c11(0x24e)][_0x4c1c11(0x228)]['id'];_0x3f8920[_0x4c1c11(0x239)](deleteContent,_0xf09d5c)[_0x4c1c11(0x232)](_0x23fd47=>{const _0x484c5f=_0x4c1c11;if(_0x23fd47[_0x484c5f(0x2be)]===0x0){wx[_0x484c5f(0x29a)]({'title':_0x3f8920[_0x484c5f(0x243)],'icon':_0x484c5f(0x26b)});const _0xfa43d8=_0x3f8920[_0x484c5f(0x2b0)](getCurrentPages),_0x19bc9d=_0xfa43d8[_0x3f8920['kSVJg'](_0xfa43d8[_0x484c5f(0x29b)],0x1)],_0x1cdc69=_0x19bc9d[_0x484c5f(0x22f)]['posts'];if(Array[_0x484c5f(0x233)](_0x1cdc69))_0x19bc9d[_0x484c5f(0x241)]({'posts':_0x1cdc69['filter'](_0x282b39=>_0x282b39[_0x484c5f(0x228)]['id']!==_0xf09d5c)});else{if(_0x1cdc69&&_0x3f8920[_0x484c5f(0x254)](typeof _0x1cdc69,_0x3f8920['ULHVa'])){const _0x516139={};Object[_0x484c5f(0x25e)](_0x1cdc69)[_0x484c5f(0x2f2)](_0x519d57=>{const _0x116bbe=_0x484c5f;Array[_0x116bbe(0x233)](_0x1cdc69[_0x519d57])?_0x516139[_0x519d57]=_0x1cdc69[_0x519d57]['filter'](_0x48f7cd=>_0x48f7cd[_0x116bbe(0x228)]['id']!==_0xf09d5c):_0x516139[_0x519d57]=_0x1cdc69[_0x519d57];}),_0x19bc9d['setData']({'posts':_0x516139});}}this[_0x484c5f(0x237)](_0x484c5f(0x225),{'post':this[_0x484c5f(0x22f)][_0x484c5f(0x24e)][_0x484c5f(0x228)]}),this[_0x484c5f(0x2b4)]();}else wx['showToast']({'title':_0x23fd47[_0x484c5f(0x2ae)]||_0x3f8920['quNTp'],'icon':_0x3f8920[_0x484c5f(0x280)]});});},'onReport'(){const _0x8b4739=_0x4b55d1,_0xdbf333={'DJAqf':_0x8b4739(0x281),'yzbPl':_0x8b4739(0x294)};this[_0x8b4739(0x237)](_0xdbf333[_0x8b4739(0x1f8)]),wx[_0x8b4739(0x213)]({'url':'../../pages/report-category/report-category?postId='+this[_0x8b4739(0x22f)][_0x8b4739(0x24e)][_0x8b4739(0x228)]['id']}),this[_0x8b4739(0x237)](_0xdbf333[_0x8b4739(0x286)],{'post':this['data'][_0x8b4739(0x24e)][_0x8b4739(0x228)]}),this[_0x8b4739(0x2b4)]();},'onFavorite'(){const _0x2d63ed=_0x4b55d1,_0x37bf95={'KdLbm':function(_0x39ab59,_0x5aff00){return _0x39ab59===_0x5aff00;},'KhTIu':_0x2d63ed(0x2b5),'ZTMsE':_0x2d63ed(0x224),'yCDeE':_0x2d63ed(0x26b),'JkjlB':_0x2d63ed(0x2eb),'PCMIU':'取消收藏失败','orPeF':_0x2d63ed(0x1f3),'NAyPd':function(_0x4b3b85,_0x46bd80,_0x3069f2){return _0x4b3b85(_0x46bd80,_0x3069f2);}},_0x1ad4fa=this[_0x2d63ed(0x22f)][_0x2d63ed(0x24e)]['post'],_0x2f0b52=_0x37bf95[_0x2d63ed(0x2df)](_0x1ad4fa[_0x2d63ed(0x255)],0x1)?0x2:0x1;_0x37bf95['NAyPd'](collectPost,_0x1ad4fa['id'],_0x2f0b52)[_0x2d63ed(0x232)](_0x67aa85=>{const _0x38bc9b=_0x2d63ed;_0x67aa85['code']===0x0?(wx['showToast']({'title':_0x37bf95[_0x38bc9b(0x2df)](_0x2f0b52,0x1)?_0x37bf95['KhTIu']:_0x37bf95['ZTMsE'],'icon':_0x37bf95[_0x38bc9b(0x29c)]}),this[_0x38bc9b(0x241)]({'item.post.is_collect':_0x37bf95[_0x38bc9b(0x2df)](_0x2f0b52,0x1)?0x1:0x0}),this['onCloseSheet']()):wx['showToast']({'title':_0x67aa85[_0x38bc9b(0x2ae)]||(_0x37bf95[_0x38bc9b(0x2df)](_0x2f0b52,0x1)?_0x37bf95[_0x38bc9b(0x22b)]:_0x37bf95['PCMIU']),'icon':_0x37bf95[_0x38bc9b(0x2e8)]});});},'onHotLike'(){const _0x3eeed9=_0x4b55d1,_0x3c0d22={'YuIIg':function(_0x22b413,_0x5f2d94){return _0x22b413!==_0x5f2d94;},'eDUla':_0x3eeed9(0x281),'JQCtN':function(_0xc011ec){return _0xc011ec();},'rkzZE':function(_0x3ea3d3,_0x3041af){return _0x3ea3d3===_0x3041af;},'yHkDU':function(_0x76b7bf,_0x5a5d8f){return _0x76b7bf-_0x5a5d8f;},'AwNxj':function(_0x153b6c,_0x5fca10){return _0x153b6c+_0x5fca10;}};this[_0x3eeed9(0x237)](_0x3c0d22[_0x3eeed9(0x266)]);if(!_0x3c0d22[_0x3eeed9(0x23b)](checkLogin))return;const _0x6aa6bb=this[_0x3eeed9(0x22f)][_0x3eeed9(0x24e)][_0x3eeed9(0x2a7)],_0x2075bc=_0x6aa6bb['comment'],_0xd5767c=_0x3c0d22[_0x3eeed9(0x21e)](_0x2075bc[_0x3eeed9(0x28f)],0x1),_0x33e1ab=_0xd5767c?0x0:0x1,_0x1eec23=_0xd5767c?_0x3c0d22['yHkDU'](_0x2075bc['like_count'],0x1):_0x3c0d22[_0x3eeed9(0x21d)](_0x2075bc[_0x3eeed9(0x277)],0x1);this[_0x3eeed9(0x241)]({'item.hot.comment.is_like':_0x33e1ab,'item.hot.comment.like_count':_0x1eec23}),likePost(_0x2075bc['id'],_0x3c0d22[_0x3eeed9(0x21e)](_0x33e1ab,0x1)?0x1:0x2)['then'](_0x60481c=>{const _0x3327ce=_0x3eeed9;_0x3c0d22[_0x3327ce(0x1fb)](_0x60481c[_0x3327ce(0x2be)],0x0)&&this['setData']({'item.hot.comment.is_like':_0xd5767c?0x1:0x0,'item.hot.comment.like_count':_0x2075bc[_0x3327ce(0x277)]});});},async 'onBannerVideoPlay'(_0x358550){const _0x34d30f=_0x4b55d1,_0x312a1b={'SIJmH':function(_0x3be6fc,_0x302e18){return _0x3be6fc===_0x302e18;},'lTAON':_0x34d30f(0x257),'FaYDu':'videoPlay','kNSoc':'视频加载失败','urkpe':_0x34d30f(0x23a)},_0x2aaddb=_0x358550[_0x34d30f(0x2d2)][_0x34d30f(0x229)]['id'],_0x1a4a78=_0x358550[_0x34d30f(0x2d2)][_0x34d30f(0x229)][_0x34d30f(0x2e4)],_0x3cc68b=_0x358550[_0x34d30f(0x2d2)][_0x34d30f(0x229)][_0x34d30f(0x2f8)],_0x402694=_0x312a1b['SIJmH'](_0x1a4a78,_0x34d30f(0x2ec));let _0x1cb3a9=_0x402694?_0x3cc68b:_0x2aaddb;try{const _0xe8fd09=await queryPostVideo(_0x1cb3a9);if(_0xe8fd09[_0x34d30f(0x2be)]===0x0&&_0xe8fd09[_0x34d30f(0x22f)]){let _0x1e7856=_0x402694?_0x312a1b['lTAON']:_0x34d30f(0x1e5);this[_0x34d30f(0x241)]({[_0x1e7856]:_0xe8fd09[_0x34d30f(0x22f)],'isCurrentPlaying':!![]},()=>{const _0x445f58=_0x34d30f;this[_0x445f58(0x261)]();}),this[_0x34d30f(0x237)](_0x312a1b['FaYDu'],{'id':_0x2aaddb});}else throw new Error(_0x34d30f(0x22e));}catch(_0x41c353){wx[_0x34d30f(0x29a)]({'title':_0x312a1b[_0x34d30f(0x2f9)],'icon':_0x312a1b['urkpe']});}finally{}},'setupVideoObserver'(){const _0x5b60f7=_0x4b55d1,_0x594b27={'bSthw':function(_0x1baab4,_0x227a6b){return _0x1baab4<=_0x227a6b;}},_0x4d4426=this[_0x5b60f7(0x22f)][_0x5b60f7(0x24e)][_0x5b60f7(0x228)]['id'],_0x266829=this[_0x5b60f7(0x263)]({'thresholds':[0.6]});_0x266829['relativeToViewport']({'top':0x0,'bottom':0x0})[_0x5b60f7(0x227)](_0x5b60f7(0x279)+_0x4d4426,_0x215843=>{const _0x208251=_0x5b60f7,_0x22a2c7=wx[_0x208251(0x289)]('bannerVideo-'+_0x4d4426,this);_0x594b27[_0x208251(0x23c)](_0x215843[_0x208251(0x2fa)],0.6)&&_0x22a2c7[_0x208251(0x27c)]();});},'handlePlayVideo'(){const _0x22cfe6=_0x4b55d1,_0x579a16={'gqEjp':_0x22cfe6(0x1ff)},_0x3702e7=this['data']['item'][_0x22cfe6(0x228)]['id'],_0x115dd2=wx[_0x22cfe6(0x289)](_0x22cfe6(0x27e)+_0x3702e7,this);this['triggerEvent'](_0x579a16[_0x22cfe6(0x206)],{'id':_0x3702e7}),_0x115dd2['play'](),this[_0x22cfe6(0x241)]({'isCurrentPlaying':!![]});},'onVideoPause'(_0x1b2790){const _0x1edc12=_0x4b55d1;this[_0x1edc12(0x241)]({'isCurrentPlaying':![]});},'pauseVideo'(){const _0x4d13be=_0x4b55d1,_0x4e05e4=wx[_0x4d13be(0x289)](_0x4d13be(0x27e)+this[_0x4d13be(0x22f)]['item'][_0x4d13be(0x228)]['id'],this);_0x4e05e4[_0x4d13be(0x27c)]();}}});
|