southnote-mini-sdk 1.0.20 → 1.0.22
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 +1 -14
- 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 _0x28c391=_0x1158;function _0x1158(_0x3574da,_0xa6e2e7){_0x3574da=_0x3574da-0x1a1;const _0x534f79=_0x534f();let _0x115800=_0x534f79[_0x3574da];if(_0x1158['KpIqJL']===undefined){var _0x1a09b4=function(_0x130019){const _0xfba814='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x37346a='',_0x95f967='';for(let _0x4499da=0x0,_0x4e8d05,_0x288fef,_0x55dcb4=0x0;_0x288fef=_0x130019['charAt'](_0x55dcb4++);~_0x288fef&&(_0x4e8d05=_0x4499da%0x4?_0x4e8d05*0x40+_0x288fef:_0x288fef,_0x4499da++%0x4)?_0x37346a+=String['fromCharCode'](0xff&_0x4e8d05>>(-0x2*_0x4499da&0x6)):0x0){_0x288fef=_0xfba814['indexOf'](_0x288fef);}for(let _0x4b9c61=0x0,_0x24f13f=_0x37346a['length'];_0x4b9c61<_0x24f13f;_0x4b9c61++){_0x95f967+='%'+('00'+_0x37346a['charCodeAt'](_0x4b9c61)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x95f967);};_0x1158['BkiMZs']=_0x1a09b4,_0x1158['VtafbQ']={},_0x1158['KpIqJL']=!![];}const _0x1ee1fd=_0x534f79[0x0],_0x59073c=_0x3574da+_0x1ee1fd,_0x34f2b3=_0x1158['VtafbQ'][_0x59073c];return!_0x34f2b3?(_0x115800=_0x1158['BkiMZs'](_0x115800),_0x1158['VtafbQ'][_0x59073c]=_0x115800):_0x115800=_0x34f2b3,_0x115800;}(function(_0xf6260b,_0x3a9609){const _0x5358f6=_0x1158,_0x269007=_0xf6260b();while(!![]){try{const _0x4c62c6=-parseInt(_0x5358f6(0x292))/0x1*(-parseInt(_0x5358f6(0x1df))/0x2)+-parseInt(_0x5358f6(0x1f6))/0x3+-parseInt(_0x5358f6(0x23c))/0x4*(-parseInt(_0x5358f6(0x286))/0x5)+-parseInt(_0x5358f6(0x1e0))/0x6+-parseInt(_0x5358f6(0x210))/0x7*(-parseInt(_0x5358f6(0x1a2))/0x8)+parseInt(_0x5358f6(0x21b))/0x9*(-parseInt(_0x5358f6(0x1f8))/0xa)+parseInt(_0x5358f6(0x1d9))/0xb*(parseInt(_0x5358f6(0x248))/0xc);if(_0x4c62c6===_0x3a9609)break;else _0x269007['push'](_0x269007['shift']());}catch(_0x324efa){_0x269007['push'](_0x269007['shift']());}}}(_0x534f,0x72dbf));export const emojiMap={0x1:_0x28c391(0x283),0x2:_0x28c391(0x1ca),0x3:_0x28c391(0x263),0x4:_0x28c391(0x228),0x5:_0x28c391(0x1fa),0x6:_0x28c391(0x26b),0x7:_0x28c391(0x2a2),0x8:_0x28c391(0x2a8),0x9:_0x28c391(0x1fd),0xa:_0x28c391(0x1d7),0xb:_0x28c391(0x256),0xc:_0x28c391(0x26f),0xd:'smile013.png',0xe:'smile014.png',0xf:'smile015.png',0x10:_0x28c391(0x1ec),0x11:'smile017.png',0x12:'smile018.png',0x13:_0x28c391(0x298),0x14:'smile020.png',0x15:'smile021.png',0x16:_0x28c391(0x2ba),0x17:_0x28c391(0x1cd),0x18:_0x28c391(0x203),0x19:_0x28c391(0x229),0x1a:_0x28c391(0x224),0x1b:_0x28c391(0x1d6),0x1c:_0x28c391(0x22a),0x1d:_0x28c391(0x206),0x1e:_0x28c391(0x27b),0x1f:_0x28c391(0x26c),0x20:_0x28c391(0x299),0x21:'smile033.png',0x22:_0x28c391(0x23a),0x23:_0x28c391(0x21c),0x24:_0x28c391(0x208),0x25:'smile037.png',0x26:'smile038.png',0x27:_0x28c391(0x1e5),0x28:_0x28c391(0x24b),0x29:_0x28c391(0x1fc),0x2a:'smile042.png',0x2b:_0x28c391(0x219),0x2c:_0x28c391(0x21e),0x2d:_0x28c391(0x253),0x2e:_0x28c391(0x1b2),0x2f:_0x28c391(0x1eb),0x30:_0x28c391(0x234),0x31:'smile049.png',0x32:_0x28c391(0x1cf),0x33:_0x28c391(0x2a1),0x34:_0x28c391(0x2c0)};import{followUser,likePost,deleteContent,collectPost,setUserPostTop,queryPostVideo}from'../../services/home';import{checkLogin}from'../../utils/auth';function _0x534f(){const _0x22fcce=['C21PBguWndmUCg5N','zNfpCMu','oxfYqxzKCG','C21PBguWmZuUCg5N','EMXKBLO','C21PBguWndqUCg5N','zvD0Aeq','EhHrr3C','Bwjps24','BxnN','Bw9YzvrHCa','C21PBguWmJyUCg5N','shfjDg0','zgf0yq','5PEG6kEg6Akr5zYW5z2a','C21PBguWmdqUCg5N','C21PBguWmJuUCg5N','C21PBguWmJGUCg5N','s09KqLa','C2HHCMvKAwq','BgvUz3rO','pgzVBNqGyM9Szd1MywXZzt4','ChvZAa','Aw1Hz2vZ','CgfYC2vdB250zw50','AvjxB2u','4Ocu4Ocu4Ocu4Ocu','C21PBguWndGUCg5N','vMf0Dgi','t21lCMO','AvvzExi','C3bSAxq','EKviCwy','C21PBguWmZqUCg5N','zMzws0C','nJCZmtjZvNvKy08','DKnwvue','rfzor0y','DMLLD19PBwC','Aw1Hz2vbCNjHEq','tur3wNq','vKDUDeW','DgL0Bgu','pgzVBNqGyM9Szd10CNvLpG','vK9dtey','y3jLyxrLsw50zxjZzwn0Aw9Ut2jZzxj2zxi','ChDxq0i','odrkENvNENO','zxjYB3i','jMLZq29TBwvUDeLUpxrYDwu','C21PBguWndaUCg5N','BgLRzv9JB3vUDa','DhjPz2DLCKv2zw50','s2DzDNK','lI4VlI4VCgfNzxmVDg9WAwmVDg9WAwm/Dg9WAwnFBMfTzt0','z0zRtee','AxrLBs5WB3n0lNzPzgvVvxjS','Ag90','C21PBguWnduUCg5N','svzJC1e','lI4VlI4VCgfNzxmVCMvWB3j0lwnHDgvNB3j5l3jLCg9YDc1JyxrLz29YEt9WB3n0swq9','C21PBguWmteUCg5N','CMvWB3j0','DgfYz2v0','ze5Nz2q','zMXVB3i','A1j3Ahi','r2XzqKq','zMvHDhvYzq','Bg90DgvYEq','5yIG6zMK5BIw5A2q','BMPpuLO','lI4VlI4VCgfNzxmVD2LRAs93AwTPp2DHBwvFAwq9','y0LzuhO','C21PBguWmdmUCg5N','yvrZu2K','w+AFPEECI+wBVUEjH10','se1Kz00','zwfZzs1PBI1VDxq','y29TBwvUDgvK','z2v0v2LUzg93sw5MBW','zw1VAMK','C21PBguWmdyUCg5N','C21PBguWmZeUCg5N','Dg9WAwm','t0DkCLi','C21PBguWmtiUCg5N','B2jQzwn0','ugXOyxO','5y+w5RAi5Ps26jEp5AsX6lsL','ueTYsMm','yK51AgW','wePmy0y','zxHLyW','B25dBg9ZzvnOzwv0','u0T3zKO','i3bVC3rdB250zw50','u2Pvy2C','C21PBguWmZaUCg5N','qxDwqNm','iowBNUwKJsa','CMvWBhLFBMLJA25HBwu','iZqWnMnLmW','C3vJy2vZCW','t0zUB04','AxrLBq','C21PBguWmdeUCg5N','qwfju3i','uwvZB3u','mJi1Ce12DKnf','zw5Kx3rPBwu','A2v5CW','Cgf1C2vbBgXwAwrLBW','thb0uLa','yLvOugG','zgvSzxrLug9ZDa','z2fTzq','CNb4vg9qEa','DNnItKm','AMfWCMO','q2LdA1C','mw56wfjVuq','AefZDKK','yMfUBMvYvMLKzw8T','wLjWq1e','Dg9zBfG','5yIG6zMK5AsX6lsL','C21PBguWmtKUCg5N','C21PBguWmZiUCg5N','AxnFDxnLCL90B3a','qKnItw8','y29UDgvUDa','C2HVD1rVyxn0','AxnFBgLRzq','zMf2B3jPDgu','BgLUzq','C21PBguWnteUCg5N','C21PBguWmdCUCg5N','lI4VlI4VCgfNzxmVD2vIDMLLDY93zwj2Awv3p3vYBd0','zM9YrwfJAa','zgv0ywLS','5y+w5RAi5Ps26jEp','ChjLDMLLD0LTywDL','C21PBguWmdGUCg5N','iZmZmW','CM91Dgu','CMvWB3j0ug9ZDa','CgfNzxmVAg9Tzs9OB21L','wNr3ww8','5Ase55cg5lITlI4U','rg1vqwm','vwv1wKW','5yIG6zMK5OIq5yQF','tgHbC1q','lI4VlI4VCgfNzxmVz2fTzs9Nyw1Lp2LKpq','DM1gz2W','ChvZAfDPDgHmAw5LqNjLywS','D0vNt2u','iZK5oq','C3jJ','phnPz25FBgLUzt4','C21PBguWmJiUCg5N','y3jLyxrLu2vSzwn0B3jrDwvYEq','r3v3qw8','AgLKzuXVywrPBMC','BgXnB08','i2vLmgeYna','C21PBguWntiUCg5N','tvvwExO','uNbOsLG','BM93','y2HLy2TozwvKu2HVD1jLywrnB3jL','AefqtMq','tu1Pzwm','DNDKvgW','mte3ntjcEfHjAxy','reXVEKS','v1Dbte0','DMLKzw9qBgf5','B05JCum','vufMAMC','C2v0rgf0yq','pgzLyxr1CMvFyMXVzZ4','AgXUChy','DePwu2K','ueHcAxi','zMLSDgvY','C3bSAwnL','BvLkAgG','ENLzrLi','5Ps26jEp5AsX6lsL','C21PBguWndyUCg5N','BM9Uzq','C2vSzwn0','Aw50zxjZzwn0Aw9UuMf0Aw8','C3b0yuq','tvH1zgy','BxnoD24','AxnqAw5Uzwq','y2HLy2Tby3rPDML0Evn0yxr1CW','lI4VlI4VyxnZzxrZl2LTywDLCY9LBw9QAs8','Ee5Mqwq','uhbQy08','BMLJA25HBwu','DgHLBG','t2rlruO','y3vYCMvUDfrHCMDLDa','zxHWB3j0','DMLKzw8','C3rHDhvZ','BxLtAgfYzvrHCa','rKnKEKS','rgXUtKO','B2jZzxj2zq','BwfW','C21PBguWmdiUCg5N','zMLUzeLUzgv4','v2Tbu0W','C21PBguWmJmUCg5N','Bg9JywXFAw1N','C21PBguWntaUCg5N','w+wkOoEYVL0','AuPrCKK','iZaWma','ANvTCf91CMW','whr4Bw4','ufbcBNi','C21PBguWmJCUCg5N','C21PBguWmtaUCg5N','thfevwy','mtqYmtu0mu1jzvnnwq','Aw5KzxG','lI4VlI4VCgfNzxmVCg9ZDc9WB3n0p2LKpq','AxnbCNjHEq','D2LUzg93v2LKDgG','z2fMB2O','ndy3mJqWwvvTD2Th','mZm0mJC2ofPhvffwvG','y09Kwwe','y3jLyxrLqw5PBwf0Aw9U','CgfNzvnJCM9SBfrV','C3rLCa','C21PBguWmZKUCg5N','BufnuKK','Cg9ZDa','EuHWsuK','uLfhC1C','Dw5ZAgLMDa','C21PBguWndCUCg5N','C21PBguWmtyUCg5N','DhLWzq','wLHVuuC','Cg9ZDhm','DxnLCG','DxnLCMLK','zgvSzxrLza','jM5HBwu9','Ehnltuu','BMf2AwDHDgvuBW','mtK4odmYohHUvKLLuW','u25wwMq','mJC3mteXmgHYsvPZqq','AgvPz2H0','C21PBguWmduUCg5N','u3Pht3q','C21PBguWndeUCg5N','C21PBguWmdKUCg5N','y29TBwvUDa','C2XPy2u','y29Kzq','txHlt2u','C2HHCMvK','C21PBguWmJqUCg5N','z0rlAhG','shfTtwK','C21PBguWmJKUCg5N','CMvSyxrPDMvuB1zPzxDWB3j0','C21PBguWmZyUCg5N','Bwf0y2G','r3vJuMO','w+woN+AwH+w3SUIIQ+wiOoMzPf0','C2nHBgu','w+wBVUEjH10','zM9SBg93q2HHBMDLza','Cgf1C2u','mZqZv0L4s0XV','zgf0yxnLDa','DM90zq','zLzmB3q','B3zjCxa','v0HMALu','v1PdteS','y2XPy2TFAw1N','y3jLyxrLvMLKzw9dB250zxH0'];_0x534f=function(){return _0x22fcce;};return _0x534f();}Component({'properties':{'item':Object,'itemType':{'type':String,'value':''}},'data':{'isOwner':![],'contentParts':[],'sharedContentParts':[],'commentedContentParts':[],'showFull':!![],'needShowReadMore':![],'isLongImage':![],'isSuperLongImage':![],'isHorizonImage':![],'showSheet':![],'sheetActions':[{'name':_0x28c391(0x25f),'color':_0x28c391(0x2bf),'action':'delete'},{'name':'举报','action':_0x28c391(0x257)},{'name':'收藏','action':_0x28c391(0x29f)}],'showPinButton':![],'isPinned':0x0,'hotContentParts':[],'isCurrentPlaying':![],'isVoteEnded':![],'isLotteryEnded':![]},'observers':{'item.post.vote.end_time,\x20item.post.lottery.end_time':function(){const _0x9e3dc5=_0x28c391;this[_0x9e3dc5(0x1ba)](![]);},'item.shared.post.vote.end_time,\x20item.shared.post.lottery.end_time':function(){this['checkActivityStatus'](!![]);},'item.user.id':function(_0x2d566f){const _0x500d11=_0x28c391,_0x24e112={'MpvDz':'appuid','Gtqbi':function(_0xf05231,_0x134737){return _0xf05231&&_0x134737;},'mfmWp':function(_0x354952,_0x277806){return _0x354952===_0x277806;},'HMdgM':function(_0x3f645b,_0x5236e0){return _0x3f645b(_0x5236e0);}},_0x2400e=wx['getStorageSync'](_0x24e112['MpvDz']);this['setData']({'isOwner':_0x24e112['Gtqbi'](_0x2400e,_0x2d566f)&&_0x24e112['mfmWp'](_0x24e112[_0x500d11(0x266)](Number,_0x2400e),_0x24e112[_0x500d11(0x266)](Number,_0x2d566f))});},'item.hot.comment.content':function(_0x22debc){const _0x3a5734=_0x28c391;if(!_0x22debc)return;const _0x1016cb=this[_0x3a5734(0x231)](_0x22debc);this[_0x3a5734(0x1a8)]({'hotContentParts':_0x1016cb});},'item.post.content':function(_0x59572f){const _0x4e8c0a=_0x28c391,_0x1b3d09={'HqmMi':_0x4e8c0a(0x265),'BCbMo':_0x4e8c0a(0x243),'VGntL':_0x4e8c0a(0x212)};if(_0x59572f){const _0x3ffaab=this[_0x4e8c0a(0x231)](_0x59572f);this[_0x4e8c0a(0x226)][_0x4e8c0a(0x282)]['shared']&&this[_0x4e8c0a(0x226)][_0x4e8c0a(0x282)][_0x4e8c0a(0x1e7)][_0x4e8c0a(0x240)]?.['length']&&this[_0x4e8c0a(0x226)]['item'][_0x4e8c0a(0x1e7)][_0x4e8c0a(0x240)]['forEach']((_0x556bfb,_0x50391c)=>{const _0x3b3149=_0x4e8c0a;_0x3ffaab[_0x3b3149(0x22f)]({'text':_0x1b3d09[_0x3b3149(0x205)],'type':_0x3b3149(0x23f),'src':_0x556bfb,'index':_0x50391c,'from':_0x3b3149(0x1e7),'color':_0x3b3149(0x27f)});});if(this[_0x4e8c0a(0x226)][_0x4e8c0a(0x282)][_0x4e8c0a(0x1e7)][_0x4e8c0a(0x243)]){_0x3ffaab[_0x4e8c0a(0x1ea)]({'text':this[_0x4e8c0a(0x226)][_0x4e8c0a(0x282)][_0x4e8c0a(0x1e7)][_0x4e8c0a(0x243)],'color':_0x4e8c0a(0x1d2),'type':_0x1b3d09[_0x4e8c0a(0x29b)]});this[_0x4e8c0a(0x226)]['item'][_0x4e8c0a(0x1e7)][_0x4e8c0a(0x212)]&&_0x3ffaab[_0x4e8c0a(0x22f)]({'type':_0x1b3d09[_0x4e8c0a(0x242)],'voteData':this[_0x4e8c0a(0x226)][_0x4e8c0a(0x282)][_0x4e8c0a(0x1e7)][_0x4e8c0a(0x212)]});;_0x3ffaab[_0x4e8c0a(0x1ae)](0x1,0x0,{'type':'br'});}this[_0x4e8c0a(0x1a8)]({'contentParts':_0x3ffaab},()=>{const _0x1fdfae=_0x4e8c0a;this[_0x1fdfae(0x2c4)]();});}},'item.shared.post.content':function(_0x537d0e){const _0x54bc2f=_0x28c391;if(_0x537d0e){const _0x43b6a8=this[_0x54bc2f(0x231)](_0x537d0e);this[_0x54bc2f(0x1a8)]({'sharedContentParts':_0x43b6a8});}},'item.commented':function(_0xbbcbba){const _0x278a18=_0x28c391,_0x45bc73={'MMiec':'[查看图片]','gDKhx':_0x278a18(0x27f),'MUVyz':function(_0x4b1a92,_0x30203f){return _0x4b1a92>_0x30203f;},'LptRP':'#333','cIYPz':function(_0x4c544b,_0x1eda0d){return _0x4c544b!==_0x1eda0d;},'KOdBP':function(_0x2d7b6e,_0x5be1b5){return _0x2d7b6e===_0x5be1b5;},'DlnNJ':_0x278a18(0x20b),'mbOKn':_0x278a18(0x2b7),'SjUcg':_0x278a18(0x1f2)};if(Array[_0x278a18(0x1dc)](_0xbbcbba)&&_0x45bc73[_0x278a18(0x2c1)](_0xbbcbba['length'],0x0)){const _0x5b142b=_0xbbcbba[0x0],_0x174be8=[];_0x5b142b[_0x278a18(0x1f0)]?.[_0x278a18(0x1be)]&&_0x174be8[_0x278a18(0x22f)]({'text':'@'+_0x5b142b[_0x278a18(0x1f0)][_0x278a18(0x1be)],'color':_0x45bc73[_0x278a18(0x204)],'type':'at','userId':_0x5b142b[_0x278a18(0x1f0)]['id']});_0x5b142b['post']?.[_0x278a18(0x27e)]&&(_0x174be8['push']({'text':_0x278a18(0x27d),'color':_0x45bc73[_0x278a18(0x28a)]}),_0x174be8[_0x278a18(0x22f)]({'text':'@'+_0x5b142b[_0x278a18(0x1e7)][_0x278a18(0x27e)],'color':_0x45bc73['gDKhx']}));_0x45bc73[_0x278a18(0x262)](_0x5b142b[_0x278a18(0x1e7)]?.[_0x278a18(0x1c4)],0x3)&&_0x174be8['push']({'text':':\x20','color':_0x45bc73[_0x278a18(0x28a)]});_0x5b142b[_0x278a18(0x1e7)]?.['content']&&_0x174be8[_0x278a18(0x22f)](...this['parseContent'](_0x5b142b[_0x278a18(0x1e7)][_0x278a18(0x29c)]));_0x45bc73[_0x278a18(0x22b)](_0x5b142b[_0x278a18(0x1e7)]?.['status'],0x3)&&_0x174be8[_0x278a18(0x22f)]({'text':_0x45bc73[_0x278a18(0x1c7)],'color':_0x45bc73[_0x278a18(0x221)],'type':_0x45bc73[_0x278a18(0x27a)]});if(_0x5b142b['post']?.['images']){const _0x4d0cae=_0x5b142b[_0x278a18(0x1e7)][_0x278a18(0x230)][_0x278a18(0x238)](',');_0x4d0cae['forEach']((_0x4aa09f,_0x929dc1)=>{const _0x649e04=_0x278a18;_0x174be8[_0x649e04(0x22f)]({'text':_0x45bc73[_0x649e04(0x2c6)],'type':'view_img','src':_0x4aa09f,'index':_0x929dc1,'from':_0x649e04(0x268),'color':_0x45bc73[_0x649e04(0x204)]});});}this['setData']({'commentedContentParts':_0x174be8});}}},'methods':{'checkActivityStatus'(_0xccc81e){const _0x6972e7=_0x28c391,_0x51b10c={'hAsvI':function(_0x2fbe8d,_0x45c013){return _0x2fbe8d/_0x45c013;},'Vattb':function(_0x1481f4,_0x219fdd){return _0x1481f4>=_0x219fdd;},'UAfjg':function(_0x40aa1c,_0x2483ed){return _0x40aa1c>=_0x2483ed;},'IVcsQ':function(_0x19a42f,_0x4c87f1){return _0x19a42f(_0x4c87f1);}},_0x1a0b45=_0xccc81e?this['data'][_0x6972e7(0x282)]?.[_0x6972e7(0x202)]?.[_0x6972e7(0x1e7)]:this['data']['item']?.[_0x6972e7(0x1e7)];if(!_0x1a0b45)return;const _0x247e74=Math[_0x6972e7(0x25a)](_0x51b10c[_0x6972e7(0x293)](Date[_0x6972e7(0x2c3)](),0x3e8));let _0x1fa927=![],_0x4bdcf2=![];_0x1a0b45[_0x6972e7(0x212)]&&_0x1a0b45[_0x6972e7(0x212)][_0x6972e7(0x287)]&&(_0x1fa927=_0x51b10c[_0x6972e7(0x235)](_0x247e74,Number(_0x1a0b45[_0x6972e7(0x212)][_0x6972e7(0x287)]))),_0x1a0b45['lottery']&&_0x1a0b45['lottery'][_0x6972e7(0x287)]&&(_0x4bdcf2=_0x51b10c[_0x6972e7(0x1a7)](_0x247e74,_0x51b10c[_0x6972e7(0x254)](Number,_0x1a0b45[_0x6972e7(0x25e)][_0x6972e7(0x287)]))),this[_0x6972e7(0x1a8)]({'isVoteEnded':_0x1fa927,'isLotteryEnded':_0x4bdcf2});},'onJumpUrlTap'(_0x412002){const _0x153051=_0x28c391,_0x2f541a={'AwVBs':_0x153051(0x289),'YhuSO':function(_0x555400,_0x130d69){return _0x555400(_0x130d69);}},_0x5d5791=_0x412002[_0x153051(0x1c1)][_0x153051(0x211)]['url'];if(!_0x5d5791)return;this['triggerEvent'](_0x2f541a[_0x153051(0x27c)]),wx[_0x153051(0x1f5)]({'url':_0x153051(0x2a3)+_0x2f541a['YhuSO'](encodeURIComponent,_0x5d5791)});},'onTopicTap'(_0x21732f){const _0x39cd92=_0x28c391,_0x5c5bb4={'YzwlJ':_0x39cd92(0x289)},_0x364a37=_0x21732f[_0x39cd92(0x1c1)][_0x39cd92(0x211)][_0x39cd92(0x26d)],_0x5d3284=_0x364a37['replace'](/#/g,'');this[_0x39cd92(0x24d)](_0x5c5bb4['YzwlJ']),wx['navigateTo']({'url':_0x39cd92(0x24f)+encodeURIComponent(_0x5d3284)});},'gotoWiki'(_0x29115a){const _0x118f07=_0x28c391,_0x308961=_0x29115a['currentTarget'][_0x118f07(0x211)]['id'],_0xe1b4e=_0x29115a[_0x118f07(0x1c1)][_0x118f07(0x211)]['name'];wx[_0x118f07(0x1f5)]({'url':_0x118f07(0x261)+_0x308961+_0x118f07(0x1f3)+encodeURIComponent(_0xe1b4e)});},'onUserTap'(_0x1a3d0d){const _0x9906ed=_0x28c391,_0x1f40f0=_0x1a3d0d['currentTarget'][_0x9906ed(0x211)][_0x9906ed(0x1f1)];if(!_0x1f40f0)return;this[_0x9906ed(0x24d)](_0x9906ed(0x289)),wx[_0x9906ed(0x1f5)]({'url':'../../pages/user/user?id='+_0x1f40f0});},'gotoGameCenter'(_0x2af46e){const _0x2afef0=_0x28c391,_0x234e23=_0x2af46e[_0x2afef0(0x1c1)]['dataset']['id'];this[_0x2afef0(0x24d)]('pauseAllVideo'),wx[_0x2afef0(0x1f5)]({'url':_0x2afef0(0x2b3)+_0x234e23});},'goDetail'(_0x17ed37){const _0x4e0506=_0x28c391,_0x3943e2={'zldnZ':_0x4e0506(0x289)};if(_0x17ed37[_0x4e0506(0x258)][_0x4e0506(0x211)]['video']==='1')return;const _0x232889=_0x17ed37['currentTarget'][_0x4e0506(0x211)]['id'];this['triggerEvent'](_0x3943e2[_0x4e0506(0x21d)]),wx[_0x4e0506(0x1f5)]({'url':'../../pages/post/post?id='+_0x232889});},'goUserDetail'(_0x4e3799){const _0x35d7a9=_0x28c391,_0x7f923d={'SzGOt':_0x35d7a9(0x289)},_0x3b0a11=_0x4e3799['currentTarget']['dataset']['id'];this[_0x35d7a9(0x24d)](_0x7f923d[_0x35d7a9(0x1fb)]),wx[_0x35d7a9(0x1f5)]({'url':'../../pages/user/user?id='+_0x3b0a11});},'goSharedDetail'(_0x19fb18){const _0x1ed69f=_0x28c391,_0xf38ff1={'OFnoN':function(_0x23bb91,_0x13c32d){return _0x23bb91===_0x13c32d;},'GuwAo':_0x1ed69f(0x289)};if(_0xf38ff1[_0x1ed69f(0x281)](_0x19fb18[_0x1ed69f(0x258)]['dataset'][_0x1ed69f(0x1c3)],'1'))return;const _0x313498=_0x19fb18[_0x1ed69f(0x1c1)][_0x1ed69f(0x211)]['id'];this[_0x1ed69f(0x24d)](_0xf38ff1[_0x1ed69f(0x2bc)]),wx[_0x1ed69f(0x1f5)]({'url':_0x1ed69f(0x1db)+_0x313498});},'onFollowTap'(_0x254b3e){const _0x55d30b=_0x28c391,_0x5561ba={'mYJhh':function(_0x375d3b,_0x2d3a5f){return _0x375d3b===_0x2d3a5f;},'qywSw':_0x55d30b(0x20e),'WkASL':function(_0xe97be6){return _0xe97be6();},'msNwn':function(_0x105066,_0xc1a272,_0x550ad9){return _0x105066(_0xc1a272,_0x550ad9);}};this[_0x55d30b(0x24d)](_0x55d30b(0x289));if(!_0x5561ba[_0x55d30b(0x1cc)](checkLogin))return;const _0x438ff0=_0x254b3e[_0x55d30b(0x1c1)][_0x55d30b(0x211)][_0x55d30b(0x1f0)],_0x424ed1=_0x438ff0['id'],_0x407753=_0x438ff0['is_fans']??0x0,_0x5ba165=_0x407753===0x1?0x2:0x1;_0x5561ba[_0x55d30b(0x1b8)](followUser,_0x424ed1,_0x5ba165)[_0x55d30b(0x1bf)](_0x533744=>{const _0x1d56e8=_0x55d30b;_0x5561ba[_0x1d56e8(0x1af)](_0x533744[_0x1d56e8(0x200)],0x0)&&this['triggerEvent'](_0x5561ba['qywSw'],{'userId':_0x424ed1,'isFans':_0x5561ba[_0x1d56e8(0x1af)](_0x5ba165,0x1)?0x1:0x0});});},'shareTap'(){const _0x1e6ee0=_0x28c391,_0x4ac8ad={'GucRj':_0x1e6ee0(0x289)};this[_0x1e6ee0(0x24d)](_0x4ac8ad[_0x1e6ee0(0x20a)]);if(!checkLogin())return;this[_0x1e6ee0(0x24d)](_0x1e6ee0(0x1c5),{'item':this[_0x1e6ee0(0x226)][_0x1e6ee0(0x282)]});},'commonTap'(){const _0x3fdebb=_0x28c391,_0x32320e={'MXudf':_0x3fdebb(0x289)};this[_0x3fdebb(0x24d)](_0x32320e[_0x3fdebb(0x1b7)]);if(!checkLogin())return;const _0x2719e6=this[_0x3fdebb(0x226)][_0x3fdebb(0x282)]['post']['id'];wx['navigateTo']({'url':_0x3fdebb(0x1db)+_0x2719e6+_0x3fdebb(0x24a)});},'likeTap'(_0x52ff62){const _0x37a667=_0x28c391,_0xff3fa0={'mAMRI':function(_0x544a35,_0x5db2d4){return _0x544a35===_0x5db2d4;},'DLozK':function(_0x1490c9,_0x156668){return _0x1490c9===_0x156668;},'vZEzO':_0x37a667(0x2ac),'hAPNd':function(_0x36f957,_0x2c842f){return _0x36f957!==_0x2c842f;},'xxQGw':function(_0xd6c8dc){return _0xd6c8dc();},'sdDaY':'pauseAllVideo','wEgOe':function(_0x498aa3){return _0x498aa3();},'zEHqf':function(_0x1cb68f,_0x39a5eb){return _0x1cb68f-_0x39a5eb;},'OdKEJ':function(_0x38a978,_0x1a4712){return _0x38a978+_0x1a4712;},'gafoj':function(_0x31b21b,_0xfbc298,_0x2f3949){return _0x31b21b(_0xfbc298,_0x2f3949);}};this[_0x37a667(0x24d)](_0xff3fa0['sdDaY']);if(!_0xff3fa0[_0x37a667(0x2b6)](checkLogin))return;const _0xa576f9=this[_0x37a667(0x226)][_0x37a667(0x282)][_0x37a667(0x1e7)],_0x13e259=_0xa576f9['is_like']===0x1,_0x4531a3=_0x13e259?0x0:0x1,_0x15840b=_0x13e259?_0xff3fa0[_0x37a667(0x239)](_0xa576f9[_0x37a667(0x24c)],0x1):_0xff3fa0[_0x37a667(0x1c0)](_0xa576f9['like_count'],0x1);this[_0x37a667(0x1a8)]({'item.post.is_like':_0x4531a3,'item.post.like_count':_0x15840b});const _0x4d1a32=wx[_0x37a667(0x1e2)]({'duration':0xc8,'timingFunction':_0x37a667(0x267)});_0x4d1a32[_0x37a667(0x20c)](1.5)['step'](),_0x4d1a32['scale'](0x1)[_0x37a667(0x1e4)](),this[_0x37a667(0x1a8)]({'likeAnimation':_0x4d1a32[_0x37a667(0x1c2)]()}),_0xff3fa0[_0x37a667(0x1de)](likePost,_0xa576f9['id'],_0xff3fa0[_0x37a667(0x1a3)](_0x4531a3,0x1)?0x1:0x2)[_0x37a667(0x1bf)](_0x39a267=>{const _0x5b029a=_0x37a667;if(_0xff3fa0[_0x5b029a(0x2c5)](_0x39a267[_0x5b029a(0x200)],0x0))this['setData']({'item.post.is_like':_0x13e259?0x1:0x0,'item.post.like_count':_0xa576f9[_0x5b029a(0x24c)]});else{const _0x5e1268=_0xff3fa0[_0x5b029a(0x220)](getCurrentPages);_0x5e1268[_0x5b029a(0x2a4)](_0x43727a=>{const _0x5e9076=_0x5b029a,_0x4b9b66={'jnaCu':function(_0x1ce126,_0x33bd03){const _0x3040a6=_0x1158;return _0xff3fa0[_0x3040a6(0x1e6)](_0x1ce126,_0x33bd03);}};if(_0xff3fa0['DLozK'](_0x43727a[_0x5e9076(0x2aa)],_0xff3fa0['vZEzO'])){const _0x481dd4=_0x43727a[_0x5e9076(0x226)]['posts'][_0x5e9076(0x1c9)](_0x100b79=>{const _0x110b30=_0x5e9076;return _0x4b9b66['jnaCu'](_0x100b79[_0x110b30(0x1e7)]['id'],_0xa576f9['id'])&&(_0x100b79[_0x110b30(0x1e7)][_0x110b30(0x29e)]=_0x4531a3,_0x100b79[_0x110b30(0x1e7)][_0x110b30(0x24c)]=_0x15840b),_0x100b79;});_0x43727a[_0x5e9076(0x1a8)]({'posts':_0x481dd4});}});}});},'onImageLoad'(_0x222ec8){const _0xb6e26a=_0x28c391,_0x50583e={'KgYvy':function(_0x38ce25,_0x351076){return _0x38ce25>_0x351076;},'SKwfJ':function(_0x211664,_0x377b5d){return _0x211664/_0x377b5d;},'DVNGF':function(_0x3b76bf,_0x2441fb){return _0x3b76bf<=_0x2441fb;},'tpYwK':function(_0x59ced2,_0x377507){return _0x59ced2/_0x377507;},'yHpII':function(_0x11726c,_0x364d11){return _0x11726c<_0x364d11;}},{width:_0x1b74dd,height:_0x152134}=_0x222ec8[_0xb6e26a(0x2a5)];if(_0x50583e[_0xb6e26a(0x24e)](_0x50583e[_0xb6e26a(0x278)](_0x152134,_0x1b74dd),0x3)&&_0x50583e[_0xb6e26a(0x23e)](_0x50583e['tpYwK'](_0x152134,_0x1b74dd),0x4))this[_0xb6e26a(0x1a8)]({'isLongImage':!![]});else{if(_0x50583e[_0xb6e26a(0x1e8)](_0x50583e[_0xb6e26a(0x278)](_0x152134,_0x1b74dd),0x1))this[_0xb6e26a(0x1a8)]({'isHorizonImage':!![]});else _0x50583e[_0xb6e26a(0x24e)](_0x50583e['SKwfJ'](_0x152134,_0x1b74dd),0x4)&&this[_0xb6e26a(0x1a8)]({'isSuperLongImage':!![]});}},'onPreviewImage'(_0x229049){const _0x53d7d9=_0x28c391,_0x1a31a5=_0x229049[_0x53d7d9(0x1c1)][_0x53d7d9(0x211)][_0x53d7d9(0x2b8)];wx[_0x53d7d9(0x2a7)]({'current':_0x1a31a5,'urls':[_0x1a31a5]});},'previewImageMultiple'(_0x213d42){const _0x274cb3=_0x28c391,_0x23a57f={'ffVKG':function(_0xb517cb,_0xadb3d2){return _0xb517cb===_0xadb3d2;},'CiCkW':_0x274cb3(0x202),'RQGsW':_0x274cb3(0x268)},{type:_0x2025a4,index:_0x117efb,from:_0x505c34}=_0x213d42[_0x274cb3(0x1c1)]['dataset'];let _0x94521c=[];if(_0x23a57f[_0x274cb3(0x23b)](_0x2025a4,_0x23a57f[_0x274cb3(0x291)]))_0x94521c=this['data'][_0x274cb3(0x282)][_0x274cb3(0x202)][_0x274cb3(0x1e7)][_0x274cb3(0x240)];else _0x23a57f[_0x274cb3(0x23b)](_0x2025a4,_0x23a57f[_0x274cb3(0x1e9)])?_0x94521c=this[_0x274cb3(0x226)]['item']['commented'][_0x274cb3(0x1e7)][_0x274cb3(0x240)]:_0x94521c=this[_0x274cb3(0x226)][_0x274cb3(0x282)]['post'][_0x274cb3(0x240)];wx[_0x274cb3(0x2a7)]({'current':_0x94521c[_0x117efb],'urls':_0x94521c});},'pushWithLineBreak'(_0x5d62b0,_0x32c5d5){const _0x4e142e=_0x28c391,_0x3d385f={'MxKOe':function(_0x416633,_0x340de4){return _0x416633===_0x340de4;},'BhufN':function(_0x3476d2,_0x4123c5){return _0x3476d2===_0x4123c5;},'vCVUA':'#333'},_0x43b488=_0x32c5d5[_0x4e142e(0x238)](/(\r\n|\n|\r)/);_0x43b488[_0x4e142e(0x2a4)](_0x23332a=>{const _0x32ef9f=_0x4e142e;if(_0x3d385f[_0x32ef9f(0x201)](_0x23332a,'\x0a')||_0x3d385f[_0x32ef9f(0x201)](_0x23332a,'\x0d')||_0x3d385f['BhufN'](_0x23332a,'\x0d\x0a'))_0x5d62b0[_0x32ef9f(0x22f)]({'type':'br'});else _0x23332a[_0x32ef9f(0x22d)]>0x0&&_0x5d62b0[_0x32ef9f(0x22f)]({'text':_0x23332a,'color':_0x3d385f[_0x32ef9f(0x23d)]});});},'checkNeedShowReadMore'(){const _0x2bcdd9=_0x28c391,_0x4c5c95={'xNfAd':function(_0x45693e,_0xd3f928){return _0x45693e>_0xd3f928;},'FCdzK':_0x2bcdd9(0x279)};this['setData']({'showFull':!![]},()=>{const _0x6ca142=_0x2bcdd9,_0x46fa45={'oNcqC':function(_0x24c2e6,_0x19ca17){const _0x2c8843=_0x1158;return _0x4c5c95[_0x2c8843(0x1bc)](_0x24c2e6,_0x19ca17);}},_0x331a67=this[_0x6ca142(0x2bb)]();_0x331a67[_0x6ca142(0x1b4)](_0x4c5c95[_0x6ca142(0x1c6)])['boundingClientRect'](_0x32f9e5=>{const _0x1e72bd=_0x6ca142;if(!_0x32f9e5)return;const _0x1b513f=this[_0x1e72bd(0x28e)](0x10e),_0x5b496f=_0x46fa45[_0x1e72bd(0x1a6)](_0x32f9e5[_0x1e72bd(0x1f9)],_0x1b513f);this['setData']({'needShowReadMore':_0x5b496f,'showFull':![]});})[_0x6ca142(0x276)]();});},'rpxToPx'(_0x378f1a){const _0x1a0e2b=_0x28c391,_0x4f2980={'iJQrI':function(_0x5cf619,_0x186c16){return _0x5cf619/_0x186c16;},'llMoO':function(_0x2d8d9f,_0x209305){return _0x2d8d9f*_0x209305;}};return _0x4f2980[_0x1a0e2b(0x1d1)](_0x4f2980[_0x1a0e2b(0x2be)](_0x378f1a,wx[_0x1a0e2b(0x269)]()[_0x1a0e2b(0x1dd)]),0x2ee);},'parseContent'(_0x37c133){const _0x2ef69d=_0x28c391,_0x5ef494={'lNXEJ':function(_0x15fec7,_0x504433){return _0x15fec7>_0x504433;},'MDwZt':_0x2ef69d(0x26d),'AaISr':'#406ce3','TkzLY':_0x2ef69d(0x20d),'kRwhr':'img','VOCLF':_0x2ef69d(0x217),'sptaD':_0x2ef69d(0x2b7),'iRWoe':_0x2ef69d(0x1ce),'WHfjU':_0x2ef69d(0x1d3),'vwdTl':_0x2ef69d(0x26a),'yUCRK':_0x2ef69d(0x2a9),'GlYBD':_0x2ef69d(0x28d),'eWthD':'guide','RLaWb':function(_0x4ee2d9,_0x34fd53){return _0x4ee2d9===_0x34fd53;},'ovIqp':_0x2ef69d(0x244),'Qesou':_0x2ef69d(0x22e),'fqOre':_0x2ef69d(0x2b9),'DmUAc':_0x2ef69d(0x233),'bUhPh':_0x2ef69d(0x2a0),'ltFmN':_0x2ef69d(0x1a9),'XJLcF':_0x2ef69d(0x1d0)},_0x3700e3=[],_0x4e67d9=/(#[^#]+#)|(\{@(.*?)\|(\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 _0x381ffb=0x0,_0x39877c;while((_0x39877c=_0x4e67d9[_0x2ef69d(0x276)](_0x37c133))!==null){if(_0x5ef494['lNXEJ'](_0x39877c[_0x2ef69d(0x1da)],_0x381ffb)){const _0x16df16=_0x37c133[_0x2ef69d(0x1ff)](_0x381ffb,_0x39877c[_0x2ef69d(0x1da)]);this[_0x2ef69d(0x2b5)](_0x3700e3,_0x16df16);}if(_0x39877c[0x1])_0x3700e3[_0x2ef69d(0x22f)]({'text':_0x39877c[0x1],'color':_0x2ef69d(0x27f),'type':_0x5ef494[_0x2ef69d(0x241)]});else{if(_0x39877c[0x2])_0x3700e3['push']({'text':'@'+_0x39877c[0x3],'color':_0x5ef494[_0x2ef69d(0x284)],'type':'at','userId':_0x39877c[0x4]});else{if(_0x39877c[0x5])_0x3700e3[_0x2ef69d(0x22f)]({'text':_0x5ef494['TkzLY'],'src':_0x39877c[0x5],'type':_0x5ef494[_0x2ef69d(0x25b)]});else{if(_0x39877c[0x6])_0x3700e3[_0x2ef69d(0x22f)]({'text':_0x39877c[0x6],'src':_0x39877c[0x6],'type':_0x5ef494[_0x2ef69d(0x245)]});else{if(_0x39877c[0x7])_0x3700e3[_0x2ef69d(0x22f)]({'text':_0x39877c[0x7],'color':_0x5ef494[_0x2ef69d(0x1b6)]});else{if(_0x39877c[0x8])_0x3700e3[_0x2ef69d(0x22f)]({'text':'','src':_0x39877c[0x8],'type':_0x5ef494[_0x2ef69d(0x232)]});else{if(_0x39877c[0x9])_0x3700e3[_0x2ef69d(0x22f)]({'text':'§网页链接','url':_0x39877c[0x9],'type':_0x5ef494[_0x2ef69d(0x215)],'color':_0x5ef494[_0x2ef69d(0x284)]});else{if(_0x39877c[0xa]){const _0x58af4e=_0x39877c[0xa][_0x2ef69d(0x209)](/\[\/(\d+)\]/)[0x1],_0x58df19=emojiMap[_0x58af4e];_0x58df19?_0x3700e3['push']({'type':_0x5ef494[_0x2ef69d(0x1a1)],'src':_0x2ef69d(0x1bb)+_0x58df19}):_0x3700e3[_0x2ef69d(0x22f)]({'text':_0x39877c[0xa],'color':_0x5ef494['yUCRK']});}else{if(_0x39877c[0xb]&&_0x39877c[0xc])_0x3700e3[_0x2ef69d(0x22f)]({'text':'$'+_0x39877c[0xb],'gameId':_0x39877c[0xc],'type':_0x5ef494[_0x2ef69d(0x25c)],'color':_0x5ef494[_0x2ef69d(0x284)]});else{if(_0x39877c[0xd]&&_0x39877c[0xe])_0x3700e3[_0x2ef69d(0x22f)]({'text':'?'+_0x39877c[0xd],'guideName':_0x39877c[0xd],'guideGameId':_0x39877c[0xe],'type':_0x5ef494[_0x2ef69d(0x21f)],'color':_0x5ef494[_0x2ef69d(0x284)]});else{if(_0x5ef494['RLaWb'](_0x39877c[0x0],_0x5ef494[_0x2ef69d(0x214)]))_0x3700e3[_0x2ef69d(0x22f)]({'text':'','bold':!![]});else{if(_0x39877c[0x0]===_0x5ef494[_0x2ef69d(0x285)])_0x3700e3[_0x2ef69d(0x22f)]({'text':'','bold':![]});else{if(_0x39877c[0x0]===_0x5ef494[_0x2ef69d(0x21a)])_0x3700e3[_0x2ef69d(0x22f)]({'text':_0x5ef494[_0x2ef69d(0x2af)],'type':_0x5ef494[_0x2ef69d(0x28b)]});else _0x39877c[0x0]===_0x5ef494['ltFmN']&&_0x3700e3[_0x2ef69d(0x22f)]({'text':_0x5ef494[_0x2ef69d(0x275)],'type':_0x2ef69d(0x25d)});}}}}}}}}}}}}_0x381ffb=_0x4e67d9['lastIndex'];}if(_0x381ffb<_0x37c133['length']){const _0x104318=_0x37c133[_0x2ef69d(0x1ff)](_0x381ffb);this[_0x2ef69d(0x2b5)](_0x3700e3,_0x104318);}return _0x3700e3;},'showFull'(){const _0xd3abe5=_0x28c391;this[_0xd3abe5(0x1a8)]({'showFull':!![],'needShowReadMore':![],'_stopCheckMore':!![]});},'onMoreTap'(){const _0x3a111d=_0x28c391,_0x4a7bee={'Plhaz':function(_0x248976){return _0x248976();},'LhAsT':_0x3a111d(0x223)};this[_0x3a111d(0x24d)](_0x3a111d(0x289));if(!_0x4a7bee[_0x3a111d(0x271)](checkLogin))return;this[_0x3a111d(0x24d)](_0x4a7bee[_0x3a111d(0x2b2)],{'item':this[_0x3a111d(0x226)][_0x3a111d(0x282)]});},'onPinTap'(){const _0x1fbd59=_0x28c391,_0x31369d={'PKrJc':function(_0x22fb99,_0x19eb02){return _0x22fb99!==_0x19eb02;},'gFkLA':function(_0x10028,_0x5be494){return _0x10028===_0x5be494;},'fVLot':function(_0x24d90e,_0x232f58){return _0x24d90e===_0x232f58;},'iUYyr':function(_0xcaa857,_0x47aab2){return _0xcaa857===_0x47aab2;},'GHGOu':'置顶成功','Xtxmn':'取消置顶成功','JQkFO':function(_0x20947b,_0x32f33d){return _0x20947b===_0x32f33d;},'tJVSi':function(_0x223ea5){return _0x223ea5();},'CJClY':function(_0xca2bb5,_0x34c0c8){return _0xca2bb5-_0x34c0c8;},'OGJrR':'pages/user/user','Gayzy':function(_0x40c594,_0x58c603){return _0x40c594>_0x58c603;},'aTsSi':_0x1fbd59(0x270),'pwWCB':'操作失败','bNuhl':_0x1fbd59(0x249),'vmFgl':function(_0xc8167e,_0x29f1ab,_0x194066){return _0xc8167e(_0x29f1ab,_0x194066);}},_0x512fcd=this[_0x1fbd59(0x226)][_0x1fbd59(0x282)][_0x1fbd59(0x1e7)],_0x3a2afb=this['data'][_0x1fbd59(0x1b9)]?0x2:0x1;wx['showLoading']({'title':_0x1fbd59(0x2ae)}),_0x31369d[_0x1fbd59(0x2b4)](setUserPostTop,_0x512fcd['id'],_0x3a2afb)[_0x1fbd59(0x1bf)](_0x2aa1c8=>{const _0x191add=_0x1fbd59,_0xdd4523={'UeuZL':function(_0x2e81d4,_0x5b443d){const _0x308710=_0x1158;return _0x31369d[_0x308710(0x273)](_0x2e81d4,_0x5b443d);},'japrj':function(_0x1ee84e,_0x53f1c7){const _0x2bf0aa=_0x1158;return _0x31369d[_0x2bf0aa(0x213)](_0x1ee84e,_0x53f1c7);}};wx[_0x191add(0x2bd)]();if(_0x31369d[_0x191add(0x237)](_0x2aa1c8[_0x191add(0x200)],0x0)){wx['showToast']({'title':_0x3a2afb===0x1?_0x31369d['GHGOu']:_0x31369d[_0x191add(0x1d4)],'icon':_0x191add(0x280)}),this[_0x191add(0x1a8)]({'item.post.is_user_top':_0x31369d['fVLot'](_0x3a2afb,0x1)?0x1:0x0,'isPinned':_0x31369d['JQkFO'](_0x3a2afb,0x1)?0x1:0x0}),this[_0x191add(0x277)]();if(_0x31369d[_0x191add(0x213)](_0x3a2afb,0x1)){const _0xd9084d=_0x31369d[_0x191add(0x1ab)](getCurrentPages),_0x547838=_0xd9084d[_0x31369d['CJClY'](_0xd9084d['length'],0x1)];if(_0x31369d['fVLot'](_0x547838['route'],_0x31369d[_0x191add(0x26e)])){let _0xda1df3=_0x547838[_0x191add(0x226)][_0x191add(0x1ef)];if(Array[_0x191add(0x1dc)](_0xda1df3)){_0xda1df3=_0xda1df3[_0x191add(0x1c9)](_0x8e7513=>{const _0x25e04a=_0x191add;return _0x31369d['PKrJc'](_0x8e7513[_0x25e04a(0x1e7)]['id'],_0x512fcd['id'])&&_0x31369d[_0x25e04a(0x250)](_0x8e7513[_0x25e04a(0x1e7)][_0x25e04a(0x29a)],0x1)&&(_0x8e7513['post'][_0x25e04a(0x29a)]=0x0),_0x8e7513;});const _0x783f84=_0xda1df3[_0x191add(0x1cb)](_0x54b37d=>_0x54b37d[_0x191add(0x1e7)]['id']===_0x512fcd['id']);if(_0x31369d['Gayzy'](_0x783f84,-0x1)){const [_0x316583]=_0xda1df3[_0x191add(0x1ae)](_0x783f84,0x1);_0x316583[_0x191add(0x1e7)][_0x191add(0x29a)]=0x1,_0xda1df3[_0x191add(0x1ea)](_0x316583);}_0x547838[_0x191add(0x1a8)]({'posts':_0xda1df3}),wx[_0x191add(0x1e3)]({'scrollTop':0x0,'duration':0x12c});}else{if(_0xda1df3&&_0x31369d[_0x191add(0x213)](typeof _0xda1df3,_0x31369d[_0x191add(0x264)])){const _0xd44d77={};Object['keys'](_0xda1df3)[_0x191add(0x2a4)](_0x5344d8=>{const _0x4e8b04=_0x191add;if(Array[_0x4e8b04(0x1dc)](_0xda1df3[_0x5344d8])){let _0x36b74a=_0xda1df3[_0x5344d8][_0x4e8b04(0x1c9)](_0x1299cf=>{const _0x29d77b=_0x4e8b04;return _0xdd4523[_0x29d77b(0x2b0)](_0x1299cf[_0x29d77b(0x1e7)]['id'],_0x512fcd['id'])&&_0xdd4523[_0x29d77b(0x290)](_0x1299cf[_0x29d77b(0x1e7)][_0x29d77b(0x29a)],0x1)&&(_0x1299cf[_0x29d77b(0x1e7)][_0x29d77b(0x29a)]=0x0),_0x1299cf;});const _0x589950=_0x36b74a[_0x4e8b04(0x1cb)](_0x87dd88=>_0x87dd88[_0x4e8b04(0x1e7)]['id']===_0x512fcd['id']);if(_0x589950>-0x1){const [_0x45e620]=_0x36b74a['splice'](_0x589950,0x1);_0x45e620['post']['is_user_top']=0x1,_0x36b74a[_0x4e8b04(0x1ea)](_0x45e620);}_0xd44d77[_0x5344d8]=_0x36b74a;}else _0xd44d77[_0x5344d8]=_0xda1df3[_0x5344d8];}),_0x547838[_0x191add(0x1a8)]({'posts':_0xd44d77}),wx[_0x191add(0x1e3)]({'scrollTop':0x0,'duration':0x12c});}}}}}else wx[_0x191add(0x29d)]({'title':_0x2aa1c8['msg']||_0x31369d[_0x191add(0x247)],'icon':_0x31369d[_0x191add(0x274)]});});},'onCloseSheet'(){const _0x277acd=_0x28c391;this[_0x277acd(0x1a8)]({'showSheet':![]});},'onDelete'(){const _0x1c42ea=_0x28c391,_0x316d3b={'ZXoQG':function(_0x38ea1b,_0x538c22){return _0x38ea1b===_0x538c22;},'JopaR':'success','IMYXS':function(_0x344851){return _0x344851();},'UcuCH':function(_0x2cd0d0,_0x56ca53){return _0x2cd0d0===_0x56ca53;},'fKXpQ':'object','xsKME':_0x1c42ea(0x28c),'HqItm':_0x1c42ea(0x297),'dNggd':function(_0x543eac,_0x46c969){return _0x543eac(_0x46c969);}},_0x2d1a3a=this[_0x1c42ea(0x226)][_0x1c42ea(0x282)][_0x1c42ea(0x1e7)]['id'];_0x316d3b[_0x1c42ea(0x259)](deleteContent,_0x2d1a3a)[_0x1c42ea(0x1bf)](_0xa9a412=>{const _0x1905e0=_0x1c42ea;if(_0x316d3b[_0x1905e0(0x1ee)](_0xa9a412[_0x1905e0(0x200)],0x0)){wx[_0x1905e0(0x29d)]({'title':_0x1905e0(0x2b1),'icon':_0x316d3b['JopaR']});const _0x387321=_0x316d3b['IMYXS'](getCurrentPages),_0x374a2b=_0x387321[_0x387321[_0x1905e0(0x22d)]-0x1],_0x3093f1=_0x374a2b[_0x1905e0(0x226)][_0x1905e0(0x1ef)];if(Array[_0x1905e0(0x1dc)](_0x3093f1))_0x374a2b[_0x1905e0(0x1a8)]({'posts':_0x3093f1['filter'](_0xcc22fd=>_0xcc22fd[_0x1905e0(0x1e7)]['id']!==_0x2d1a3a)});else{if(_0x3093f1&&_0x316d3b['UcuCH'](typeof _0x3093f1,_0x316d3b['fKXpQ'])){const _0x5ed8cb={};Object[_0x1905e0(0x288)](_0x3093f1)[_0x1905e0(0x2a4)](_0x54efdc=>{const _0x3c0c53=_0x1905e0;Array[_0x3c0c53(0x1dc)](_0x3093f1[_0x54efdc])?_0x5ed8cb[_0x54efdc]=_0x3093f1[_0x54efdc][_0x3c0c53(0x1ad)](_0x4cbecf=>_0x4cbecf[_0x3c0c53(0x1e7)]['id']!==_0x2d1a3a):_0x5ed8cb[_0x54efdc]=_0x3093f1[_0x54efdc];}),_0x374a2b[_0x1905e0(0x1a8)]({'posts':_0x5ed8cb});}}this[_0x1905e0(0x24d)](_0x316d3b[_0x1905e0(0x1f4)],{'post':this[_0x1905e0(0x226)]['item'][_0x1905e0(0x1e7)]}),this[_0x1905e0(0x277)]();}else wx[_0x1905e0(0x29d)]({'title':_0xa9a412[_0x1905e0(0x222)]||_0x316d3b[_0x1905e0(0x225)],'icon':_0x1905e0(0x249)});});},'onReport'(){const _0x33802f=_0x28c391,_0x27c317={'USlHf':'pauseAllVideo','PPBnr':_0x33802f(0x2ab)};this[_0x33802f(0x24d)](_0x27c317['USlHf']),wx[_0x33802f(0x1f5)]({'url':_0x33802f(0x255)+this[_0x33802f(0x226)][_0x33802f(0x282)][_0x33802f(0x1e7)]['id']}),this[_0x33802f(0x24d)](_0x27c317[_0x33802f(0x1d5)],{'post':this[_0x33802f(0x226)][_0x33802f(0x282)][_0x33802f(0x1e7)]}),this['onCloseSheet']();},'onFavorite'(){const _0x3a8d81=_0x28c391,_0x43a0c7={'njORZ':function(_0x329084,_0x28dbf1){return _0x329084===_0x28dbf1;},'OmKrj':function(_0x2956d8,_0x1a3ca7){return _0x2956d8===_0x1a3ca7;},'zyYFR':'已收藏','PHBir':_0x3a8d81(0x280),'toYlX':_0x3a8d81(0x272),'cOdYa':_0x3a8d81(0x249),'akMPb':function(_0x52ed94,_0x5c91a2,_0x29cf6d){return _0x52ed94(_0x5c91a2,_0x29cf6d);}},_0xb27d80=this[_0x3a8d81(0x226)][_0x3a8d81(0x282)]['post'],_0x2171db=_0x43a0c7[_0x3a8d81(0x260)](_0xb27d80['is_collect'],0x1)?0x2:0x1;_0x43a0c7['akMPb'](collectPost,_0xb27d80['id'],_0x2171db)[_0x3a8d81(0x1bf)](_0x73edd=>{const _0x31ad53=_0x3a8d81;_0x43a0c7['njORZ'](_0x73edd['code'],0x0)?(wx['showToast']({'title':_0x43a0c7['OmKrj'](_0x2171db,0x1)?_0x43a0c7[_0x31ad53(0x1b0)]:_0x31ad53(0x2a6),'icon':_0x43a0c7[_0x31ad53(0x1ac)]}),this[_0x31ad53(0x1a8)]({'item.post.is_collect':_0x43a0c7[_0x31ad53(0x236)](_0x2171db,0x1)?0x1:0x0}),this[_0x31ad53(0x277)]()):wx[_0x31ad53(0x29d)]({'title':_0x73edd[_0x31ad53(0x222)]||(_0x2171db===0x1?_0x31ad53(0x1b1):_0x43a0c7[_0x31ad53(0x296)]),'icon':_0x43a0c7[_0x31ad53(0x1e1)]});});},'onHotLike'(){const _0x76b5b=_0x28c391,_0xccd694={'ACgwk':function(_0x457493,_0x16a100){return _0x457493!==_0x16a100;},'SnVZd':function(_0x4365c6,_0x5c303c){return _0x4365c6===_0x5c303c;},'ZRpCQ':function(_0x118405,_0x342b16,_0x4eae8c){return _0x118405(_0x342b16,_0x4eae8c);}};this['triggerEvent'](_0x76b5b(0x289));if(!checkLogin())return;const _0x5b164e=this[_0x76b5b(0x226)][_0x76b5b(0x282)][_0x76b5b(0x252)],_0x46702e=_0x5b164e[_0x76b5b(0x1fe)],_0x221995=_0xccd694[_0x76b5b(0x1f7)](_0x46702e[_0x76b5b(0x29e)],0x1),_0x34a40a=_0x221995?0x0:0x1,_0xd7cfd5=_0x221995?_0x46702e[_0x76b5b(0x24c)]-0x1:_0x46702e['like_count']+0x1;this['setData']({'item.hot.comment.is_like':_0x34a40a,'item.hot.comment.like_count':_0xd7cfd5}),_0xccd694[_0x76b5b(0x295)](likePost,_0x46702e['id'],_0x34a40a===0x1?0x1:0x2)[_0x76b5b(0x1bf)](_0x38ba82=>{const _0x2be8eb=_0x76b5b;_0xccd694['ACgwk'](_0x38ba82[_0x2be8eb(0x200)],0x0)&&this[_0x2be8eb(0x1a8)]({'item.hot.comment.is_like':_0x221995?0x1:0x0,'item.hot.comment.like_count':_0x46702e['like_count']});});},async 'onBannerVideoPlay'(_0x56da25){const _0x37cd5f=_0x28c391,_0x311bbc={'ZtwYo':function(_0x2b6ca9,_0x17c70a){return _0x2b6ca9===_0x17c70a;},'hlnpv':_0x37cd5f(0x202),'WWALM':function(_0x1dd56a,_0x2f82c6){return _0x1dd56a(_0x2f82c6);},'LqDUf':'item.shared.post.videoUrl','WZCLK':_0x37cd5f(0x251),'RphJX':_0x37cd5f(0x1a5),'cwUwl':_0x37cd5f(0x227),'vsbNC':'视频加载失败'},_0x572d5b=_0x56da25[_0x37cd5f(0x1c1)][_0x37cd5f(0x211)]['id'],_0x560c24=_0x56da25[_0x37cd5f(0x1c1)][_0x37cd5f(0x211)][_0x37cd5f(0x1ed)],_0x5748e1=_0x56da25[_0x37cd5f(0x1c1)][_0x37cd5f(0x211)][_0x37cd5f(0x22c)],_0x4f3496=_0x311bbc[_0x37cd5f(0x2ad)](_0x560c24,_0x311bbc[_0x37cd5f(0x1aa)]);let _0x36b668=_0x4f3496?_0x5748e1:_0x572d5b;try{const _0x29a327=await _0x311bbc[_0x37cd5f(0x1a4)](queryPostVideo,_0x36b668);if(_0x311bbc[_0x37cd5f(0x2ad)](_0x29a327[_0x37cd5f(0x200)],0x0)&&_0x29a327[_0x37cd5f(0x226)]){let _0x5781a9=_0x4f3496?_0x311bbc[_0x37cd5f(0x1d8)]:_0x311bbc[_0x37cd5f(0x216)];this[_0x37cd5f(0x1a8)]({[_0x5781a9]:_0x29a327[_0x37cd5f(0x226)],'isCurrentPlaying':!![]},()=>{this['setupVideoObserver']();}),this[_0x37cd5f(0x24d)](_0x311bbc[_0x37cd5f(0x2c2)],{'id':_0x572d5b});}else throw new Error(_0x311bbc['cwUwl']);}catch(_0x12a52f){wx[_0x37cd5f(0x29d)]({'title':_0x311bbc[_0x37cd5f(0x28f)],'icon':_0x37cd5f(0x1b3)});}finally{}},'setupVideoObserver'(){const _0x2349dc=_0x28c391,_0x1508a4={'PpjcO':function(_0x1eb90f,_0x18229e){return _0x1eb90f<=_0x18229e;}},_0x415cd2=this[_0x2349dc(0x226)][_0x2349dc(0x282)]['post']['id'],_0x289cda=this[_0x2349dc(0x246)]({'thresholds':[0.6]});_0x289cda[_0x2349dc(0x207)]({'top':0x0,'bottom':0x0})[_0x2349dc(0x1c8)]('#bannerVideo-'+_0x415cd2,_0x4653cf=>{const _0x437501=_0x2349dc,_0x347f37=wx[_0x437501(0x218)]('bannerVideo-'+_0x415cd2,this);_0x1508a4[_0x437501(0x1bd)](_0x4653cf[_0x437501(0x1b5)],0.6)&&_0x347f37[_0x437501(0x20f)]();});},'handlePlayVideo'(){const _0x31dd85=_0x28c391,_0x19d262={'CqOqC':_0x31dd85(0x1a5)},_0x1e070f=this[_0x31dd85(0x226)][_0x31dd85(0x282)][_0x31dd85(0x1e7)]['id'],_0x54e7ef=wx[_0x31dd85(0x218)]('bannerVideo-'+_0x1e070f,this);this['triggerEvent'](_0x19d262['CqOqC'],{'id':_0x1e070f}),_0x54e7ef['play'](),this[_0x31dd85(0x1a8)]({'isCurrentPlaying':!![]});},'onVideoPause'(_0x500dc4){const _0x3e9d0a=_0x28c391;this[_0x3e9d0a(0x1a8)]({'isCurrentPlaying':![]});},'pauseVideo'(){const _0x12d329=_0x28c391,_0x41444a=wx[_0x12d329(0x218)](_0x12d329(0x294)+this[_0x12d329(0x226)][_0x12d329(0x282)]['post']['id'],this);_0x41444a[_0x12d329(0x20f)]();}}});
|