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.
Files changed (47) hide show
  1. package/app.js +1 -22
  2. package/assets/file/badwords.js +1 -63008
  3. package/assets/file/rules.js +1 -38
  4. package/components/bottomSheet/bottomSheet.js +1 -473
  5. package/components/experience-item/experience-item.js +1 -105
  6. package/components/grid-item/grid-item.js +1 -8
  7. package/components/post-item/post-item.js +1 -1086
  8. package/components/wiki-renderer/wiki-renderer.js +1 -636
  9. package/components/wiki-tabs/wiki-tabs.js +1 -52
  10. package/index.js +1 -49
  11. package/package.json +2 -22
  12. package/pages/addGame/addGame.js +1 -454
  13. package/pages/addSubject/addSubject.js +1 -199
  14. package/pages/commonLogin/commonLogin.js +1 -269
  15. package/pages/copyOfficial/copyOfficial.js +1 -25
  16. package/pages/demo/demo.js +1 -23
  17. package/pages/game/game.js +1 -1305
  18. package/pages/home/home.js +1 -665
  19. package/pages/lottery-winners/lottery-winners.js +1 -60
  20. package/pages/message/messageCommentsAndAt/messageCommentsAndAt.js +1 -178
  21. package/pages/message/messageEntire/messageEntire.js +1 -112
  22. package/pages/message/messageLikeAndCollect/messageLikeAndCollect.js +1 -147
  23. package/pages/message/messageNewFans/messageNewFans.js +1 -139
  24. package/pages/officialWebview/officialWebview.js +1 -13
  25. package/pages/post/post.js +1 -1856
  26. package/pages/post-editor/post-editor.js +1 -465
  27. package/pages/postDialog/postDialog.js +1 -560
  28. package/pages/report-category/report-category.js +1 -29
  29. package/pages/report-form/report-form.js +1 -65
  30. package/pages/sevenDaySignDetail/sevenDaySignDetail.js +1 -273
  31. package/pages/topic/topic.js +1 -266
  32. package/pages/user/user.js +1 -939
  33. package/pages/userDatum/userDatum.js +1 -24
  34. package/pages/userGameLib/userGameLib.js +1 -105
  35. package/pages/webview/webview.js +1 -25
  36. package/pages/wheelActivivty/wheelActivivty.js +1 -492
  37. package/pages/wiki/wiki.js +1 -138
  38. package/request/JKRequest.js +1 -177
  39. package/services/home.js +1 -603
  40. package/utils/auth.js +1 -17
  41. package/utils/base64.js +1 -67
  42. package/utils/compressImage.js +1 -41
  43. package/utils/exp.js +1 -49
  44. package/utils/formatPost.js +1 -18
  45. package/utils/parseContent.js +1 -191
  46. package/utils/query-select.js +1 -9
  47. package/utils/sensitive.js +1 -82
@@ -1,1856 +1 @@
1
- import {
2
- emojiMap
3
- } from "../../components/post-item/post-item"
4
- import {
5
- queryPostInfo,
6
- queryPostComments,
7
- queryPostLikes,
8
- queryPostShare,
9
- followUser,
10
- likePost,
11
- collectPost,
12
- votePost,
13
- queryMainComments,
14
- deleteContent,
15
- queryPostVideo
16
- } from "../../services/home";
17
- import formatUTC from "../../utils/formatPost.js"
18
- import {
19
- getLevelByExp,
20
- getLevelImg
21
- } from '../../utils/exp';
22
- import {
23
- checkLogin
24
- } from "../../utils/auth"
25
-
26
- Page({
27
- data: {
28
- item: {}, // 当前帖子详情
29
- itemDetial: {},
30
- postId: 0,
31
- contentParts: [], // 帖子正文
32
- commentedContentParts: [], // 评论格式化内容
33
- sharedContentParts: [],
34
- comments: [], // 评论列表
35
- likes: [], //赞列表
36
- shares: [], //转发列表
37
- showFull: false,
38
- needShowReadMore: false,
39
- isLongImage: false,
40
- isSuperLongImage: false, //是否是超长图
41
-
42
- isHorizonImage: false, //是否是长>宽的图
43
- active: 1,
44
- sortValue: 0, // 默认选中第一个(按热度)
45
- sortOptions: [{
46
- text: '按热度',
47
- value: 0
48
- },
49
- {
50
- text: '按时间',
51
- value: 1
52
- }
53
- ],
54
-
55
- sharesPage: 1,
56
- sharesHasMore: true,
57
- commentsPage: 1,
58
- commentsHasMore: true,
59
- likesPage: 1,
60
- likesHasMore: true,
61
- isLoadingMore: false, // 防止重复请求
62
- isCommentIn: false, //是否是点击评论跳转进来的
63
-
64
- showSheet: false, //评论弹窗
65
- originPost: {},
66
- currentReplyComment: null,
67
- typeName: '单选',
68
-
69
- showMenuSheet: false, //菜单弹窗
70
- loading: true,
71
- },
72
-
73
- getVoteTitle(isVoted, vote) {
74
- const typeName = vote.max_choices === 1 ? "单选" : `${vote.max_choices}选`;
75
- this.setData({
76
- typeName: typeName
77
- })
78
-
79
- if (Date.now() > vote.end_time * 1000) {
80
- return `投票已结束`;
81
- }
82
-
83
- return isVoted ? `已投票` : `参与投票`;
84
- },
85
-
86
-
87
- initVoteData(vote) {
88
- if (!vote) return;
89
-
90
- const userVotes = vote.user_votes || [];
91
- const isVoted = userVotes.length > 0;
92
- const isVoteEnded = Date.now() > vote.end_time * 1000;
93
-
94
-
95
- // 处理选项
96
- const voteOptions = vote.options.map(o => ({
97
- ...o,
98
- _selected: userVotes.includes(o.id),
99
- vote_count: o.vote_count || 0
100
- }));
101
-
102
- const hasAnyImage = voteOptions.some(o => o.option_image); // 假设选项图片字段是 o.image
103
-
104
-
105
- // 如果已投票,计算百分比
106
- if (isVoted || isVoteEnded) {
107
- const total = voteOptions.reduce((sum, o) => sum + o.vote_count, 0);
108
- voteOptions.forEach(o => {
109
- o.percent = total > 0 ? ((o.vote_count / total) * 100).toFixed(1) : '0.0';
110
- });
111
- }
112
-
113
- this.setData({
114
- voteOptions,
115
- isVoted,
116
- selectedVotes: [],
117
- isVoteEnded: Date.now() > vote.end_time * 1000,
118
- voteEndTime: vote.end_time ? this.formatTime(vote.end_time) : null,
119
- voteTitle: this.getVoteTitle(isVoted, vote),
120
- showVoteImages: hasAnyImage
121
-
122
- });
123
- },
124
-
125
- initLotteryData(lottery) {
126
- if (!lottery) return;
127
-
128
- const now = Date.now() / 1000;
129
- const isEnded = now > lottery.end_time;
130
-
131
- const conditionTextMap = {
132
- 1: '评论此贴',
133
- 2: '转发此贴',
134
- 3: '评论并转发此贴',
135
- 4: '发表话题',
136
- 5: '关注作者',
137
- 6: '关注游戏'
138
- };
139
-
140
- const lotteryConditions = (lottery.conditions || []).map((cond, idx) => {
141
- let parts = [];
142
-
143
- switch (cond.condition_type) {
144
- case 1:
145
- case 2:
146
- case 3:
147
- case 5:
148
- parts.push({
149
- text: conditionTextMap[cond.condition_type],
150
- color: '#333',
151
- clickable: false
152
- });
153
- break;
154
-
155
- case 4: // 发表话题
156
- parts.push({
157
- text: '发表话题',
158
- color: '#333',
159
- clickable: false
160
- });
161
- parts.push({
162
- text: `#${cond.condition_value}#`,
163
- color: '#406ce3',
164
- clickable: true,
165
- data: {
166
- type: 'topic',
167
- name: cond.condition_value
168
- }
169
- });
170
- break;
171
-
172
- case 6: // 关注游戏
173
- parts.push({
174
- text: '关注游戏',
175
- color: '#333',
176
- clickable: false
177
- });
178
-
179
-
180
- parts.push({
181
- text: `$${cond.condition_value.game_name}`,
182
- color: '#406ce3',
183
- clickable: true,
184
- data: {
185
- type: 'game',
186
- id: cond.condition_value.game_id
187
- }
188
- });
189
- break;
190
- }
191
-
192
- return {
193
- index: idx + 1,
194
- parts
195
- };
196
- });
197
-
198
- this.setData({
199
- lotteryInfo: {
200
- ...lottery,
201
- isEnded,
202
- winnerCount: lottery.winner_count,
203
- conditions: lotteryConditions,
204
- endTimeText: this.formatTime(lottery.end_time),
205
- },
206
- isLotteryEnded: Date.now() > lottery.end_time * 1000
207
- });
208
- },
209
-
210
- // 点击抽奖条件(话题/游戏)
211
- onLotteryConditionTap(e) {
212
- const {
213
- type,
214
- name,
215
- id
216
- } = e.currentTarget.dataset;
217
- if (!type) return;
218
-
219
- if (type === 'topic') {
220
- wx.navigateTo({
221
- url: `../topic/topic?topic_name=${encodeURIComponent(name)}`
222
- });
223
- } else if (type === 'game') {
224
- wx.navigateTo({
225
- url: `../game/game?id=${id}`
226
- });
227
- }
228
- },
229
-
230
- // 查看中奖名单
231
- // 查看中奖名单
232
- onViewWinners() {
233
- if (!checkLogin()) return;
234
- const postItem = this.data.item;
235
-
236
- // 构造抽奖公示页需要的最小帖子对象
237
- const post = {
238
- id: postItem.post.id,
239
- user_id: postItem.user.id, // 发帖人 id(用于判断发起人)
240
- nickname: postItem.user.nickname, // 发帖人昵称
241
- avatar: postItem.user.avatar, // 发帖人头像
242
- cover: postItem.post.imageArray?.[0] || '', // 帖子图(第一张)
243
- content: postItem.post.content // 帖子内容
244
- };
245
-
246
- wx.navigateTo({
247
- url: `../lottery-winners/lottery-winners?post=${encodeURIComponent(
248
- JSON.stringify(post)
249
- )}`
250
- });
251
- },
252
-
253
- // 帖子详情页分享逻辑
254
- onShareAppMessage() {
255
- const {
256
- item,
257
- postId
258
- } = this.data;
259
-
260
- // 取帖子标题或默认文案
261
- const title = item?.post?.title || '查看帖子详情';
262
-
263
- return {
264
- title,
265
- // 分享路径携带帖子 id 参数
266
- path: `../post/post?id=${postId}` // 携带用户ID
267
- };
268
- },
269
- // tab切换
270
- onChange(event) {
271
- const {
272
- index
273
- } = event.detail
274
- this.setData({
275
- active: index
276
- })
277
- },
278
-
279
- async onSortChange(e) {
280
- console.log(e.detail)
281
- this.setData({
282
- sortValue: e.detail
283
- })
284
-
285
- // TODO: 根据选择重新请求或排序 comments
286
-
287
- const commentsRes = await queryPostComments(this.data.postId, 1, e.detail === 0 ? 2 : 1)
288
- // 格式化评论
289
- const comments = this.formatComments(commentsRes.data)
290
- this.setData({
291
- comments
292
- })
293
- },
294
-
295
- onLoad(options) {
296
- const postId = options.id; // 从路由参数拿帖子 id
297
- const isCommentIn = options.isCommentIn
298
- this.setData({
299
- postId,
300
- isCommentIn
301
- })
302
- this.fetchPostDetail(postId).then(res => {
303
- const currentUserId = wx.getStorageSync('appuid'); // 当前登录用户id
304
- const isOwner = this.data.item.user.id === currentUserId;
305
- this.setData({
306
- isOwner
307
- })
308
- if (this.data.isCommentIn) {
309
- this.setData({
310
- showSheet: true,
311
- originPost: this.data.item,
312
- commentData: null,
313
- })
314
-
315
- }
316
- });
317
-
318
-
319
-
320
-
321
- },
322
-
323
- onFirstComment() {
324
- if (!checkLogin()) return; // 🔥 登录校验
325
-
326
- this.setData({
327
- showSheet: true,
328
- originPost: this.data.item,
329
- commentData: null
330
- })
331
- },
332
- onLike(e) {
333
- if (!checkLogin()) return; // 🔥 登录校验
334
-
335
-
336
- const post = this.data.item.post;
337
- const isLiked = post.is_like === 1;
338
- const newLikeStatus = isLiked ? 0 : 1;
339
- const newLikeCount = isLiked ? post.like_count - 1 : post.like_count + 1;
340
-
341
- // 2️⃣ 前端立即更新状态
342
- this.setData({
343
- 'item.post.is_like': newLikeStatus,
344
- 'item.post.like_count': newLikeCount
345
- });
346
-
347
- // 3️⃣ 动画效果(缩放+回弹)
348
- const animation = wx.createAnimation({
349
- duration: 200,
350
- timingFunction: 'ease-in-out'
351
- });
352
- animation.scale(1.5).step();
353
- animation.scale(1.0).step();
354
-
355
- this.setData({
356
- likeAnimation: animation.export()
357
- });
358
-
359
- // 4️⃣ 调用后端接口(type: 1点赞, 2取消点赞)
360
- likePost(post.id, newLikeStatus === 1 ? 1 : 2)
361
- .then(res => {
362
- if (res.code !== 0) {
363
- // ❌ 接口失败,回滚前端状态
364
- this.setData({
365
- 'item.post.is_like': isLiked ? 1 : 0,
366
- 'item.post.like_count': post.like_count
367
- });
368
- wx.showToast({
369
- title: res.message || '操作失败',
370
- icon: 'none'
371
- });
372
- } else {
373
- // ✅ 接口成功,跨页面同步数据
374
- const pages = getCurrentPages();
375
- pages.forEach(page => {
376
- // 首页更新 posts
377
- if (page.route === 'pages/home/home') {
378
- const posts = page.data.posts.map(p => {
379
- if (p.post.id === post.id) {
380
- p.post.is_like = newLikeStatus;
381
- p.post.like_count = newLikeCount;
382
- }
383
- return p;
384
- });
385
- page.setData({
386
- posts
387
- });
388
- }
389
-
390
- // 用户详情页更新 userPosts
391
- if (page.route === 'pages/user/user') {
392
- if (Array.isArray(page.data.userPosts)) {
393
- const userPosts = page.data.userPosts.map(p => {
394
- if (p.post.id === post.id) {
395
- p.post.is_like = newLikeStatus;
396
- p.post.like_count = newLikeCount;
397
- }
398
- return p;
399
- });
400
- page.setData({
401
- userPosts
402
- });
403
- }
404
- }
405
-
406
- // 帖子详情页更新 item
407
- if (page.route === 'pages/post/post' && page.data.postId === post.id) {
408
- page.setData({
409
- 'item.post.is_like': newLikeStatus,
410
- 'item.post.like_count': newLikeCount
411
- });
412
- }
413
- });
414
- }
415
- })
416
- .catch(err => {
417
- // ❌ 网络/接口异常
418
- this.setData({
419
- 'item.post.is_like': isLiked ? 1 : 0,
420
- 'item.post.like_count': post.like_count
421
- });
422
- wx.showToast({
423
- title: '网络错误,操作失败',
424
- icon: 'none'
425
- });
426
- });
427
- },
428
-
429
- onCollect(e) {
430
- if (!checkLogin()) return; // 🔥 登录校验
431
-
432
- const post = this.data.item.post;
433
- const isCollected = post.is_collect === 1;
434
- const newCollectStatus = isCollected ? 0 : 1;
435
- const newCollectCount = isCollected ? post.collect_count - 1 : post.collect_count + 1;
436
-
437
- // 1️⃣ 前端立即更新状态和收藏数
438
- this.setData({
439
- 'item.post.is_collect': newCollectStatus,
440
- 'item.post.collect_count': newCollectCount
441
- });
442
-
443
- // 2️⃣ 动画效果(可选)
444
- const animation = wx.createAnimation({
445
- duration: 200,
446
- timingFunction: 'ease-in-out'
447
- });
448
- animation.scale(1.5).step();
449
- animation.scale(1.0).step();
450
- this.setData({
451
- collectAnimation: animation.export()
452
- });
453
-
454
- // 3️⃣ 调用后端接口(type: 1收藏, 2取消收藏)
455
- collectPost(post.id, newCollectStatus === 1 ? 1 : 2)
456
- .then(res => {
457
- if (res.code !== 0) {
458
- // ❌ 接口失败,回滚前端状态和数量
459
- this.setData({
460
- 'item.post.is_collect': isCollected,
461
- 'item.post.collect_count': post.collect_count
462
- });
463
- wx.showToast({
464
- title: res.message || '操作失败',
465
- icon: 'none'
466
- });
467
- } else {
468
- // ✅ 接口成功,跨页面同步数据
469
- const pages = getCurrentPages();
470
- pages.forEach(page => {
471
- // 首页更新 posts
472
- if (page.route === 'pages/home/home') {
473
- const posts = page.data.posts.map(p => {
474
- if (p.post.id === post.id) {
475
- p.post.is_collect = newCollectStatus;
476
- p.post.collect_count = newCollectCount;
477
- }
478
- return p;
479
- });
480
- page.setData({
481
- posts
482
- });
483
- }
484
-
485
- // 用户详情页更新 userPosts
486
- if (page.route === 'pages/user/user') {
487
- if (Array.isArray(page.data.userPosts)) {
488
- const userPosts = page.data.userPosts.map(p => {
489
- if (p.post.id === post.id) {
490
- p.post.is_collect = newCollectStatus;
491
- p.post.collect_count = newCollectCount;
492
- }
493
- return p;
494
- });
495
- page.setData({
496
- userPosts
497
- });
498
- }
499
- }
500
-
501
- // 帖子详情页更新 item
502
- if (page.route === 'pages/post/post' && page.data.postId === post.id) {
503
- page.setData({
504
- 'item.post.is_collect': newCollectStatus,
505
- 'item.post.collect_count': newCollectCount
506
- });
507
- }
508
- });
509
-
510
- wx.showToast({
511
- title: newCollectStatus === 1 ? '收藏成功' : '取消收藏',
512
- icon: 'success'
513
- });
514
- }
515
- })
516
- .catch(err => {
517
- // ❌ 网络/接口异常,回滚
518
- this.setData({
519
- 'item.post.is_collect': isCollected,
520
- 'item.post.collect_count': post.collect_count
521
- });
522
- wx.showToast({
523
- title: '网络错误,操作失败',
524
- icon: 'none'
525
- });
526
- });
527
- },
528
-
529
- async onCommentSuccess(e) {
530
- const {
531
- postId,
532
- mode,
533
- content,
534
- images
535
- } = e.detail;
536
-
537
- const commentsRes = await queryPostComments(this.data.postId, 1, this.data.sortValue === 0 ? 2 : 1);
538
- const comments = this.formatComments(commentsRes.data);
539
-
540
- // ✅ 当前页面更新评论
541
- const newCount = (this.data.item.post.comment_count || 0) + 1;
542
- this.setData({
543
- 'item.post.comment_count': newCount,
544
- comments
545
- });
546
-
547
- // ✅ 遍历页面栈同步修改
548
- const pages = getCurrentPages();
549
- const currentPage = pages[pages.length - 1];
550
-
551
- pages.forEach(page => {
552
- if (page === currentPage) return;
553
- // 首页
554
- if (page.route === 'pages/home/home') {
555
- const updatedPosts = page.data.posts.map(p => {
556
- if (p.post.id === postId) {
557
- p.post.comment_count = (p.post.comment_count || 0) + 1;
558
- }
559
- return p;
560
- });
561
- page.setData({
562
- posts: updatedPosts
563
- });
564
- }
565
-
566
- // 用户详情页
567
- if (page.route === 'pages/user/user') {
568
- const updatedPosts = page.data.userPosts?.map(p => {
569
- if (p.post.id === postId) {
570
- p.post.comment_count = (p.post.comment_count || 0) + 1;
571
- }
572
- return p;
573
- }) || [];
574
- page.setData({
575
- userPosts: updatedPosts
576
- });
577
- }
578
-
579
- // 其他帖子详情页(如果嵌套)
580
- if (page.route === 'pages/post/post' && page.data.postId === postId) {
581
- page.setData({
582
- 'item.post.comment_count': (page.data.item.post.comment_count || 0) + 1
583
- });
584
- }
585
- });
586
- },
587
-
588
- async fetchPostDetail(postId) {
589
- try {
590
- const [postRes, commentsRes, likesRes, sharesRes] = await Promise.all([
591
- queryPostInfo(postId),
592
- queryPostComments(postId, 1, 2),
593
- queryPostLikes(postId, 1),
594
- queryPostShare(postId, 1),
595
- ])
596
-
597
- const item = this.formatPost(postRes.data);
598
- // 处理投票相关信息
599
- this.initVoteData(item.post.vote);
600
- this.initLotteryData(item.post.lottery);
601
-
602
-
603
- const comments = this.formatComments(commentsRes.data);
604
- const shares = this.formatShares(sharesRes.data);
605
-
606
- // ✅ 处理 commented 转换
607
- let commentedContentParts = [];
608
- const commentedArr = postRes.data?.commented;
609
- if (Array.isArray(commentedArr) && commentedArr.length > 0) {
610
- const commented = commentedArr[0];
611
- const parts = [];
612
-
613
- if (commented.user?.nickname) {
614
- parts.push({
615
- text: `@${commented.user.nickname}`,
616
- color: '#406ce3',
617
- type: 'at',
618
- userId: commented.user?.id || ''
619
- });
620
- }
621
-
622
- if (commented.post?.reply_nickname) {
623
- parts.push({
624
- text: ' 回复 ',
625
- color: '#333'
626
- });
627
- parts.push({
628
- text: `@${commented.post.reply_nickname}`,
629
- color: '#406ce3',
630
- type: 'at',
631
- userId: commented.post?.reply_user_id || ''
632
- });
633
- }
634
-
635
- if (commented.post?.status !== 3) {
636
- parts.push({
637
- text: ': ',
638
- color: '#333'
639
- });
640
- }
641
-
642
- if (commented.post?.content) {
643
- parts.push(...this.parseContent(commented.post.content));
644
- }
645
- if (commented.post?.status === 3) {
646
- parts.push({
647
- text: '[原文已被删除]',
648
- color: '#999',
649
- type: 'deleted'
650
- });
651
- }
652
-
653
- if (commented.post?.images) {
654
- const imgArray = commented.post.images.split(',').filter(Boolean);
655
- imgArray.forEach((src, idx) => {
656
- parts.push({
657
- text: '[查看图片]',
658
- type: 'view_img',
659
- src,
660
- index: idx,
661
- from: 'commented',
662
- color: '#406ce3'
663
- });
664
- });
665
- }
666
-
667
- commentedContentParts = parts;
668
- }
669
-
670
- const contentParts = this.injectTitle(
671
- this.parseContent(item.post.content, item.post.imageArray, item.shared),
672
- item.post.title
673
- );
674
-
675
- // 提取 title
676
- const titlePart = contentParts.find(p => p.type === 'title');
677
-
678
-
679
- if (item.game?.exp !== null) {
680
- item.user.level = getLevelByExp(item.game?.exp);
681
- item.user.levelImg = getLevelImg(item.user.level)
682
- }
683
-
684
- this.setData({
685
- loading: false,
686
- item,
687
- contentParts,
688
- hasTitle: !!titlePart,
689
- titleText: titlePart ? titlePart.text : '',
690
- commentedContentParts,
691
- comments,
692
- likes: Array.isArray(likesRes.data) ? likesRes.data : [],
693
- shares: shares.map(s => ({
694
- ...s,
695
- contentParts: this.parseContent(s.post.content, s.post.imageArray, true)
696
- }))
697
- });
698
-
699
-
700
- if (item.shared) {
701
- this.setData({
702
- isLotteryEnded: Date.now() > item.shared?.post?.lottery?.end_time * 1000,
703
- sharedContentParts: this.injectTitle(
704
- this.parseContent(item.shared?.post?.content, item.shared?.post?.imageArray, item.shared),
705
- item.shared?.post?.title
706
- )
707
- });
708
- }
709
-
710
-
711
- } catch (err) {
712
- this.setData({
713
- loading: false,
714
- })
715
- console.error("加载帖子详情失败:", err);
716
- wx.showToast({
717
- title: "加载失败",
718
- icon: "none"
719
- });
720
- }
721
- },
722
-
723
- injectTitle(parts, title) {
724
- if (!title) return parts;
725
-
726
- // 标题插入到开头
727
- parts.unshift({
728
- text: title,
729
- color: '#000',
730
- type: 'title'
731
- });
732
-
733
- // 再插入一个换行
734
- parts.splice(1, 0, {
735
- type: 'br'
736
- });
737
-
738
- return parts;
739
- },
740
-
741
- onReachBottom() {
742
- switch (this.data.active) {
743
- case 0: // 转发
744
- this.loadMoreShares();
745
- break;
746
- case 1: // 评论
747
- this.loadMoreComments();
748
- break;
749
- case 2: // 赞
750
- this.loadMoreLikes();
751
- break;
752
- }
753
- },
754
-
755
- async loadMoreShares() {
756
- if (!this.data.sharesHasMore || this.data.isLoadingMore) return;
757
-
758
- this.setData({
759
- isLoadingMore: true
760
- });
761
-
762
- const nextPage = this.data.sharesPage + 1;
763
- try {
764
- const res = await queryPostShare(this.data.postId, nextPage);
765
- const newShares = this.formatShares(res.data).map(s => ({
766
- ...s,
767
- contentParts: this.parseContent(s.post.content, s.post.imageArray, true)
768
- }));
769
-
770
- this.setData({
771
- shares: [...this.data.shares, ...newShares],
772
- sharesPage: nextPage,
773
- sharesHasMore: newShares.length > 0
774
- });
775
- } catch (err) {
776
- console.error("加载更多转发失败:", err);
777
- } finally {
778
- this.setData({
779
- isLoadingMore: false
780
- });
781
- }
782
- },
783
-
784
- async loadMoreComments() {
785
- if (!this.data.commentsHasMore || this.data.isLoadingMore) return;
786
-
787
- this.setData({
788
- isLoadingMore: true
789
- });
790
-
791
- const nextPage = this.data.commentsPage + 1;
792
- try {
793
- const res = await queryPostComments(this.data.postId, nextPage, this.data.sortValue === 0 ? 2 : 1);
794
- const newComments = this.formatComments(res.data);
795
-
796
- this.setData({
797
- comments: [...this.data.comments, ...newComments],
798
- commentsPage: nextPage,
799
- commentsHasMore: newComments.length > 0
800
- });
801
- } catch (err) {
802
- console.error("加载更多评论失败:", err);
803
- } finally {
804
- this.setData({
805
- isLoadingMore: false
806
- });
807
- }
808
- },
809
- async loadMoreLikes() {
810
- if (!this.data.likesHasMore || this.data.isLoadingMore) return;
811
-
812
- this.setData({
813
- isLoadingMore: true
814
- });
815
-
816
- const nextPage = this.data.likesPage + 1;
817
- try {
818
- const res = await queryPostLikes(this.data.postId, nextPage);
819
- const newLikes = Array.isArray(res.data) ? res.data : [];
820
-
821
- this.setData({
822
- likes: [...this.data.likes, ...newLikes],
823
- likesPage: nextPage,
824
- likesHasMore: newLikes.length > 0
825
- });
826
- } catch (err) {
827
- console.error("加载更多点赞失败:", err);
828
- } finally {
829
- this.setData({
830
- isLoadingMore: false
831
- });
832
- }
833
- },
834
-
835
-
836
-
837
- /**
838
- * 格式化评论(主评论 + 子评论)
839
- */
840
- formatComments(rawComments) {
841
- if (!Array.isArray(rawComments)) return []
842
-
843
- return rawComments.map(c => {
844
- const main = c.main_comment.comment
845
- const mainImageSrc = main.images ?
846
- main.images.split(',').filter(Boolean)[0] :
847
- null;
848
-
849
- const mainImageMeta = mainImageSrc ? {
850
- src: mainImageSrc,
851
- isLong: false,
852
- isSuperLong: false,
853
- isHorizon: false
854
- } : null;
855
-
856
-
857
-
858
- const mainUser = c.main_comment.user;
859
- // 处理主评论用户等级
860
- if (c.main_comment?.game?.exp != null) {
861
- mainUser.level = getLevelByExp(c.main_comment.game?.exp);
862
- mainUser.levelImg = getLevelImg(mainUser.level)
863
- }
864
-
865
- const contentParts = this.parseContent(main.content || "")
866
-
867
- // 处理子评论
868
- const second_comment = Array.isArray(c.second_comment) ?
869
- c.second_comment.map(sc => {
870
- const reply = sc.comment;
871
-
872
- const replyImageSrc = reply.images ?
873
- reply.images.split(',').filter(Boolean)[0] :
874
- null;
875
-
876
- const replyImageMeta = replyImageSrc ? {
877
- src: replyImageSrc,
878
- isLong: false,
879
- isSuperLong: false,
880
- isHorizon: false
881
- } : null;
882
-
883
-
884
- const parts = this.parseContent(sc.comment.content || "")
885
- return {
886
- ...sc,
887
- comment: {
888
- ...sc.comment,
889
- formatTime: formatUTC(sc.comment.created_at),
890
- imageMeta: replyImageMeta
891
- },
892
- contentParts: parts
893
- }
894
- }) : []
895
-
896
- return {
897
- ...c,
898
- main_comment: {
899
- ...c.main_comment,
900
- comment: {
901
- ...main,
902
- formatTime: formatUTC(main.created_at),
903
- imageMeta: mainImageMeta
904
- },
905
- contentParts
906
- },
907
- second_comment
908
- }
909
- })
910
- },
911
-
912
- // 格式化转发列表
913
- // 格式化转发列表
914
- formatShares(rawShares) {
915
- if (!Array.isArray(rawShares)) return [];
916
-
917
- return rawShares.map(s => {
918
- const post = s.post || {};
919
- const contentParts = this.parseContent(post.content || "");
920
- const imageArray = post.images ? post.images.split(',') : [];
921
-
922
- // ✅ 处理 commented
923
- let commented = null;
924
- if (Array.isArray(s.commented) && s.commented.length > 0) {
925
- const firstCommented = s.commented[0];
926
- const parts = [];
927
-
928
- // 添加 @user.nickname
929
- if (firstCommented.user?.nickname) {
930
- parts.push({
931
- text: `@${firstCommented.user.nickname}`,
932
- color: '#406ce3'
933
- });
934
- }
935
-
936
- // 如果有 reply_nickname
937
- if (firstCommented.post?.reply_nickname) {
938
- parts.push({
939
- text: ' 回复 ',
940
- color: '#333'
941
- });
942
- parts.push({
943
- text: `@${firstCommented.post.reply_nickname}`,
944
- color: '#406ce3'
945
- });
946
- }
947
-
948
- // 补冒号
949
- parts.push({
950
- text: ': ',
951
- color: '#333'
952
- });
953
-
954
- // 拼接正文
955
- if (firstCommented.post?.content) {
956
- parts.push(...this.parseContent(firstCommented.post.content));
957
- }
958
-
959
- // 图片数组转成 [查看图片]
960
- if (firstCommented.post?.images) {
961
- const imgArray = firstCommented.post.images.split(',');
962
- imgArray.forEach((src, idx) => {
963
- parts.push({
964
- text: '[查看图片]',
965
- type: 'view_img',
966
- src,
967
- index: idx,
968
- from: 'commented',
969
- color: '#406ce3'
970
- });
971
- });
972
- }
973
-
974
- commented = {
975
- ...firstCommented,
976
- post: {
977
- ...firstCommented.post,
978
- imageArray: firstCommented.post?.images ? firstCommented.post.images.split(',') : []
979
- },
980
- contentParts: parts
981
- };
982
- }
983
-
984
- return {
985
- ...s,
986
- post: {
987
- ...post,
988
- formatTime: formatUTC(post.created_at),
989
- imageArray
990
- },
991
- contentParts,
992
- commented // ✅ 新增
993
- };
994
- });
995
- },
996
-
997
-
998
-
999
- onCommentImageLoad(e) {
1000
- const {
1001
- width,
1002
- height
1003
- } = e.detail;
1004
- const {
1005
- level,
1006
- parentidx,
1007
- childidx
1008
- } = e.currentTarget.dataset;
1009
- const ratio = height / width;
1010
-
1011
- const imageMeta = {
1012
- isLong: ratio > 3 && ratio <= 4,
1013
- isSuperLong: ratio > 4,
1014
- isHorizon: ratio < 1
1015
- };
1016
-
1017
- const comments = [...this.data.comments];
1018
-
1019
- if (level === 'main') {
1020
- comments[parentidx].main_comment.comment.imageMeta = imageMeta;
1021
- }
1022
-
1023
- if (level === 'reply') {
1024
- comments[parentidx]
1025
- .second_comment[childidx]
1026
- .comment
1027
- .imageMeta = imageMeta;
1028
- }
1029
-
1030
- this.setData({
1031
- comments
1032
- });
1033
- },
1034
- onImageLoad(e) {
1035
- const {
1036
- width,
1037
- height
1038
- } = e.detail;
1039
- if (height / width > 3 && height / width <= 4) {
1040
- this.setData({
1041
- isLongImage: true
1042
- });
1043
- } else if (height / width < 1) {
1044
- this.setData({
1045
- isHorizonImage: true
1046
- });
1047
- } else if (height / width > 4) {
1048
- this.setData({
1049
- isSuperLongImage: true
1050
- });
1051
- }
1052
-
1053
- },
1054
-
1055
- // 链接跳转
1056
- onJumpUrlTap(e) {
1057
- const url = e.currentTarget.dataset.url;
1058
-
1059
- if (!url) return;
1060
-
1061
- wx.navigateTo({
1062
- url: `../webview/webview?url=${encodeURIComponent(url)}`
1063
- });
1064
- },
1065
-
1066
- onPreviewImage(e) {
1067
- const src = e.currentTarget.dataset.src;
1068
- wx.previewImage({
1069
- current: src,
1070
- urls: [src]
1071
- });
1072
- },
1073
-
1074
- previewImageMultiple(e) {
1075
- const {
1076
- index
1077
- } = e.currentTarget.dataset;
1078
- const imgList = this.data.item.post.imageArray;
1079
- wx.previewImage({
1080
- current: imgList[index],
1081
- urls: imgList
1082
- });
1083
- },
1084
- formatPost(item) {
1085
-
1086
- const newItem = {
1087
- ...item,
1088
- post: {
1089
- ...item.post,
1090
- formatTime: formatUTC(item.post.created_at),
1091
- imageArray: item.post.images ? item.post.images.split(',') : []
1092
- }
1093
- };
1094
-
1095
- // 处理转发的原始帖
1096
- if (item.shared && item.shared.post) {
1097
- newItem.shared = {
1098
- ...item.shared,
1099
- post: {
1100
- ...item.shared.post,
1101
- formatTime: formatUTC(item.shared.post.created_at),
1102
- imageArray: item.shared.post.images ? item.shared.post.images.split(',') : []
1103
- }
1104
- };
1105
- }
1106
- return newItem;
1107
- },
1108
-
1109
- parseContent(content, images = [], isShared) {
1110
- const parts = [];
1111
- // ✅ 正则末尾加上 guide 匹配
1112
- 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;
1113
-
1114
- let lastIndex = 0,
1115
- match;
1116
-
1117
- while ((match = regex.exec(content)) !== null) {
1118
- if (match.index > lastIndex) {
1119
- const plainText = content.slice(lastIndex, match.index);
1120
- this.pushWithLineBreak(parts, plainText);
1121
- }
1122
-
1123
- if (match[1]) {
1124
- parts.push({
1125
- text: match[1],
1126
- color: '#406ce3',
1127
- type: 'topic'
1128
- });
1129
- } else if (match[2]) {
1130
- parts.push({
1131
- text: `@${match[3]}`,
1132
- color: '#406ce3',
1133
- type: 'at',
1134
- userId: match[4]
1135
- });
1136
- } else if (match[5]) {
1137
- parts.push({
1138
- text: '[图片]',
1139
- src: match[5],
1140
- type: 'img'
1141
- });
1142
- } else if (match[6]) {
1143
- parts.push({
1144
- text: match[6],
1145
- src: match[6],
1146
- type: 'click_img'
1147
- });
1148
- } else if (match[7]) {
1149
- parts.push({
1150
- text: match[7],
1151
- color: '#999'
1152
- });
1153
- } else if (match[8]) {
1154
- parts.push({
1155
- text: '',
1156
- src: match[8],
1157
- type: 'local_img'
1158
- });
1159
- } else if (match[9]) {
1160
- parts.push({
1161
- text: '§网页链接',
1162
- url: match[9],
1163
- type: 'jump_url',
1164
- color: '#406ce3'
1165
- });
1166
- } else if (match[10]) {
1167
- const code = match[10].match(/\[\/(\d+)\]/)[1];
1168
- const file = emojiMap[code];
1169
- if (file) {
1170
- parts.push({
1171
- type: 'emoji',
1172
- src: `../../assets/images/emoji/${file}`
1173
- });
1174
- } else {
1175
- parts.push({
1176
- text: match[10],
1177
- color: '#333'
1178
- });
1179
- }
1180
- } else if (match[11] && match[12]) {
1181
- parts.push({
1182
- text: `$${match[11]}`,
1183
- gameId: match[12],
1184
- type: 'game',
1185
- color: '#406ce3'
1186
- });
1187
- } else if (match[13] && match[14]) {
1188
- // ✅ 新增 guide 逻辑
1189
- parts.push({
1190
- text: `?${match[13]}`,
1191
- guideName: match[13],
1192
- guideGameId: match[14],
1193
- type: 'guide',
1194
- color: '#406ce3'
1195
- });
1196
- } else if (match[0] === '<font bold=true>') {
1197
- parts.push({
1198
- text: '',
1199
- bold: true
1200
- });
1201
- } else if (match[0] === '<font bold=false>') {
1202
- parts.push({
1203
- text: '',
1204
- bold: false
1205
- });
1206
- } else if (match[0] === '<sign_line>') {
1207
- parts.push({
1208
- text: '————',
1209
- type: 'line'
1210
- });
1211
- } else if (match[0] === '<feature_blog>') {
1212
- parts.push({
1213
- text: '[加精]',
1214
- type: 'feature'
1215
- });
1216
- }
1217
-
1218
- lastIndex = regex.lastIndex;
1219
- }
1220
-
1221
- if (lastIndex < content?.length) {
1222
- this.pushWithLineBreak(parts, content.slice(lastIndex));
1223
- }
1224
-
1225
- if (isShared && images.length) {
1226
- images.forEach((src) => {
1227
- parts.push({
1228
- type: 'image',
1229
- text: '[查看图片]',
1230
- color: '#406ce3',
1231
- src
1232
- });
1233
- });
1234
- }
1235
-
1236
- return parts;
1237
- },
1238
- pushWithLineBreak(parts, text) {
1239
- const segments = text.split(/(\r\n|\n|\r)/);
1240
- segments.forEach(seg => {
1241
- if (seg === '\n' || seg === '\r' || seg === '\r\n') {
1242
- parts.push({
1243
- type: 'br'
1244
- });
1245
- } else if (seg.length > 0) {
1246
- parts.push({
1247
- text: seg,
1248
- color: '#333'
1249
- });
1250
- }
1251
- });
1252
- },
1253
-
1254
- showFull() {
1255
- this.setData({
1256
- showFull: true
1257
- });
1258
- },
1259
-
1260
- onFollowTap(e) {
1261
- if (!checkLogin()) return; // 🔥 登录校验
1262
-
1263
- const user = e.currentTarget.dataset.user;
1264
- const userId = user.id;
1265
- const isFans = user.is_fans ?? 0;
1266
- const nType = isFans === 1 ? 2 : 1; // 1关注,2取消关注
1267
-
1268
- followUser(userId, nType).then(res => {
1269
- if (res.code === 0) {
1270
- // 更新当前页面 item.user.is_fans
1271
- this.setData({
1272
- 'item.user.is_fans': isFans === 1 ? 0 : 1
1273
- });
1274
-
1275
- const pages = getCurrentPages();
1276
- pages.forEach(page => {
1277
-
1278
- // 首页:更新 posts 中对应用户的 is_fans
1279
- if (page.route === 'pages/home/home') {
1280
-
1281
- const posts = page.data.posts.map(p => {
1282
- if (p.user.id === user.id) {
1283
- p.user.is_fans = isFans === 1 ? 0 : 1; // 修改关注状态
1284
- }
1285
- return p;
1286
- });
1287
- page.setData({
1288
- posts
1289
- });
1290
- }
1291
-
1292
- // 用户详情页:更新 userDetail
1293
- if (page.route === 'pages/user/user') {
1294
- if (page.data.userDetail?.user?.id === user.id) {
1295
- page.setData({
1296
- 'userDetail.user.is_fans': isFans === 1 ? 0 : 1
1297
- });
1298
- }
1299
- }
1300
-
1301
- // 帖子详情页:更新 item.user.is_fans
1302
- if (page.route === 'pages/post/post') {
1303
- if (page.data.item?.user?.id === user.id) {
1304
- page.setData({
1305
- 'item.user.is_fans': isFans === 1 ? 0 : 1
1306
- });
1307
- }
1308
- }
1309
- });
1310
-
1311
- wx.showToast({
1312
- title: nType === 1 ? '关注成功' : '已取消关注',
1313
- icon: 'success'
1314
- });
1315
- } else {
1316
- wx.showToast({
1317
- title: res.message || '操作失败',
1318
- icon: 'none'
1319
- });
1320
- }
1321
- }).catch(err => {
1322
- wx.showToast({
1323
- title: err,
1324
- icon: 'none'
1325
- });
1326
- });
1327
- },
1328
- // 跳转帖子详情
1329
- goSharedDetail(e) {
1330
- if (e.target.dataset.video === '1') return
1331
-
1332
- const postId = e.currentTarget.dataset.id;
1333
- wx.navigateTo({
1334
- url: `../post/post?id=${postId}`
1335
- });
1336
- },
1337
-
1338
- gotoWiki(e) {
1339
- const gameId = e.currentTarget.dataset.id
1340
- const name = e.currentTarget.dataset.name
1341
- wx.navigateTo({
1342
- url: `../wiki/wiki?game_id=${gameId}&name=${encodeURIComponent(name)}`
1343
- })
1344
- },
1345
- /** 点击 跳转 */
1346
- onPartTap(e) {
1347
- const {
1348
- type,
1349
- id,
1350
- text
1351
- } = e.currentTarget.dataset;
1352
- switch (type) {
1353
- case 'topic':
1354
- const topicText = text;
1355
- const topicName = topicText.replace(/#/g, ''); // 去掉首尾 #
1356
- wx.navigateTo({
1357
- url: `../topic/topic?topic_name=${encodeURIComponent(topicName)}`
1358
- });
1359
- break;
1360
-
1361
- case 'at':
1362
- wx.navigateTo({
1363
- url: `../user/user?id=${id}`
1364
- });
1365
- break;
1366
-
1367
- case 'game':
1368
- wx.navigateTo({
1369
- url: `../game/game?id=${id}`
1370
- });
1371
- break;
1372
-
1373
- }
1374
- },
1375
-
1376
-
1377
-
1378
- onShowSheet(topic) {
1379
- const sheet = this.selectComponent('#bottomSheet');
1380
- if (sheet) {
1381
- sheet.setData({
1382
- selectedTopic: topic,
1383
- visible: true
1384
- });
1385
- }
1386
- },
1387
-
1388
-
1389
- createLikeAnimation() {
1390
- const animation = wx.createAnimation({
1391
- duration: 300,
1392
- timingFunction: 'ease-out'
1393
- });
1394
- animation.scale(1.6).step().scale(1).step();
1395
- return animation.export();
1396
- },
1397
-
1398
-
1399
- async onCommentLike(e) {
1400
- if (!checkLogin()) return; // 🔥 登录校验
1401
-
1402
- const {
1403
- type,
1404
- id,
1405
- idx,
1406
- parentidx
1407
- } = e.currentTarget.dataset;
1408
- if (!id) return;
1409
-
1410
- // const animation = this.createLikeAnimation();
1411
- let comments = [...this.data.comments];
1412
-
1413
- if (type === 'main') {
1414
- const main = comments[idx].main_comment.comment;
1415
- const isLiked = main.is_like === 1;
1416
- const nType = isLiked ? 2 : 1; // 1点赞,2取消
1417
-
1418
- // 动画 + 乐观更新
1419
- main.is_like = isLiked ? 0 : 1;
1420
- main.like_count += isLiked ? -1 : 1;
1421
- // comments[idx].main_comment.likeAnimation = animation;
1422
- this.setData({
1423
- comments
1424
- });
1425
- try {
1426
- await likePost(id, nType);
1427
-
1428
- } catch (err) {
1429
- console.error('主评论点赞失败', err);
1430
- // 回滚
1431
- main.is_like = isLiked ? 1 : 0;
1432
- main.like_count += isLiked ? 1 : -1;
1433
- this.setData({
1434
- comments
1435
- });
1436
- }
1437
-
1438
- } else if (type === 'reply') {
1439
- const reply = comments[parentidx].second_comment[idx].comment;
1440
- const isLiked = reply.is_like === 1;
1441
- const nType = isLiked ? 2 : 1;
1442
-
1443
- reply.is_like = isLiked ? 0 : 1;
1444
- reply.like_count += isLiked ? -1 : 1;
1445
- // comments[parentidx].second_comment[idx].likeAnimation = animation;
1446
- this.setData({
1447
- comments
1448
- });
1449
-
1450
- try {
1451
- await likePost(id, nType);
1452
- } catch (err) {
1453
- console.error('子评论点赞失败', err);
1454
- reply.is_like = isLiked ? 1 : 0;
1455
- reply.like_count += isLiked ? 1 : -1;
1456
- this.setData({
1457
- comments
1458
- });
1459
- }
1460
- }
1461
- },
1462
-
1463
- // 点击主评论或子评论,弹出回复框
1464
- onCommentReplyTap(e) {
1465
- if (!checkLogin()) return; // 🔥 登录校验
1466
-
1467
- const {
1468
- type,
1469
- idx,
1470
- parentidx
1471
- } = e.currentTarget.dataset;
1472
- let commentData = null;
1473
-
1474
- if (type === 'main') {
1475
- commentData = this.data.comments[idx].main_comment.comment;
1476
- commentData.reply_nickname = this.data.comments[idx].main_comment.user.nickname
1477
- commentData.avatar = this.data.comments[idx].main_comment.user.avatar
1478
-
1479
- } else if (type === 'reply') {
1480
- commentData = this.data.comments[parentidx].second_comment[idx].comment;
1481
- commentData.avatar = this.data.comments[parentidx].second_comment[idx].user.avatar;
1482
-
1483
- }
1484
-
1485
- if (!commentData) return;
1486
-
1487
- this.setData({
1488
- currentReplyComment: commentData
1489
- });
1490
-
1491
- const sheet = this.selectComponent('#bottomSheet');
1492
- if (sheet) {
1493
- sheet.setData({
1494
- visible: true,
1495
- originData: this.data.item,
1496
- commentData: commentData,
1497
- });
1498
- }
1499
- },
1500
- // 选择投票
1501
- onSelectVote(e) {
1502
- if (!checkLogin()) return; // 🔥 登录校验
1503
-
1504
- const {
1505
- id
1506
- } = e.currentTarget.dataset;
1507
- const disabled = e.currentTarget.dataset.disabled;
1508
-
1509
- if (disabled) return; // 已投票 或 已结束禁止
1510
-
1511
- let {
1512
- selectedVotes,
1513
- voteOptions
1514
- } = this.data;
1515
- const vote = this.data.item.post.vote;
1516
-
1517
- // 单选
1518
- if (vote.max_choices === 1) {
1519
- selectedVotes = [id];
1520
- } else {
1521
- // 多选
1522
- if (selectedVotes.includes(id)) {
1523
- selectedVotes = selectedVotes.filter(v => v !== id);
1524
- } else {
1525
- if (selectedVotes.length >= vote.max_choices) {
1526
- wx.showToast({
1527
- title: `最多只能选择${vote.max_choices}个选项`,
1528
- icon: 'none'
1529
- });
1530
- return; // 超过数量,直接返回
1531
- }
1532
- selectedVotes.push(id);
1533
- }
1534
- }
1535
-
1536
- // 更新选中状态
1537
- voteOptions = voteOptions.map(o => ({
1538
- ...o,
1539
- _selected: selectedVotes.includes(o.id)
1540
- }));
1541
-
1542
- this.setData({
1543
- selectedVotes,
1544
- voteOptions
1545
- });
1546
- },
1547
-
1548
-
1549
- // 提交投票
1550
- submitVote() {
1551
- if (!checkLogin()) return; // 🔥 登录校验
1552
-
1553
- const {
1554
- selectedVotes,
1555
- item
1556
- } = this.data;
1557
-
1558
- if (selectedVotes.length === 0) return;
1559
- console.log(selectedVotes)
1560
- votePost(item.post.id, item.post.vote.id, selectedVotes).then(res => {
1561
- this.fetchPostDetail(item.post.id); // 重新加载获取 vote_count & percent
1562
- });
1563
- },
1564
-
1565
- formatTime(ts) {
1566
- const d = new Date(ts * 1000);
1567
-
1568
- const Y = d.getFullYear();
1569
- const M = String(d.getMonth() + 1).padStart(2, '0');
1570
- const D = String(d.getDate()).padStart(2, '0');
1571
- const h = String(d.getHours()).padStart(2, '0');
1572
- const m = String(d.getMinutes()).padStart(2, '0');
1573
-
1574
- return `${Y}-${M}-${D} ${h}:${m}`;
1575
- },
1576
-
1577
- // 点击更多按钮
1578
- onMoreTap() {
1579
- const currentUserId = wx.getStorageSync('appuid'); // 当前登录用户id
1580
- const isOwner = this.data.item.user.id === currentUserId;
1581
-
1582
- this.setData({
1583
- showMenuSheet: true,
1584
- isOwner
1585
- });
1586
- },
1587
-
1588
- // 关闭弹窗
1589
- onCloseSheet() {
1590
- this.setData({
1591
- showMenuSheet: false
1592
- });
1593
- },
1594
-
1595
- // 弹窗选项点击
1596
- onDelete() {
1597
- const postId = this.data.item.post.id;
1598
-
1599
- deleteContent(postId).then(res => {
1600
- if (res.code === 0) {
1601
- wx.showToast({
1602
- title: '删除成功',
1603
- icon: 'success'
1604
- });
1605
-
1606
- const pages = getCurrentPages();
1607
- const prevPage = pages[pages.length - 2]; // 🔥 上一个页面
1608
-
1609
- if (prevPage) {
1610
- // 首页
1611
- if (prevPage.route === 'pages/home/home') {
1612
- const posts = prevPage.data.posts;
1613
-
1614
- if (Array.isArray(posts)) {
1615
- prevPage.setData({
1616
- posts: posts.filter(p => p.post.id !== postId)
1617
- });
1618
- } else if (posts && typeof posts === 'object') {
1619
- const newPosts = {};
1620
- Object.keys(posts).forEach(key => {
1621
- newPosts[key] = Array.isArray(posts[key]) ?
1622
- posts[key].filter(p => p.post.id !== postId) :
1623
- posts[key];
1624
- });
1625
- prevPage.setData({
1626
- posts: newPosts
1627
- });
1628
- }
1629
- }
1630
-
1631
- // 用户中心
1632
- if (prevPage.route === 'pages/user/user') {
1633
- const userPosts = prevPage.data.userPosts || [];
1634
- prevPage.setData({
1635
- userPosts: userPosts.filter(p => p.post.id !== postId)
1636
- });
1637
- }
1638
- }
1639
-
1640
- // 返回上一页
1641
- wx.navigateBack();
1642
-
1643
- } else {
1644
- wx.showToast({
1645
- title: res.msg || '删除失败',
1646
- icon: 'error'
1647
- });
1648
- }
1649
- });
1650
- },
1651
-
1652
- // 举报帖子
1653
- onReport() {
1654
- wx.navigateTo({
1655
- url: `../report-category/report-category?postId=${this.data.item.post.id}`,
1656
- })
1657
-
1658
- this.triggerEvent('reportPost', {
1659
- post: this.data.item.post
1660
- });
1661
- this.onCloseSheet();
1662
- },
1663
-
1664
- // 收藏/取消收藏
1665
- onFavorite() {
1666
- const post = this.data.item.post;
1667
- const nType = post.is_collect === 1 ? 2 : 1; // 1收藏,2取消收藏
1668
-
1669
- collectPost(post.id, nType).then(res => {
1670
- if (res.code === 0) {
1671
- wx.showToast({
1672
- title: nType === 1 ? '已收藏' : '取消收藏',
1673
- icon: 'success'
1674
- });
1675
-
1676
- // 更新本地状态
1677
- this.setData({
1678
- 'item.post.is_collect': nType === 1 ? 1 : 0
1679
- });
1680
-
1681
- this.onCloseSheet();
1682
- } else {
1683
- wx.showToast({
1684
- title: res.msg || (nType === 1 ? '收藏失败' : '取消收藏失败'),
1685
- icon: 'error'
1686
- });
1687
- }
1688
- });
1689
- },
1690
-
1691
-
1692
- /**
1693
- * 展开剩余子评论
1694
- */
1695
- async loadMoreReply(e) {
1696
- const parentidx = e.currentTarget.dataset.parentidx;
1697
-
1698
- let comments = [...this.data.comments];
1699
- let parent = comments[parentidx];
1700
-
1701
- const post_id = this.data.postId;
1702
- const comment_id = parent.main_comment.comment.id;
1703
-
1704
- // 初始化每个主评论的分页
1705
- if (!parent._replyPage) parent._replyPage = 0;
1706
-
1707
- const nextPage = parent._replyPage + 1;
1708
-
1709
- try {
1710
- const res = await queryMainComments(post_id, comment_id, nextPage);
1711
-
1712
- if (res.code !== 0 || !Array.isArray(res.data)) {
1713
- wx.showToast({
1714
- title: '加载失败',
1715
- icon: 'none'
1716
- });
1717
- return;
1718
- }
1719
-
1720
- // 格式化新子评论
1721
- const newReplies = res.data.map(sc => {
1722
- const parts = this.parseContent(sc.comment.content || "");
1723
- return {
1724
- ...sc,
1725
- comment: {
1726
- ...sc.comment,
1727
- formatTime: formatUTC(sc.comment.created_at)
1728
- },
1729
- contentParts: parts
1730
- };
1731
- });
1732
-
1733
- // 拼接到原来的 second_comment
1734
- parent.second_comment = [...parent.second_comment, ...newReplies];
1735
-
1736
- // 更新页码
1737
- parent._replyPage = nextPage;
1738
-
1739
- this.setData({
1740
- comments
1741
- });
1742
-
1743
- } catch (err) {
1744
- console.error("加载更多子评论失败", err);
1745
- wx.showToast({
1746
- title: "网络错误",
1747
- icon: "none"
1748
- });
1749
- }
1750
- },
1751
-
1752
- checkDialog() {
1753
- wx.navigateTo({
1754
- url: `../postDialog/postDialog?id=${this.data.item.post.id}`,
1755
- })
1756
- },
1757
-
1758
-
1759
- // ****************************视频相关逻辑*************************************
1760
-
1761
- // 获取视频链接
1762
- async onBannerVideoPlay(e) {
1763
-
1764
- const id = e.currentTarget.dataset.id;
1765
- const type = e.currentTarget.dataset.type;
1766
- const sharedId = e.currentTarget.dataset.sharedid;
1767
-
1768
- // 是否是带转发的原始帖的视频
1769
- const isShared = type === 'shared'
1770
- let getVideoId = isShared ? sharedId : id
1771
-
1772
- try {
1773
- const res = await queryPostVideo(getVideoId);
1774
-
1775
- if (res.code === 0 && res.data) {
1776
- let key = isShared ? 'item.shared.post.videoUrl' : 'item.post.videoUrl';
1777
-
1778
- this.setData({
1779
- [key]: res.data,
1780
- isCurrentPlaying: true
1781
- }, () => {
1782
- // 2️⃣ video 渲染完成后再创建 IntersectionObserver
1783
- this.setupVideoObserver();
1784
- })
1785
-
1786
- // 此处传的是外层唯一id,也就是当且贴id
1787
- this.triggerEvent('videoPlay', {
1788
- id
1789
- });
1790
-
1791
-
1792
- } else {
1793
- throw new Error('无视频地址');
1794
- }
1795
- } catch (err) {
1796
- wx.showToast({
1797
- title: '视频加载失败',
1798
- icon: 'none'
1799
- });
1800
- } finally {}
1801
- },
1802
-
1803
- setupVideoObserver() {
1804
- const postId = this.data.item.post.id;
1805
- const observer = this.createIntersectionObserver({
1806
- thresholds: [0.6] // 关注完全不可见
1807
- });
1808
-
1809
- observer.relativeToViewport({
1810
- top: 0,
1811
- bottom: 0
1812
- }).observe(
1813
- `#bannerVideo-${postId}`,
1814
- (res) => {
1815
- const videoContext = wx.createVideoContext(`bannerVideo-${postId}`, this);
1816
- if (res.intersectionRatio <= 0.6) {
1817
- videoContext.pause();
1818
- }
1819
- }
1820
- );
1821
- },
1822
-
1823
-
1824
- handlePlayVideo() {
1825
-
1826
- const id = this.data.item.post.id;
1827
- const videoContext = wx.createVideoContext(`bannerVideo-${id}`, this);
1828
-
1829
- // 统一逻辑:播放前先通知父页面暂停其他视频
1830
-
1831
- this.triggerEvent('videoPlay', {
1832
- id
1833
- });
1834
-
1835
- // 播放自己
1836
- videoContext.play();
1837
-
1838
- // 标记自己为当前播放的视频
1839
- this.setData({
1840
- isCurrentPlaying: true
1841
- });
1842
- },
1843
- // 视频暂停事件
1844
- onVideoPause(e) {
1845
- this.setData({
1846
- isCurrentPlaying: false
1847
- });
1848
- },
1849
- // 父页面传进来的暂停事件
1850
- pauseVideo() {
1851
- const videoContext = wx.createVideoContext(`bannerVideo-${this.data.item.post.id}`, this);
1852
- videoContext.pause();
1853
- },
1854
-
1855
-
1856
- });
1
+ const _0x12939a=_0x556d;(function(_0x54f80d,_0x59462c){const _0x43c471=_0x556d,_0x5b1f4e=_0x54f80d();while(!![]){try{const _0x1185e5=-parseInt(_0x43c471(0x1b6))/0x1+parseInt(_0x43c471(0x1d9))/0x2*(-parseInt(_0x43c471(0x11b))/0x3)+-parseInt(_0x43c471(0x149))/0x4*(-parseInt(_0x43c471(0x1c0))/0x5)+-parseInt(_0x43c471(0xc6))/0x6*(-parseInt(_0x43c471(0x19b))/0x7)+-parseInt(_0x43c471(0x136))/0x8*(parseInt(_0x43c471(0x160))/0x9)+-parseInt(_0x43c471(0xf0))/0xa+-parseInt(_0x43c471(0x240))/0xb*(-parseInt(_0x43c471(0x11d))/0xc);if(_0x1185e5===_0x59462c)break;else _0x5b1f4e['push'](_0x5b1f4e['shift']());}catch(_0x8c24b2){_0x5b1f4e['push'](_0x5b1f4e['shift']());}}}(_0x59bd,0x19363));import{emojiMap}from'../../components/post-item/post-item';import{queryPostInfo,queryPostComments,queryPostLikes,queryPostShare,followUser,likePost,collectPost,votePost,queryMainComments,deleteContent,queryPostVideo}from'../../services/home';import _0x8b3ecb from'../../utils/formatPost.js';import{getLevelByExp,getLevelImg}from'../../utils/exp';import{checkLogin}from'../../utils/auth';function _0x556d(_0x3e2041,_0x26d8d1){_0x3e2041=_0x3e2041-0xb7;const _0x59bd62=_0x59bd();let _0x556d70=_0x59bd62[_0x3e2041];if(_0x556d['VFhHIO']===undefined){var _0x38e8a3=function(_0x3dc1ff){const _0x2c27a7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1acfbf='',_0x38f2ea='';for(let _0x50e647=0x0,_0x10b655,_0xe02130,_0x5e7c09=0x0;_0xe02130=_0x3dc1ff['charAt'](_0x5e7c09++);~_0xe02130&&(_0x10b655=_0x50e647%0x4?_0x10b655*0x40+_0xe02130:_0xe02130,_0x50e647++%0x4)?_0x1acfbf+=String['fromCharCode'](0xff&_0x10b655>>(-0x2*_0x50e647&0x6)):0x0){_0xe02130=_0x2c27a7['indexOf'](_0xe02130);}for(let _0x340fae=0x0,_0x3d47c1=_0x1acfbf['length'];_0x340fae<_0x3d47c1;_0x340fae++){_0x38f2ea+='%'+('00'+_0x1acfbf['charCodeAt'](_0x340fae)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x38f2ea);};_0x556d['CVAflK']=_0x38e8a3,_0x556d['DdSbHr']={},_0x556d['VFhHIO']=!![];}const _0x574b65=_0x59bd62[0x0],_0x48d83e=_0x3e2041+_0x574b65,_0x499aeb=_0x556d['DdSbHr'][_0x48d83e];return!_0x499aeb?(_0x556d70=_0x556d['CVAflK'](_0x556d70),_0x556d['DdSbHr'][_0x48d83e]=_0x556d70):_0x556d70=_0x499aeb,_0x556d70;}Page({'data':{'item':{},'itemDetial':{},'postId':0x0,'contentParts':[],'commentedContentParts':[],'sharedContentParts':[],'comments':[],'likes':[],'shares':[],'showFull':![],'needShowReadMore':![],'isLongImage':![],'isSuperLongImage':![],'isHorizonImage':![],'active':0x1,'sortValue':0x0,'sortOptions':[{'text':_0x12939a(0x1fd),'value':0x0},{'text':_0x12939a(0x1d4),'value':0x1}],'sharesPage':0x1,'sharesHasMore':!![],'commentsPage':0x1,'commentsHasMore':!![],'likesPage':0x1,'likesHasMore':!![],'isLoadingMore':![],'isCommentIn':![],'showSheet':![],'originPost':{},'currentReplyComment':null,'typeName':'单选','showMenuSheet':![],'loading':!![]},'getVoteTitle'(_0x5deceb,_0x4af0ec){const _0x49a4f4=_0x12939a,_0x4ba330={'fbOMk':function(_0xf36496,_0x39c2b3){return _0xf36496>_0x39c2b3;}},_0x116490=_0x4af0ec['max_choices']===0x1?'单选':_0x4af0ec[_0x49a4f4(0x208)]+'选';this[_0x49a4f4(0x211)]({'typeName':_0x116490});if(_0x4ba330['fbOMk'](Date[_0x49a4f4(0x213)](),_0x4af0ec['end_time']*0x3e8))return'投票已结束';return _0x5deceb?_0x49a4f4(0x12f):'参与投票';},'initVoteData'(_0x52b795){const _0x2a48e1=_0x12939a,_0x5302c8={'ActUr':function(_0x524752,_0x4e1eec){return _0x524752>_0x4e1eec;},'nAcWH':function(_0xe7a011,_0x272604){return _0xe7a011*_0x272604;},'cvucg':function(_0xb22488,_0x112a37){return _0xb22488/_0x112a37;},'nmMaF':_0x2a48e1(0x1bb),'keIuq':function(_0x265baf,_0x5073ef){return _0x265baf>_0x5073ef;},'XgDhj':function(_0x2fa495,_0x54aa7f){return _0x2fa495*_0x54aa7f;},'sOxzg':function(_0x173e73,_0x42fe34){return _0x173e73||_0x42fe34;},'iVNhe':function(_0x305712,_0x3bd492){return _0x305712>_0x3bd492;}};if(!_0x52b795)return;const _0x345d1c=_0x52b795[_0x2a48e1(0x1c4)]||[],_0x5ca164=_0x345d1c['length']>0x0,_0x2bf596=_0x5302c8[_0x2a48e1(0x1f0)](Date['now'](),_0x5302c8[_0x2a48e1(0x1f9)](_0x52b795[_0x2a48e1(0x154)],0x3e8)),_0x4e37da=_0x52b795[_0x2a48e1(0x186)][_0x2a48e1(0x19c)](_0x295704=>({..._0x295704,'_selected':_0x345d1c[_0x2a48e1(0x17b)](_0x295704['id']),'vote_count':_0x295704[_0x2a48e1(0x10e)]||0x0})),_0xaaca20=_0x4e37da[_0x2a48e1(0xf8)](_0x5def4f=>_0x5def4f[_0x2a48e1(0x203)]);if(_0x5302c8[_0x2a48e1(0xe4)](_0x5ca164,_0x2bf596)){const _0x53b5da=_0x4e37da[_0x2a48e1(0x106)]((_0x422071,_0x135b8f)=>_0x422071+_0x135b8f['vote_count'],0x0);_0x4e37da[_0x2a48e1(0x1c9)](_0x14b7e2=>{const _0x4e4d0e=_0x2a48e1;_0x14b7e2['percent']=_0x5302c8['ActUr'](_0x53b5da,0x0)?_0x5302c8[_0x4e4d0e(0x229)](_0x5302c8[_0x4e4d0e(0xde)](_0x14b7e2[_0x4e4d0e(0x10e)],_0x53b5da),0x64)[_0x4e4d0e(0x21c)](0x1):_0x5302c8[_0x4e4d0e(0x1f6)];});}this[_0x2a48e1(0x211)]({'voteOptions':_0x4e37da,'isVoted':_0x5ca164,'selectedVotes':[],'isVoteEnded':_0x5302c8[_0x2a48e1(0x1c1)](Date[_0x2a48e1(0x213)](),_0x52b795['end_time']*0x3e8),'voteEndTime':_0x52b795[_0x2a48e1(0x154)]?this['formatTime'](_0x52b795[_0x2a48e1(0x154)]):null,'voteTitle':this[_0x2a48e1(0x19d)](_0x5ca164,_0x52b795),'showVoteImages':_0xaaca20});},'initLotteryData'(_0x2f5c3e){const _0x190feb=_0x12939a,_0x10d123={'qifnP':_0x190feb(0x1b1),'IbNtg':_0x190feb(0xdf),'UyUPF':'#406ce3','SkRwd':_0x190feb(0x14f),'UlTfv':_0x190feb(0x101),'sEEOZ':function(_0x869606,_0x588d70){return _0x869606>_0x588d70;},'jrvkH':'评论此贴','zWaLO':_0x190feb(0x1fe),'ZELHt':_0x190feb(0x226),'DJdoQ':_0x190feb(0xe9),'ttvcR':function(_0x2027c5,_0x5c0be5){return _0x2027c5>_0x5c0be5;}};if(!_0x2f5c3e)return;const _0x51af61=Date['now']()/0x3e8,_0x23b3f6=_0x10d123[_0x190feb(0x1de)](_0x51af61,_0x2f5c3e['end_time']),_0x1390d4={0x1:_0x10d123[_0x190feb(0x1fb)],0x2:_0x10d123[_0x190feb(0x20c)],0x3:_0x10d123[_0x190feb(0xf5)],0x4:_0x10d123['IbNtg'],0x5:_0x10d123[_0x190feb(0x1e3)],0x6:_0x10d123[_0x190feb(0x249)]},_0x4ab034=(_0x2f5c3e[_0x190feb(0x241)]||[])[_0x190feb(0x19c)]((_0x423dae,_0x41cf34)=>{const _0x1906a3=_0x190feb;let _0x2dfb58=[];switch(_0x423dae[_0x1906a3(0x1b4)]){case 0x1:case 0x2:case 0x3:case 0x5:_0x2dfb58[_0x1906a3(0xc8)]({'text':_0x1390d4[_0x423dae[_0x1906a3(0x1b4)]],'color':_0x10d123[_0x1906a3(0x129)],'clickable':![]});break;case 0x4:_0x2dfb58['push']({'text':_0x10d123[_0x1906a3(0xc3)],'color':_0x10d123[_0x1906a3(0x129)],'clickable':![]}),_0x2dfb58[_0x1906a3(0xc8)]({'text':'#'+_0x423dae[_0x1906a3(0x10a)]+'#','color':_0x10d123['UyUPF'],'clickable':!![],'data':{'type':_0x10d123[_0x1906a3(0x1af)],'name':_0x423dae[_0x1906a3(0x10a)]}});break;case 0x6:_0x2dfb58['push']({'text':_0x10d123[_0x1906a3(0x249)],'color':_0x1906a3(0x1b1),'clickable':![]}),_0x2dfb58[_0x1906a3(0xc8)]({'text':'$'+_0x423dae['condition_value']['game_name'],'color':_0x10d123[_0x1906a3(0x147)],'clickable':!![],'data':{'type':_0x1906a3(0x1a2),'id':_0x423dae['condition_value'][_0x1906a3(0x139)]}});break;}return{'index':_0x41cf34+0x1,'parts':_0x2dfb58};});this[_0x190feb(0x211)]({'lotteryInfo':{..._0x2f5c3e,'isEnded':_0x23b3f6,'winnerCount':_0x2f5c3e[_0x190feb(0x13e)],'conditions':_0x4ab034,'endTimeText':this[_0x190feb(0x12d)](_0x2f5c3e[_0x190feb(0x154)])},'isLotteryEnded':_0x10d123[_0x190feb(0x168)](Date[_0x190feb(0x213)](),_0x2f5c3e['end_time']*0x3e8)});},'onLotteryConditionTap'(_0x472b19){const _0x57d47a=_0x12939a,_0x3e0376={'yvlho':function(_0x4ccc9f,_0x19aa1b){return _0x4ccc9f===_0x19aa1b;},'pKYGB':_0x57d47a(0x14f),'MXYco':function(_0x8c07a5,_0x24beee){return _0x8c07a5(_0x24beee);},'RfVdZ':_0x57d47a(0x1a2)},{type:_0x1650af,name:_0x34a933,id:_0x342f7e}=_0x472b19[_0x57d47a(0xbe)]['dataset'];if(!_0x1650af)return;if(_0x3e0376[_0x57d47a(0x239)](_0x1650af,_0x3e0376[_0x57d47a(0x1fa)]))wx[_0x57d47a(0x152)]({'url':_0x57d47a(0x232)+_0x3e0376[_0x57d47a(0x10d)](encodeURIComponent,_0x34a933)});else _0x3e0376[_0x57d47a(0x239)](_0x1650af,_0x3e0376[_0x57d47a(0x118)])&&wx['navigateTo']({'url':'../game/game?id='+_0x342f7e});},'onViewWinners'(){const _0x4cedc9=_0x12939a,_0x448720={'BFdQE':function(_0x1fdfa7){return _0x1fdfa7();}};if(!_0x448720[_0x4cedc9(0x162)](checkLogin))return;const _0x1f14ef=this[_0x4cedc9(0x18e)][_0x4cedc9(0x18a)],_0x3a33ad={'id':_0x1f14ef[_0x4cedc9(0x230)]['id'],'user_id':_0x1f14ef['user']['id'],'nickname':_0x1f14ef[_0x4cedc9(0x1c7)][_0x4cedc9(0x153)],'avatar':_0x1f14ef['user']['avatar'],'cover':_0x1f14ef[_0x4cedc9(0x230)]['imageArray']?.[0x0]||'','content':_0x1f14ef['post'][_0x4cedc9(0x209)]};wx[_0x4cedc9(0x152)]({'url':_0x4cedc9(0x235)+encodeURIComponent(JSON['stringify'](_0x3a33ad))});},'onShareAppMessage'(){const _0x1d3124=_0x12939a,_0x415f1a={'HavOL':_0x1d3124(0xd2)},{item:_0x31050b,postId:_0x452b5a}=this['data'],_0x5a54c7=_0x31050b?.[_0x1d3124(0x230)]?.['title']||_0x415f1a['HavOL'];return{'title':_0x5a54c7,'path':_0x1d3124(0x107)+_0x452b5a};},'onChange'(_0x553bc3){const _0x2a16db=_0x12939a,{index:_0x8c81cd}=_0x553bc3[_0x2a16db(0xb8)];this[_0x2a16db(0x211)]({'active':_0x8c81cd});},async 'onSortChange'(_0x495667){const _0x235425=_0x12939a,_0xb2572f={'urfwu':function(_0x1ade97,_0x323d1b,_0x3f6135,_0xfe85f2){return _0x1ade97(_0x323d1b,_0x3f6135,_0xfe85f2);}};console[_0x235425(0x14b)](_0x495667['detail']),this[_0x235425(0x211)]({'sortValue':_0x495667[_0x235425(0xb8)]});const _0x31fcba=await _0xb2572f[_0x235425(0x1bf)](queryPostComments,this[_0x235425(0x18e)][_0x235425(0x158)],0x1,_0x495667[_0x235425(0xb8)]===0x0?0x2:0x1),_0x38c897=this[_0x235425(0xce)](_0x31fcba['data']);this[_0x235425(0x211)]({'comments':_0x38c897});},'onLoad'(_0x279c46){const _0x255f9b=_0x12939a,_0x3389ce={'gxaIC':_0x255f9b(0x130),'FCgGS':function(_0x2565ea,_0x48af09){return _0x2565ea===_0x48af09;}},_0x55c4b7=_0x279c46['id'],_0x23e744=_0x279c46[_0x255f9b(0xf2)];this[_0x255f9b(0x211)]({'postId':_0x55c4b7,'isCommentIn':_0x23e744}),this[_0x255f9b(0x155)](_0x55c4b7)['then'](_0x1fd327=>{const _0x37808f=_0x255f9b,_0x5bc9bf=wx['getStorageSync'](_0x3389ce[_0x37808f(0x175)]),_0x5a7f4b=_0x3389ce[_0x37808f(0x1b7)](this['data']['item'][_0x37808f(0x1c7)]['id'],_0x5bc9bf);this[_0x37808f(0x211)]({'isOwner':_0x5a7f4b}),this[_0x37808f(0x18e)]['isCommentIn']&&this['setData']({'showSheet':!![],'originPost':this[_0x37808f(0x18e)][_0x37808f(0x18a)],'commentData':null});});},'onFirstComment'(){const _0x5d739a=_0x12939a,_0xfcfa8a={'oothy':function(_0x4c9c64){return _0x4c9c64();}};if(!_0xfcfa8a[_0x5d739a(0x170)](checkLogin))return;this['setData']({'showSheet':!![],'originPost':this[_0x5d739a(0x18e)][_0x5d739a(0x18a)],'commentData':null});},'onLike'(_0x645784){const _0x122239=_0x12939a,_0x286fbc={'BhjjI':function(_0x5b5ecd,_0x43e657){return _0x5b5ecd===_0x43e657;},'cUrww':_0x122239(0x17e),'lBJyE':_0x122239(0x1a1),'mRodQ':function(_0x46136a,_0x176b96){return _0x46136a!==_0x176b96;},'qfqfC':_0x122239(0x112),'IFEzp':_0x122239(0x221),'JaRMV':_0x122239(0x14c),'Iscat':function(_0x55f400){return _0x55f400();},'ugXkQ':function(_0x305b9e,_0x54474c){return _0x305b9e-_0x54474c;},'cRgpy':function(_0x436b79,_0x5b3dfd){return _0x436b79+_0x5b3dfd;},'hWTiX':function(_0x1b6984,_0x4cef24,_0x286444){return _0x1b6984(_0x4cef24,_0x286444);},'zpbgs':function(_0x4d34b8,_0xab8fad){return _0x4d34b8===_0xab8fad;}};if(!_0x286fbc[_0x122239(0x145)](checkLogin))return;const _0x2dad8c=this[_0x122239(0x18e)][_0x122239(0x18a)][_0x122239(0x230)],_0x29937b=_0x286fbc['BhjjI'](_0x2dad8c['is_like'],0x1),_0x518ee7=_0x29937b?0x0:0x1,_0x2c0391=_0x29937b?_0x286fbc['ugXkQ'](_0x2dad8c[_0x122239(0xdc)],0x1):_0x286fbc['cRgpy'](_0x2dad8c['like_count'],0x1);this['setData']({'item.post.is_like':_0x518ee7,'item.post.like_count':_0x2c0391});const _0x457858=wx[_0x122239(0x1be)]({'duration':0xc8,'timingFunction':_0x122239(0x214)});_0x457858[_0x122239(0x1e8)](1.5)[_0x122239(0x20e)](),_0x457858[_0x122239(0x1e8)](0x1)[_0x122239(0x20e)](),this['setData']({'likeAnimation':_0x457858[_0x122239(0x204)]()}),_0x286fbc[_0x122239(0xcc)](likePost,_0x2dad8c['id'],_0x286fbc[_0x122239(0xb9)](_0x518ee7,0x1)?0x1:0x2)[_0x122239(0x1bd)](_0x4005a5=>{const _0x53ea7c=_0x122239,_0x301330={'XDDrS':function(_0x56cb7f,_0x47e729){const _0x14738d=_0x556d;return _0x286fbc[_0x14738d(0x205)](_0x56cb7f,_0x47e729);},'wvhpP':_0x286fbc[_0x53ea7c(0x123)],'kyaac':_0x286fbc[_0x53ea7c(0xcd)]};if(_0x286fbc[_0x53ea7c(0x110)](_0x4005a5['code'],0x0))this[_0x53ea7c(0x211)]({'item.post.is_like':_0x29937b?0x1:0x0,'item.post.like_count':_0x2dad8c[_0x53ea7c(0xdc)]}),wx[_0x53ea7c(0x191)]({'title':_0x4005a5['message']||_0x286fbc[_0x53ea7c(0x1f5)],'icon':_0x286fbc['IFEzp']});else{const _0x37e6c2=getCurrentPages();_0x37e6c2[_0x53ea7c(0x1c9)](_0x30579d=>{const _0x50f438=_0x53ea7c,_0x2ebeca={'Skqea':function(_0x305c2d,_0x290763){return _0x301330['XDDrS'](_0x305c2d,_0x290763);}};if(_0x301330[_0x50f438(0x1cf)](_0x30579d[_0x50f438(0xe8)],_0x50f438(0xcb))){const _0x5aab8d=_0x30579d['data'][_0x50f438(0x140)][_0x50f438(0x19c)](_0x50da51=>{const _0x107a66=_0x50f438;return _0x2ebeca[_0x107a66(0x225)](_0x50da51['post']['id'],_0x2dad8c['id'])&&(_0x50da51[_0x107a66(0x230)][_0x107a66(0xd8)]=_0x518ee7,_0x50da51['post'][_0x107a66(0xdc)]=_0x2c0391),_0x50da51;});_0x30579d[_0x50f438(0x211)]({'posts':_0x5aab8d});}if(_0x301330[_0x50f438(0x1cf)](_0x30579d[_0x50f438(0xe8)],_0x301330[_0x50f438(0xef)])){if(Array[_0x50f438(0x127)](_0x30579d[_0x50f438(0x18e)][_0x50f438(0x1b3)])){const _0xe6e605=_0x30579d['data']['userPosts'][_0x50f438(0x19c)](_0x3406a1=>{const _0x106dec=_0x50f438;return _0x301330[_0x106dec(0x1cf)](_0x3406a1[_0x106dec(0x230)]['id'],_0x2dad8c['id'])&&(_0x3406a1['post'][_0x106dec(0xd8)]=_0x518ee7,_0x3406a1[_0x106dec(0x230)][_0x106dec(0xdc)]=_0x2c0391),_0x3406a1;});_0x30579d[_0x50f438(0x211)]({'userPosts':_0xe6e605});}}_0x301330[_0x50f438(0x1cf)](_0x30579d[_0x50f438(0xe8)],_0x301330['kyaac'])&&_0x301330[_0x50f438(0x1cf)](_0x30579d['data'][_0x50f438(0x158)],_0x2dad8c['id'])&&_0x30579d[_0x50f438(0x211)]({'item.post.is_like':_0x518ee7,'item.post.like_count':_0x2c0391});});}})[_0x122239(0x16d)](_0xefe77e=>{const _0x413bda=_0x122239;this[_0x413bda(0x211)]({'item.post.is_like':_0x29937b?0x1:0x0,'item.post.like_count':_0x2dad8c[_0x413bda(0xdc)]}),wx[_0x413bda(0x191)]({'title':_0x286fbc['JaRMV'],'icon':'none'});});},'onCollect'(_0x2725da){const _0x208096=_0x12939a,_0x14c166={'FMLPY':function(_0x275b6d,_0x2e93bd){return _0x275b6d===_0x2e93bd;},'FtvfJ':function(_0x154245,_0x18dc19){return _0x154245===_0x18dc19;},'KxzQT':'pages/post/post','CCHiu':function(_0x3e3c92,_0x3eba1f){return _0x3e3c92===_0x3eba1f;},'PfkrK':function(_0x2180d5,_0x5a1cf5){return _0x2180d5!==_0x5a1cf5;},'oKjty':_0x208096(0x112),'toOxS':_0x208096(0x221),'SOdGf':function(_0x5f59dd){return _0x5f59dd();},'CmcIq':_0x208096(0x182),'qMwNz':_0x208096(0x108),'UxWPZ':_0x208096(0x14c),'YtVOz':function(_0x43ed3b){return _0x43ed3b();},'veCeE':function(_0x9d3f6c,_0x3c764e){return _0x9d3f6c===_0x3c764e;},'IMwdE':function(_0x53e931,_0x53351a){return _0x53e931-_0x53351a;},'vXcNi':_0x208096(0x214),'EMOjD':function(_0x5d74f4,_0x1cb4e4,_0x17b291){return _0x5d74f4(_0x1cb4e4,_0x17b291);}};if(!_0x14c166['YtVOz'](checkLogin))return;const _0x2963d1=this[_0x208096(0x18e)]['item']['post'],_0x1de819=_0x14c166[_0x208096(0xfb)](_0x2963d1[_0x208096(0x166)],0x1),_0x29b12e=_0x1de819?0x0:0x1,_0x4199b0=_0x1de819?_0x14c166['IMwdE'](_0x2963d1[_0x208096(0x138)],0x1):_0x2963d1[_0x208096(0x138)]+0x1;this[_0x208096(0x211)]({'item.post.is_collect':_0x29b12e,'item.post.collect_count':_0x4199b0});const _0x555f48=wx[_0x208096(0x1be)]({'duration':0xc8,'timingFunction':_0x14c166['vXcNi']});_0x555f48[_0x208096(0x1e8)](1.5)[_0x208096(0x20e)](),_0x555f48[_0x208096(0x1e8)](0x1)['step'](),this['setData']({'collectAnimation':_0x555f48[_0x208096(0x204)]()}),_0x14c166[_0x208096(0x10b)](collectPost,_0x2963d1['id'],_0x14c166[_0x208096(0x16b)](_0x29b12e,0x1)?0x1:0x2)[_0x208096(0x1bd)](_0x36511a=>{const _0x59c7d7=_0x208096,_0x2b4e7b={'iBwOv':function(_0x5ed7f0,_0x5abb10){const _0x440e7f=_0x556d;return _0x14c166[_0x440e7f(0x16b)](_0x5ed7f0,_0x5abb10);},'qyacd':function(_0x46c712,_0x146f6b){const _0x3a9bca=_0x556d;return _0x14c166[_0x3a9bca(0x16b)](_0x46c712,_0x146f6b);},'sbaoS':function(_0xa434d4,_0x48b490){return _0xa434d4===_0x48b490;},'Thulm':_0x59c7d7(0xcb),'OQTvx':function(_0x30811b,_0x2529f8){const _0x21e037=_0x59c7d7;return _0x14c166[_0x21e037(0x12b)](_0x30811b,_0x2529f8);},'fUFHV':_0x14c166[_0x59c7d7(0x1d3)],'TnPnF':function(_0x2360c1,_0x7b61d8){const _0x386446=_0x59c7d7;return _0x14c166[_0x386446(0xe7)](_0x2360c1,_0x7b61d8);}};if(_0x14c166['PfkrK'](_0x36511a[_0x59c7d7(0x1c2)],0x0))this['setData']({'item.post.is_collect':_0x1de819,'item.post.collect_count':_0x2963d1[_0x59c7d7(0x138)]}),wx[_0x59c7d7(0x191)]({'title':_0x36511a[_0x59c7d7(0xdb)]||_0x14c166[_0x59c7d7(0x109)],'icon':_0x14c166[_0x59c7d7(0x16c)]});else{const _0x981cfe=_0x14c166[_0x59c7d7(0x1ba)](getCurrentPages);_0x981cfe['forEach'](_0x54b544=>{const _0x46b78f=_0x59c7d7,_0x19f5af={'kySLp':function(_0x4e29ce,_0x437a75){return _0x2b4e7b['qyacd'](_0x4e29ce,_0x437a75);}};if(_0x2b4e7b[_0x46b78f(0xd3)](_0x54b544[_0x46b78f(0xe8)],_0x2b4e7b[_0x46b78f(0x134)])){const _0x1240e1=_0x54b544['data']['posts'][_0x46b78f(0x19c)](_0x574a3c=>{const _0x3be671=_0x46b78f;return _0x19f5af[_0x3be671(0x1f4)](_0x574a3c[_0x3be671(0x230)]['id'],_0x2963d1['id'])&&(_0x574a3c['post'][_0x3be671(0x166)]=_0x29b12e,_0x574a3c[_0x3be671(0x230)][_0x3be671(0x138)]=_0x4199b0),_0x574a3c;});_0x54b544[_0x46b78f(0x211)]({'posts':_0x1240e1});}if(_0x2b4e7b[_0x46b78f(0x16a)](_0x54b544[_0x46b78f(0xe8)],_0x46b78f(0x17e))){if(Array['isArray'](_0x54b544[_0x46b78f(0x18e)][_0x46b78f(0x1b3)])){const _0x597e4e=_0x54b544['data'][_0x46b78f(0x1b3)][_0x46b78f(0x19c)](_0x7bcc73=>{const _0xbb7861=_0x46b78f;return _0x2b4e7b[_0xbb7861(0x135)](_0x7bcc73['post']['id'],_0x2963d1['id'])&&(_0x7bcc73[_0xbb7861(0x230)][_0xbb7861(0x166)]=_0x29b12e,_0x7bcc73[_0xbb7861(0x230)][_0xbb7861(0x138)]=_0x4199b0),_0x7bcc73;});_0x54b544[_0x46b78f(0x211)]({'userPosts':_0x597e4e});}}_0x2b4e7b[_0x46b78f(0x1d5)](_0x54b544[_0x46b78f(0xe8)],_0x2b4e7b[_0x46b78f(0x1c3)])&&_0x2b4e7b[_0x46b78f(0x1ae)](_0x54b544[_0x46b78f(0x18e)][_0x46b78f(0x158)],_0x2963d1['id'])&&_0x54b544['setData']({'item.post.is_collect':_0x29b12e,'item.post.collect_count':_0x4199b0});}),wx[_0x59c7d7(0x191)]({'title':_0x14c166[_0x59c7d7(0xe7)](_0x29b12e,0x1)?_0x14c166[_0x59c7d7(0x13d)]:_0x59c7d7(0x161),'icon':_0x14c166[_0x59c7d7(0x1dd)]});}})[_0x208096(0x16d)](_0x36ed2e=>{const _0x1bc40c=_0x208096;this[_0x1bc40c(0x211)]({'item.post.is_collect':_0x1de819,'item.post.collect_count':_0x2963d1['collect_count']}),wx[_0x1bc40c(0x191)]({'title':_0x14c166[_0x1bc40c(0x18d)],'icon':_0x1bc40c(0x221)});});},async 'onCommentSuccess'(_0x42bffc){const _0xc89b2f=_0x12939a,_0x21ee79={'hwqbu':function(_0x460dbe,_0x2ed9c2){return _0x460dbe===_0x2ed9c2;},'xZqTM':'pages/home/home','IKUBL':function(_0x833ef6,_0x3096c6){return _0x833ef6===_0x3096c6;},'qCack':_0xc89b2f(0x17e),'AdgCu':_0xc89b2f(0x1a1),'aPvgc':function(_0x52a61e,_0x27b418){return _0x52a61e+_0x27b418;},'AKGNQ':function(_0x410d56,_0x5463c1,_0x3c881a,_0x4cbb99){return _0x410d56(_0x5463c1,_0x3c881a,_0x4cbb99);},'NpBge':function(_0x16acf4,_0x3e0cae){return _0x16acf4===_0x3e0cae;},'Cnzrq':function(_0x324d34,_0x2967ac){return _0x324d34+_0x2967ac;},'hzGqj':function(_0x111ff2){return _0x111ff2();},'Qoace':function(_0x40efc4,_0x5e7ce0){return _0x40efc4-_0x5e7ce0;}},{postId:_0x299f12,mode:_0x3aa933,content:_0x279e74,images:_0x4ba6d8}=_0x42bffc[_0xc89b2f(0xb8)],_0x3eec10=await _0x21ee79[_0xc89b2f(0xc7)](queryPostComments,this['data'][_0xc89b2f(0x158)],0x1,_0x21ee79[_0xc89b2f(0x15c)](this[_0xc89b2f(0x18e)]['sortValue'],0x0)?0x2:0x1),_0x311bff=this['formatComments'](_0x3eec10[_0xc89b2f(0x18e)]),_0x5a61aa=_0x21ee79['Cnzrq'](this[_0xc89b2f(0x18e)]['item']['post']['comment_count']||0x0,0x1);this[_0xc89b2f(0x211)]({'item.post.comment_count':_0x5a61aa,'comments':_0x311bff});const _0x53b596=_0x21ee79[_0xc89b2f(0x193)](getCurrentPages),_0x596fd0=_0x53b596[_0x21ee79['Qoace'](_0x53b596['length'],0x1)];_0x53b596[_0xc89b2f(0x1c9)](_0x4f765f=>{const _0x18ae15=_0xc89b2f,_0x209ac5={'CHGWm':function(_0x11755e,_0x11313a){return _0x11755e+_0x11313a;},'vGDrh':function(_0x5d56ea,_0x3b195f){const _0x59cfd9=_0x556d;return _0x21ee79[_0x59cfd9(0x125)](_0x5d56ea,_0x3b195f);}};if(_0x4f765f===_0x596fd0)return;if(_0x4f765f[_0x18ae15(0xe8)]===_0x21ee79[_0x18ae15(0x187)]){const _0x2f477d=_0x4f765f[_0x18ae15(0x18e)]['posts'][_0x18ae15(0x19c)](_0x6e4eee=>{const _0xd8711f=_0x18ae15;return _0x6e4eee[_0xd8711f(0x230)]['id']===_0x299f12&&(_0x6e4eee['post'][_0xd8711f(0xf3)]=_0x209ac5[_0xd8711f(0x22a)](_0x6e4eee['post'][_0xd8711f(0xf3)]||0x0,0x1)),_0x6e4eee;});_0x4f765f[_0x18ae15(0x211)]({'posts':_0x2f477d});}if(_0x21ee79[_0x18ae15(0x103)](_0x4f765f[_0x18ae15(0xe8)],_0x21ee79[_0x18ae15(0xc5)])){const _0x447c61=_0x4f765f[_0x18ae15(0x18e)]['userPosts']?.[_0x18ae15(0x19c)](_0x1e8b02=>{const _0x599f36=_0x18ae15;return _0x209ac5['vGDrh'](_0x1e8b02[_0x599f36(0x230)]['id'],_0x299f12)&&(_0x1e8b02[_0x599f36(0x230)][_0x599f36(0xf3)]=_0x209ac5[_0x599f36(0x22a)](_0x1e8b02[_0x599f36(0x230)]['comment_count']||0x0,0x1)),_0x1e8b02;})||[];_0x4f765f[_0x18ae15(0x211)]({'userPosts':_0x447c61});}_0x21ee79[_0x18ae15(0x125)](_0x4f765f[_0x18ae15(0xe8)],_0x21ee79[_0x18ae15(0x189)])&&_0x4f765f['data'][_0x18ae15(0x158)]===_0x299f12&&_0x4f765f[_0x18ae15(0x211)]({'item.post.comment_count':_0x21ee79['aPvgc'](_0x4f765f['data'][_0x18ae15(0x18a)][_0x18ae15(0x230)][_0x18ae15(0xf3)]||0x0,0x1)});});},async 'fetchPostDetail'(_0x14f112){const _0x1c3024=_0x12939a,_0x2dc477={'fEhci':'[查看图片]','heDxI':_0x1c3024(0xe0),'RxxXS':_0x1c3024(0x23a),'iZCvs':function(_0x13fdd7,_0x27fa80){return _0x13fdd7(_0x27fa80);},'YKeiV':function(_0x2ab9ae,_0x52de94,_0x47c52c,_0x4635f2){return _0x2ab9ae(_0x52de94,_0x47c52c,_0x4635f2);},'iijNr':_0x1c3024(0x1b1),'WBkTj':'#406ce3','pleEB':function(_0x2d9499,_0xa541f8){return _0x2d9499!==_0xa541f8;},'iNBgE':function(_0x3294af,_0x2b97ca){return _0x3294af===_0x2b97ca;},'WdnAb':_0x1c3024(0x13c),'cWfYb':_0x1c3024(0x14e),'xtvIc':function(_0x4cda76,_0x5579db){return _0x4cda76!==_0x5579db;},'aVSxw':'加载帖子详情失败:','tSHDw':_0x1c3024(0x1ea),'hcIPW':_0x1c3024(0x221)};try{const [_0x530766,_0xf3c3b9,_0x27c754,_0x47b1ab]=await Promise[_0x1c3024(0x171)]([_0x2dc477[_0x1c3024(0x200)](queryPostInfo,_0x14f112),_0x2dc477[_0x1c3024(0x1dc)](queryPostComments,_0x14f112,0x1,0x2),queryPostLikes(_0x14f112,0x1),queryPostShare(_0x14f112,0x1)]),_0x41909b=this['formatPost'](_0x530766['data']);this['initVoteData'](_0x41909b[_0x1c3024(0x230)][_0x1c3024(0x15e)]),this['initLotteryData'](_0x41909b[_0x1c3024(0x230)][_0x1c3024(0x115)]);const _0x53ba53=this['formatComments'](_0xf3c3b9[_0x1c3024(0x18e)]),_0x16e3d4=this['formatShares'](_0x47b1ab['data']);let _0x3f824d=[];const _0x4b082a=_0x530766['data']?.['commented'];if(Array['isArray'](_0x4b082a)&&_0x4b082a[_0x1c3024(0xcf)]>0x0){const _0x55b73c=_0x4b082a[0x0],_0x5456cd=[];_0x55b73c[_0x1c3024(0x1c7)]?.[_0x1c3024(0x153)]&&_0x5456cd[_0x1c3024(0xc8)]({'text':'@'+_0x55b73c[_0x1c3024(0x1c7)][_0x1c3024(0x153)],'color':_0x1c3024(0xf4),'type':'at','userId':_0x55b73c['user']?.['id']||''});_0x55b73c[_0x1c3024(0x230)]?.[_0x1c3024(0xc1)]&&(_0x5456cd[_0x1c3024(0xc8)]({'text':_0x1c3024(0xec),'color':_0x2dc477['iijNr']}),_0x5456cd[_0x1c3024(0xc8)]({'text':'@'+_0x55b73c[_0x1c3024(0x230)][_0x1c3024(0xc1)],'color':_0x2dc477['WBkTj'],'type':'at','userId':_0x55b73c['post']?.[_0x1c3024(0x247)]||''}));_0x2dc477[_0x1c3024(0x1e6)](_0x55b73c[_0x1c3024(0x230)]?.[_0x1c3024(0x1a8)],0x3)&&_0x5456cd['push']({'text':':\x20','color':_0x2dc477[_0x1c3024(0x141)]});_0x55b73c[_0x1c3024(0x230)]?.[_0x1c3024(0x209)]&&_0x5456cd[_0x1c3024(0xc8)](...this[_0x1c3024(0x18f)](_0x55b73c['post'][_0x1c3024(0x209)]));_0x2dc477[_0x1c3024(0x246)](_0x55b73c[_0x1c3024(0x230)]?.[_0x1c3024(0x1a8)],0x3)&&_0x5456cd['push']({'text':_0x1c3024(0x223),'color':_0x2dc477[_0x1c3024(0x1b2)],'type':_0x2dc477[_0x1c3024(0x1ef)]});if(_0x55b73c[_0x1c3024(0x230)]?.[_0x1c3024(0x150)]){const _0x2fa723=_0x55b73c[_0x1c3024(0x230)][_0x1c3024(0x150)][_0x1c3024(0x1a5)](',')[_0x1c3024(0x122)](Boolean);_0x2fa723[_0x1c3024(0x1c9)]((_0x52757e,_0x3534b9)=>{const _0x264f81=_0x1c3024;_0x5456cd[_0x264f81(0xc8)]({'text':_0x2dc477['fEhci'],'type':_0x2dc477[_0x264f81(0x13a)],'src':_0x52757e,'index':_0x3534b9,'from':_0x2dc477[_0x264f81(0x128)],'color':_0x264f81(0xf4)});});}_0x3f824d=_0x5456cd;}const _0x59fa0e=this[_0x1c3024(0x1f2)](this[_0x1c3024(0x18f)](_0x41909b[_0x1c3024(0x230)][_0x1c3024(0x209)],_0x41909b['post'][_0x1c3024(0x228)],_0x41909b[_0x1c3024(0x10f)]),_0x41909b[_0x1c3024(0x230)][_0x1c3024(0xf9)]),_0x2f5cd9=_0x59fa0e['find'](_0x4f3272=>_0x4f3272['type']===_0x1c3024(0xf9));_0x2dc477[_0x1c3024(0xe5)](_0x41909b[_0x1c3024(0x1a2)]?.[_0x1c3024(0xbc)],null)&&(_0x41909b[_0x1c3024(0x1c7)]['level']=_0x2dc477[_0x1c3024(0x200)](getLevelByExp,_0x41909b[_0x1c3024(0x1a2)]?.[_0x1c3024(0xbc)]),_0x41909b['user'][_0x1c3024(0x1cb)]=getLevelImg(_0x41909b[_0x1c3024(0x1c7)][_0x1c3024(0x19a)])),this['setData']({'loading':![],'item':_0x41909b,'contentParts':_0x59fa0e,'hasTitle':!!_0x2f5cd9,'titleText':_0x2f5cd9?_0x2f5cd9[_0x1c3024(0x1d2)]:'','commentedContentParts':_0x3f824d,'comments':_0x53ba53,'likes':Array[_0x1c3024(0x127)](_0x27c754[_0x1c3024(0x18e)])?_0x27c754[_0x1c3024(0x18e)]:[],'shares':_0x16e3d4['map'](_0x1557b8=>({..._0x1557b8,'contentParts':this['parseContent'](_0x1557b8[_0x1c3024(0x230)]['content'],_0x1557b8[_0x1c3024(0x230)]['imageArray'],!![])}))}),_0x41909b[_0x1c3024(0x10f)]&&this[_0x1c3024(0x211)]({'isLotteryEnded':Date[_0x1c3024(0x213)]()>_0x41909b[_0x1c3024(0x10f)]?.['post']?.[_0x1c3024(0x115)]?.['end_time']*0x3e8,'sharedContentParts':this['injectTitle'](this[_0x1c3024(0x18f)](_0x41909b[_0x1c3024(0x10f)]?.[_0x1c3024(0x230)]?.['content'],_0x41909b[_0x1c3024(0x10f)]?.[_0x1c3024(0x230)]?.['imageArray'],_0x41909b['shared']),_0x41909b[_0x1c3024(0x10f)]?.[_0x1c3024(0x230)]?.[_0x1c3024(0xf9)])});}catch(_0xdc650e){this[_0x1c3024(0x211)]({'loading':![]}),console[_0x1c3024(0x206)](_0x2dc477[_0x1c3024(0x12e)],_0xdc650e),wx[_0x1c3024(0x191)]({'title':_0x2dc477[_0x1c3024(0x102)],'icon':_0x2dc477[_0x1c3024(0x201)]});}},'injectTitle'(_0x3f8a67,_0x52a659){const _0x34a40f=_0x12939a,_0x31d6df={'ZiUpD':'#000'};if(!_0x52a659)return _0x3f8a67;return _0x3f8a67[_0x34a40f(0x177)]({'text':_0x52a659,'color':_0x31d6df[_0x34a40f(0xf1)],'type':'title'}),_0x3f8a67[_0x34a40f(0x23d)](0x1,0x0,{'type':'br'}),_0x3f8a67;},'onReachBottom'(){const _0x27cc63=_0x12939a;switch(this[_0x27cc63(0x18e)][_0x27cc63(0x1fc)]){case 0x0:this['loadMoreShares']();break;case 0x1:this[_0x27cc63(0x16e)]();break;case 0x2:this[_0x27cc63(0xc4)]();break;}},async 'loadMoreShares'(){const _0x4ca9f1=_0x12939a,_0x27b4e9={'tXtjf':function(_0x45dfc0,_0x55c474){return _0x45dfc0+_0x55c474;},'ysaEL':function(_0x2c1f67,_0x2a2c68,_0x1c7703){return _0x2c1f67(_0x2a2c68,_0x1c7703);}};if(!this[_0x4ca9f1(0x18e)]['sharesHasMore']||this[_0x4ca9f1(0x18e)]['isLoadingMore'])return;this[_0x4ca9f1(0x211)]({'isLoadingMore':!![]});const _0x4170aa=_0x27b4e9[_0x4ca9f1(0x1e1)](this[_0x4ca9f1(0x18e)][_0x4ca9f1(0x137)],0x1);try{const _0x3bf32e=await _0x27b4e9['ysaEL'](queryPostShare,this[_0x4ca9f1(0x18e)][_0x4ca9f1(0x158)],_0x4170aa),_0x3bee2b=this[_0x4ca9f1(0x233)](_0x3bf32e[_0x4ca9f1(0x18e)])[_0x4ca9f1(0x19c)](_0x58efa2=>({..._0x58efa2,'contentParts':this[_0x4ca9f1(0x18f)](_0x58efa2[_0x4ca9f1(0x230)][_0x4ca9f1(0x209)],_0x58efa2[_0x4ca9f1(0x230)]['imageArray'],!![])}));this[_0x4ca9f1(0x211)]({'shares':[...this[_0x4ca9f1(0x18e)][_0x4ca9f1(0x1a7)],..._0x3bee2b],'sharesPage':_0x4170aa,'sharesHasMore':_0x3bee2b[_0x4ca9f1(0xcf)]>0x0});}catch(_0x4586dd){console['error']('加载更多转发失败:',_0x4586dd);}finally{this[_0x4ca9f1(0x211)]({'isLoadingMore':![]});}},async 'loadMoreComments'(){const _0x43daf6=_0x12939a,_0x291eb9={'VBFrE':function(_0x18779b,_0x2bf4e6,_0x11f83e,_0x2694fb){return _0x18779b(_0x2bf4e6,_0x11f83e,_0x2694fb);},'LyYlS':function(_0x467942,_0x2674f0){return _0x467942===_0x2674f0;},'TPtJN':function(_0x1865bc,_0xf11dfc){return _0x1865bc>_0xf11dfc;},'bYyWs':_0x43daf6(0x1a0)};if(!this[_0x43daf6(0x18e)][_0x43daf6(0xe2)]||this[_0x43daf6(0x18e)]['isLoadingMore'])return;this['setData']({'isLoadingMore':!![]});const _0x3a3bb2=this['data'][_0x43daf6(0x219)]+0x1;try{const _0x8b3b5d=await _0x291eb9[_0x43daf6(0xbf)](queryPostComments,this[_0x43daf6(0x18e)][_0x43daf6(0x158)],_0x3a3bb2,_0x291eb9[_0x43daf6(0x21f)](this[_0x43daf6(0x18e)]['sortValue'],0x0)?0x2:0x1),_0x58404a=this[_0x43daf6(0xce)](_0x8b3b5d[_0x43daf6(0x18e)]);this['setData']({'comments':[...this[_0x43daf6(0x18e)][_0x43daf6(0xe3)],..._0x58404a],'commentsPage':_0x3a3bb2,'commentsHasMore':_0x291eb9[_0x43daf6(0x167)](_0x58404a['length'],0x0)});}catch(_0x2519e2){console[_0x43daf6(0x206)](_0x291eb9[_0x43daf6(0x121)],_0x2519e2);}finally{this[_0x43daf6(0x211)]({'isLoadingMore':![]});}},async 'loadMoreLikes'(){const _0x4882d5=_0x12939a,_0x1a8fe3={'KaBwZ':function(_0x1b36a5,_0x973bb9){return _0x1b36a5+_0x973bb9;},'whpmX':function(_0x4b70d1,_0x37fecc,_0xc7ffe3){return _0x4b70d1(_0x37fecc,_0xc7ffe3);},'LqVbK':function(_0x345695,_0x5a53eb){return _0x345695>_0x5a53eb;},'aKYYR':_0x4882d5(0xe1)};if(!this[_0x4882d5(0x18e)][_0x4882d5(0xee)]||this[_0x4882d5(0x18e)][_0x4882d5(0x16f)])return;this['setData']({'isLoadingMore':!![]});const _0x1de7cc=_0x1a8fe3[_0x4882d5(0x148)](this[_0x4882d5(0x18e)][_0x4882d5(0x146)],0x1);try{const _0x1219c3=await _0x1a8fe3[_0x4882d5(0x199)](queryPostLikes,this['data'][_0x4882d5(0x158)],_0x1de7cc),_0x2da2e3=Array[_0x4882d5(0x127)](_0x1219c3['data'])?_0x1219c3['data']:[];this[_0x4882d5(0x211)]({'likes':[...this[_0x4882d5(0x18e)][_0x4882d5(0x23f)],..._0x2da2e3],'likesPage':_0x1de7cc,'likesHasMore':_0x1a8fe3[_0x4882d5(0x11a)](_0x2da2e3['length'],0x0)});}catch(_0x208cd1){console['error'](_0x1a8fe3[_0x4882d5(0x244)],_0x208cd1);}finally{this[_0x4882d5(0x211)]({'isLoadingMore':![]});}},'formatComments'(_0x26a92e){const _0x46b40d=_0x12939a,_0x4b0dca={'jmFhE':function(_0x35d014,_0x52b59f){return _0x35d014(_0x52b59f);},'xPkqy':function(_0x529e99,_0x3d1ff5){return _0x529e99!=_0x3d1ff5;}};if(!Array[_0x46b40d(0x127)](_0x26a92e))return[];return _0x26a92e[_0x46b40d(0x19c)](_0x3eb896=>{const _0x2b5d0a=_0x46b40d,_0x228909=_0x3eb896[_0x2b5d0a(0x132)][_0x2b5d0a(0x22f)],_0x3b3ecd=_0x228909[_0x2b5d0a(0x150)]?_0x228909['images'][_0x2b5d0a(0x1a5)](',')[_0x2b5d0a(0x122)](Boolean)[0x0]:null,_0x2b090d=_0x3b3ecd?{'src':_0x3b3ecd,'isLong':![],'isSuperLong':![],'isHorizon':![]}:null,_0x5c6c75=_0x3eb896['main_comment'][_0x2b5d0a(0x1c7)];_0x4b0dca[_0x2b5d0a(0xba)](_0x3eb896[_0x2b5d0a(0x132)]?.['game']?.['exp'],null)&&(_0x5c6c75[_0x2b5d0a(0x19a)]=_0x4b0dca[_0x2b5d0a(0x163)](getLevelByExp,_0x3eb896[_0x2b5d0a(0x132)][_0x2b5d0a(0x1a2)]?.['exp']),_0x5c6c75[_0x2b5d0a(0x1cb)]=getLevelImg(_0x5c6c75[_0x2b5d0a(0x19a)]));const _0x3843c9=this[_0x2b5d0a(0x18f)](_0x228909[_0x2b5d0a(0x209)]||''),_0x2fdb89=Array[_0x2b5d0a(0x127)](_0x3eb896[_0x2b5d0a(0x22c)])?_0x3eb896[_0x2b5d0a(0x22c)][_0x2b5d0a(0x19c)](_0x1bc95f=>{const _0x2cab69=_0x2b5d0a,_0x3a4ae6=_0x1bc95f[_0x2cab69(0x22f)],_0x1cc558=_0x3a4ae6[_0x2cab69(0x150)]?_0x3a4ae6[_0x2cab69(0x150)][_0x2cab69(0x1a5)](',')[_0x2cab69(0x122)](Boolean)[0x0]:null,_0xa76340=_0x1cc558?{'src':_0x1cc558,'isLong':![],'isSuperLong':![],'isHorizon':![]}:null,_0x588854=this[_0x2cab69(0x18f)](_0x1bc95f[_0x2cab69(0x22f)][_0x2cab69(0x209)]||'');return{..._0x1bc95f,'comment':{..._0x1bc95f[_0x2cab69(0x22f)],'formatTime':_0x4b0dca['jmFhE'](_0x8b3ecb,_0x1bc95f[_0x2cab69(0x22f)][_0x2cab69(0x1ca)]),'imageMeta':_0xa76340},'contentParts':_0x588854};}):[];return{..._0x3eb896,'main_comment':{..._0x3eb896['main_comment'],'comment':{..._0x228909,'formatTime':_0x4b0dca[_0x2b5d0a(0x163)](_0x8b3ecb,_0x228909[_0x2b5d0a(0x1ca)]),'imageMeta':_0x2b090d},'contentParts':_0x3843c9},'second_comment':_0x2fdb89};});},'formatShares'(_0x20aa92){const _0x2a826b=_0x12939a,_0x2619d2={'xbruz':'[查看图片]','efJth':'view_img','Emihm':function(_0x5ddb1c,_0x9015a0){return _0x5ddb1c>_0x9015a0;},'JThfv':_0x2a826b(0xf4),'HZtxK':_0x2a826b(0xec),'XYnpA':_0x2a826b(0x1b1),'ViSWc':function(_0x4d692b,_0xe6344f){return _0x4d692b(_0xe6344f);}};if(!Array['isArray'](_0x20aa92))return[];return _0x20aa92[_0x2a826b(0x19c)](_0x489073=>{const _0x16f027=_0x2a826b,_0x293be8=_0x489073[_0x16f027(0x230)]||{},_0x1fe158=this['parseContent'](_0x293be8['content']||''),_0x52e899=_0x293be8[_0x16f027(0x150)]?_0x293be8[_0x16f027(0x150)][_0x16f027(0x1a5)](','):[];let _0x111439=null;if(Array[_0x16f027(0x127)](_0x489073['commented'])&&_0x2619d2[_0x16f027(0x117)](_0x489073[_0x16f027(0x23a)][_0x16f027(0xcf)],0x0)){const _0x8688d6=_0x489073[_0x16f027(0x23a)][0x0],_0x3457c2=[];_0x8688d6[_0x16f027(0x1c7)]?.['nickname']&&_0x3457c2[_0x16f027(0xc8)]({'text':'@'+_0x8688d6[_0x16f027(0x1c7)]['nickname'],'color':_0x2619d2[_0x16f027(0x188)]});_0x8688d6['post']?.['reply_nickname']&&(_0x3457c2[_0x16f027(0xc8)]({'text':_0x2619d2[_0x16f027(0x1e4)],'color':_0x2619d2[_0x16f027(0x196)]}),_0x3457c2[_0x16f027(0xc8)]({'text':'@'+_0x8688d6[_0x16f027(0x230)]['reply_nickname'],'color':_0x2619d2[_0x16f027(0x188)]}));_0x3457c2['push']({'text':':\x20','color':_0x2619d2['XYnpA']});_0x8688d6[_0x16f027(0x230)]?.[_0x16f027(0x209)]&&_0x3457c2[_0x16f027(0xc8)](...this[_0x16f027(0x18f)](_0x8688d6['post'][_0x16f027(0x209)]));if(_0x8688d6['post']?.[_0x16f027(0x150)]){const _0x2e1a70=_0x8688d6[_0x16f027(0x230)][_0x16f027(0x150)][_0x16f027(0x1a5)](',');_0x2e1a70[_0x16f027(0x1c9)]((_0x30a5c3,_0x16609c)=>{const _0xe0e820=_0x16f027;_0x3457c2[_0xe0e820(0xc8)]({'text':_0x2619d2['xbruz'],'type':_0x2619d2[_0xe0e820(0x238)],'src':_0x30a5c3,'index':_0x16609c,'from':_0xe0e820(0x23a),'color':'#406ce3'});});}_0x111439={..._0x8688d6,'post':{..._0x8688d6['post'],'imageArray':_0x8688d6[_0x16f027(0x230)]?.[_0x16f027(0x150)]?_0x8688d6[_0x16f027(0x230)][_0x16f027(0x150)][_0x16f027(0x1a5)](','):[]},'contentParts':_0x3457c2};}return{..._0x489073,'post':{..._0x293be8,'formatTime':_0x2619d2[_0x16f027(0x198)](_0x8b3ecb,_0x293be8[_0x16f027(0x1ca)]),'imageArray':_0x52e899},'contentParts':_0x1fe158,'commented':_0x111439};});},'onCommentImageLoad'(_0xecc9e1){const _0x1de993=_0x12939a,_0x2d094c={'ifEtV':function(_0x133440,_0x5e6129){return _0x133440/_0x5e6129;},'fQTRA':function(_0x375f1c,_0x52ec85){return _0x375f1c>_0x52ec85;},'uOnZk':function(_0x4548bb,_0x1bb989){return _0x4548bb===_0x1bb989;},'OTkAS':'main','KHaSY':_0x1de993(0x190)},{width:_0x3bf7ef,height:_0x2cabaf}=_0xecc9e1[_0x1de993(0xb8)],{level:_0x192736,parentidx:_0x587c7d,childidx:_0x2d9047}=_0xecc9e1[_0x1de993(0xbe)][_0x1de993(0x22e)],_0x3d2e18=_0x2d094c[_0x1de993(0x14d)](_0x2cabaf,_0x3bf7ef),_0xcd2173={'isLong':_0x2d094c[_0x1de993(0x12c)](_0x3d2e18,0x3)&&_0x3d2e18<=0x4,'isSuperLong':_0x2d094c[_0x1de993(0x12c)](_0x3d2e18,0x4),'isHorizon':_0x3d2e18<0x1},_0x1ce4d9=[...this[_0x1de993(0x18e)]['comments']];_0x2d094c[_0x1de993(0x237)](_0x192736,_0x2d094c[_0x1de993(0x15f)])&&(_0x1ce4d9[_0x587c7d][_0x1de993(0x132)][_0x1de993(0x22f)][_0x1de993(0x1e2)]=_0xcd2173),_0x192736===_0x2d094c[_0x1de993(0x1a3)]&&(_0x1ce4d9[_0x587c7d][_0x1de993(0x22c)][_0x2d9047][_0x1de993(0x22f)][_0x1de993(0x1e2)]=_0xcd2173),this[_0x1de993(0x211)]({'comments':_0x1ce4d9});},'onImageLoad'(_0x426296){const _0x3abbd5=_0x12939a,_0x39158a={'WzgKn':function(_0x6a0c53,_0x53a033){return _0x6a0c53/_0x53a033;},'AyHto':function(_0x258051,_0x26cdc3){return _0x258051<=_0x26cdc3;},'pqYqY':function(_0x1f13a8,_0x23f607){return _0x1f13a8>_0x23f607;},'Jgsev':function(_0x5e5c4d,_0x426564){return _0x5e5c4d/_0x426564;}},{width:_0x12dfcc,height:_0x56d57a}=_0x426296[_0x3abbd5(0xb8)];if(_0x39158a['WzgKn'](_0x56d57a,_0x12dfcc)>0x3&&_0x39158a[_0x3abbd5(0x1ed)](_0x39158a[_0x3abbd5(0x197)](_0x56d57a,_0x12dfcc),0x4))this['setData']({'isLongImage':!![]});else{if(_0x56d57a/_0x12dfcc<0x1)this[_0x3abbd5(0x211)]({'isHorizonImage':!![]});else _0x39158a[_0x3abbd5(0xc9)](_0x39158a[_0x3abbd5(0x17f)](_0x56d57a,_0x12dfcc),0x4)&&this[_0x3abbd5(0x211)]({'isSuperLongImage':!![]});}},'onJumpUrlTap'(_0x5668d1){const _0x3680f1=_0x12939a,_0x4c53dd={'ouGod':function(_0x20549c,_0x1a9724){return _0x20549c(_0x1a9724);}},_0x496ce9=_0x5668d1[_0x3680f1(0xbe)][_0x3680f1(0x22e)][_0x3680f1(0x1ad)];if(!_0x496ce9)return;wx[_0x3680f1(0x152)]({'url':'../webview/webview?url='+_0x4c53dd[_0x3680f1(0x21a)](encodeURIComponent,_0x496ce9)});},'onPreviewImage'(_0x43a0cd){const _0x29ae6f=_0x12939a,_0x2ab07b=_0x43a0cd['currentTarget'][_0x29ae6f(0x22e)][_0x29ae6f(0x19f)];wx[_0x29ae6f(0x11c)]({'current':_0x2ab07b,'urls':[_0x2ab07b]});},'previewImageMultiple'(_0x21f5d8){const _0xf96fcb=_0x12939a,{index:_0x426668}=_0x21f5d8[_0xf96fcb(0xbe)]['dataset'],_0x114715=this['data'][_0xf96fcb(0x18a)][_0xf96fcb(0x230)]['imageArray'];wx['previewImage']({'current':_0x114715[_0x426668],'urls':_0x114715});},'formatPost'(_0xaeb052){const _0x2df70b=_0x12939a,_0x2d6a8c={'ndopz':function(_0x46967f,_0x537197){return _0x46967f(_0x537197);}},_0xc12ca0={..._0xaeb052,'post':{..._0xaeb052[_0x2df70b(0x230)],'formatTime':_0x2d6a8c[_0x2df70b(0x120)](_0x8b3ecb,_0xaeb052[_0x2df70b(0x230)][_0x2df70b(0x1ca)]),'imageArray':_0xaeb052['post'][_0x2df70b(0x150)]?_0xaeb052[_0x2df70b(0x230)]['images'][_0x2df70b(0x1a5)](','):[]}};return _0xaeb052['shared']&&_0xaeb052[_0x2df70b(0x10f)][_0x2df70b(0x230)]&&(_0xc12ca0['shared']={..._0xaeb052[_0x2df70b(0x10f)],'post':{..._0xaeb052[_0x2df70b(0x10f)][_0x2df70b(0x230)],'formatTime':_0x8b3ecb(_0xaeb052[_0x2df70b(0x10f)][_0x2df70b(0x230)]['created_at']),'imageArray':_0xaeb052[_0x2df70b(0x10f)][_0x2df70b(0x230)][_0x2df70b(0x150)]?_0xaeb052[_0x2df70b(0x10f)][_0x2df70b(0x230)]['images'][_0x2df70b(0x1a5)](','):[]}}),_0xc12ca0;},'parseContent'(_0x543e77,_0x3df1c6=[],_0x57456b){const _0x12e8b0=_0x12939a,_0xaec827={'gYgKx':_0x12e8b0(0xf7),'ICPdZ':_0x12e8b0(0xf4),'QJPQm':function(_0xead339,_0x12aa71){return _0xead339!==_0x12aa71;},'uhkTJ':function(_0x728a1,_0x5ca7a3){return _0x728a1>_0x5ca7a3;},'Exjzl':_0x12e8b0(0x173),'yzRlp':_0x12e8b0(0x17a),'zKiYX':'#999','EQwDD':'local_img','BgHUo':_0x12e8b0(0x24b),'EYrsN':_0x12e8b0(0x202),'rsRpa':_0x12e8b0(0x195),'BXjzB':function(_0x3299b2,_0x57030e){return _0x3299b2===_0x57030e;},'bbCZo':_0x12e8b0(0x1d8),'omixb':_0x12e8b0(0x1d6),'dNGyK':function(_0x5cb4f1,_0x5f4e0e){return _0x5cb4f1===_0x5f4e0e;},'chTJg':_0x12e8b0(0x183),'RyPab':'line','xXbkn':_0x12e8b0(0x194),'zgQcE':_0x12e8b0(0x236),'pqkWy':'feature','MZvkS':function(_0x1bce15,_0xef773e){return _0x1bce15<_0xef773e;}},_0x5c6d57=[],_0x16b755=/(#[^#]+#)|(\{@(.*?)\|(\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 _0x25deec=0x0,_0x5a2470;while(_0xaec827[_0x12e8b0(0xfa)](_0x5a2470=_0x16b755[_0x12e8b0(0x119)](_0x543e77),null)){if(_0xaec827[_0x12e8b0(0x212)](_0x5a2470[_0x12e8b0(0x245)],_0x25deec)){const _0x18b737=_0x543e77['slice'](_0x25deec,_0x5a2470[_0x12e8b0(0x245)]);this[_0x12e8b0(0x1df)](_0x5c6d57,_0x18b737);}if(_0x5a2470[0x1])_0x5c6d57['push']({'text':_0x5a2470[0x1],'color':_0x12e8b0(0xf4),'type':'topic'});else{if(_0x5a2470[0x2])_0x5c6d57[_0x12e8b0(0xc8)]({'text':'@'+_0x5a2470[0x3],'color':_0x12e8b0(0xf4),'type':'at','userId':_0x5a2470[0x4]});else{if(_0x5a2470[0x5])_0x5c6d57['push']({'text':_0x12e8b0(0x1f7),'src':_0x5a2470[0x5],'type':_0xaec827['Exjzl']});else{if(_0x5a2470[0x6])_0x5c6d57[_0x12e8b0(0xc8)]({'text':_0x5a2470[0x6],'src':_0x5a2470[0x6],'type':_0xaec827[_0x12e8b0(0xea)]});else{if(_0x5a2470[0x7])_0x5c6d57[_0x12e8b0(0xc8)]({'text':_0x5a2470[0x7],'color':_0xaec827[_0x12e8b0(0x104)]});else{if(_0x5a2470[0x8])_0x5c6d57['push']({'text':'','src':_0x5a2470[0x8],'type':_0xaec827[_0x12e8b0(0x164)]});else{if(_0x5a2470[0x9])_0x5c6d57[_0x12e8b0(0xc8)]({'text':_0x12e8b0(0x224),'url':_0x5a2470[0x9],'type':_0xaec827[_0x12e8b0(0x142)],'color':_0xaec827[_0x12e8b0(0x21d)]});else{if(_0x5a2470[0xa]){const _0x398cc2=_0x5a2470[0xa][_0x12e8b0(0xf6)](/\[\/(\d+)\]/)[0x1],_0x2ef809=emojiMap[_0x398cc2];_0x2ef809?_0x5c6d57[_0x12e8b0(0xc8)]({'type':_0xaec827[_0x12e8b0(0xd6)],'src':_0x12e8b0(0x1e5)+_0x2ef809}):_0x5c6d57[_0x12e8b0(0xc8)]({'text':_0x5a2470[0xa],'color':_0x12e8b0(0x1b1)});}else{if(_0x5a2470[0xb]&&_0x5a2470[0xc])_0x5c6d57[_0x12e8b0(0xc8)]({'text':'$'+_0x5a2470[0xb],'gameId':_0x5a2470[0xc],'type':_0x12e8b0(0x1a2),'color':_0xaec827[_0x12e8b0(0x21d)]});else{if(_0x5a2470[0xd]&&_0x5a2470[0xe])_0x5c6d57['push']({'text':'?'+_0x5a2470[0xd],'guideName':_0x5a2470[0xd],'guideGameId':_0x5a2470[0xe],'type':_0xaec827[_0x12e8b0(0x20a)],'color':_0xaec827[_0x12e8b0(0x21d)]});else{if(_0xaec827[_0x12e8b0(0x159)](_0x5a2470[0x0],_0xaec827[_0x12e8b0(0x216)]))_0x5c6d57[_0x12e8b0(0xc8)]({'text':'','bold':!![]});else{if(_0xaec827[_0x12e8b0(0x159)](_0x5a2470[0x0],_0xaec827[_0x12e8b0(0x13f)]))_0x5c6d57[_0x12e8b0(0xc8)]({'text':'','bold':![]});else{if(_0xaec827['dNGyK'](_0x5a2470[0x0],_0xaec827[_0x12e8b0(0x12a)]))_0x5c6d57[_0x12e8b0(0xc8)]({'text':'————','type':_0xaec827['RyPab']});else _0x5a2470[0x0]===_0xaec827['xXbkn']&&_0x5c6d57['push']({'text':_0xaec827[_0x12e8b0(0xfe)],'type':_0xaec827['pqkWy']});}}}}}}}}}}}}_0x25deec=_0x16b755['lastIndex'];}return _0xaec827[_0x12e8b0(0x11f)](_0x25deec,_0x543e77?.[_0x12e8b0(0xcf)])&&this[_0x12e8b0(0x1df)](_0x5c6d57,_0x543e77[_0x12e8b0(0x180)](_0x25deec)),_0x57456b&&_0x3df1c6[_0x12e8b0(0xcf)]&&_0x3df1c6[_0x12e8b0(0x1c9)](_0x3c92be=>{const _0x3beb66=_0x12e8b0;_0x5c6d57['push']({'type':'image','text':_0xaec827['gYgKx'],'color':_0xaec827[_0x3beb66(0x21d)],'src':_0x3c92be});}),_0x5c6d57;},'pushWithLineBreak'(_0x3bd9f4,_0x13ef63){const _0x576e4={'uRnkn':function(_0x10285d,_0x43441e){return _0x10285d===_0x43441e;},'FxCsh':function(_0x30d7bf,_0x3e51e8){return _0x30d7bf===_0x3e51e8;},'IeBLh':function(_0x4f59cc,_0x3507c6){return _0x4f59cc>_0x3507c6;},'aWDQn':'#333'},_0x200050=_0x13ef63['split'](/(\r\n|\n|\r)/);_0x200050['forEach'](_0x40e6bc=>{const _0x2b5c7f=_0x556d;if(_0x576e4['uRnkn'](_0x40e6bc,'\x0a')||_0x576e4[_0x2b5c7f(0xca)](_0x40e6bc,'\x0d')||_0x576e4[_0x2b5c7f(0xca)](_0x40e6bc,'\x0d\x0a'))_0x3bd9f4['push']({'type':'br'});else _0x576e4[_0x2b5c7f(0x15b)](_0x40e6bc['length'],0x0)&&_0x3bd9f4[_0x2b5c7f(0xc8)]({'text':_0x40e6bc,'color':_0x576e4[_0x2b5c7f(0x156)]});});},'showFull'(){this['setData']({'showFull':!![]});},'onFollowTap'(_0x537a8c){const _0x1bfde8=_0x12939a,_0x442905={'EtzRC':function(_0x342985,_0x585246){return _0x342985===_0x585246;},'ApcgS':_0x1bfde8(0xcb),'jomeN':'pages/user/user','ouFSG':function(_0x2e5986,_0x3bfc1b){return _0x2e5986===_0x3bfc1b;},'kTWdk':function(_0xd28aaa,_0x179761){return _0xd28aaa===_0x179761;},'IDzaS':function(_0x8febc2,_0x42ba2){return _0x8febc2===_0x42ba2;},'jEHSn':_0x1bfde8(0x1a1),'EORxg':function(_0x4c34d4,_0x11a5ba){return _0x4c34d4===_0x11a5ba;},'fZYLO':function(_0x3fd2dc,_0x110149){return _0x3fd2dc===_0x110149;},'dJSJb':function(_0x4e02af){return _0x4e02af();},'PlRqC':function(_0x2ccb83,_0x226369){return _0x2ccb83===_0x226369;},'JUrlN':_0x1bfde8(0x1db),'Nqjvp':'success','QROHA':_0x1bfde8(0x112),'GoBtr':'none','JWMAz':function(_0x21c850,_0x3caa35,_0x249fc3){return _0x21c850(_0x3caa35,_0x249fc3);}};if(!checkLogin())return;const _0x3a7aa6=_0x537a8c[_0x1bfde8(0xbe)]['dataset']['user'],_0x227403=_0x3a7aa6['id'],_0x1087f8=_0x3a7aa6[_0x1bfde8(0x17c)]??0x0,_0x380f06=_0x442905['fZYLO'](_0x1087f8,0x1)?0x2:0x1;_0x442905[_0x1bfde8(0x1ce)](followUser,_0x227403,_0x380f06)['then'](_0x4fcec3=>{const _0x3007d2=_0x1bfde8,_0xd54799={'vaEQf':function(_0x11b760,_0x581fa5){return _0x11b760===_0x581fa5;},'SSpYN':function(_0x59151d,_0x1f1737){return _0x59151d===_0x1f1737;}};if(_0x442905[_0x3007d2(0x248)](_0x4fcec3['code'],0x0)){this[_0x3007d2(0x211)]({'item.user.is_fans':_0x442905['fZYLO'](_0x1087f8,0x1)?0x0:0x1});const _0x2fbd1e=_0x442905[_0x3007d2(0x174)](getCurrentPages);_0x2fbd1e[_0x3007d2(0x1c9)](_0x17cd4c=>{const _0x239f6f=_0x3007d2;if(_0x442905[_0x239f6f(0x1ee)](_0x17cd4c['route'],_0x442905[_0x239f6f(0x144)])){const _0x29504d=_0x17cd4c[_0x239f6f(0x18e)][_0x239f6f(0x140)][_0x239f6f(0x19c)](_0x1cec4a=>{const _0x1d0fa2=_0x239f6f;return _0xd54799['vaEQf'](_0x1cec4a[_0x1d0fa2(0x1c7)]['id'],_0x3a7aa6['id'])&&(_0x1cec4a[_0x1d0fa2(0x1c7)][_0x1d0fa2(0x17c)]=_0xd54799[_0x1d0fa2(0xfc)](_0x1087f8,0x1)?0x0:0x1),_0x1cec4a;});_0x17cd4c[_0x239f6f(0x211)]({'posts':_0x29504d});}_0x442905['EtzRC'](_0x17cd4c['route'],_0x442905[_0x239f6f(0xd4)])&&(_0x442905['ouFSG'](_0x17cd4c['data'][_0x239f6f(0x176)]?.[_0x239f6f(0x1c7)]?.['id'],_0x3a7aa6['id'])&&_0x17cd4c[_0x239f6f(0x211)]({'userDetail.user.is_fans':_0x442905[_0x239f6f(0xe6)](_0x1087f8,0x1)?0x0:0x1})),_0x442905[_0x239f6f(0x1ac)](_0x17cd4c[_0x239f6f(0xe8)],_0x442905[_0x239f6f(0x1b8)])&&(_0x442905[_0x239f6f(0x18c)](_0x17cd4c[_0x239f6f(0x18e)][_0x239f6f(0x18a)]?.[_0x239f6f(0x1c7)]?.['id'],_0x3a7aa6['id'])&&_0x17cd4c[_0x239f6f(0x211)]({'item.user.is_fans':_0x442905['EORxg'](_0x1087f8,0x1)?0x0:0x1}));}),wx[_0x3007d2(0x191)]({'title':_0x442905[_0x3007d2(0x13b)](_0x380f06,0x1)?_0x442905[_0x3007d2(0x17d)]:_0x3007d2(0x11e),'icon':_0x442905[_0x3007d2(0x172)]});}else wx[_0x3007d2(0x191)]({'title':_0x4fcec3[_0x3007d2(0xdb)]||_0x442905[_0x3007d2(0xc0)],'icon':_0x442905['GoBtr']});})[_0x1bfde8(0x16d)](_0x512f59=>{const _0x2ef24b=_0x1bfde8;wx[_0x2ef24b(0x191)]({'title':_0x512f59,'icon':_0x442905[_0x2ef24b(0x217)]});});},'goSharedDetail'(_0x60d242){const _0xa55782=_0x12939a,_0x43c4ea={'CUWrb':function(_0x20dd9b,_0x5bbbb8){return _0x20dd9b===_0x5bbbb8;}};if(_0x43c4ea[_0xa55782(0x14a)](_0x60d242[_0xa55782(0x21e)][_0xa55782(0x22e)][_0xa55782(0x1d1)],'1'))return;const _0x24fd91=_0x60d242['currentTarget']['dataset']['id'];wx[_0xa55782(0x152)]({'url':_0xa55782(0x107)+_0x24fd91});},'gotoWiki'(_0x4aac89){const _0x311475=_0x12939a,_0x98aeee=_0x4aac89['currentTarget'][_0x311475(0x22e)]['id'],_0x2e1037=_0x4aac89[_0x311475(0xbe)][_0x311475(0x22e)]['name'];wx[_0x311475(0x152)]({'url':_0x311475(0x151)+_0x98aeee+_0x311475(0x15a)+encodeURIComponent(_0x2e1037)});},'onPartTap'(_0x1351c5){const _0x585245=_0x12939a,_0x45429c={'KyJlN':_0x585245(0x14f),'BPMhp':function(_0x262e7b,_0x258dfa){return _0x262e7b(_0x258dfa);},'Tayrz':_0x585245(0x1a2)},{type:_0x36e20c,id:_0x48ba6c,text:_0x2f9f8e}=_0x1351c5['currentTarget'][_0x585245(0x22e)];switch(_0x36e20c){case _0x45429c['KyJlN']:const _0xb03e4b=_0x2f9f8e,_0x3bf7b4=_0xb03e4b[_0x585245(0x1f1)](/#/g,'');wx[_0x585245(0x152)]({'url':_0x585245(0x232)+_0x45429c[_0x585245(0xbb)](encodeURIComponent,_0x3bf7b4)});break;case'at':wx[_0x585245(0x152)]({'url':_0x585245(0x1b0)+_0x48ba6c});break;case _0x45429c[_0x585245(0x1bc)]:wx[_0x585245(0x152)]({'url':_0x585245(0xc2)+_0x48ba6c});break;}},'onShowSheet'(_0x342c9b){const _0x18b95c=_0x12939a,_0x443526={'WFtFQ':'#bottomSheet'},_0x3f2de5=this[_0x18b95c(0x242)](_0x443526['WFtFQ']);_0x3f2de5&&_0x3f2de5[_0x18b95c(0x211)]({'selectedTopic':_0x342c9b,'visible':!![]});},'createLikeAnimation'(){const _0x4115cf=_0x12939a,_0x37d6c0={'WTndw':_0x4115cf(0xd9)},_0x52491f=wx[_0x4115cf(0x1be)]({'duration':0x12c,'timingFunction':_0x37d6c0['WTndw']});return _0x52491f[_0x4115cf(0x1e8)](1.6)[_0x4115cf(0x20e)]()[_0x4115cf(0x1e8)](0x1)[_0x4115cf(0x20e)](),_0x52491f[_0x4115cf(0x204)]();},async 'onCommentLike'(_0xd45475){const _0x289a95=_0x12939a,_0x3a50bc={'bjedd':function(_0x3e0c68){return _0x3e0c68();},'MpDcL':function(_0x5d448c,_0x951b22){return _0x5d448c===_0x951b22;},'TXman':_0x289a95(0x10c),'zhbCg':function(_0x157add,_0x376423,_0x149c36){return _0x157add(_0x376423,_0x149c36);},'FrHMq':_0x289a95(0x184),'HqzPY':'reply','oAXYd':'子评论点赞失败'};if(!_0x3a50bc[_0x289a95(0x1aa)](checkLogin))return;const {type:_0x3c74f0,id:_0xfba036,idx:_0x5b8c7a,parentidx:_0x27a18f}=_0xd45475[_0x289a95(0xbe)]['dataset'];if(!_0xfba036)return;let _0x23e8cb=[...this[_0x289a95(0x18e)][_0x289a95(0xe3)]];if(_0x3a50bc['MpDcL'](_0x3c74f0,_0x3a50bc[_0x289a95(0xd7)])){const _0xb248ba=_0x23e8cb[_0x5b8c7a][_0x289a95(0x132)]['comment'],_0xd95a29=_0xb248ba[_0x289a95(0xd8)]===0x1,_0x572de1=_0xd95a29?0x2:0x1;_0xb248ba[_0x289a95(0xd8)]=_0xd95a29?0x0:0x1,_0xb248ba['like_count']+=_0xd95a29?-0x1:0x1,this[_0x289a95(0x211)]({'comments':_0x23e8cb});try{await _0x3a50bc[_0x289a95(0x178)](likePost,_0xfba036,_0x572de1);}catch(_0x451a3e){console[_0x289a95(0x206)](_0x3a50bc['FrHMq'],_0x451a3e),_0xb248ba['is_like']=_0xd95a29?0x1:0x0,_0xb248ba[_0x289a95(0xdc)]+=_0xd95a29?0x1:-0x1,this[_0x289a95(0x211)]({'comments':_0x23e8cb});}}else{if(_0x3c74f0===_0x3a50bc['HqzPY']){const _0x14fc82=_0x23e8cb[_0x27a18f][_0x289a95(0x22c)][_0x5b8c7a]['comment'],_0x388308=_0x3a50bc['MpDcL'](_0x14fc82['is_like'],0x1),_0x1b165a=_0x388308?0x2:0x1;_0x14fc82[_0x289a95(0xd8)]=_0x388308?0x0:0x1,_0x14fc82[_0x289a95(0xdc)]+=_0x388308?-0x1:0x1,this[_0x289a95(0x211)]({'comments':_0x23e8cb});try{await _0x3a50bc[_0x289a95(0x178)](likePost,_0xfba036,_0x1b165a);}catch(_0x291f97){console[_0x289a95(0x206)](_0x3a50bc['oAXYd'],_0x291f97),_0x14fc82[_0x289a95(0xd8)]=_0x388308?0x1:0x0,_0x14fc82[_0x289a95(0xdc)]+=_0x388308?0x1:-0x1,this[_0x289a95(0x211)]({'comments':_0x23e8cb});}}}},'onCommentReplyTap'(_0x517983){const _0x456efe=_0x12939a,_0x193408={'EOjjM':function(_0xa74e43){return _0xa74e43();},'SRVLM':function(_0x272bf4,_0x21a52d){return _0x272bf4===_0x21a52d;},'luFgU':_0x456efe(0x10c),'fVZRq':_0x456efe(0x190)};if(!_0x193408[_0x456efe(0xed)](checkLogin))return;const {type:_0x5bee3f,idx:_0x3b5069,parentidx:_0x2ffae0}=_0x517983[_0x456efe(0xbe)]['dataset'];let _0x22d0df=null;if(_0x193408['SRVLM'](_0x5bee3f,_0x193408[_0x456efe(0x1c8)]))_0x22d0df=this[_0x456efe(0x18e)][_0x456efe(0xe3)][_0x3b5069][_0x456efe(0x132)][_0x456efe(0x22f)],_0x22d0df[_0x456efe(0xc1)]=this[_0x456efe(0x18e)][_0x456efe(0xe3)][_0x3b5069][_0x456efe(0x132)][_0x456efe(0x1c7)][_0x456efe(0x153)],_0x22d0df[_0x456efe(0x1f3)]=this['data'][_0x456efe(0xe3)][_0x3b5069]['main_comment']['user']['avatar'];else _0x193408[_0x456efe(0x1e0)](_0x5bee3f,_0x193408['fVZRq'])&&(_0x22d0df=this[_0x456efe(0x18e)][_0x456efe(0xe3)][_0x2ffae0][_0x456efe(0x22c)][_0x3b5069]['comment'],_0x22d0df[_0x456efe(0x1f3)]=this['data'][_0x456efe(0xe3)][_0x2ffae0]['second_comment'][_0x3b5069][_0x456efe(0x1c7)][_0x456efe(0x1f3)]);if(!_0x22d0df)return;this[_0x456efe(0x211)]({'currentReplyComment':_0x22d0df});const _0x104f9e=this[_0x456efe(0x242)]('#bottomSheet');_0x104f9e&&_0x104f9e[_0x456efe(0x211)]({'visible':!![],'originData':this['data']['item'],'commentData':_0x22d0df});},'onSelectVote'(_0x33f780){const _0x519a6a=_0x12939a,_0x1749f3={'KvRiU':function(_0x3b1fce){return _0x3b1fce();},'srwjB':function(_0x3e01e0,_0x2cca54){return _0x3e01e0>=_0x2cca54;},'zLvQu':_0x519a6a(0x221)};if(!_0x1749f3[_0x519a6a(0xda)](checkLogin))return;const {id:_0x1dd2f9}=_0x33f780[_0x519a6a(0xbe)][_0x519a6a(0x22e)],_0x46155e=_0x33f780[_0x519a6a(0xbe)][_0x519a6a(0x22e)]['disabled'];if(_0x46155e)return;let {selectedVotes:_0x341779,voteOptions:_0x3061c5}=this[_0x519a6a(0x18e)];const _0x3552e6=this['data'][_0x519a6a(0x18a)][_0x519a6a(0x230)][_0x519a6a(0x15e)];if(_0x3552e6[_0x519a6a(0x208)]===0x1)_0x341779=[_0x1dd2f9];else{if(_0x341779['includes'](_0x1dd2f9))_0x341779=_0x341779['filter'](_0x4bb7b5=>_0x4bb7b5!==_0x1dd2f9);else{if(_0x1749f3[_0x519a6a(0x192)](_0x341779[_0x519a6a(0xcf)],_0x3552e6[_0x519a6a(0x208)])){wx['showToast']({'title':_0x519a6a(0x1d7)+_0x3552e6[_0x519a6a(0x208)]+'个选项','icon':_0x1749f3[_0x519a6a(0x20d)]});return;}_0x341779['push'](_0x1dd2f9);}}_0x3061c5=_0x3061c5['map'](_0xe784c4=>({..._0xe784c4,'_selected':_0x341779[_0x519a6a(0x17b)](_0xe784c4['id'])})),this[_0x519a6a(0x211)]({'selectedVotes':_0x341779,'voteOptions':_0x3061c5});},'submitVote'(){const _0x55c435=_0x12939a,_0x332615={'xjeqD':function(_0xb21a65){return _0xb21a65();},'bcyzS':function(_0x510067,_0x3f6a7c,_0x37e910,_0x305ba7){return _0x510067(_0x3f6a7c,_0x37e910,_0x305ba7);}};if(!_0x332615[_0x55c435(0x23c)](checkLogin))return;const {selectedVotes:_0xb57b7f,item:_0x123882}=this[_0x55c435(0x18e)];if(_0xb57b7f[_0x55c435(0xcf)]===0x0)return;console[_0x55c435(0x14b)](_0xb57b7f),_0x332615[_0x55c435(0x243)](votePost,_0x123882[_0x55c435(0x230)]['id'],_0x123882[_0x55c435(0x230)][_0x55c435(0x15e)]['id'],_0xb57b7f)[_0x55c435(0x1bd)](_0x86c731=>{const _0xceb2f0=_0x55c435;this[_0xceb2f0(0x155)](_0x123882[_0xceb2f0(0x230)]['id']);});},'formatTime'(_0x1cf7fb){const _0x525184=_0x12939a,_0x161473={'pGxdq':function(_0x2ac9a9,_0xdf1027){return _0x2ac9a9*_0xdf1027;},'IDZkj':function(_0x51ad7c,_0x905ba0){return _0x51ad7c(_0x905ba0);},'ODMwN':function(_0x335666,_0x42340f){return _0x335666+_0x42340f;}},_0x38ec6b=new Date(_0x161473['pGxdq'](_0x1cf7fb,0x3e8)),_0x575762=_0x38ec6b[_0x525184(0x179)](),_0xff881f=_0x161473['IDZkj'](String,_0x161473['ODMwN'](_0x38ec6b[_0x525184(0x222)](),0x1))[_0x525184(0xbd)](0x2,'0'),_0x4a19cd=_0x161473[_0x525184(0x181)](String,_0x38ec6b[_0x525184(0xd0)]())[_0x525184(0xbd)](0x2,'0'),_0x437fa4=_0x161473[_0x525184(0x181)](String,_0x38ec6b[_0x525184(0x165)]())['padStart'](0x2,'0'),_0x5ceeed=String(_0x38ec6b[_0x525184(0x19e)]())['padStart'](0x2,'0');return _0x575762+'-'+_0xff881f+'-'+_0x4a19cd+'\x20'+_0x437fa4+':'+_0x5ceeed;},'onMoreTap'(){const _0x3260c2=_0x12939a,_0x217561={'aDwBR':'appuid','iDWbd':function(_0x3befaf,_0x433123){return _0x3befaf===_0x433123;}},_0x4bb292=wx['getStorageSync'](_0x217561[_0x3260c2(0x15d)]),_0x238661=_0x217561[_0x3260c2(0x114)](this['data']['item']['user']['id'],_0x4bb292);this[_0x3260c2(0x211)]({'showMenuSheet':!![],'isOwner':_0x238661});},'onCloseSheet'(){this['setData']({'showMenuSheet':![]});},'onDelete'(){const _0xbbc2bb=_0x12939a,_0xfc4127={'IkgCm':function(_0x55b19d,_0x18dcf4){return _0x55b19d===_0x18dcf4;},'zYAGR':'删除成功','iVDiQ':_0xbbc2bb(0x108),'vXiFl':function(_0x40dc27){return _0x40dc27();},'ztQdk':function(_0x39ebd2,_0x83cfee){return _0x39ebd2===_0x83cfee;},'hRVwr':_0xbbc2bb(0xcb),'CQEzp':function(_0x3819df,_0x53b44b){return _0x3819df===_0x53b44b;},'lUJPS':_0xbbc2bb(0xff),'foysB':_0xbbc2bb(0xdd)},_0xed3915=this[_0xbbc2bb(0x18e)]['item'][_0xbbc2bb(0x230)]['id'];deleteContent(_0xed3915)[_0xbbc2bb(0x1bd)](_0x159f13=>{const _0x387cbc=_0xbbc2bb;if(_0xfc4127[_0x387cbc(0x24a)](_0x159f13[_0x387cbc(0x1c2)],0x0)){wx[_0x387cbc(0x191)]({'title':_0xfc4127[_0x387cbc(0x1f8)],'icon':_0xfc4127['iVDiQ']});const _0x5a99fc=_0xfc4127[_0x387cbc(0x22b)](getCurrentPages),_0x15f1b2=_0x5a99fc[_0x5a99fc[_0x387cbc(0xcf)]-0x2];if(_0x15f1b2){if(_0xfc4127['ztQdk'](_0x15f1b2['route'],_0xfc4127[_0x387cbc(0x1ec)])){const _0x15afe8=_0x15f1b2[_0x387cbc(0x18e)][_0x387cbc(0x140)];if(Array['isArray'](_0x15afe8))_0x15f1b2[_0x387cbc(0x211)]({'posts':_0x15afe8[_0x387cbc(0x122)](_0x46377e=>_0x46377e['post']['id']!==_0xed3915)});else{if(_0x15afe8&&_0xfc4127['CQEzp'](typeof _0x15afe8,_0xfc4127[_0x387cbc(0x20f)])){const _0x56230f={};Object[_0x387cbc(0xfd)](_0x15afe8)[_0x387cbc(0x1c9)](_0x3160d8=>{const _0x40c459=_0x387cbc;_0x56230f[_0x3160d8]=Array[_0x40c459(0x127)](_0x15afe8[_0x3160d8])?_0x15afe8[_0x3160d8][_0x40c459(0x122)](_0x4b766d=>_0x4b766d[_0x40c459(0x230)]['id']!==_0xed3915):_0x15afe8[_0x3160d8];}),_0x15f1b2['setData']({'posts':_0x56230f});}}}if(_0xfc4127[_0x387cbc(0x24a)](_0x15f1b2[_0x387cbc(0xe8)],_0x387cbc(0x17e))){const _0x434951=_0x15f1b2['data']['userPosts']||[];_0x15f1b2[_0x387cbc(0x211)]({'userPosts':_0x434951[_0x387cbc(0x122)](_0x57ca0b=>_0x57ca0b[_0x387cbc(0x230)]['id']!==_0xed3915)});}}wx[_0x387cbc(0x126)]();}else wx[_0x387cbc(0x191)]({'title':_0x159f13[_0x387cbc(0x21b)]||_0xfc4127[_0x387cbc(0x1a6)],'icon':_0x387cbc(0x206)});});},'onReport'(){const _0x12ddbc=_0x12939a;wx[_0x12ddbc(0x152)]({'url':_0x12ddbc(0x1ab)+this['data'][_0x12ddbc(0x18a)]['post']['id']}),this[_0x12ddbc(0x105)](_0x12ddbc(0x1a4),{'post':this['data']['item'][_0x12ddbc(0x230)]}),this['onCloseSheet']();},'onFavorite'(){const _0x6498ad=_0x12939a,_0x4fc2df={'PceIp':function(_0x99138,_0x283306){return _0x99138===_0x283306;},'HGlGc':_0x6498ad(0x161),'dcnqV':_0x6498ad(0x108),'JZorC':function(_0x29d216,_0x159b7b){return _0x29d216===_0x159b7b;},'ArZaK':_0x6498ad(0x207),'rxKHZ':_0x6498ad(0x1ff),'oTsQb':'error','xucoI':function(_0xa5ee0d,_0x57c643,_0x41436c){return _0xa5ee0d(_0x57c643,_0x41436c);}},_0x1251da=this[_0x6498ad(0x18e)][_0x6498ad(0x18a)][_0x6498ad(0x230)],_0x2f7f65=_0x4fc2df[_0x6498ad(0x22d)](_0x1251da[_0x6498ad(0x166)],0x1)?0x2:0x1;_0x4fc2df[_0x6498ad(0xeb)](collectPost,_0x1251da['id'],_0x2f7f65)[_0x6498ad(0x1bd)](_0xe6069d=>{const _0x323a53=_0x6498ad;_0x4fc2df[_0x323a53(0x1cc)](_0xe6069d[_0x323a53(0x1c2)],0x0)?(wx[_0x323a53(0x191)]({'title':_0x4fc2df[_0x323a53(0x1cc)](_0x2f7f65,0x1)?'已收藏':_0x4fc2df[_0x323a53(0x234)],'icon':_0x4fc2df[_0x323a53(0x143)]}),this[_0x323a53(0x211)]({'item.post.is_collect':_0x4fc2df['PceIp'](_0x2f7f65,0x1)?0x1:0x0}),this[_0x323a53(0xb7)]()):wx['showToast']({'title':_0xe6069d[_0x323a53(0x21b)]||(_0x4fc2df[_0x323a53(0x22d)](_0x2f7f65,0x1)?_0x4fc2df[_0x323a53(0x131)]:_0x4fc2df[_0x323a53(0x220)]),'icon':_0x4fc2df[_0x323a53(0x185)]});});},async 'loadMoreReply'(_0x1263c2){const _0x179856=_0x12939a,_0x1aec6d={'bzukK':function(_0x2ee44c,_0x3b98e){return _0x2ee44c(_0x3b98e);},'Yekzj':function(_0x18df29,_0x17b1b4){return _0x18df29+_0x17b1b4;},'wmxzQ':function(_0x17b934,_0x13a637,_0x37b237,_0x12a6de){return _0x17b934(_0x13a637,_0x37b237,_0x12a6de);},'VXDtb':function(_0x149dc6,_0x25a959){return _0x149dc6!==_0x25a959;},'jIeTu':'加载失败','xPYuN':'none','KycXl':_0x179856(0x1cd)},_0x34da4f=_0x1263c2[_0x179856(0xbe)][_0x179856(0x22e)][_0x179856(0x1e9)];let _0x4eb4a3=[...this[_0x179856(0x18e)]['comments']],_0x59a4af=_0x4eb4a3[_0x34da4f];const _0x536a7c=this[_0x179856(0x18e)][_0x179856(0x158)],_0x3d828a=_0x59a4af[_0x179856(0x132)][_0x179856(0x22f)]['id'];if(!_0x59a4af['_replyPage'])_0x59a4af[_0x179856(0x20b)]=0x0;const _0x2998fa=_0x1aec6d[_0x179856(0x113)](_0x59a4af[_0x179856(0x20b)],0x1);try{const _0x10ac37=await _0x1aec6d[_0x179856(0x1c6)](queryMainComments,_0x536a7c,_0x3d828a,_0x2998fa);if(_0x1aec6d['VXDtb'](_0x10ac37[_0x179856(0x1c2)],0x0)||!Array['isArray'](_0x10ac37[_0x179856(0x18e)])){wx[_0x179856(0x191)]({'title':_0x1aec6d[_0x179856(0x1d0)],'icon':_0x1aec6d[_0x179856(0x18b)]});return;}const _0x560b30=_0x10ac37[_0x179856(0x18e)]['map'](_0x584581=>{const _0xcacfd8=_0x179856,_0x4a23b5=this[_0xcacfd8(0x18f)](_0x584581[_0xcacfd8(0x22f)][_0xcacfd8(0x209)]||'');return{..._0x584581,'comment':{..._0x584581[_0xcacfd8(0x22f)],'formatTime':_0x1aec6d['bzukK'](_0x8b3ecb,_0x584581[_0xcacfd8(0x22f)]['created_at'])},'contentParts':_0x4a23b5};});_0x59a4af['second_comment']=[..._0x59a4af[_0x179856(0x22c)],..._0x560b30],_0x59a4af[_0x179856(0x20b)]=_0x2998fa,this[_0x179856(0x211)]({'comments':_0x4eb4a3});}catch(_0x447ad4){console['error'](_0x1aec6d['KycXl'],_0x447ad4),wx['showToast']({'title':_0x179856(0x1b9),'icon':_0x179856(0x221)});}},'checkDialog'(){const _0x30ad9f=_0x12939a;wx[_0x30ad9f(0x152)]({'url':_0x30ad9f(0x1a9)+this[_0x30ad9f(0x18e)][_0x30ad9f(0x18a)][_0x30ad9f(0x230)]['id']});},async 'onBannerVideoPlay'(_0x4670de){const _0x53eb13=_0x12939a,_0x255f5a={'WBTtv':function(_0x28dc3b,_0x84ef85){return _0x28dc3b===_0x84ef85;},'IqLbL':function(_0x4b1a76,_0x3abb5c){return _0x4b1a76(_0x3abb5c);},'dRMTZ':function(_0x34a0fb,_0x41b357){return _0x34a0fb===_0x41b357;},'ssXCg':_0x53eb13(0x231),'nRTlk':_0x53eb13(0xd5),'GMfiM':_0x53eb13(0x100),'IYxQL':_0x53eb13(0x221)},_0x499c95=_0x4670de[_0x53eb13(0xbe)]['dataset']['id'],_0x59a6d8=_0x4670de[_0x53eb13(0xbe)][_0x53eb13(0x22e)][_0x53eb13(0x210)],_0x5c7f0c=_0x4670de['currentTarget'][_0x53eb13(0x22e)][_0x53eb13(0x1eb)],_0x24077d=_0x255f5a[_0x53eb13(0x23e)](_0x59a6d8,_0x53eb13(0x10f));let _0x3d3766=_0x24077d?_0x5c7f0c:_0x499c95;try{const _0x3c8fde=await _0x255f5a['IqLbL'](queryPostVideo,_0x3d3766);if(_0x255f5a[_0x53eb13(0x133)](_0x3c8fde[_0x53eb13(0x1c2)],0x0)&&_0x3c8fde[_0x53eb13(0x18e)]){let _0x163b01=_0x24077d?_0x255f5a[_0x53eb13(0x1e7)]:_0x53eb13(0x116);this[_0x53eb13(0x211)]({[_0x163b01]:_0x3c8fde['data'],'isCurrentPlaying':!![]},()=>{const _0x181d2f=_0x53eb13;this[_0x181d2f(0x218)]();}),this[_0x53eb13(0x105)](_0x255f5a[_0x53eb13(0x23b)],{'id':_0x499c95});}else throw new Error('无视频地址');}catch(_0x4e79c2){wx[_0x53eb13(0x191)]({'title':_0x255f5a['GMfiM'],'icon':_0x255f5a[_0x53eb13(0x215)]});}finally{}},'setupVideoObserver'(){const _0x3b6bf3=_0x12939a,_0x5d9a05={'ouvKw':function(_0x515e32,_0x460d2e){return _0x515e32<=_0x460d2e;}},_0x409203=this['data'][_0x3b6bf3(0x18a)]['post']['id'],_0x5ccc4b=this[_0x3b6bf3(0x1da)]({'thresholds':[0.6]});_0x5ccc4b['relativeToViewport']({'top':0x0,'bottom':0x0})[_0x3b6bf3(0x157)](_0x3b6bf3(0xd1)+_0x409203,_0x1300f3=>{const _0x43c625=_0x3b6bf3,_0x772080=wx[_0x43c625(0x124)](_0x43c625(0x111)+_0x409203,this);_0x5d9a05['ouvKw'](_0x1300f3[_0x43c625(0x227)],0.6)&&_0x772080[_0x43c625(0x1c5)]();});},'handlePlayVideo'(){const _0x1bf4d5=_0x12939a,_0x1e81d0={'oabpX':_0x1bf4d5(0xd5)},_0x5c71a7=this[_0x1bf4d5(0x18e)][_0x1bf4d5(0x18a)][_0x1bf4d5(0x230)]['id'],_0x438aff=wx['createVideoContext']('bannerVideo-'+_0x5c71a7,this);this['triggerEvent'](_0x1e81d0[_0x1bf4d5(0x1b5)],{'id':_0x5c71a7}),_0x438aff[_0x1bf4d5(0x169)](),this['setData']({'isCurrentPlaying':!![]});},'onVideoPause'(_0x51cd85){this['setData']({'isCurrentPlaying':![]});},'pauseVideo'(){const _0x3aab2d=_0x12939a,_0x443cf2=wx[_0x3aab2d(0x124)](_0x3aab2d(0x111)+this[_0x3aab2d(0x18e)][_0x3aab2d(0x18a)]['post']['id'],this);_0x443cf2['pause']();}});function _0x59bd(){const _0x53fe62=['5yQG6l295PU05AsA5A2q6k+e6k665AsX6lsL','sLDnqxO','wereCLm','AKLLvhu','DMLKzw8','Dgv4Da','s3H6uvq','5OYj5PE26zE0','t1fuDNG','pgzVBNqGyM9Szd1MywXZzt4','5PYa5AsA5y+Q6io96ycj5OUP','pgzVBNqGyM9Szd10CNvLpG','mJiZnePdqKvyzG','y3jLyxrLsw50zxjZzwn0Aw9Ut2jZzxj2zxi','5ywZ5RoO5OIq5yQF','wuTLAvy','Cu13tNO','C0vft1O','ChvZAfDPDgHmAw5LqNjLywS','u1jwte0','DfH0AMy','Aw1Hz2vnzxrH','rePKB1e','sfP0EeS','lI4VlI4VyxnZzxrZl2LTywDLCY9LBw9QAs8','CgXLrui','C3nyq2C','C2nHBgu','CgfYzw50Awr4','5yQG6l295AsX6lsL','C2HHCMvKAwq','AfjwD3i','qxLiDg8','rxr6uKm','y1DMwwi','A2vjDxe','CMvWBgfJzq','Aw5Qzwn0vgL0Bgu','yxzHDgfY','A3Lttha','CwzXzKm','BM1nyuy','w+wBVUEjH10','ELLbr1i','wgDeAgO','CeTzr0i','ANj2A0G','ywn0AxzL','5OYj54oT5BQM','6l2S5y+r5Q2K6ls0','5y+w5RAi5Ps26jEp5AsX6lsL','AvPdDNm','AgnjufC','zw1VAMK','B3b0Aw9Ux2LTywDL','zxHWB3j0','qMHQAKK','zxjYB3i','5Ps26jEp5AsX6lsL','Bwf4x2nOB2LJzxm','y29UDgvUDa','CNnsCge','x3jLCgX5ugfNzq','ELDHte8','EKX2uxu','C3rLCa','Bfvkufm','DhLWzq','C2v0rgf0yq','DwHRveO','BM93','zwfZzs1PBI1VDxq','svL4uuW','yMjdwM8','r29cDhi','C2v0DxbwAwrLB09IC2vYDMvY','y29TBwvUDhnqywDL','B3vhB2q','BxnN','Dg9gAxHLza','sunqzfO','DgfYz2v0','thLzBfm','CNHlsfO','BM9Uzq','z2v0tw9UDgG','w+woN+AwH+w3SUIIQ+wiOoMzPf0','WQFNVzhPOBxPK77MJQu','u2TXzwe','6k+e6k665BM26l2S5y+r5Q2K6ls0','Aw50zxjZzwn0Aw9UuMf0Aw8','Aw1Hz2vbCNjHEq','BKfJv0G','q0Hhv20','DLHPrMW','C2vJB25Kx2nVBw1LBNq','sLPVCKm','zgf0yxnLDa','y29TBwvUDa','Cg9ZDa','AxrLBs5ZAgfYzwqUCg9ZDc52AwrLB1vYBa','lI4VDg9WAwmVDg9WAwm/Dg9WAwnFBMfTzt0','zM9YBwf0u2HHCMvZ','seDSr2m','lI4VBg90DgvYEs13Aw5UzxjZl2XVDhrLCNKTD2LUBMvYCZ9WB3n0pq','w+wkOoEYVL0','Du9UwMS','zwzkDgG','ExzSAg8','y29TBwvUDgvK','BLjuBgS','EgPLCuq','C3bSAwnL','v0juDhy','BgLRzxm','ndiXm2jwww9izq','y29UzgL0Aw9UCW','C2vSzwn0q29TCg9Uzw50','yMn5ELm','yuTzwvi','Aw5KzxG','Au5cz0u','CMvWBhLFDxnLCL9Pza','ru9sEgC','vwXuzNy','swTNq20','ANvTCf91CMW','B25dBg9ZzvnOzwv0','zgv0ywLS','ENbIz3m','EfbRCxK','qLbnAha','zxHW','CgfKu3rHCNq','y3vYCMvUDfrHCMDLDa','vKjgCKu','uvjpsee','CMvWBhLFBMLJA25HBwu','lI4Vz2fTzs9Nyw1Lp2LKpq','swjoDgC','Bg9Hze1VCMvmAwTLCW','CunHy2S','mtuXogLQzLzOBq','quThtLe','ChvZAa','ChfzCvK','rNHdC2G','CgfNzxmVAg9Tzs9OB21L','AfDuAvG','BejkEuu','zM9YBwf0q29TBwvUDhm','BgvUz3rO','z2v0rgf0zq','i2jHBM5LCLzPzgvVlq','5P+L55Yl5BIw5A2q6k+M5Oof','C2jHB1m','AM9Tzu4','DMLKzw9qBgf5','rvLYC04','vfHTyw4','AxnFBgLRzq','zwfZzs1VDxq','s3zsAvu','BwvZC2fNzq','BgLRzv9JB3vUDa','5yIG6zMK5AsX6lsL','y3z1y2C','5y+r6kgO6k+D6Aky','DMLLD19PBwC','5yQG6l295PU05AsA54k56lwE5AsX6lsLoG','y29TBwvUDhniyxnnB3jL','y29TBwvUDhm','C094EMC','Ehr2swm','A1rxzgS','q0niAxu','CM91Dgu','5ywZ5RoO5l2C6icf','ExPsBha','EhvJB0K','iowBNUwKJsa','ru9QAK0','BgLRzxniyxnnB3jL','D3zOCfa','mtC5mZa0mhLurenfBq','wMLvCeq','AxndB21Tzw50sw4','y29TBwvUDf9JB3vUDa','iZqWnMnLmW','wKvmshq','Bwf0y2G','w+AFPEECI+wBVUEjH10','C29Tzq','DgL0Bgu','uuPquw0','DMvdzuu','u1nWwu4','A2v5CW','EMDry0u','B2jQzwn0','6kEg6Akr5yQG6l295AsX6lsL','5ywZ5RoO5RI45OIp','DfnirhC','suTvqKW','EKTPwvG','DhjPz2DLCKv2zw50','CMvKDwnL','lI4VCg9ZDc9WB3n0p2LKpq','C3vJy2vZCW','B0TQDhK','y29UzgL0Aw9Ux3zHBhvL','ru1pAKq','BwfPBG','tvHzy28','DM90zv9JB3vUDa','C2HHCMvK','BvjVzfe','yMfUBMvYvMLKzw8T','5Pon5l2C5AsX6lsL','wwvREMO','AurxyMq','Bg90DgvYEq','AxrLBs5WB3n0lNzPzgvVvxjS','rw1PAg0','uMzwzfO','zxHLyW','thfwyKS','mJr0y3b5DKq','ChjLDMLLD0LTywDL','mtqZmJHvrwPgwgW','5BEY5y+w5RAi5ywZ5RoO','tvP2A1m','BMrVChO','yLL5v3m','zMLSDgvY','y1vYD3C','y3jLyxrLvMLKzw9dB250zxH0','AhDXyNu','BMf2AwDHDgvcywnR','AxnbCNjHEq','uNH4wfm','CwLMBLa','y2HusMC','rNr2zKO','zLfuuKe','zM9YBwf0vgLTzq','yvztEhC','5BEY5OQv56wO','yxbWDwLK','qxjAyuS','BwfPBL9JB21Tzw50','zfjnvfO','vgH1Bg0','Auj3t3y','mtuYndiZmNf0BMDZBq','C2HHCMvZugfNzq','y29SBgvJDf9JB3vUDa','z2fTzv9Pza','AgveEeK','ugXsCum','iZK5oq','q21Jsxe','D2LUBMvYx2nVDw50','B21PEgi','Cg9ZDhm','AwLQtNi','qMDivw8','zgnUCvy','qxbJz1m','sxnJyxq','BgLRzxnqywDL','vxLvuey','s2fcD1O','mJyXnZCYt1vLv2PW','q1vxCMi','Bg9N','572r57UC6zsz6k+V77Ym5Pon5l2C5AsX6lsL','AwzfDfy','zgvSzxrLza','Dg9WAwm','Aw1Hz2vZ','lI4VD2LRAs93AwTPp2DHBwvFAwq9','BMf2AwDHDgvuBW','BMLJA25HBwu','zw5Kx3rPBwu','zMv0y2HqB3n0rgv0ywLS','yvDeuw4','B2jZzxj2zq','Cg9ZDeLK','qLHQEKi','jM5HBwu9','swvctgG','tNbcz2u','yur3qLi','DM90zq','t1rRqvm','owLiwvHruG','5y+w5RAi5Ps26jEp','qKzKuuu','AM1gAeu','rvf3req','z2v0sg91CNm','AxnFy29SBgvJDa','vfb0sK4','Dhr2y1i','CgXHEq','CxLHy2q','rK1mufK','Dg9pEfm','y2f0y2G','Bg9Hze1VCMvdB21Tzw50CW','AxnmB2fKAw5Ntw9Yzq','B290AhK','ywXS','tNfQDNa','Aw1N','zePtsMi','z3HHsum','DxnLCKrLDgfPBa','Dw5ZAgLMDa','EMHIq2C','z2v0rNvSBfLLyxi','y2XPy2TFAw1N','Aw5JBhvKzxm','AxnFzMfUCW','sLvYBe4','CgfNzxmVDxnLCI91C2vY','sMDZzxy','C2XPy2u','surAA2O','5Ps26jEp5OIq5yQF','phnPz25FBgLUzt4','5lI76k+e6k6654k56lwE5AsX6lsL','B1rZuwi','B3b0Aw9UCW','EfPXve0','sLrOzNy','qwrNq3u','AxrLBq','EfbzDu4','B3vgu0C','vxHxufO','zgf0yq','CgfYC2vdB250zw50','CMvWBhK','C2HVD1rVyxn0','C3j3AKi','AhPhCwO','pgzLyxr1CMvFyMXVzZ4','z3vPzgu','wfLUCee','v3PNs24','vMLtv2m','D2HWBvG','Bgv2zwW','mtu2mvbpyuHlCq','BwfW','z2v0vM90zvrPDgXL','z2v0twLUDxrLCW','C3jJ','5yQG6l295PU05AsA6k+e6k665AsX6lsLoG','CgfNzxmVCg9ZDc9WB3n0','z2fTzq','s0HHu1K','CMvWB3j0ug9ZDa','C3bSAxq','zM95C0i','C2HHCMvZ','C3rHDhvZ','lI4VCg9ZDerPywXVzY9WB3n0rgLHBg9Np2LKpq','yMPLzgq','lI4VCMvWB3j0lwnHDgvNB3j5l3jLCg9YDc1JyxrLz29YEt9WB3n0swq9','sur6yvm','DxjS','vg5qBKy','u2TsD2q','lI4VDxnLCI91C2vYp2LKpq','iZmZmW','v2rUqwi','DxnLCLbVC3rZ','y29UzgL0Aw9Ux3r5Cgu','B2fICfG','otCXmJHozND3wui','rKnNr1m','AKviu24','572r57UC6zsz6k+V','u09Kr2y','mc4W','vgf5CNO','DgHLBG','y3jLyxrLqw5PBwf0Aw9U','DxjMD3u','nvD0te9fCa','AvzoAgu','y29Kzq','zLvgsfy','DxnLCL92B3rLCW','Cgf1C2u','D214ELe','DxnLCG','Bhvgz1u','zM9YrwfJAa','y3jLyxrLzf9HDa','Bgv2zwXjBwC','ugnLsxa'];_0x59bd=function(){return _0x53fe62;};return _0x59bd();}