southnote-mini-sdk 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
+ function _0x2cb5(){const _0x29f406=['BgvUz3rO','r0Xkwvu','6l2S5y+r5Q2K6ls0','iZmZmW','jM5HBwu9','ze91weu','y2XPy2TFAw1N','C29Tzq','tNLuExm','mtuWmdb4uKXrwgW','5Ps26jEp5AsX6lsL','lI4VlI4VyxnZzxrZl2LTywDLCY9LBw9QAs8','B2jZzxj2zq','zLvHs2e','BhnUz1m','phnPz25FBgLUzt4','sM1KwM0','BxnN','DgL0Bgu','Cg9ZDhm','y29TBwvUDhm','qMXSDK4','5y+w5RAi5Ps26jEp','5yIG6zMK5AsX6lsL','rw1qvNG','D3Dmrvm','Cfn6wNK','5yQG6l295PU05AsA5A2q6k+e6k665AsX6lsL','mtKZntK3mdnRBePyyLC','s1r1se4','CM9AqNG','rKDAuLe','CgvYy2vUDa','A1bNu0e','572r57UC6zsz6k+V77Ym5Pon5l2C5AsX6lsL','vuL6zNK','rMzvAu0','vNfQtxe','uvD5DgK','WQFNVzhPOBxPK77MJQu','B25dBg9ZzvnOzwv0','Ag1oyM4','zxjYB3i','iZqWnMnLmW','x3jLCgX5ugfNzq','CKPQB2W','Cg9ZDa','y29UzgL0Aw9Ux3zHBhvL','DMLKzw8','DxjS','uxjUAMO','ugrbtKq','nZK1ndrKq3jqC1u','C3jJ','rfDQA0i','C29YDfzHBhvL','B2jQzwn0','lI4VD2LRAs93AwTPp2DHBwvFAwq9','swnOyw4','Bg90DgvYEq','ywzbs1C','5BEY5y+w5RAi5ywZ5RoO','zwLYrhu','D2LUBMvYx2nVDw50','DxnLCKrLDgfPBa','DNnUzMS','ywLsBMe','Be1zrMm','yLLoBxK','Aw9ADLe','CgXHEq','BM93','rxbst2G','C3bSAwnL','uujiz3K','z2v0rNvSBfLLyxi','DunQsMu','lI4VCMvWB3j0lwnHDgvNB3j5l3jLCg9YDc1JyxrLz29YEt9WB3n0swq9','DevVy1y','twLXuxi','5y+c5lIo5OQv56wO','CMvSyxrPDMvuB1zPzxDWB3j0','EgLoExG','t3bfwgC','Aw1Hz2vnzxrH','Cg9ZDeLK','z2fTzv9Uyw1L','A2v5CW','thnQD1i','z2v0sg91CNm','5OYj5PE26zE0','zMLSDgvY','vKrivfu','5lI76k+e6k6654k56lwE5AsX6lsL','Dgv4Da','CLfWzwe','C3vJy2vZCW','zM9YrwfJAa','C2HHCMvZ','BMfTzq','CMvWBhLFDxnLCL9Pza','Bwf0y2G','CgfKu3rHCNq','uvviwKC','5y+w5RAi5Ps26jEp5AsX6lsL','rMD5C3i','EurYB2i','Bgv2zwXjBwC','CLDtvLO','zMv0y2HqB3n0rgv0ywLS','C2HHCMvKAwq','swPIAe8','ndC3otq4BgXUqNnn','AfnzCMG','wuDVBwq','zNjUt2i','DhjPz2DLCKv2zw50','BwfPBL9JB21Tzw50','CKPbtfq','DMLLD19PBwC','CvHtCeu','CwzhChG','zxHW','Bg9N','mJK1mtGWnunIu0fYBq','yMjquwi','DxnLCL92B3rLCW','zLDYtfy','CgfYzw50Awr4','Dg9WAwm','C2HHCMvZsgfZtw9Yzq','Cgf1C2u','BMLJA25HBwu','v0DPsxq','BfnTCeu','z29xzwS','y29Kzq','ywn0AxzL','Bg9Hze1VCMvmAwTLCW','y3jLyxrLvMLKzw9dB250zxH0','CM91Dgu','wxzNAwu','5OQv56wO5BEY57Ut5P2F','rgLmENy','zgv0ywLS','572r57UC6zsz6k+V','ENzfyxa','A2r1v28','AMXfufC','ENLUvxe','tMneDLu','AxrLBs5WB3n0lNzPzgvVvxjS','AxnbCNjHEq','C0PssKe','sunmBMm','6k+e6k665BM26l2S5y+r5Q2K6ls0','C2HHCMvZugfNzq','zxHLyW','5ywZ5RoO5RI45OIp','CgfNzxmVAg9Tzs9OB21L','BM9Uzq','y2f0y2G','AhfkDNu','BhH5Ehy','C2v0rgf0yq','5P+L55Yl5BIw5A2q6k+M5Oof','wgHtChu','C2nHBgu','uM9qA3C','Aw5Qzwn0vgL0Bgu','zwfZzs1PBI1VDxq','zgf0yq','5yIG6zMK5OIq5yQF','y29TBwvUDgvK','lI4VD2vIDMLLDY93zwj2Awv3p3vYBd0','yLLTCfa','s2PVse4','tuXIuKm','qvzPD3K','sencAhu','z3vPzgu','w+AFPEECI+wBVUEjH10','yxzHDgfY','tuDfALa','AxrLBs5ZAgfYzwqUCg9ZDc52AwrLB1vYBa','AxrLBq','z2v0twLUDxrLCW','y3jLyxrLsw50zxjZzwn0Aw9Ut2jZzxj2zxi','mtm2nZiYt3Lxrwje','lI4VCg9ZDerPywXVzY9WB3n0rgLHBg9Np2LKpq','Dg9gAxHLza','yxrerfu','y3jLyxrLzf9HDa','ChvZAfDPDgHmAw5LqNjLywS','ANzlEve','C3bSAxq','lI4VCg9ZDc9WB3n0p2LKpq','pgzLyxr1CMvFyMXVzZ4','DxnLCLbVC3rZ','C2vJB25Kx2nVBw1LBNq','zM9YBwf0q29TBwvUDhm','5yQG6l295PU05AsA6k+e6k665AsX6lsLoG','zLzeEwq','B3b0Aw9Ux2LTywDL','EwLJBuK','Aw1Hz2vbCNjHEq','z2v0u3rVCMfNzvn5BMm','BwfPBG','wvL1zuu','Bg9JywXFAw1N','yMfUBMvYvMLKzw8T','Bgv2zwW','5Pon5l2C5AsX6lsL','ANvTCf91CMW','zgf0yxnLDa','C2v0DxbwAwrLB09IC2vYDMvY','BMf2AwDHDgvcywnR','A2jVs0u','lI4VDg9WAwmVDg9WAwm/Dg9WAwnFBMfTzt0','y29UzgL0Aw9UCW','svP0tuW','5yQG6l295PU05AsA6l2S5y+r5AsX6lsLoG','5Ps26jEp5OIq5yQF','w+wBVUEjH10','i2jHBM5LCLzPzgvVlq','Aw5JBhvKzxm','zgLZywjSzwq','tfHtre4','5yQG6l295PU05AsA54k56lwE5AsX6lsLoG','zvrkufy','CuvfD3G','uxPUBMS','s0HgB2y','tefHzwC','wwrhA28','BgLRzv9JB3vUDa','pgzVBNqGyM9Szd10CNvLpG','se9JsxO','6kEg6Akr5yQG6l295AsX6lsL','r3P6rg0','DuvSAwe','BgLUzq','AxndB21Tzw50sw4','zM9YBwf0vgLTzq','mNbAwNbJvW','vKHOEeG','wuf5Ag4','uxjurwy','wxbJEwq','v0DIEwu','uMLpr04','u0Hdv3u','y2Plt0m','DM90zv9JB3vUDa','wvPjAe0','B2Pfv3i','C2HHCMvK','ueXvA20','DM90zq','rgLRCKK','veHKCue','5PEG6kEg6Akr5zYW5z2a','EMLfAxy','B2TpBLG','mJrACevoq28','DhLWzq','5BEY5Ps26jEp','vKvbEhi','CgfNzxmVDxnLCI91C2vY','DhzYDhm','AxnmB2fKAw5Ntw9Yzq','rvzdCxO','s21Ys0q','BhPnq1O','AerruNe','z2fTzq','sNvtu2W','y29UDgvUDa','EwLewui','ENfJy1q','zMLUza','CgfYC2vdB250zw50','Aw5PDeXVDhrLCNLeyxrH','BgLRzxnqywDL','AwfczMe','nZD4C2z6wLq','B0zmtwK','CMvWBgfJzq','mtC2ntq1zMzMCvr3','y29TBwvUDhniyxnnB3jL','y29TBwvUDf9JB3vUDa','zgvSzxrLza','qMTRvva','EMPUshK','q2HbAxK','5BEY5OQv56wO','Bg9Hze1VCMvtAgfYzxm','DfbvELm','CMzXwvm','z2fTzv9Pza','uvjiCMm','ug9Wu1G','uwjPDLC','ChvZAa','C2HVD1rVyxn0','Aw1Hz2vZ','Aw50zxjZzwn0Aw9UuMf0Aw8','zMvHDhvYzq','BwfW','tM9iAK0','y0jNC3u','zhjeuw4','B1zXD0S','yxbWDwLK','lI4VBg90DgvYEs13Aw5UzxjZl2XVDhrLCNKTD2LUBMvYCZ9WB3n0pq','r0jfAfq','vMPAA3C','Aw5PDfzVDgveyxrH','nJm1neHuufrQBG','y29TBwvUDa','A0H3ug0','suHfB2W','AxnFy29SBgvJDa','5OYj54oT5BQM','z2v0tw9UDgG','C3rLCa','CMvWB3j0ug9ZDa','zxHWB3j0','DgHLBG','CgfNzxmVCg9ZDc9WB3n0','ywXS','zM9YBwf0u2HHCMvZ','wwPkD2O','w+wkOoEYVL0','DMLKzw9qBgf5','Bwf4x2nOB2LJzxm','BgLRzxm','wK56AM4','uNHqAvC','5lIQ6ycj6Ag5','z2v0vM90zvrPDgXL','Aw1Hz2u','AuLOze0','y1LPrLC','6k+e6k665Q2K6ls0','C2XPy2u','vhfyyuC','y3vYCMvUDfrHCMDLDa','BxHIz3y','zvjbufm','y29SBgvJDf9JB3vUDa','z05pseO','z1neCxm','Ew5jAey','BNzTq0K','zMfKtwq','DxnLCG','BwvZC2fNzq','tLnIq2O','A1H1q1m','t0PruNi','iZK5oq','zw5Kx3rPBwu','BMf2AwDHDgvuBW','y29UzgL0Aw9Ux3r5Cgu','iowBNUwKJsa','C2vSzwn0q29TCg9Uzw50','AxnFBgLRzq','sg9dufq','B3r4AMe','s0HlB3C','5yQG6l295AsX6lsL','vw1VrKi','AxnFzMfUCW','lI4Vz2fTzs9Nyw1Lp2LKpq','uM5rwgu','tMrRweC','pgzVBNqGyM9Szd1MywXZzt4','rLrTu3C','CMvWBhK','CMvWBhLFBMLJA25HBwu','y3jLyxrLqw5PBwf0Aw9U','i2jVDhrVBvnOzwv0','wKLHC0S'];_0x2cb5=function(){return _0x29f406;};return _0x2cb5();}function _0x5797(_0xdfe1b9,_0x1ce4dd){_0xdfe1b9=_0xdfe1b9-0xd8;const _0x2cb5ea=_0x2cb5();let _0x5797a8=_0x2cb5ea[_0xdfe1b9];if(_0x5797['zwgNRj']===undefined){var _0x15579b=function(_0x14efc9){const _0x46476d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x263926='',_0x19b737='';for(let _0x5e609a=0x0,_0x142968,_0x537589,_0x53d05e=0x0;_0x537589=_0x14efc9['charAt'](_0x53d05e++);~_0x537589&&(_0x142968=_0x5e609a%0x4?_0x142968*0x40+_0x537589:_0x537589,_0x5e609a++%0x4)?_0x263926+=String['fromCharCode'](0xff&_0x142968>>(-0x2*_0x5e609a&0x6)):0x0){_0x537589=_0x46476d['indexOf'](_0x537589);}for(let _0x2c8e9f=0x0,_0x40fe77=_0x263926['length'];_0x2c8e9f<_0x40fe77;_0x2c8e9f++){_0x19b737+='%'+('00'+_0x263926['charCodeAt'](_0x2c8e9f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x19b737);};_0x5797['DCsQdm']=_0x15579b,_0x5797['PUTpBc']={},_0x5797['zwgNRj']=!![];}const _0x3439bf=_0x2cb5ea[0x0],_0x3980d7=_0xdfe1b9+_0x3439bf,_0x2d2ef8=_0x5797['PUTpBc'][_0x3980d7];return!_0x2d2ef8?(_0x5797a8=_0x5797['DCsQdm'](_0x5797a8),_0x5797['PUTpBc'][_0x3980d7]=_0x5797a8):_0x5797a8=_0x2d2ef8,_0x5797a8;}const _0x442992=_0x5797;(function(_0x542c81,_0x500d28){const _0x111a15=_0x5797,_0x5c57dc=_0x542c81();while(!![]){try{const _0x34872f=parseInt(_0x111a15(0x232))/0x1*(parseInt(_0x111a15(0x1fa))/0x2)+parseInt(_0x111a15(0x1ba))/0x3+-parseInt(_0x111a15(0x1ae))/0x4+-parseInt(_0x111a15(0xde))/0x5*(-parseInt(_0x111a15(0x246))/0x6)+-parseInt(_0x111a15(0xdb))/0x7*(-parseInt(_0x111a15(0x172))/0x8)+-parseInt(_0x111a15(0xfc))/0x9*(-parseInt(_0x111a15(0x147))/0xa)+-parseInt(_0x111a15(0x15a))/0xb;if(_0x34872f===_0x500d28)break;else _0x5c57dc['push'](_0x5c57dc['shift']());}catch(_0x4af185){_0x5c57dc['push'](_0x5c57dc['shift']());}}}(_0x2cb5,0x86796));import{emojiMap}from'../../components/post-item/post-item';import{queryPostInfo,queryPostComments,queryPostLikes,queryPostShare,followUser,likePost,collectPost,votePost,queryMainComments,deleteContent,queryPostVideo}from'../../services/home';import _0x1fd1d4 from'../../utils/formatPost.js';import{getLevelByExp,getLevelImg}from'../../utils/exp';import{checkLogin}from'../../utils/auth';Page({'data':{'item':{},'itemDetial':{},'postId':0x0,'contentParts':[],'commentedContentParts':[],'sharedContentParts':[],'comments':[],'likes':[],'shares':[],'showFull':![],'needShowReadMore':![],'isLongImage':![],'isSuperLongImage':![],'isHorizonImage':![],'active':0x1,'sortValue':0x0,'sortOptions':[{'text':_0x442992(0x101),'value':0x0},{'text':_0x442992(0x198),'value':0x1}],'sharesPage':0x1,'sharesHasMore':!![],'commentsPage':0x1,'commentsHasMore':!![],'likesPage':0x1,'likesHasMore':!![],'isLoadingMore':![],'isCommentIn':![],'showSheet':![],'originPost':{},'currentReplyComment':null,'typeName':'单选','showMenuSheet':![],'loading':!![]},'getVoteTitle'(_0x57ef07,_0xd587c8){const _0x305980=_0x442992,_0x259d3d={'Qznnk':function(_0x331aa4,_0x319196){return _0x331aa4===_0x319196;},'vYhRk':function(_0x2bf735,_0x52c5b0){return _0x2bf735>_0x52c5b0;},'rJALT':function(_0x2538be,_0x30f68c){return _0x2538be*_0x30f68c;}},_0x4f8faa=_0x259d3d[_0x305980(0x225)](_0xd587c8[_0x305980(0x10d)],0x1)?'单选':_0xd587c8[_0x305980(0x10d)]+'选';this[_0x305980(0x1e2)]({'typeName':_0x4f8faa});if(_0x259d3d['vYhRk'](Date[_0x305980(0x185)](),_0x259d3d[_0x305980(0x1b4)](_0xd587c8['end_time'],0x3e8)))return _0x305980(0x1cc);return _0x57ef07?_0x305980(0xe5):_0x305980(0x18e);},'initVoteData'(_0x51255a){const _0x430303=_0x442992,_0x117b2e={'afAKW':function(_0x573132,_0x57011e){return _0x573132>_0x57011e;},'GLJYU':function(_0x15fd9e,_0x3fed1d){return _0x15fd9e*_0x3fed1d;},'Fgysr':function(_0x126e7e,_0x5e1fd5){return _0x126e7e>_0x5e1fd5;},'atDDU':function(_0x1b4b76,_0x487b96){return _0x1b4b76>_0x487b96;},'LAlCq':function(_0x356045,_0x56cebc){return _0x356045*_0x56cebc;}};if(!_0x51255a)return;const _0x59c343=_0x51255a[_0x430303(0x1bc)]||[],_0x53db1f=_0x117b2e[_0x430303(0x1a7)](_0x59c343[_0x430303(0x13e)],0x0),_0x3074ea=_0x117b2e[_0x430303(0x1fd)](Date[_0x430303(0x185)](),_0x117b2e[_0x430303(0x13f)](_0x51255a[_0x430303(0x128)],0x3e8)),_0xdd1438=_0x51255a['options'][_0x430303(0xf2)](_0x1614f9=>({..._0x1614f9,'_selected':_0x59c343[_0x430303(0x21f)](_0x1614f9['id']),'vote_count':_0x1614f9[_0x430303(0x23b)]||0x0})),_0x2a4c26=_0xdd1438[_0x430303(0x145)](_0x51ef72=>_0x51ef72[_0x430303(0x209)]);if(_0x53db1f||_0x3074ea){const _0x398811=_0xdd1438['reduce']((_0x3e147a,_0x1e87fc)=>_0x3e147a+_0x1e87fc[_0x430303(0x23b)],0x0);_0xdd1438[_0x430303(0x19f)](_0x5f487d=>{const _0x577e77=_0x430303;_0x5f487d[_0x577e77(0x15e)]=_0x117b2e[_0x577e77(0x17a)](_0x398811,0x0)?_0x117b2e[_0x577e77(0x13f)](_0x5f487d[_0x577e77(0x23b)]/_0x398811,0x64)[_0x577e77(0x1fc)](0x1):'0.0';});}this[_0x430303(0x1e2)]({'voteOptions':_0xdd1438,'isVoted':_0x53db1f,'selectedVotes':[],'isVoteEnded':_0x117b2e[_0x430303(0x1fd)](Date[_0x430303(0x185)](),_0x117b2e['LAlCq'](_0x51255a[_0x430303(0x128)],0x3e8)),'voteEndTime':_0x51255a[_0x430303(0x128)]?this[_0x430303(0x231)](_0x51255a[_0x430303(0x128)]):null,'voteTitle':this[_0x430303(0x112)](_0x53db1f,_0x51255a),'showVoteImages':_0x2a4c26});},'initLotteryData'(_0x2583dd){const _0x34aac6=_0x442992,_0x529361={'dOuXE':_0x34aac6(0x141),'NSbCj':'发表话题','mxbgv':_0x34aac6(0x1bf),'yiDYB':_0x34aac6(0x1dc),'oVqwK':_0x34aac6(0x169),'LXSDN':function(_0x2637db,_0x2150a8){return _0x2637db+_0x2150a8;},'SHCWu':function(_0x153c24,_0x2bbdf5){return _0x153c24/_0x2bbdf5;},'lSmpE':function(_0x233411,_0x2bdd38){return _0x233411>_0x2bdd38;},'FfUiM':_0x34aac6(0x140),'YjJwj':_0x34aac6(0x1d9),'jlEPW':'关注作者'};if(!_0x2583dd)return;const _0x1d1480=_0x529361[_0x34aac6(0x239)](Date['now'](),0x3e8),_0x767a6=_0x529361[_0x34aac6(0x1c4)](_0x1d1480,_0x2583dd[_0x34aac6(0x128)]),_0x3f2d2c={0x1:_0x34aac6(0x116),0x2:_0x529361[_0x34aac6(0x162)],0x3:_0x529361[_0x34aac6(0x10a)],0x4:_0x529361[_0x34aac6(0x124)],0x5:_0x529361[_0x34aac6(0x1d2)],0x6:_0x529361[_0x34aac6(0x254)]},_0x3a7dc6=(_0x2583dd[_0x34aac6(0x219)]||[])[_0x34aac6(0xf2)]((_0x175416,_0x378ead)=>{const _0x43a301=_0x34aac6;let _0x308d15=[];switch(_0x175416[_0x43a301(0x12a)]){case 0x1:case 0x2:case 0x3:case 0x5:_0x308d15['push']({'text':_0x3f2d2c[_0x175416['condition_type']],'color':_0x529361[_0x43a301(0x143)],'clickable':![]});break;case 0x4:_0x308d15[_0x43a301(0xed)]({'text':_0x529361['NSbCj'],'color':_0x529361[_0x43a301(0x143)],'clickable':![]}),_0x308d15[_0x43a301(0xed)]({'text':'#'+_0x175416[_0x43a301(0x16d)]+'#','color':_0x43a301(0x169),'clickable':!![],'data':{'type':_0x529361[_0x43a301(0x11a)],'name':_0x175416[_0x43a301(0x16d)]}});break;case 0x6:_0x308d15['push']({'text':_0x529361[_0x43a301(0x254)],'color':_0x529361[_0x43a301(0x143)],'clickable':![]}),_0x308d15['push']({'text':'$'+_0x175416[_0x43a301(0x16d)][_0x43a301(0x194)],'color':_0x529361[_0x43a301(0xf6)],'clickable':!![],'data':{'type':'game','id':_0x175416[_0x43a301(0x16d)][_0x43a301(0xe9)]}});break;}return{'index':_0x529361[_0x43a301(0x221)](_0x378ead,0x1),'parts':_0x308d15};});this['setData']({'lotteryInfo':{..._0x2583dd,'isEnded':_0x767a6,'winnerCount':_0x2583dd[_0x34aac6(0x17d)],'conditions':_0x3a7dc6,'endTimeText':this[_0x34aac6(0x231)](_0x2583dd['end_time'])},'isLotteryEnded':_0x529361[_0x34aac6(0x1c4)](Date['now'](),_0x2583dd[_0x34aac6(0x128)]*0x3e8)});},'onLotteryConditionTap'(_0x5edf16){const _0x493bc0=_0x442992,_0x301a56={'NhQjK':_0x493bc0(0x1bf),'lxyxv':function(_0xe7243f,_0x267236){return _0xe7243f(_0x267236);},'YYueE':function(_0x2d588f,_0x4cbca4){return _0x2d588f===_0x4cbca4;},'RiOGN':_0x493bc0(0x251)},{type:_0x520cce,name:_0x592d61,id:_0x6876df}=_0x5edf16[_0x493bc0(0x119)][_0x493bc0(0x214)];if(!_0x520cce)return;if(_0x520cce===_0x301a56['NhQjK'])wx['navigateTo']({'url':_0x493bc0(0x218)+_0x301a56[_0x493bc0(0x1e1)](encodeURIComponent,_0x592d61)});else _0x301a56[_0x493bc0(0x20e)](_0x520cce,_0x301a56[_0x493bc0(0x238)])&&wx[_0x493bc0(0x129)]({'url':_0x493bc0(0x134)+_0x6876df});},'onViewWinners'(){const _0x4fce29=_0x442992,_0x3ba7ae={'VjUJj':function(_0x29010c){return _0x29010c();},'hqJvu':function(_0x4c38e3,_0x36ce75){return _0x4c38e3(_0x36ce75);}};if(!_0x3ba7ae['VjUJj'](checkLogin))return;const _0x4dc7dc=this[_0x4fce29(0x1e9)][_0x4fce29(0x1f7)],_0x4761bf={'id':_0x4dc7dc[_0x4fce29(0x16c)]['id'],'user_id':_0x4dc7dc[_0x4fce29(0x122)]['id'],'nickname':_0x4dc7dc[_0x4fce29(0x122)][_0x4fce29(0x1c2)],'avatar':_0x4dc7dc[_0x4fce29(0x122)]['avatar'],'cover':_0x4dc7dc[_0x4fce29(0x16c)]['imageArray']?.[0x0]||'','content':_0x4dc7dc['post'][_0x4fce29(0x253)]};wx[_0x4fce29(0x129)]({'url':_0x4fce29(0xf8)+_0x3ba7ae[_0x4fce29(0x1e0)](encodeURIComponent,JSON['stringify'](_0x4761bf))});},'onShareAppMessage'(){const _0x4c942d=_0x442992,_0x422468={'DikrI':_0x4c942d(0x1e3)},{item:_0x538c7a,postId:_0x45d08c}=this[_0x4c942d(0x1e9)],_0xf0e999=_0x538c7a?.[_0x4c942d(0x16c)]?.['title']||_0x422468[_0x4c942d(0x241)];return{'title':_0xf0e999,'path':_0x4c942d(0x202)+_0x45d08c};},'onChange'(_0x3ce540){const _0x14c680=_0x442992,{index:_0xbf76d9}=_0x3ce540['detail'];this[_0x14c680(0x1e2)]({'active':_0xbf76d9});},async 'onSortChange'(_0x1d6547){const _0xee1a8d=_0x442992,_0x3202cc={'PklMX':function(_0x23d8d1,_0x3ed4e1,_0x162e4c,_0x347c64){return _0x23d8d1(_0x3ed4e1,_0x162e4c,_0x347c64);},'otxja':function(_0x654bc1,_0x22d9ff){return _0x654bc1===_0x22d9ff;}};console['log'](_0x1d6547['detail']),this[_0xee1a8d(0x1e2)]({'sortValue':_0x1d6547['detail']});const _0x180e30=await _0x3202cc['PklMX'](queryPostComments,this[_0xee1a8d(0x1e9)][_0xee1a8d(0x193)],0x1,_0x3202cc[_0xee1a8d(0x12f)](_0x1d6547['detail'],0x0)?0x2:0x1),_0x2d453a=this[_0xee1a8d(0x206)](_0x180e30[_0xee1a8d(0x1e9)]);this[_0xee1a8d(0x1e2)]({'comments':_0x2d453a});},'onLoad'(_0x4a3ad2){const _0x3d67e7=_0x442992,_0x16606d={'MGEjP':function(_0x41c709,_0x32b109){return _0x41c709===_0x32b109;}},_0xe1b300=_0x4a3ad2['id'],_0x7de8ad=_0x4a3ad2[_0x3d67e7(0x230)];this[_0x3d67e7(0x1e2)]({'postId':_0xe1b300,'isCommentIn':_0x7de8ad}),this[_0x3d67e7(0x1ab)](_0xe1b300)['then'](_0x31284c=>{const _0xc7df68=_0x3d67e7,_0xb79abb=wx['getStorageSync'](_0xc7df68(0xf7)),_0xb4bfdb=_0x16606d[_0xc7df68(0x1f5)](this[_0xc7df68(0x1e9)][_0xc7df68(0x1f7)]['user']['id'],_0xb79abb);this[_0xc7df68(0x1e2)]({'isOwner':_0xb4bfdb}),this[_0xc7df68(0x1e9)][_0xc7df68(0x230)]&&this['setData']({'showSheet':!![],'originPost':this['data'][_0xc7df68(0x1f7)],'commentData':null});});},'onFirstComment'(){const _0x114c47=_0x442992;if(!checkLogin())return;this[_0x114c47(0x1e2)]({'showSheet':!![],'originPost':this[_0x114c47(0x1e9)][_0x114c47(0x1f7)],'commentData':null});},'onLike'(_0xc6ec60){const _0x11c357=_0x442992,_0x3a1154={'GzzDm':function(_0x427d0f,_0x3234f2){return _0x427d0f===_0x3234f2;},'fadMd':_0x11c357(0x1dd),'LsjwR':_0x11c357(0x24a),'DWjkB':'pages/post/post','ChAiy':function(_0x304d87,_0x32dd82){return _0x304d87!==_0x32dd82;},'bYNmy':_0x11c357(0x1de),'YCdXO':function(_0x441559){return _0x441559();},'cjKOC':function(_0x5a1f17,_0x51d9b8){return _0x5a1f17-_0x51d9b8;},'DxAPT':function(_0x5d9efe,_0x525b92){return _0x5d9efe+_0x525b92;},'Qrnjj':function(_0x2ff3ff,_0x2f1a53,_0x18f02d){return _0x2ff3ff(_0x2f1a53,_0x18f02d);}};if(!checkLogin())return;const _0x245d1a=this[_0x11c357(0x1e9)][_0x11c357(0x1f7)][_0x11c357(0x16c)],_0x28683b=_0x3a1154['GzzDm'](_0x245d1a[_0x11c357(0x12d)],0x1),_0x267c98=_0x28683b?0x0:0x1,_0x47db49=_0x28683b?_0x3a1154[_0x11c357(0x23a)](_0x245d1a[_0x11c357(0x229)],0x1):_0x3a1154['DxAPT'](_0x245d1a[_0x11c357(0x229)],0x1);this[_0x11c357(0x1e2)]({'item.post.is_like':_0x267c98,'item.post.like_count':_0x47db49});const _0x13c119=wx[_0x11c357(0x13b)]({'duration':0xc8,'timingFunction':_0x11c357(0x1e8)});_0x13c119[_0x11c357(0x1e5)](1.5)[_0x11c357(0x103)](),_0x13c119[_0x11c357(0x1e5)](0x1)[_0x11c357(0x103)](),this['setData']({'likeAnimation':_0x13c119[_0x11c357(0x105)]()}),_0x3a1154[_0x11c357(0x170)](likePost,_0x245d1a['id'],_0x267c98===0x1?0x1:0x2)['then'](_0x2fb546=>{const _0x185c87=_0x11c357;if(_0x3a1154[_0x185c87(0xe4)](_0x2fb546[_0x185c87(0x1c6)],0x0))this[_0x185c87(0x1e2)]({'item.post.is_like':_0x28683b?0x1:0x0,'item.post.like_count':_0x245d1a[_0x185c87(0x229)]}),wx[_0x185c87(0xee)]({'title':_0x2fb546[_0x185c87(0x123)]||_0x185c87(0x212),'icon':_0x3a1154[_0x185c87(0x182)]});else{const _0x1e6a83=_0x3a1154['YCdXO'](getCurrentPages);_0x1e6a83[_0x185c87(0x19f)](_0x4b99fd=>{const _0x44d465=_0x185c87,_0x514c11={'QBHgy':function(_0x5cda65,_0x5d3270){const _0x20beee=_0x5797;return _0x3a1154[_0x20beee(0x22d)](_0x5cda65,_0x5d3270);}};if(_0x4b99fd[_0x44d465(0x1ca)]===_0x3a1154[_0x44d465(0x121)]){const _0x4590b0=_0x4b99fd[_0x44d465(0x1e9)][_0x44d465(0x151)][_0x44d465(0xf2)](_0x39598f=>{const _0x1f6bc4=_0x44d465;return _0x514c11[_0x1f6bc4(0x188)](_0x39598f['post']['id'],_0x245d1a['id'])&&(_0x39598f[_0x1f6bc4(0x16c)][_0x1f6bc4(0x12d)]=_0x267c98,_0x39598f['post'][_0x1f6bc4(0x229)]=_0x47db49),_0x39598f;});_0x4b99fd[_0x44d465(0x1e2)]({'posts':_0x4590b0});}if(_0x4b99fd['route']===_0x3a1154[_0x44d465(0x196)]){if(Array[_0x44d465(0x1d6)](_0x4b99fd[_0x44d465(0x1e9)][_0x44d465(0x204)])){const _0x477e7e=_0x4b99fd['data'][_0x44d465(0x204)][_0x44d465(0xf2)](_0x160a7b=>{const _0x462cda=_0x44d465;return _0x160a7b[_0x462cda(0x16c)]['id']===_0x245d1a['id']&&(_0x160a7b[_0x462cda(0x16c)][_0x462cda(0x12d)]=_0x267c98,_0x160a7b['post'][_0x462cda(0x229)]=_0x47db49),_0x160a7b;});_0x4b99fd[_0x44d465(0x1e2)]({'userPosts':_0x477e7e});}}_0x3a1154['GzzDm'](_0x4b99fd[_0x44d465(0x1ca)],_0x3a1154[_0x44d465(0x174)])&&_0x4b99fd[_0x44d465(0x1e9)][_0x44d465(0x193)]===_0x245d1a['id']&&_0x4b99fd['setData']({'item.post.is_like':_0x267c98,'item.post.like_count':_0x47db49});});}})[_0x11c357(0x1df)](_0xc5e874=>{const _0x21ba1d=_0x11c357;this[_0x21ba1d(0x1e2)]({'item.post.is_like':_0x28683b?0x1:0x0,'item.post.like_count':_0x245d1a[_0x21ba1d(0x229)]}),wx['showToast']({'title':_0x21ba1d(0x160),'icon':_0x3a1154[_0x21ba1d(0x182)]});});},'onCollect'(_0x4e44c9){const _0x314163=_0x442992,_0x29a15c={'tEocV':function(_0x3f6a48,_0x170ac9){return _0x3f6a48===_0x170ac9;},'zynUq':_0x314163(0x24a),'FTmSw':_0x314163(0x212),'IHEol':'none','kpAPD':function(_0x301e39){return _0x301e39();},'TqXaG':_0x314163(0x154),'ioZvQ':_0x314163(0x19e),'ynIhF':function(_0x36825f,_0x51ac7f){return _0x36825f===_0x51ac7f;},'tjrCo':function(_0x263493,_0xd5107f){return _0x263493-_0xd5107f;},'VDHTU':function(_0x416c6e,_0x5e1e8a){return _0x416c6e+_0x5e1e8a;},'KHKow':_0x314163(0x1e8)};if(!_0x29a15c['kpAPD'](checkLogin))return;const _0x1e5329=this[_0x314163(0x1e9)]['item'][_0x314163(0x16c)],_0x51219f=_0x29a15c[_0x314163(0x11f)](_0x1e5329[_0x314163(0x100)],0x1),_0x22682a=_0x51219f?0x0:0x1,_0x53b0bc=_0x51219f?_0x29a15c['tjrCo'](_0x1e5329[_0x314163(0x11c)],0x1):_0x29a15c[_0x314163(0x19a)](_0x1e5329['collect_count'],0x1);this[_0x314163(0x1e2)]({'item.post.is_collect':_0x22682a,'item.post.collect_count':_0x53b0bc});const _0x3e1801=wx[_0x314163(0x13b)]({'duration':0xc8,'timingFunction':_0x29a15c[_0x314163(0x130)]});_0x3e1801['scale'](1.5)[_0x314163(0x103)](),_0x3e1801[_0x314163(0x1e5)](0x1)[_0x314163(0x103)](),this[_0x314163(0x1e2)]({'collectAnimation':_0x3e1801[_0x314163(0x105)]()}),collectPost(_0x1e5329['id'],_0x22682a===0x1?0x1:0x2)[_0x314163(0x106)](_0x35caf2=>{const _0x41c640=_0x314163,_0x81531c={'YDlzF':function(_0x5c05d6,_0x34ae0b){return _0x5c05d6===_0x34ae0b;}};if(_0x35caf2['code']!==0x0)this[_0x41c640(0x1e2)]({'item.post.is_collect':_0x51219f,'item.post.collect_count':_0x1e5329[_0x41c640(0x11c)]}),wx[_0x41c640(0xee)]({'title':_0x35caf2['message']||_0x29a15c[_0x41c640(0x138)],'icon':_0x29a15c[_0x41c640(0xff)]});else{const _0x3f5332=_0x29a15c['kpAPD'](getCurrentPages);_0x3f5332[_0x41c640(0x19f)](_0x42383f=>{const _0x4ddf5e=_0x41c640;if(_0x29a15c['tEocV'](_0x42383f['route'],'pages/home/home')){const _0x226f41=_0x42383f[_0x4ddf5e(0x1e9)]['posts'][_0x4ddf5e(0xf2)](_0x7929f3=>{const _0x3c3d79=_0x4ddf5e;return _0x81531c['YDlzF'](_0x7929f3[_0x3c3d79(0x16c)]['id'],_0x1e5329['id'])&&(_0x7929f3['post'][_0x3c3d79(0x100)]=_0x22682a,_0x7929f3[_0x3c3d79(0x16c)][_0x3c3d79(0x11c)]=_0x53b0bc),_0x7929f3;});_0x42383f[_0x4ddf5e(0x1e2)]({'posts':_0x226f41});}if(_0x42383f[_0x4ddf5e(0x1ca)]===_0x29a15c[_0x4ddf5e(0x1d3)]){if(Array[_0x4ddf5e(0x1d6)](_0x42383f[_0x4ddf5e(0x1e9)]['userPosts'])){const _0x142c36=_0x42383f[_0x4ddf5e(0x1e9)][_0x4ddf5e(0x204)][_0x4ddf5e(0xf2)](_0x414d67=>{const _0xe312ee=_0x4ddf5e;return _0x414d67[_0xe312ee(0x16c)]['id']===_0x1e5329['id']&&(_0x414d67[_0xe312ee(0x16c)][_0xe312ee(0x100)]=_0x22682a,_0x414d67[_0xe312ee(0x16c)][_0xe312ee(0x11c)]=_0x53b0bc),_0x414d67;});_0x42383f[_0x4ddf5e(0x1e2)]({'userPosts':_0x142c36});}}_0x29a15c[_0x4ddf5e(0x18c)](_0x42383f[_0x4ddf5e(0x1ca)],_0x4ddf5e(0x107))&&_0x42383f[_0x4ddf5e(0x1e9)][_0x4ddf5e(0x193)]===_0x1e5329['id']&&_0x42383f[_0x4ddf5e(0x1e2)]({'item.post.is_collect':_0x22682a,'item.post.collect_count':_0x53b0bc});}),wx[_0x41c640(0xee)]({'title':_0x22682a===0x1?_0x41c640(0x21c):_0x29a15c[_0x41c640(0x118)],'icon':_0x29a15c[_0x41c640(0x183)]});}})['catch'](_0x2363f8=>{const _0x4167ea=_0x314163;this[_0x4167ea(0x1e2)]({'item.post.is_collect':_0x51219f,'item.post.collect_count':_0x1e5329[_0x4167ea(0x11c)]}),wx[_0x4167ea(0xee)]({'title':_0x4167ea(0x160),'icon':_0x4167ea(0x1de)});});},async 'onCommentSuccess'(_0x5332ca){const _0x387b96=_0x442992,_0x1d004b={'rfqYS':function(_0x44a580,_0x4d24ef){return _0x44a580+_0x4d24ef;},'YAyhn':function(_0x4dd7f6,_0x2f18fe){return _0x4dd7f6===_0x2f18fe;},'rQpea':function(_0xe49ffc,_0x48783a){return _0xe49ffc+_0x48783a;},'gSDqs':function(_0x4580c6,_0x3e9829){return _0x4580c6===_0x3e9829;},'SKInC':function(_0x5dfd97,_0x106a35){return _0x5dfd97===_0x106a35;},'NoHjM':_0x387b96(0x107),'kPgSA':function(_0x40007d,_0x2f171b,_0x472471,_0x451484){return _0x40007d(_0x2f171b,_0x472471,_0x451484);},'gNOHJ':function(_0x4bebbd,_0xc1b091){return _0x4bebbd+_0xc1b091;},'FOmBI':function(_0xaac396){return _0xaac396();},'RxPiW':function(_0x4e9557,_0x404914){return _0x4e9557-_0x404914;}},{postId:_0x25c61b,mode:_0x5b28f6,content:_0x23788a,images:_0x3d1b1c}=_0x5332ca[_0x387b96(0x1ce)],_0x5cecdf=await _0x1d004b[_0x387b96(0x15f)](queryPostComments,this[_0x387b96(0x1e9)][_0x387b96(0x193)],0x1,_0x1d004b[_0x387b96(0x11e)](this['data'][_0x387b96(0x175)],0x0)?0x2:0x1),_0x18b489=this['formatComments'](_0x5cecdf[_0x387b96(0x1e9)]),_0xcfeb8c=_0x1d004b[_0x387b96(0x11d)](this[_0x387b96(0x1e9)][_0x387b96(0x1f7)][_0x387b96(0x16c)][_0x387b96(0xe0)]||0x0,0x1);this[_0x387b96(0x1e2)]({'item.post.comment_count':_0xcfeb8c,'comments':_0x18b489});const _0x54f36a=_0x1d004b['FOmBI'](getCurrentPages),_0x585574=_0x54f36a[_0x1d004b[_0x387b96(0x110)](_0x54f36a[_0x387b96(0x13e)],0x1)];_0x54f36a[_0x387b96(0x19f)](_0x554243=>{const _0x50f692=_0x387b96;if(_0x554243===_0x585574)return;if(_0x1d004b['YAyhn'](_0x554243[_0x50f692(0x1ca)],'pages/home/home')){const _0x5148de=_0x554243['data'][_0x50f692(0x151)][_0x50f692(0xf2)](_0x2b9123=>{const _0x5715d2=_0x50f692;return _0x2b9123[_0x5715d2(0x16c)]['id']===_0x25c61b&&(_0x2b9123[_0x5715d2(0x16c)][_0x5715d2(0xe0)]=_0x1d004b[_0x5715d2(0xe8)](_0x2b9123['post'][_0x5715d2(0xe0)]||0x0,0x1)),_0x2b9123;});_0x554243[_0x50f692(0x1e2)]({'posts':_0x5148de});}if(_0x1d004b[_0x50f692(0x11e)](_0x554243[_0x50f692(0x1ca)],_0x50f692(0x24a))){const _0x50b0bb=_0x554243[_0x50f692(0x1e9)]['userPosts']?.[_0x50f692(0xf2)](_0x657748=>{const _0x2fbe8c=_0x50f692;return _0x1d004b[_0x2fbe8c(0x234)](_0x657748[_0x2fbe8c(0x16c)]['id'],_0x25c61b)&&(_0x657748[_0x2fbe8c(0x16c)][_0x2fbe8c(0xe0)]=_0x1d004b[_0x2fbe8c(0x19d)](_0x657748[_0x2fbe8c(0x16c)][_0x2fbe8c(0xe0)]||0x0,0x1)),_0x657748;})||[];_0x554243['setData']({'userPosts':_0x50b0bb});}_0x1d004b['SKInC'](_0x554243['route'],_0x1d004b[_0x50f692(0xf3)])&&_0x554243[_0x50f692(0x1e9)][_0x50f692(0x193)]===_0x25c61b&&_0x554243[_0x50f692(0x1e2)]({'item.post.comment_count':(_0x554243[_0x50f692(0x1e9)]['item']['post'][_0x50f692(0xe0)]||0x0)+0x1});});},async 'fetchPostDetail'(_0x3766ac){const _0x33c4aa=_0x442992,_0x370efe={'BkkUP':_0x33c4aa(0x1b5),'YGomd':'commented','PLUkm':_0x33c4aa(0x169),'frnOb':function(_0x1d1712,_0x200bd9,_0x16c569){return _0x1d1712(_0x200bd9,_0x16c569);},'Ypcyd':function(_0x545aaa,_0x30fa16){return _0x545aaa>_0x30fa16;},'VqjMq':function(_0x12bdbc,_0x218b32){return _0x12bdbc!==_0x218b32;},'DiLzv':function(_0xea19d8,_0x1561cc){return _0xea19d8===_0x1561cc;},'djoZX':'[原文已被删除]','cYiFW':_0x33c4aa(0x127),'UmoFB':_0x33c4aa(0xe1),'PopSX':function(_0x42937d,_0x4b56bf){return _0x42937d(_0x4b56bf);},'ByKHc':_0x33c4aa(0x131),'kboKE':_0x33c4aa(0x1de)};try{const [_0x518e93,_0x40e185,_0x4ec47a,_0x27d504]=await Promise[_0x33c4aa(0x108)]([queryPostInfo(_0x3766ac),queryPostComments(_0x3766ac,0x1,0x2),_0x370efe[_0x33c4aa(0x1b1)](queryPostLikes,_0x3766ac,0x1),_0x370efe[_0x33c4aa(0x1b1)](queryPostShare,_0x3766ac,0x1)]),_0x356daf=this['formatPost'](_0x518e93[_0x33c4aa(0x1e9)]);this[_0x33c4aa(0xfb)](_0x356daf[_0x33c4aa(0x16c)][_0x33c4aa(0x240)]),this[_0x33c4aa(0xd8)](_0x356daf[_0x33c4aa(0x16c)][_0x33c4aa(0x179)]);const _0x2abcd5=this[_0x33c4aa(0x206)](_0x40e185[_0x33c4aa(0x1e9)]),_0x5b4572=this[_0x33c4aa(0x109)](_0x27d504[_0x33c4aa(0x1e9)]);let _0x362e0c=[];const _0x291d54=_0x518e93['data']?.['commented'];if(Array[_0x33c4aa(0x1d6)](_0x291d54)&&_0x370efe[_0x33c4aa(0x236)](_0x291d54[_0x33c4aa(0x13e)],0x0)){const _0x3d855d=_0x291d54[0x0],_0x166403=[];_0x3d855d[_0x33c4aa(0x122)]?.['nickname']&&_0x166403[_0x33c4aa(0xed)]({'text':'@'+_0x3d855d['user'][_0x33c4aa(0x1c2)],'color':_0x370efe['PLUkm'],'type':'at','userId':_0x3d855d[_0x33c4aa(0x122)]?.['id']||''});_0x3d855d[_0x33c4aa(0x16c)]?.[_0x33c4aa(0x13a)]&&(_0x166403[_0x33c4aa(0xed)]({'text':_0x33c4aa(0x12b),'color':_0x33c4aa(0x141)}),_0x166403[_0x33c4aa(0xed)]({'text':'@'+_0x3d855d['post']['reply_nickname'],'color':_0x33c4aa(0x169),'type':'at','userId':_0x3d855d['post']?.[_0x33c4aa(0x1a2)]||''}));_0x370efe[_0x33c4aa(0x163)](_0x3d855d['post']?.['status'],0x3)&&_0x166403[_0x33c4aa(0xed)]({'text':':\x20','color':_0x33c4aa(0x141)});_0x3d855d['post']?.[_0x33c4aa(0x253)]&&_0x166403[_0x33c4aa(0xed)](...this[_0x33c4aa(0x257)](_0x3d855d[_0x33c4aa(0x16c)][_0x33c4aa(0x253)]));_0x370efe[_0x33c4aa(0x1cd)](_0x3d855d[_0x33c4aa(0x16c)]?.['status'],0x3)&&_0x166403[_0x33c4aa(0xed)]({'text':_0x370efe['djoZX'],'color':_0x370efe[_0x33c4aa(0x115)],'type':_0x370efe[_0x33c4aa(0x132)]});if(_0x3d855d[_0x33c4aa(0x16c)]?.['images']){const _0x473f0d=_0x3d855d[_0x33c4aa(0x16c)][_0x33c4aa(0xef)][_0x33c4aa(0x201)](',')[_0x33c4aa(0x199)](Boolean);_0x473f0d[_0x33c4aa(0x19f)]((_0x2622e9,_0x42c467)=>{const _0x17855e=_0x33c4aa;_0x166403[_0x17855e(0xed)]({'text':_0x17855e(0x1f3),'type':_0x370efe[_0x17855e(0xe2)],'src':_0x2622e9,'index':_0x42c467,'from':_0x370efe[_0x17855e(0x1b0)],'color':_0x370efe[_0x17855e(0x23f)]});});}_0x362e0c=_0x166403;}const _0x2ffbd4=this[_0x33c4aa(0x1e7)](this[_0x33c4aa(0x257)](_0x356daf['post'][_0x33c4aa(0x253)],_0x356daf['post'][_0x33c4aa(0x20b)],_0x356daf[_0x33c4aa(0x23e)]),_0x356daf['post'][_0x33c4aa(0x150)]),_0x5185c7=_0x2ffbd4[_0x33c4aa(0x256)](_0x35fe5c=>_0x35fe5c[_0x33c4aa(0x247)]===_0x33c4aa(0x150));_0x370efe['VqjMq'](_0x356daf['game']?.[_0x33c4aa(0x1b8)],null)&&(_0x356daf[_0x33c4aa(0x122)][_0x33c4aa(0x211)]=getLevelByExp(_0x356daf[_0x33c4aa(0x251)]?.[_0x33c4aa(0x1b8)]),_0x356daf[_0x33c4aa(0x122)][_0x33c4aa(0x1a9)]=_0x370efe[_0x33c4aa(0xeb)](getLevelImg,_0x356daf[_0x33c4aa(0x122)]['level'])),this[_0x33c4aa(0x1e2)]({'loading':![],'item':_0x356daf,'contentParts':_0x2ffbd4,'hasTitle':!!_0x5185c7,'titleText':_0x5185c7?_0x5185c7[_0x33c4aa(0x19c)]:'','commentedContentParts':_0x362e0c,'comments':_0x2abcd5,'likes':Array[_0x33c4aa(0x1d6)](_0x4ec47a[_0x33c4aa(0x1e9)])?_0x4ec47a[_0x33c4aa(0x1e9)]:[],'shares':_0x5b4572[_0x33c4aa(0xf2)](_0x32ab84=>({..._0x32ab84,'contentParts':this['parseContent'](_0x32ab84[_0x33c4aa(0x16c)][_0x33c4aa(0x253)],_0x32ab84[_0x33c4aa(0x16c)][_0x33c4aa(0x20b)],!![])}))}),_0x356daf[_0x33c4aa(0x23e)]&&this['setData']({'isLotteryEnded':_0x370efe[_0x33c4aa(0x236)](Date['now'](),_0x356daf[_0x33c4aa(0x23e)]?.[_0x33c4aa(0x16c)]?.[_0x33c4aa(0x179)]?.['end_time']*0x3e8),'sharedContentParts':this['injectTitle'](this['parseContent'](_0x356daf['shared']?.[_0x33c4aa(0x16c)]?.[_0x33c4aa(0x253)],_0x356daf[_0x33c4aa(0x23e)]?.[_0x33c4aa(0x16c)]?.['imageArray'],_0x356daf['shared']),_0x356daf[_0x33c4aa(0x23e)]?.[_0x33c4aa(0x16c)]?.[_0x33c4aa(0x150)])});}catch(_0x202546){this[_0x33c4aa(0x1e2)]({'loading':![]}),console[_0x33c4aa(0x168)]('加载帖子详情失败:',_0x202546),wx[_0x33c4aa(0xee)]({'title':_0x370efe['ByKHc'],'icon':_0x370efe[_0x33c4aa(0x217)]});}},'injectTitle'(_0x100adc,_0x5456d2){const _0x2ebbad=_0x442992;if(!_0x5456d2)return _0x100adc;return _0x100adc['unshift']({'text':_0x5456d2,'color':'#000','type':_0x2ebbad(0x150)}),_0x100adc[_0x2ebbad(0x187)](0x1,0x0,{'type':'br'}),_0x100adc;},'onReachBottom'(){const _0x134c85=_0x442992;switch(this['data'][_0x134c85(0x1c7)]){case 0x0:this[_0x134c85(0xe6)]();break;case 0x1:this['loadMoreComments']();break;case 0x2:this[_0x134c85(0x1c8)]();break;}},async 'loadMoreShares'(){const _0x1b15eb=_0x442992,_0x385af9={'joDfa':function(_0x1cc554,_0x13b4a3,_0x304218){return _0x1cc554(_0x13b4a3,_0x304218);},'qfGpx':function(_0x502781,_0x140114){return _0x502781>_0x140114;},'EpROh':_0x1b15eb(0x21b)};if(!this[_0x1b15eb(0x1e9)][_0x1b15eb(0x1c0)]||this[_0x1b15eb(0x1e9)][_0x1b15eb(0x24c)])return;this[_0x1b15eb(0x1e2)]({'isLoadingMore':!![]});const _0x22abbc=this[_0x1b15eb(0x1e9)][_0x1b15eb(0x1da)]+0x1;try{const _0x565612=await _0x385af9['joDfa'](queryPostShare,this[_0x1b15eb(0x1e9)][_0x1b15eb(0x193)],_0x22abbc),_0x24b0c9=this[_0x1b15eb(0x109)](_0x565612['data'])[_0x1b15eb(0xf2)](_0x39e9f2=>({..._0x39e9f2,'contentParts':this['parseContent'](_0x39e9f2[_0x1b15eb(0x16c)][_0x1b15eb(0x253)],_0x39e9f2[_0x1b15eb(0x16c)][_0x1b15eb(0x20b)],!![])}));this['setData']({'shares':[...this[_0x1b15eb(0x1e9)][_0x1b15eb(0x1a0)],..._0x24b0c9],'sharesPage':_0x22abbc,'sharesHasMore':_0x385af9[_0x1b15eb(0x1b7)](_0x24b0c9['length'],0x0)});}catch(_0x38b5f6){console['error'](_0x385af9[_0x1b15eb(0x186)],_0x38b5f6);}finally{this['setData']({'isLoadingMore':![]});}},async 'loadMoreComments'(){const _0x5aab8e=_0x442992,_0x522342={'GBEhT':function(_0x4a8fe4,_0x2b2121){return _0x4a8fe4+_0x2b2121;},'xiNyx':function(_0x2c1aba,_0x7ef08a,_0x311620,_0x47ff94){return _0x2c1aba(_0x7ef08a,_0x311620,_0x47ff94);},'cBgsu':function(_0x2e92ff,_0x464328){return _0x2e92ff===_0x464328;},'QrTEf':function(_0x3b844a,_0x1c566b){return _0x3b844a>_0x1c566b;},'nvmCI':_0x5aab8e(0x207)};if(!this[_0x5aab8e(0x1e9)][_0x5aab8e(0xdf)]||this['data'][_0x5aab8e(0x24c)])return;this[_0x5aab8e(0x1e2)]({'isLoadingMore':!![]});const _0x2cfb57=_0x522342[_0x5aab8e(0xf9)](this[_0x5aab8e(0x1e9)]['commentsPage'],0x1);try{const _0x3d4f7d=await _0x522342[_0x5aab8e(0x190)](queryPostComments,this[_0x5aab8e(0x1e9)][_0x5aab8e(0x193)],_0x2cfb57,_0x522342[_0x5aab8e(0xf4)](this['data'][_0x5aab8e(0x175)],0x0)?0x2:0x1),_0x5b288c=this[_0x5aab8e(0x206)](_0x3d4f7d[_0x5aab8e(0x1e9)]);this[_0x5aab8e(0x1e2)]({'comments':[...this[_0x5aab8e(0x1e9)]['comments'],..._0x5b288c],'commentsPage':_0x2cfb57,'commentsHasMore':_0x522342[_0x5aab8e(0x235)](_0x5b288c[_0x5aab8e(0x13e)],0x0)});}catch(_0x4ee08a){console['error'](_0x522342[_0x5aab8e(0x120)],_0x4ee08a);}finally{this[_0x5aab8e(0x1e2)]({'isLoadingMore':![]});}},async 'loadMoreLikes'(){const _0x1d35ca=_0x442992,_0x3ebf09={'ceOlZ':function(_0x3e3a22,_0xe30f78){return _0x3e3a22>_0xe30f78;},'qXSpE':_0x1d35ca(0x222)};if(!this[_0x1d35ca(0x1e9)]['likesHasMore']||this['data'][_0x1d35ca(0x24c)])return;this[_0x1d35ca(0x1e2)]({'isLoadingMore':!![]});const _0x17c0ba=this[_0x1d35ca(0x1e9)][_0x1d35ca(0xd9)]+0x1;try{const _0x51d513=await queryPostLikes(this[_0x1d35ca(0x1e9)]['postId'],_0x17c0ba),_0x4e551a=Array[_0x1d35ca(0x1d6)](_0x51d513[_0x1d35ca(0x1e9)])?_0x51d513[_0x1d35ca(0x1e9)]:[];this[_0x1d35ca(0x1e2)]({'likes':[...this[_0x1d35ca(0x1e9)][_0x1d35ca(0x10e)],..._0x4e551a],'likesPage':_0x17c0ba,'likesHasMore':_0x3ebf09['ceOlZ'](_0x4e551a[_0x1d35ca(0x13e)],0x0)});}catch(_0x1feea5){console['error'](_0x3ebf09[_0x1d35ca(0x1b6)],_0x1feea5);}finally{this[_0x1d35ca(0x1e2)]({'isLoadingMore':![]});}},'formatComments'(_0x373b7c){const _0x5354f8=_0x442992,_0xc70cee={'MLbRC':function(_0xe57429,_0x4da19c){return _0xe57429!=_0x4da19c;},'OJQRr':function(_0x36c94a,_0x21b2a2){return _0x36c94a(_0x21b2a2);}};if(!Array[_0x5354f8(0x1d6)](_0x373b7c))return[];return _0x373b7c[_0x5354f8(0xf2)](_0x418ae8=>{const _0xffb7e1=_0x5354f8,_0x1e5826=_0x418ae8[_0xffb7e1(0x1b3)][_0xffb7e1(0xfd)],_0x557e25=_0x1e5826[_0xffb7e1(0xef)]?_0x1e5826['images']['split'](',')[_0xffb7e1(0x199)](Boolean)[0x0]:null,_0x35abf9=_0x557e25?{'src':_0x557e25,'isLong':![],'isSuperLong':![],'isHorizon':![]}:null,_0x3a40de=_0x418ae8['main_comment'][_0xffb7e1(0x122)];_0xc70cee[_0xffb7e1(0x1ef)](_0x418ae8[_0xffb7e1(0x1b3)]?.[_0xffb7e1(0x251)]?.[_0xffb7e1(0x1b8)],null)&&(_0x3a40de[_0xffb7e1(0x211)]=_0xc70cee[_0xffb7e1(0x126)](getLevelByExp,_0x418ae8[_0xffb7e1(0x1b3)]['game']?.['exp']),_0x3a40de['levelImg']=_0xc70cee[_0xffb7e1(0x126)](getLevelImg,_0x3a40de['level']));const _0xeb5a55=this[_0xffb7e1(0x257)](_0x1e5826[_0xffb7e1(0x253)]||''),_0x45bab4=Array['isArray'](_0x418ae8[_0xffb7e1(0x205)])?_0x418ae8['second_comment'][_0xffb7e1(0xf2)](_0x727981=>{const _0x261e84=_0xffb7e1,_0x278410=_0x727981['comment'],_0x23b5a7=_0x278410[_0x261e84(0xef)]?_0x278410['images']['split'](',')['filter'](Boolean)[0x0]:null,_0x2a98e1=_0x23b5a7?{'src':_0x23b5a7,'isLong':![],'isSuperLong':![],'isHorizon':![]}:null,_0x249854=this[_0x261e84(0x257)](_0x727981['comment'][_0x261e84(0x253)]||'');return{..._0x727981,'comment':{..._0x727981['comment'],'formatTime':_0x1fd1d4(_0x727981[_0x261e84(0xfd)]['created_at']),'imageMeta':_0x2a98e1},'contentParts':_0x249854};}):[];return{..._0x418ae8,'main_comment':{..._0x418ae8[_0xffb7e1(0x1b3)],'comment':{..._0x1e5826,'formatTime':_0x1fd1d4(_0x1e5826['created_at']),'imageMeta':_0x35abf9},'contentParts':_0xeb5a55},'second_comment':_0x45bab4};});},'formatShares'(_0x584ad){const _0x9eef1b=_0x442992,_0x413d28={'yPdtY':_0x9eef1b(0x1f3),'HOcIz':_0x9eef1b(0x1eb),'BllvN':'#406ce3','HCBhu':_0x9eef1b(0x141),'kOblt':function(_0x5678ae,_0x44a082){return _0x5678ae(_0x44a082);}};if(!Array[_0x9eef1b(0x1d6)](_0x584ad))return[];return _0x584ad[_0x9eef1b(0xf2)](_0x17ca4f=>{const _0x54589a=_0x9eef1b,_0x4a09b0=_0x17ca4f[_0x54589a(0x16c)]||{},_0x119768=this[_0x54589a(0x257)](_0x4a09b0[_0x54589a(0x253)]||''),_0x1beb4b=_0x4a09b0['images']?_0x4a09b0[_0x54589a(0xef)][_0x54589a(0x201)](','):[];let _0x58c669=null;if(Array[_0x54589a(0x1d6)](_0x17ca4f[_0x54589a(0x1eb)])&&_0x17ca4f['commented'][_0x54589a(0x13e)]>0x0){const _0xc2fe40=_0x17ca4f[_0x54589a(0x1eb)][0x0],_0x4cbf48=[];_0xc2fe40[_0x54589a(0x122)]?.[_0x54589a(0x1c2)]&&_0x4cbf48[_0x54589a(0xed)]({'text':'@'+_0xc2fe40[_0x54589a(0x122)][_0x54589a(0x1c2)],'color':_0x413d28[_0x54589a(0x153)]});_0xc2fe40[_0x54589a(0x16c)]?.[_0x54589a(0x13a)]&&(_0x4cbf48[_0x54589a(0xed)]({'text':_0x54589a(0x12b),'color':_0x413d28[_0x54589a(0x1f1)]}),_0x4cbf48[_0x54589a(0xed)]({'text':'@'+_0xc2fe40['post'][_0x54589a(0x13a)],'color':_0x54589a(0x169)}));_0x4cbf48[_0x54589a(0xed)]({'text':':\x20','color':_0x413d28[_0x54589a(0x1f1)]});_0xc2fe40['post']?.[_0x54589a(0x253)]&&_0x4cbf48[_0x54589a(0xed)](...this[_0x54589a(0x257)](_0xc2fe40[_0x54589a(0x16c)]['content']));if(_0xc2fe40[_0x54589a(0x16c)]?.[_0x54589a(0xef)]){const _0x4ed03e=_0xc2fe40[_0x54589a(0x16c)]['images'][_0x54589a(0x201)](',');_0x4ed03e[_0x54589a(0x19f)]((_0x499a47,_0x377b27)=>{const _0x474da1=_0x54589a;_0x4cbf48[_0x474da1(0xed)]({'text':_0x413d28['yPdtY'],'type':_0x474da1(0x1b5),'src':_0x499a47,'index':_0x377b27,'from':_0x413d28[_0x474da1(0x22b)],'color':_0x413d28[_0x474da1(0x153)]});});}_0x58c669={..._0xc2fe40,'post':{..._0xc2fe40[_0x54589a(0x16c)],'imageArray':_0xc2fe40[_0x54589a(0x16c)]?.[_0x54589a(0xef)]?_0xc2fe40[_0x54589a(0x16c)][_0x54589a(0xef)][_0x54589a(0x201)](','):[]},'contentParts':_0x4cbf48};}return{..._0x17ca4f,'post':{..._0x4a09b0,'formatTime':_0x413d28['kOblt'](_0x1fd1d4,_0x4a09b0[_0x54589a(0x1fe)]),'imageArray':_0x1beb4b},'contentParts':_0x119768,'commented':_0x58c669};});},'onCommentImageLoad'(_0x486716){const _0x4068d2=_0x442992,_0x3c3777={'UZUzQ':function(_0x3d059a,_0x275aa8){return _0x3d059a/_0x275aa8;},'HkFmU':function(_0xa2b850,_0x10e679){return _0xa2b850>_0x10e679;},'QWyti':function(_0xea15e,_0x139be3){return _0xea15e<=_0x139be3;},'zvEap':function(_0x57c37c,_0x462b5f){return _0x57c37c===_0x462b5f;},'KTuHN':function(_0xc2d106,_0x4fab38){return _0xc2d106===_0x4fab38;},'drDQn':_0x4068d2(0x139)},{width:_0x46351c,height:_0x327d1f}=_0x486716['detail'],{level:_0x59848e,parentidx:_0x381746,childidx:_0x5e2c21}=_0x486716[_0x4068d2(0x119)]['dataset'],_0x2c3bf8=_0x3c3777['UZUzQ'](_0x327d1f,_0x46351c),_0x4bae02={'isLong':_0x3c3777['HkFmU'](_0x2c3bf8,0x3)&&_0x3c3777[_0x4068d2(0x164)](_0x2c3bf8,0x4),'isSuperLong':_0x2c3bf8>0x4,'isHorizon':_0x2c3bf8<0x1},_0x2016a0=[...this[_0x4068d2(0x1e9)][_0x4068d2(0x152)]];_0x3c3777[_0x4068d2(0x1d0)](_0x59848e,'main')&&(_0x2016a0[_0x381746][_0x4068d2(0x1b3)][_0x4068d2(0xfd)]['imageMeta']=_0x4bae02),_0x3c3777[_0x4068d2(0x15b)](_0x59848e,_0x3c3777[_0x4068d2(0xf5)])&&(_0x2016a0[_0x381746]['second_comment'][_0x5e2c21]['comment'][_0x4068d2(0x192)]=_0x4bae02),this[_0x4068d2(0x1e2)]({'comments':_0x2016a0});},'onImageLoad'(_0x2a00a2){const _0x201b9f=_0x442992,_0x1707de={'okOnX':function(_0x3c364d,_0x5f3aad){return _0x3c364d>_0x5f3aad;},'eRAPS':function(_0x47ce0b,_0x482217){return _0x47ce0b<=_0x482217;},'lsngS':function(_0x43a910,_0x2da964){return _0x43a910/_0x2da964;},'fEmmZ':function(_0x1b56dc,_0x30aa82){return _0x1b56dc<_0x30aa82;}},{width:_0x124b33,height:_0x1d6c4c}=_0x2a00a2[_0x201b9f(0x1ce)];if(_0x1707de[_0x201b9f(0x245)](_0x1d6c4c/_0x124b33,0x3)&&_0x1707de[_0x201b9f(0x11b)](_0x1707de['lsngS'](_0x1d6c4c,_0x124b33),0x4))this['setData']({'isLongImage':!![]});else{if(_0x1707de['fEmmZ'](_0x1707de[_0x201b9f(0x14c)](_0x1d6c4c,_0x124b33),0x1))this[_0x201b9f(0x1e2)]({'isHorizonImage':!![]});else _0x1707de['okOnX'](_0x1707de['lsngS'](_0x1d6c4c,_0x124b33),0x4)&&this['setData']({'isSuperLongImage':!![]});}},'onJumpUrlTap'(_0x5e4eac){const _0x582593=_0x442992,_0x1df3a4=_0x5e4eac[_0x582593(0x119)][_0x582593(0x214)][_0x582593(0x16f)];if(!_0x1df3a4)return;wx[_0x582593(0x129)]({'url':_0x582593(0x1ec)+encodeURIComponent(_0x1df3a4)});},'onPreviewImage'(_0x62d9cc){const _0x1345e4=_0x442992,_0x5919fa=_0x62d9cc[_0x1345e4(0x119)][_0x1345e4(0x214)][_0x1345e4(0x173)];wx['previewImage']({'current':_0x5919fa,'urls':[_0x5919fa]});},'previewImageMultiple'(_0x13b941){const _0x2518b4=_0x442992,{index:_0x5db4da}=_0x13b941[_0x2518b4(0x119)]['dataset'],_0x182eb6=this[_0x2518b4(0x1e9)][_0x2518b4(0x1f7)][_0x2518b4(0x16c)]['imageArray'];wx['previewImage']({'current':_0x182eb6[_0x5db4da],'urls':_0x182eb6});},'formatPost'(_0x4f6a10){const _0x20bb21=_0x442992,_0x2cda76={'kXuCS':function(_0x5ea600,_0x208ab3){return _0x5ea600(_0x208ab3);}},_0xa0ebe7={..._0x4f6a10,'post':{..._0x4f6a10['post'],'formatTime':_0x1fd1d4(_0x4f6a10['post'][_0x20bb21(0x1fe)]),'imageArray':_0x4f6a10[_0x20bb21(0x16c)][_0x20bb21(0xef)]?_0x4f6a10[_0x20bb21(0x16c)]['images'][_0x20bb21(0x201)](','):[]}};return _0x4f6a10[_0x20bb21(0x23e)]&&_0x4f6a10[_0x20bb21(0x23e)][_0x20bb21(0x16c)]&&(_0xa0ebe7[_0x20bb21(0x23e)]={..._0x4f6a10[_0x20bb21(0x23e)],'post':{..._0x4f6a10['shared'][_0x20bb21(0x16c)],'formatTime':_0x2cda76[_0x20bb21(0x125)](_0x1fd1d4,_0x4f6a10['shared'][_0x20bb21(0x16c)]['created_at']),'imageArray':_0x4f6a10[_0x20bb21(0x23e)]['post'][_0x20bb21(0xef)]?_0x4f6a10[_0x20bb21(0x23e)][_0x20bb21(0x16c)][_0x20bb21(0xef)][_0x20bb21(0x201)](','):[]}}),_0xa0ebe7;},'parseContent'(_0x12f33a,_0x454d41=[],_0x49c742){const _0x39adc9=_0x442992,_0x80498e={'WGiIt':_0x39adc9(0x113),'kICqT':_0x39adc9(0x1f3),'IjbhO':'#406ce3','lMYFc':function(_0x3a9606,_0x339c90){return _0x3a9606!==_0x339c90;},'WGbye':function(_0x347f04,_0x240b35){return _0x347f04>_0x240b35;},'eTJPV':'img','iIhdM':_0x39adc9(0x127),'fVDyd':_0x39adc9(0x20f),'YdGko':_0x39adc9(0x213),'hmNbn':'emoji','MiqQr':_0x39adc9(0x141),'JxQQe':_0x39adc9(0x251),'QCwOu':_0x39adc9(0x1f2),'tvrts':function(_0x33217d,_0x1b3923){return _0x33217d===_0x1b3923;},'KHFof':_0x39adc9(0x22a),'tPUzS':function(_0x4b9efc,_0x1aa833){return _0x4b9efc===_0x1aa833;},'rJjol':_0x39adc9(0x137),'vsnfk':function(_0x15cd81,_0x1a3e96){return _0x15cd81===_0x1a3e96;},'EVCqz':'————','hDQRq':_0x39adc9(0x22f),'zqccT':_0x39adc9(0x10b),'AjbSu':_0x39adc9(0xf1),'roZBx':function(_0x1d25f0,_0x171183){return _0x1d25f0<_0x171183;}},_0x3a573c=[],_0x586ceb=/(#[^#]+#)|(\{@(.*?)\|(\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 _0x39e0dd=0x0,_0x182311;while(_0x80498e[_0x39adc9(0x181)](_0x182311=_0x586ceb[_0x39adc9(0x1db)](_0x12f33a),null)){if(_0x80498e[_0x39adc9(0x237)](_0x182311['index'],_0x39e0dd)){const _0x2de3e1=_0x12f33a['slice'](_0x39e0dd,_0x182311['index']);this[_0x39adc9(0x1ff)](_0x3a573c,_0x2de3e1);}if(_0x182311[0x1])_0x3a573c['push']({'text':_0x182311[0x1],'color':_0x80498e['IjbhO'],'type':_0x39adc9(0x1bf)});else{if(_0x182311[0x2])_0x3a573c['push']({'text':'@'+_0x182311[0x3],'color':_0x80498e['IjbhO'],'type':'at','userId':_0x182311[0x4]});else{if(_0x182311[0x5])_0x3a573c[_0x39adc9(0xed)]({'text':_0x39adc9(0x21d),'src':_0x182311[0x5],'type':_0x80498e[_0x39adc9(0x223)]});else{if(_0x182311[0x6])_0x3a573c[_0x39adc9(0xed)]({'text':_0x182311[0x6],'src':_0x182311[0x6],'type':_0x39adc9(0x144)});else{if(_0x182311[0x7])_0x3a573c[_0x39adc9(0xed)]({'text':_0x182311[0x7],'color':_0x80498e[_0x39adc9(0x114)]});else{if(_0x182311[0x8])_0x3a573c[_0x39adc9(0xed)]({'text':'','src':_0x182311[0x8],'type':_0x80498e[_0x39adc9(0x208)]});else{if(_0x182311[0x9])_0x3a573c[_0x39adc9(0xed)]({'text':_0x39adc9(0x165),'url':_0x182311[0x9],'type':_0x80498e[_0x39adc9(0x228)],'color':_0x80498e['IjbhO']});else{if(_0x182311[0xa]){const _0x596bd7=_0x182311[0xa][_0x39adc9(0x1a3)](/\[\/(\d+)\]/)[0x1],_0x407082=emojiMap[_0x596bd7];_0x407082?_0x3a573c['push']({'type':_0x80498e[_0x39adc9(0x167)],'src':_0x39adc9(0x149)+_0x407082}):_0x3a573c['push']({'text':_0x182311[0xa],'color':_0x80498e[_0x39adc9(0x18d)]});}else{if(_0x182311[0xb]&&_0x182311[0xc])_0x3a573c[_0x39adc9(0xed)]({'text':'$'+_0x182311[0xb],'gameId':_0x182311[0xc],'type':_0x80498e['JxQQe'],'color':_0x80498e[_0x39adc9(0x1ad)]});else{if(_0x182311[0xd]&&_0x182311[0xe])_0x3a573c[_0x39adc9(0xed)]({'text':'?'+_0x182311[0xd],'guideName':_0x182311[0xd],'guideGameId':_0x182311[0xe],'type':_0x80498e['QCwOu'],'color':_0x80498e[_0x39adc9(0x1ad)]});else{if(_0x80498e[_0x39adc9(0x24b)](_0x182311[0x0],_0x80498e[_0x39adc9(0x226)]))_0x3a573c[_0x39adc9(0xed)]({'text':'','bold':!![]});else{if(_0x80498e[_0x39adc9(0xe7)](_0x182311[0x0],_0x80498e[_0x39adc9(0x16b)]))_0x3a573c['push']({'text':'','bold':![]});else{if(_0x80498e['vsnfk'](_0x182311[0x0],_0x39adc9(0x14d)))_0x3a573c[_0x39adc9(0xed)]({'text':_0x80498e[_0x39adc9(0x24d)],'type':_0x80498e[_0x39adc9(0x250)]});else _0x80498e[_0x39adc9(0x17f)](_0x182311[0x0],_0x39adc9(0x203))&&_0x3a573c[_0x39adc9(0xed)]({'text':_0x80498e[_0x39adc9(0x255)],'type':_0x80498e['AjbSu']});}}}}}}}}}}}}_0x39e0dd=_0x586ceb['lastIndex'];}return _0x80498e[_0x39adc9(0x15c)](_0x39e0dd,_0x12f33a?.[_0x39adc9(0x13e)])&&this[_0x39adc9(0x1ff)](_0x3a573c,_0x12f33a[_0x39adc9(0x117)](_0x39e0dd)),_0x49c742&&_0x454d41[_0x39adc9(0x13e)]&&_0x454d41[_0x39adc9(0x19f)](_0x4d1ae2=>{const _0x2eff8c=_0x39adc9;_0x3a573c[_0x2eff8c(0xed)]({'type':_0x80498e[_0x2eff8c(0x1c3)],'text':_0x80498e['kICqT'],'color':_0x80498e['IjbhO'],'src':_0x4d1ae2});}),_0x3a573c;},'pushWithLineBreak'(_0x44cab7,_0xd8293){const _0xa7bdf0=_0x442992,_0x7eefb0={'hSYrh':function(_0x4662cf,_0x4226f3){return _0x4662cf===_0x4226f3;},'NcDvU':function(_0x155341,_0x7d6972){return _0x155341===_0x7d6972;},'rWSVZ':function(_0x25effa,_0x5a02bf){return _0x25effa>_0x5a02bf;},'VjZkw':_0xa7bdf0(0x141)},_0x3f056d=_0xd8293[_0xa7bdf0(0x201)](/(\r\n|\n|\r)/);_0x3f056d[_0xa7bdf0(0x19f)](_0x5e5549=>{const _0x19e3be=_0xa7bdf0;if(_0x7eefb0[_0x19e3be(0x1af)](_0x5e5549,'\x0a')||_0x7eefb0[_0x19e3be(0x1d4)](_0x5e5549,'\x0d')||_0x7eefb0[_0x19e3be(0x1af)](_0x5e5549,'\x0d\x0a'))_0x44cab7['push']({'type':'br'});else _0x7eefb0[_0x19e3be(0x1aa)](_0x5e5549[_0x19e3be(0x13e)],0x0)&&_0x44cab7[_0x19e3be(0xed)]({'text':_0x5e5549,'color':_0x7eefb0[_0x19e3be(0xfa)]});});},'showFull'(){const _0x195bc6=_0x442992;this[_0x195bc6(0x1e2)]({'showFull':!![]});},'onFollowTap'(_0x2600af){const _0x48cca2=_0x442992,_0x45e544={'fUaKa':function(_0x259c6b,_0x16e843){return _0x259c6b===_0x16e843;},'lzMCZ':_0x48cca2(0x24a),'yDrob':function(_0x33d5a7,_0x47a09e){return _0x33d5a7===_0x47a09e;},'kHwPm':function(_0x573f95,_0x31fd2c){return _0x573f95===_0x31fd2c;},'hKrlU':_0x48cca2(0x107),'vzXFi':_0x48cca2(0x19e),'jvKyQ':_0x48cca2(0x1de),'bYmpP':function(_0x2c5ed2){return _0x2c5ed2();},'ZNzjn':function(_0x1d2fb3,_0x5a9898,_0x1e2349){return _0x1d2fb3(_0x5a9898,_0x1e2349);}};if(!_0x45e544[_0x48cca2(0x1ed)](checkLogin))return;const _0x3fe58a=_0x2600af['currentTarget'][_0x48cca2(0x214)][_0x48cca2(0x122)],_0x34b031=_0x3fe58a['id'],_0x575fbb=_0x3fe58a[_0x48cca2(0x133)]??0x0,_0x556261=_0x575fbb===0x1?0x2:0x1;_0x45e544[_0x48cca2(0x10f)](followUser,_0x34b031,_0x556261)[_0x48cca2(0x106)](_0x59a196=>{const _0x3833ca=_0x48cca2;if(_0x45e544[_0x3833ca(0x1a8)](_0x59a196[_0x3833ca(0x1c6)],0x0)){this['setData']({'item.user.is_fans':_0x45e544[_0x3833ca(0x14b)](_0x575fbb,0x1)?0x0:0x1});const _0x44d85f=getCurrentPages();_0x44d85f['forEach'](_0x30ffb1=>{const _0x8c422=_0x3833ca,_0x458a16={'goWek':function(_0x4e2f26,_0x10854c){return _0x4e2f26===_0x10854c;}};if(_0x45e544['fUaKa'](_0x30ffb1[_0x8c422(0x1ca)],_0x8c422(0x1dd))){const _0x459c61=_0x30ffb1[_0x8c422(0x1e9)][_0x8c422(0x151)]['map'](_0x252725=>{const _0x502296=_0x8c422;return _0x252725[_0x502296(0x122)]['id']===_0x3fe58a['id']&&(_0x252725[_0x502296(0x122)][_0x502296(0x133)]=_0x458a16[_0x502296(0x1c5)](_0x575fbb,0x1)?0x0:0x1),_0x252725;});_0x30ffb1['setData']({'posts':_0x459c61});}_0x45e544[_0x8c422(0x14b)](_0x30ffb1['route'],_0x45e544[_0x8c422(0x24f)])&&(_0x30ffb1[_0x8c422(0x1e9)][_0x8c422(0x17e)]?.[_0x8c422(0x122)]?.['id']===_0x3fe58a['id']&&_0x30ffb1[_0x8c422(0x1e2)]({'userDetail.user.is_fans':_0x45e544[_0x8c422(0x1a8)](_0x575fbb,0x1)?0x0:0x1})),_0x45e544[_0x8c422(0xfe)](_0x30ffb1[_0x8c422(0x1ca)],_0x45e544['hKrlU'])&&(_0x30ffb1[_0x8c422(0x1e9)][_0x8c422(0x1f7)]?.[_0x8c422(0x122)]?.['id']===_0x3fe58a['id']&&_0x30ffb1[_0x8c422(0x1e2)]({'item.user.is_fans':_0x575fbb===0x1?0x0:0x1}));}),wx['showToast']({'title':_0x556261===0x1?'关注成功':_0x3833ca(0x17b),'icon':_0x45e544['vzXFi']});}else wx[_0x3833ca(0xee)]({'title':_0x59a196[_0x3833ca(0x123)]||_0x3833ca(0x212),'icon':_0x45e544[_0x3833ca(0x200)]});})[_0x48cca2(0x1df)](_0x313d33=>{const _0x27226a=_0x48cca2;wx[_0x27226a(0xee)]({'title':_0x313d33,'icon':_0x45e544[_0x27226a(0x200)]});});},'goSharedDetail'(_0x2d8f40){const _0x5c8d85=_0x442992,_0x4d6187={'ICLnc':function(_0x32433c,_0x2faddf){return _0x32433c===_0x2faddf;}};if(_0x4d6187[_0x5c8d85(0x1d8)](_0x2d8f40['target'][_0x5c8d85(0x214)][_0x5c8d85(0x16e)],'1'))return;const _0x2964b9=_0x2d8f40['currentTarget'][_0x5c8d85(0x214)]['id'];wx[_0x5c8d85(0x129)]({'url':_0x5c8d85(0x202)+_0x2964b9});},'gotoWiki'(_0x1bf9f1){const _0x4f3b81=_0x442992,_0x33cca3={'yicmI':function(_0x4a7345,_0x585d2a){return _0x4a7345(_0x585d2a);}},_0x541962=_0x1bf9f1['currentTarget'][_0x4f3b81(0x214)]['id'],_0x2b7587=_0x1bf9f1['currentTarget']['dataset'][_0x4f3b81(0x1a1)];wx[_0x4f3b81(0x129)]({'url':_0x4f3b81(0x177)+_0x541962+_0x4f3b81(0x142)+_0x33cca3[_0x4f3b81(0x20a)](encodeURIComponent,_0x2b7587)});},'onPartTap'(_0x573ec6){const _0x1fa57c=_0x442992,_0x59db66={'ziEiv':_0x1fa57c(0x1bf),'NyTys':function(_0x370391,_0x1c06f0){return _0x370391(_0x1c06f0);}},{type:_0x3ad570,id:_0x3f0407,text:_0x507636}=_0x573ec6[_0x1fa57c(0x119)]['dataset'];switch(_0x3ad570){case _0x59db66[_0x1fa57c(0x244)]:const _0x166ad9=_0x507636,_0x33ebc8=_0x166ad9[_0x1fa57c(0xdd)](/#/g,'');wx[_0x1fa57c(0x129)]({'url':_0x1fa57c(0x218)+_0x59db66[_0x1fa57c(0x146)](encodeURIComponent,_0x33ebc8)});break;case'at':wx['navigateTo']({'url':'../user/user?id='+_0x3f0407});break;case _0x1fa57c(0x251):wx['navigateTo']({'url':_0x1fa57c(0x134)+_0x3f0407});break;}},'onShowSheet'(_0x45ecc6){const _0x31694a=_0x442992,_0x2ef6fd={'fWrLV':_0x31694a(0x13c)},_0x4d89fc=this[_0x31694a(0x12c)](_0x2ef6fd[_0x31694a(0x1bd)]);_0x4d89fc&&_0x4d89fc['setData']({'selectedTopic':_0x45ecc6,'visible':!![]});},'createLikeAnimation'(){const _0x3b59cb=_0x442992,_0x1381b9=wx[_0x3b59cb(0x13b)]({'duration':0x12c,'timingFunction':'ease-out'});return _0x1381b9[_0x3b59cb(0x1e5)](1.6)[_0x3b59cb(0x103)]()[_0x3b59cb(0x1e5)](0x1)[_0x3b59cb(0x103)](),_0x1381b9[_0x3b59cb(0x105)]();},async 'onCommentLike'(_0x3c52c0){const _0x1a6c46=_0x442992,_0x3268f9={'RnQXe':function(_0x546ffb){return _0x546ffb();},'NJNXg':function(_0x337703,_0x1b3d8f){return _0x337703===_0x1b3d8f;},'NjRaD':function(_0x5428b5,_0x4c2fc5){return _0x5428b5===_0x4c2fc5;},'QbivW':function(_0x7b7f9e,_0x38275e,_0x5ade83){return _0x7b7f9e(_0x38275e,_0x5ade83);},'UIzfy':function(_0xe05b73,_0x460ad5){return _0xe05b73===_0x460ad5;},'FGZRQ':_0x1a6c46(0x139),'iaBfa':'子评论点赞失败'};if(!_0x3268f9[_0x1a6c46(0x135)](checkLogin))return;const {type:_0x463517,id:_0x2d91e4,idx:_0x31bfb0,parentidx:_0x3d9b3b}=_0x3c52c0[_0x1a6c46(0x119)]['dataset'];if(!_0x2d91e4)return;let _0x334cfd=[...this['data'][_0x1a6c46(0x152)]];if(_0x3268f9['NJNXg'](_0x463517,'main')){const _0x36030a=_0x334cfd[_0x31bfb0][_0x1a6c46(0x1b3)][_0x1a6c46(0xfd)],_0x583dc7=_0x3268f9['NjRaD'](_0x36030a[_0x1a6c46(0x12d)],0x1),_0x5bca24=_0x583dc7?0x2:0x1;_0x36030a['is_like']=_0x583dc7?0x0:0x1,_0x36030a['like_count']+=_0x583dc7?-0x1:0x1,this[_0x1a6c46(0x1e2)]({'comments':_0x334cfd});try{await _0x3268f9[_0x1a6c46(0xec)](likePost,_0x2d91e4,_0x5bca24);}catch(_0x20e5bd){console[_0x1a6c46(0x168)](_0x1a6c46(0x19b),_0x20e5bd),_0x36030a['is_like']=_0x583dc7?0x1:0x0,_0x36030a[_0x1a6c46(0x229)]+=_0x583dc7?0x1:-0x1,this[_0x1a6c46(0x1e2)]({'comments':_0x334cfd});}}else{if(_0x3268f9[_0x1a6c46(0x161)](_0x463517,_0x3268f9[_0x1a6c46(0x15d)])){const _0x37e82b=_0x334cfd[_0x3d9b3b][_0x1a6c46(0x205)][_0x31bfb0][_0x1a6c46(0xfd)],_0x5c7334=_0x3268f9['NJNXg'](_0x37e82b['is_like'],0x1),_0xafdf89=_0x5c7334?0x2:0x1;_0x37e82b[_0x1a6c46(0x12d)]=_0x5c7334?0x0:0x1,_0x37e82b[_0x1a6c46(0x229)]+=_0x5c7334?-0x1:0x1,this[_0x1a6c46(0x1e2)]({'comments':_0x334cfd});try{await _0x3268f9[_0x1a6c46(0xec)](likePost,_0x2d91e4,_0xafdf89);}catch(_0x3498e2){console[_0x1a6c46(0x168)](_0x3268f9[_0x1a6c46(0xda)],_0x3498e2),_0x37e82b['is_like']=_0x5c7334?0x1:0x0,_0x37e82b[_0x1a6c46(0x229)]+=_0x5c7334?0x1:-0x1,this[_0x1a6c46(0x1e2)]({'comments':_0x334cfd});}}}},'onCommentReplyTap'(_0x3807b2){const _0x12a84d=_0x442992,_0x36d548={'zlsVz':function(_0x17480f){return _0x17480f();},'EmPVx':function(_0x37bf3b,_0x4e5535){return _0x37bf3b===_0x4e5535;},'llrlq':'reply','pqaQk':_0x12a84d(0x13c)};if(!_0x36d548['zlsVz'](checkLogin))return;const {type:_0x3ae56b,idx:_0x2f843b,parentidx:_0x30b6df}=_0x3807b2[_0x12a84d(0x119)][_0x12a84d(0x214)];let _0x2d0995=null;if(_0x36d548[_0x12a84d(0x156)](_0x3ae56b,_0x12a84d(0x20d)))_0x2d0995=this[_0x12a84d(0x1e9)][_0x12a84d(0x152)][_0x2f843b][_0x12a84d(0x1b3)]['comment'],_0x2d0995[_0x12a84d(0x13a)]=this[_0x12a84d(0x1e9)][_0x12a84d(0x152)][_0x2f843b][_0x12a84d(0x1b3)][_0x12a84d(0x122)][_0x12a84d(0x1c2)],_0x2d0995[_0x12a84d(0x1f4)]=this[_0x12a84d(0x1e9)][_0x12a84d(0x152)][_0x2f843b][_0x12a84d(0x1b3)][_0x12a84d(0x122)]['avatar'];else _0x36d548[_0x12a84d(0x156)](_0x3ae56b,_0x36d548['llrlq'])&&(_0x2d0995=this[_0x12a84d(0x1e9)][_0x12a84d(0x152)][_0x30b6df][_0x12a84d(0x205)][_0x2f843b][_0x12a84d(0xfd)],_0x2d0995[_0x12a84d(0x1f4)]=this['data'][_0x12a84d(0x152)][_0x30b6df][_0x12a84d(0x205)][_0x2f843b][_0x12a84d(0x122)][_0x12a84d(0x1f4)]);if(!_0x2d0995)return;this['setData']({'currentReplyComment':_0x2d0995});const _0x2fd03f=this[_0x12a84d(0x12c)](_0x36d548['pqaQk']);_0x2fd03f&&_0x2fd03f['setData']({'visible':!![],'originData':this['data'][_0x12a84d(0x1f7)],'commentData':_0x2d0995});},'onSelectVote'(_0x21e3f4){const _0x2d2a7c=_0x442992,_0x3807d0={'QUHZG':function(_0x548661){return _0x548661();},'VEAxr':function(_0x132267,_0x5494a6){return _0x132267>=_0x5494a6;},'uElia':'none'};if(!_0x3807d0[_0x2d2a7c(0x1a5)](checkLogin))return;const {id:_0xe11aa0}=_0x21e3f4[_0x2d2a7c(0x119)][_0x2d2a7c(0x214)],_0x4090da=_0x21e3f4[_0x2d2a7c(0x119)][_0x2d2a7c(0x214)][_0x2d2a7c(0x220)];if(_0x4090da)return;let {selectedVotes:_0x2d6a62,voteOptions:_0x22f15f}=this['data'];const _0x532b19=this['data']['item']['post'][_0x2d2a7c(0x240)];if(_0x532b19[_0x2d2a7c(0x10d)]===0x1)_0x2d6a62=[_0xe11aa0];else{if(_0x2d6a62['includes'](_0xe11aa0))_0x2d6a62=_0x2d6a62[_0x2d2a7c(0x199)](_0x8abf6c=>_0x8abf6c!==_0xe11aa0);else{if(_0x3807d0[_0x2d2a7c(0x249)](_0x2d6a62[_0x2d2a7c(0x13e)],_0x532b19[_0x2d2a7c(0x10d)])){wx[_0x2d2a7c(0xee)]({'title':'最多只能选择'+_0x532b19[_0x2d2a7c(0x10d)]+_0x2d2a7c(0x111),'icon':_0x3807d0[_0x2d2a7c(0x22e)]});return;}_0x2d6a62[_0x2d2a7c(0xed)](_0xe11aa0);}}_0x22f15f=_0x22f15f[_0x2d2a7c(0xf2)](_0x473f0f=>({..._0x473f0f,'_selected':_0x2d6a62[_0x2d2a7c(0x21f)](_0x473f0f['id'])})),this[_0x2d2a7c(0x1e2)]({'selectedVotes':_0x2d6a62,'voteOptions':_0x22f15f});},'submitVote'(){const _0x1abe8f=_0x442992,_0x3aaa53={'THdqA':function(_0x588c83){return _0x588c83();},'IIjqw':function(_0x42ad06,_0x128d82,_0x2d89fb,_0x1cf4e8){return _0x42ad06(_0x128d82,_0x2d89fb,_0x1cf4e8);}};if(!_0x3aaa53[_0x1abe8f(0x242)](checkLogin))return;const {selectedVotes:_0x563880,item:_0x31b9d2}=this['data'];if(_0x563880[_0x1abe8f(0x13e)]===0x0)return;console[_0x1abe8f(0x1b9)](_0x563880),_0x3aaa53['IIjqw'](votePost,_0x31b9d2['post']['id'],_0x31b9d2['post'][_0x1abe8f(0x240)]['id'],_0x563880)[_0x1abe8f(0x106)](_0x5de918=>{const _0x23dda5=_0x1abe8f;this[_0x23dda5(0x1ab)](_0x31b9d2[_0x23dda5(0x16c)]['id']);});},'formatTime'(_0x147707){const _0x8dee77=_0x442992,_0x2fa330={'YtRPh':function(_0x4c5d09,_0x300e0b){return _0x4c5d09(_0x300e0b);},'kduWo':function(_0x16f7fb,_0x380e3d){return _0x16f7fb(_0x380e3d);}},_0x5bf1be=new Date(_0x147707*0x3e8),_0x33ac7e=_0x5bf1be[_0x8dee77(0x189)](),_0x1135b8=String(_0x5bf1be[_0x8dee77(0x102)]()+0x1)['padStart'](0x2,'0'),_0x3ce22=String(_0x5bf1be['getDate']())['padStart'](0x2,'0'),_0x34f4b3=_0x2fa330['YtRPh'](String,_0x5bf1be[_0x8dee77(0x197)]())[_0x8dee77(0x1a4)](0x2,'0'),_0x395646=_0x2fa330[_0x8dee77(0x1d1)](String,_0x5bf1be[_0x8dee77(0x1f8)]())[_0x8dee77(0x1a4)](0x2,'0');return _0x33ac7e+'-'+_0x1135b8+'-'+_0x3ce22+'\x20'+_0x34f4b3+':'+_0x395646;},'onMoreTap'(){const _0x3c8e01=_0x442992,_0x5db07e={'VHhxH':'appuid','KjoHN':function(_0x32788e,_0x121b10){return _0x32788e===_0x121b10;}},_0x3076f8=wx[_0x3c8e01(0x20c)](_0x5db07e[_0x3c8e01(0x233)]),_0x4412ba=_0x5db07e[_0x3c8e01(0x1ee)](this[_0x3c8e01(0x1e9)][_0x3c8e01(0x1f7)][_0x3c8e01(0x122)]['id'],_0x3076f8);this[_0x3c8e01(0x1e2)]({'showMenuSheet':!![],'isOwner':_0x4412ba});},'onCloseSheet'(){const _0x39f975=_0x442992;this[_0x39f975(0x1e2)]({'showMenuSheet':![]});},'onDelete'(){const _0xa0ddd6=_0x442992,_0x2d517f={'qEEwx':function(_0x1f5521,_0x1ff502){return _0x1f5521===_0x1ff502;},'zXKDV':_0xa0ddd6(0x1ea),'PdAND':_0xa0ddd6(0x19e),'DQIHL':function(_0x1db107){return _0x1db107();},'NdkXG':function(_0x2cb8f2,_0x1fc4ab){return _0x2cb8f2-_0x1fc4ab;},'JmdZm':function(_0x843a8b,_0x43f79b){return _0x843a8b===_0x43f79b;},'vKbaf':_0xa0ddd6(0x1dd),'pSzZy':function(_0x5a9458,_0x323817){return _0x5a9458===_0x323817;},'eirDu':_0xa0ddd6(0x176),'YZIhM':_0xa0ddd6(0x155),'ZIasK':'error','uCjJe':function(_0x2f81c7,_0x29829c){return _0x2f81c7(_0x29829c);}},_0x2689b5=this[_0xa0ddd6(0x1e9)][_0xa0ddd6(0x1f7)][_0xa0ddd6(0x16c)]['id'];_0x2d517f[_0xa0ddd6(0x18a)](deleteContent,_0x2689b5)[_0xa0ddd6(0x106)](_0x36d525=>{const _0x378120=_0xa0ddd6;if(_0x2d517f[_0x378120(0x224)](_0x36d525[_0x378120(0x1c6)],0x0)){wx['showToast']({'title':_0x2d517f['zXKDV'],'icon':_0x2d517f[_0x378120(0x171)]});const _0x3ad670=_0x2d517f['DQIHL'](getCurrentPages),_0x4a9682=_0x3ad670[_0x2d517f[_0x378120(0x136)](_0x3ad670[_0x378120(0x13e)],0x2)];if(_0x4a9682){if(_0x2d517f[_0x378120(0x14e)](_0x4a9682[_0x378120(0x1ca)],_0x2d517f['vKbaf'])){const _0x539fa2=_0x4a9682[_0x378120(0x1e9)][_0x378120(0x151)];if(Array[_0x378120(0x1d6)](_0x539fa2))_0x4a9682['setData']({'posts':_0x539fa2[_0x378120(0x199)](_0x1e471b=>_0x1e471b[_0x378120(0x16c)]['id']!==_0x2689b5)});else{if(_0x539fa2&&_0x2d517f[_0x378120(0x158)](typeof _0x539fa2,_0x2d517f[_0x378120(0x17c)])){const _0x15e8e0={};Object[_0x378120(0x195)](_0x539fa2)[_0x378120(0x19f)](_0x4db6b7=>{const _0x444dca=_0x378120;_0x15e8e0[_0x4db6b7]=Array[_0x444dca(0x1d6)](_0x539fa2[_0x4db6b7])?_0x539fa2[_0x4db6b7]['filter'](_0x765863=>_0x765863['post']['id']!==_0x2689b5):_0x539fa2[_0x4db6b7];}),_0x4a9682[_0x378120(0x1e2)]({'posts':_0x15e8e0});}}}if(_0x2d517f[_0x378120(0x158)](_0x4a9682[_0x378120(0x1ca)],_0x378120(0x24a))){const _0x2a5a2e=_0x4a9682['data'][_0x378120(0x204)]||[];_0x4a9682['setData']({'userPosts':_0x2a5a2e['filter'](_0x15d3fc=>_0x15d3fc[_0x378120(0x16c)]['id']!==_0x2689b5)});}}wx[_0x378120(0x216)]();}else wx['showToast']({'title':_0x36d525[_0x378120(0x14f)]||_0x2d517f[_0x378120(0x23c)],'icon':_0x2d517f[_0x378120(0x13d)]});});},'onReport'(){const _0x3d9a6c=_0x442992,_0x2ab880={'KmrKD':_0x3d9a6c(0x104)};wx['navigateTo']({'url':_0x3d9a6c(0x18b)+this[_0x3d9a6c(0x1e9)][_0x3d9a6c(0x1f7)][_0x3d9a6c(0x16c)]['id']}),this['triggerEvent'](_0x2ab880[_0x3d9a6c(0x24e)],{'post':this['data'][_0x3d9a6c(0x1f7)][_0x3d9a6c(0x16c)]}),this[_0x3d9a6c(0x166)]();},'onFavorite'(){const _0x15b852=_0x442992,_0x23fad3={'zjnHy':function(_0x125353,_0x1fc39c){return _0x125353===_0x1fc39c;},'HoCPT':_0x15b852(0x154),'Ichan':_0x15b852(0x19e),'GRnlq':function(_0x571489,_0x134dcf){return _0x571489===_0x134dcf;},'raZuS':function(_0x25d906,_0x108ff2){return _0x25d906===_0x108ff2;},'gazhD':_0x15b852(0x148),'nUngc':_0x15b852(0x1a6),'OpEXg':_0x15b852(0x168),'IZtML':function(_0x539bd4,_0x1ff90f){return _0x539bd4===_0x1ff90f;},'XhSpu':function(_0xa409f1,_0xb0ab2e,_0x57429c){return _0xa409f1(_0xb0ab2e,_0x57429c);}},_0x30e612=this[_0x15b852(0x1e9)][_0x15b852(0x1f7)][_0x15b852(0x16c)],_0x25663a=_0x23fad3[_0x15b852(0x21a)](_0x30e612['is_collect'],0x1)?0x2:0x1;_0x23fad3[_0x15b852(0x1e4)](collectPost,_0x30e612['id'],_0x25663a)[_0x15b852(0x106)](_0x5198c9=>{const _0x50efb9=_0x15b852;_0x5198c9[_0x50efb9(0x1c6)]===0x0?(wx['showToast']({'title':_0x23fad3[_0x50efb9(0xe3)](_0x25663a,0x1)?_0x50efb9(0x248):_0x23fad3[_0x50efb9(0x12e)],'icon':_0x23fad3[_0x50efb9(0x178)]}),this[_0x50efb9(0x1e2)]({'item.post.is_collect':_0x23fad3['GRnlq'](_0x25663a,0x1)?0x1:0x0}),this['onCloseSheet']()):wx[_0x50efb9(0xee)]({'title':_0x5198c9['msg']||(_0x23fad3['raZuS'](_0x25663a,0x1)?_0x23fad3['gazhD']:_0x23fad3['nUngc']),'icon':_0x23fad3[_0x50efb9(0x191)]});});},async 'loadMoreReply'(_0x185726){const _0x58a342=_0x442992,_0xdff057={'JuSSl':function(_0x2fc816,_0x26b085){return _0x2fc816(_0x26b085);},'xSnbJ':function(_0x53701a,_0xd1b4d4){return _0x53701a+_0xd1b4d4;},'QRHrc':function(_0x51d7c9,_0x545d73,_0xdc6a3a,_0x186a83){return _0x51d7c9(_0x545d73,_0xdc6a3a,_0x186a83);},'xnTSZ':_0x58a342(0x131),'oFLMi':_0x58a342(0x1de)},_0x3ebc18=_0x185726[_0x58a342(0x119)][_0x58a342(0x214)][_0x58a342(0x1be)];let _0x1f64a0=[...this[_0x58a342(0x1e9)][_0x58a342(0x152)]],_0x40693e=_0x1f64a0[_0x3ebc18];const _0x20c70e=this[_0x58a342(0x1e9)]['postId'],_0x47f7f7=_0x40693e[_0x58a342(0x1b3)][_0x58a342(0xfd)]['id'];if(!_0x40693e[_0x58a342(0x16a)])_0x40693e['_replyPage']=0x0;const _0x2c2ca9=_0xdff057['xSnbJ'](_0x40693e[_0x58a342(0x16a)],0x1);try{const _0x2f6106=await _0xdff057[_0x58a342(0xea)](queryMainComments,_0x20c70e,_0x47f7f7,_0x2c2ca9);if(_0x2f6106['code']!==0x0||!Array[_0x58a342(0x1d6)](_0x2f6106[_0x58a342(0x1e9)])){wx[_0x58a342(0xee)]({'title':_0xdff057['xnTSZ'],'icon':_0xdff057[_0x58a342(0xdc)]});return;}const _0x54eafd=_0x2f6106[_0x58a342(0x1e9)][_0x58a342(0xf2)](_0x236d64=>{const _0x73d43b=_0x58a342,_0x2a4288=this[_0x73d43b(0x257)](_0x236d64[_0x73d43b(0xfd)]['content']||'');return{..._0x236d64,'comment':{..._0x236d64[_0x73d43b(0xfd)],'formatTime':_0xdff057[_0x73d43b(0x252)](_0x1fd1d4,_0x236d64[_0x73d43b(0xfd)][_0x73d43b(0x1fe)])},'contentParts':_0x2a4288};});_0x40693e['second_comment']=[..._0x40693e['second_comment'],..._0x54eafd],_0x40693e[_0x58a342(0x16a)]=_0x2c2ca9,this[_0x58a342(0x1e2)]({'comments':_0x1f64a0});}catch(_0x17dbd4){console[_0x58a342(0x168)](_0x58a342(0x159),_0x17dbd4),wx['showToast']({'title':_0x58a342(0x1cf),'icon':_0xdff057[_0x58a342(0xdc)]});}},'checkDialog'(){const _0x1b29ca=_0x442992;wx['navigateTo']({'url':_0x1b29ca(0x1fb)+this['data']['item'][_0x1b29ca(0x16c)]['id']});},async 'onBannerVideoPlay'(_0x4e9db8){const _0x29b03b=_0x442992,_0x5ee8c5={'aiRna':function(_0xe2cad8,_0x2acb1d){return _0xe2cad8===_0x2acb1d;},'ojEWr':_0x29b03b(0x23e),'RoPkw':function(_0xce4c46,_0x384a4b){return _0xce4c46(_0x384a4b);},'Yvgie':_0x29b03b(0x1f6),'LAaeg':_0x29b03b(0x1d5),'lJFHh':_0x29b03b(0x10c),'wwLES':_0x29b03b(0x243),'bbPQb':_0x29b03b(0x22c),'RnCyr':'none'},_0x5040c4=_0x4e9db8[_0x29b03b(0x119)][_0x29b03b(0x214)]['id'],_0x2fabe1=_0x4e9db8[_0x29b03b(0x119)][_0x29b03b(0x214)][_0x29b03b(0x247)],_0x26cc99=_0x4e9db8[_0x29b03b(0x119)][_0x29b03b(0x214)][_0x29b03b(0x1ac)],_0x5e2a08=_0x5ee8c5[_0x29b03b(0x180)](_0x2fabe1,_0x5ee8c5[_0x29b03b(0x23d)]);let _0x2cea44=_0x5e2a08?_0x26cc99:_0x5040c4;try{const _0x411017=await _0x5ee8c5[_0x29b03b(0x1e6)](queryPostVideo,_0x2cea44);if(_0x411017['code']===0x0&&_0x411017[_0x29b03b(0x1e9)]){let _0x276177=_0x5e2a08?_0x5ee8c5[_0x29b03b(0x1cb)]:_0x5ee8c5[_0x29b03b(0x227)];this[_0x29b03b(0x1e2)]({[_0x276177]:_0x411017[_0x29b03b(0x1e9)],'isCurrentPlaying':!![]},()=>{const _0x4478c1=_0x29b03b;this[_0x4478c1(0x215)]();}),this[_0x29b03b(0x1b2)](_0x5ee8c5['lJFHh'],{'id':_0x5040c4});}else throw new Error(_0x5ee8c5[_0x29b03b(0x157)]);}catch(_0x53fb4e){wx[_0x29b03b(0xee)]({'title':_0x5ee8c5[_0x29b03b(0x1bb)],'icon':_0x5ee8c5['RnCyr']});}finally{}},'setupVideoObserver'(){const _0x23cc01=_0x442992,_0x353b1c={'sJRJA':function(_0x478aa4,_0x5b58c6){return _0x478aa4<=_0x5b58c6;}},_0x1a1fda=this['data'][_0x23cc01(0x1f7)][_0x23cc01(0x16c)]['id'],_0x37a5bb=this[_0x23cc01(0x1f9)]({'thresholds':[0.6]});_0x37a5bb[_0x23cc01(0x18f)]({'top':0x0,'bottom':0x0})[_0x23cc01(0x14a)](_0x23cc01(0x21e)+_0x1a1fda,_0x41c268=>{const _0x569b5b=_0x23cc01,_0x5b8cd7=wx[_0x569b5b(0x1c9)]('bannerVideo-'+_0x1a1fda,this);_0x353b1c[_0x569b5b(0x1d7)](_0x41c268[_0x569b5b(0xf0)],0.6)&&_0x5b8cd7[_0x569b5b(0x1c1)]();});},'handlePlayVideo'(){const _0x1380d3=_0x442992,_0x1392cb={'AViwy':_0x1380d3(0x10c)},_0x3089d7=this['data'][_0x1380d3(0x1f7)][_0x1380d3(0x16c)]['id'],_0x5bf8e8=wx[_0x1380d3(0x1c9)](_0x1380d3(0x210)+_0x3089d7,this);this[_0x1380d3(0x1b2)](_0x1392cb[_0x1380d3(0x1f0)],{'id':_0x3089d7}),_0x5bf8e8[_0x1380d3(0x184)](),this[_0x1380d3(0x1e2)]({'isCurrentPlaying':!![]});},'onVideoPause'(_0x8c0312){const _0x3d5b2d=_0x442992;this[_0x3d5b2d(0x1e2)]({'isCurrentPlaying':![]});},'pauseVideo'(){const _0x2f4324=_0x442992,_0x4129ea=wx['createVideoContext'](_0x2f4324(0x210)+this[_0x2f4324(0x1e9)]['item']['post']['id'],this);_0x4129ea[_0x2f4324(0x1c1)]();}});