southnote-mini-sdk 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +1 -22
- package/assets/file/badwords.js +1 -63008
- package/assets/file/rules.js +1 -38
- package/components/bottomSheet/bottomSheet.js +1 -473
- package/components/experience-item/experience-item.js +1 -105
- package/components/grid-item/grid-item.js +1 -8
- package/components/post-item/post-item.js +1 -1086
- package/components/wiki-renderer/wiki-renderer.js +1 -636
- package/components/wiki-tabs/wiki-tabs.js +1 -52
- package/index.js +1 -49
- package/package.json +2 -22
- package/pages/addGame/addGame.js +1 -454
- package/pages/addSubject/addSubject.js +1 -199
- package/pages/commonLogin/commonLogin.js +1 -269
- package/pages/copyOfficial/copyOfficial.js +1 -25
- package/pages/demo/demo.js +1 -23
- package/pages/game/game.js +1 -1305
- package/pages/home/home.js +1 -665
- package/pages/lottery-winners/lottery-winners.js +1 -60
- package/pages/message/messageCommentsAndAt/messageCommentsAndAt.js +1 -178
- package/pages/message/messageEntire/messageEntire.js +1 -112
- package/pages/message/messageLikeAndCollect/messageLikeAndCollect.js +1 -147
- package/pages/message/messageNewFans/messageNewFans.js +1 -139
- package/pages/officialWebview/officialWebview.js +1 -13
- package/pages/post/post.js +1 -1856
- package/pages/post-editor/post-editor.js +1 -465
- package/pages/postDialog/postDialog.js +1 -560
- package/pages/report-category/report-category.js +1 -29
- package/pages/report-form/report-form.js +1 -65
- package/pages/sevenDaySignDetail/sevenDaySignDetail.js +1 -273
- package/pages/topic/topic.js +1 -266
- package/pages/user/user.js +1 -939
- package/pages/userDatum/userDatum.js +1 -24
- package/pages/userGameLib/userGameLib.js +1 -105
- package/pages/webview/webview.js +1 -25
- package/pages/wheelActivivty/wheelActivivty.js +1 -492
- package/pages/wiki/wiki.js +1 -138
- package/request/JKRequest.js +1 -177
- package/services/home.js +1 -603
- package/utils/auth.js +1 -17
- package/utils/base64.js +1 -67
- package/utils/compressImage.js +1 -41
- package/utils/exp.js +1 -49
- package/utils/formatPost.js +1 -18
- package/utils/parseContent.js +1 -191
- package/utils/query-select.js +1 -9
- package/utils/sensitive.js +1 -82
package/pages/game/game.js
CHANGED
|
@@ -1,1305 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
queryGameInfo,
|
|
3
|
-
queryGameWiki,
|
|
4
|
-
queryGameWikiUsers,
|
|
5
|
-
queryGamePosts,
|
|
6
|
-
addGame,
|
|
7
|
-
deleteContent,
|
|
8
|
-
collectPost,
|
|
9
|
-
setUserPostTop,
|
|
10
|
-
queryGameBannerVideo
|
|
11
|
-
} from "../../services/home";
|
|
12
|
-
import {
|
|
13
|
-
decompressBase64Gzip,
|
|
14
|
-
isEmptyObject
|
|
15
|
-
} from "../../utils/base64"
|
|
16
|
-
import {
|
|
17
|
-
formatUTCYear
|
|
18
|
-
} from "../../utils/formatPost";
|
|
19
|
-
import formatUTC from "../../utils/formatPost";
|
|
20
|
-
import {
|
|
21
|
-
getLevelByExp,
|
|
22
|
-
getLevelImg
|
|
23
|
-
} from "../../utils/exp";
|
|
24
|
-
import {
|
|
25
|
-
checkLogin
|
|
26
|
-
} from "../../utils/auth"
|
|
27
|
-
import sdk from '../../index'
|
|
28
|
-
const rulesData = require("../../assets/file/rules.js");
|
|
29
|
-
|
|
30
|
-
Page({
|
|
31
|
-
data: {
|
|
32
|
-
gameId: 0,
|
|
33
|
-
gameInfo: {},
|
|
34
|
-
introduceInfo: {},
|
|
35
|
-
protocolInfo: {},
|
|
36
|
-
empiricInfo: {},
|
|
37
|
-
tabs: [],
|
|
38
|
-
currentTab: 1,
|
|
39
|
-
gameWikiJson: [],
|
|
40
|
-
wikiUsers: [],
|
|
41
|
-
wiki_created_at: '',
|
|
42
|
-
showSheet: false,
|
|
43
|
-
sheetMode: 'forward',
|
|
44
|
-
originPost: {},
|
|
45
|
-
|
|
46
|
-
postTabs: [{
|
|
47
|
-
title: "最新",
|
|
48
|
-
filter: 1
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
title: "最热",
|
|
52
|
-
filter: 2
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
title: "24小时榜",
|
|
56
|
-
filter: 3
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
title: "官方",
|
|
60
|
-
filter: 4
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: "精品",
|
|
64
|
-
filter: 5
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
title: "文章",
|
|
68
|
-
filter: 6
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
subTab: 1,
|
|
72
|
-
activities: [],
|
|
73
|
-
posts: {}, // {1: [...], 2: [...], ...}
|
|
74
|
-
page: {}, // {1: 1, 2: 1, ...}
|
|
75
|
-
hasMore: {}, // {1: true, 2: false, ...}
|
|
76
|
-
loading: {},
|
|
77
|
-
|
|
78
|
-
ruleList: [],
|
|
79
|
-
avatar: '',
|
|
80
|
-
nickname: '',
|
|
81
|
-
|
|
82
|
-
moreSheetVisible: false,
|
|
83
|
-
moreSheetItem: {},
|
|
84
|
-
isOwner: false, //当前cell是否是自己
|
|
85
|
-
|
|
86
|
-
currentBanner: 0,
|
|
87
|
-
bannerRect: null,
|
|
88
|
-
|
|
89
|
-
currentPlayingVideoId: null, //当前播放视频帖子id
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
onPageScroll(e) {
|
|
94
|
-
|
|
95
|
-
const scrollTop = e.scrollTop
|
|
96
|
-
if (scrollTop >= 350 && this.data.gameInfo.landscape === 1) {
|
|
97
|
-
this.pauseFirstVideo()
|
|
98
|
-
}
|
|
99
|
-
if (scrollTop >= 400 && this.data.gameInfo.landscape === 0) {
|
|
100
|
-
this.pauseFirstVideo()
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
// 发布按钮点击
|
|
105
|
-
onPublish() {
|
|
106
|
-
this.onPauseAllVideo()
|
|
107
|
-
const token = wx.getStorageSync('token'); // 读取缓存里的 token
|
|
108
|
-
const {
|
|
109
|
-
gameId,
|
|
110
|
-
gameInfo
|
|
111
|
-
} = this.data; // 获取当前游戏信息
|
|
112
|
-
if (token) {
|
|
113
|
-
// 已登录,跳转到发布页面
|
|
114
|
-
wx.navigateTo({
|
|
115
|
-
url: `../post-editor/post-editor?gameId=${gameId}&gameName=${encodeURIComponent(gameInfo.name || '')}`,
|
|
116
|
-
});
|
|
117
|
-
} else {
|
|
118
|
-
// 未登录,跳转登录页面
|
|
119
|
-
wx.navigateTo({
|
|
120
|
-
url: '../commonLogin/commonLogin',
|
|
121
|
-
// url:'../login/login'
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
gotoUserDetail(e) {
|
|
126
|
-
this.onPauseAllVideo()
|
|
127
|
-
const userId = e.currentTarget.dataset.id;
|
|
128
|
-
wx.navigateTo({
|
|
129
|
-
url: `../user/user?id=${userId}`
|
|
130
|
-
});
|
|
131
|
-
},
|
|
132
|
-
// 游戏详情页分享逻辑
|
|
133
|
-
onShareAppMessage() {
|
|
134
|
-
const {
|
|
135
|
-
gameInfo,
|
|
136
|
-
gameId
|
|
137
|
-
} = this.data;
|
|
138
|
-
|
|
139
|
-
// 使用游戏名称作为分享标题,如果没有则显示默认文案
|
|
140
|
-
const title = gameInfo?.name || '查看游戏详情';
|
|
141
|
-
|
|
142
|
-
return {
|
|
143
|
-
title,
|
|
144
|
-
// 分享路径携带 gameId 参数
|
|
145
|
-
path: `../game/game?id=${gameId}`
|
|
146
|
-
};
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
onLoad(options) {
|
|
151
|
-
const gameId = options.id || sdk.gameId;
|
|
152
|
-
|
|
153
|
-
if (!gameId) {
|
|
154
|
-
wx.showToast({
|
|
155
|
-
title: '缺少gameId参数',
|
|
156
|
-
icon: 'none'
|
|
157
|
-
});
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
this.setData({
|
|
161
|
-
gameId,
|
|
162
|
-
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
this.getGameInfo();
|
|
166
|
-
this.getGameIntroduce();
|
|
167
|
-
this.getGameProtocol();
|
|
168
|
-
this.getGameEmpiricValue();
|
|
169
|
-
this.getGameWikiInfo()
|
|
170
|
-
|
|
171
|
-
// 默认加载 最热
|
|
172
|
-
this.loadPosts(2);
|
|
173
|
-
|
|
174
|
-
this.setData({
|
|
175
|
-
nickname: wx.getStorageSync('nickname'),
|
|
176
|
-
avatar: wx.getStorageSync('avatar')
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
changeSubTab(e) {
|
|
183
|
-
const index = e.detail.index;
|
|
184
|
-
const filter = this.data.postTabs[index].filter;
|
|
185
|
-
this.setData({
|
|
186
|
-
subTab: index
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
// 如果当前tab还没加载过数据,则加载
|
|
190
|
-
if (!this.data.posts[filter]) {
|
|
191
|
-
this.loadPosts(filter);
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
/** 获取帖子列表(已改造 ✅) */
|
|
196
|
-
/** 获取帖子列表(已改造 ✅) */
|
|
197
|
-
async loadPosts(filter, append = false) {
|
|
198
|
-
const {
|
|
199
|
-
gameId,
|
|
200
|
-
page,
|
|
201
|
-
posts,
|
|
202
|
-
loading
|
|
203
|
-
} = this.data;
|
|
204
|
-
|
|
205
|
-
if (loading[filter]) return;
|
|
206
|
-
|
|
207
|
-
const nextPage = append ? (page[filter] || 1) + 1 : 1;
|
|
208
|
-
this.setData({
|
|
209
|
-
[`loading.${filter}`]: true
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
try {
|
|
213
|
-
const res = await queryGamePosts(gameId, nextPage, filter);
|
|
214
|
-
if (res?.code === 0 && Array.isArray(res.data)) {
|
|
215
|
-
// 格式化帖子数据
|
|
216
|
-
const list = res.data.map(item => {
|
|
217
|
-
const p = item.post || {};
|
|
218
|
-
const shared = item.shared;
|
|
219
|
-
|
|
220
|
-
const user = item.user || {};
|
|
221
|
-
const game = item.game || {};
|
|
222
|
-
if (game.exp != null) {
|
|
223
|
-
user.level = getLevelByExp(game?.exp);
|
|
224
|
-
user.levelImg = getLevelImg(user.level)
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return {
|
|
228
|
-
...item,
|
|
229
|
-
post: {
|
|
230
|
-
...p,
|
|
231
|
-
imageArray: p.images ? p.images.split(",") : [],
|
|
232
|
-
formatTime: formatUTC(p.created_at)
|
|
233
|
-
},
|
|
234
|
-
shared: shared?.post ? {
|
|
235
|
-
...shared,
|
|
236
|
-
post: {
|
|
237
|
-
...shared.post,
|
|
238
|
-
imageArray: shared.post.images ? shared.post.images.split(",") : [],
|
|
239
|
-
formatTime: formatUTC(shared.post.created_at)
|
|
240
|
-
}
|
|
241
|
-
} : shared
|
|
242
|
-
};
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
const got = list.length > 0;
|
|
246
|
-
|
|
247
|
-
if (append) {
|
|
248
|
-
// ✅ 只追加新增数据,避免重渲染旧数据
|
|
249
|
-
const currentLength = posts[filter]?.length || 0;
|
|
250
|
-
let update = {};
|
|
251
|
-
list.forEach((item, idx) => {
|
|
252
|
-
update[`posts.${filter}[${currentLength + idx}]`] = item;
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
this.setData({
|
|
256
|
-
...update,
|
|
257
|
-
[`page.${filter}`]: nextPage,
|
|
258
|
-
[`hasMore.${filter}`]: got,
|
|
259
|
-
[`loading.${filter}`]: false
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
} else {
|
|
263
|
-
// 首次加载直接覆盖
|
|
264
|
-
this.setData({
|
|
265
|
-
[`posts.${filter}`]: list,
|
|
266
|
-
[`page.${filter}`]: nextPage,
|
|
267
|
-
[`hasMore.${filter}`]: got,
|
|
268
|
-
[`loading.${filter}`]: false
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
} else {
|
|
273
|
-
this.setData({
|
|
274
|
-
[`hasMore.${filter}`]: false,
|
|
275
|
-
[`loading.${filter}`]: false
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
} catch (e) {
|
|
280
|
-
console.error("获取帖子失败", e);
|
|
281
|
-
this.setData({
|
|
282
|
-
[`loading.${filter}`]: false
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
/** 点击加载更多 */
|
|
288
|
-
loadMore(e) {
|
|
289
|
-
const filter = e.currentTarget.dataset.filter;
|
|
290
|
-
this.loadPosts(filter, true);
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
toggleRule(e) {
|
|
294
|
-
const index = e.currentTarget.dataset.index;
|
|
295
|
-
const key = `ruleList[${index}].open`;
|
|
296
|
-
this.setData({
|
|
297
|
-
[key]: !this.data.ruleList[index].open
|
|
298
|
-
});
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
async getGameInfo() {
|
|
302
|
-
try {
|
|
303
|
-
const res = await queryGameInfo(this.data.gameId, 1, 1);
|
|
304
|
-
if (res.code === 0) {
|
|
305
|
-
const info = res.data;
|
|
306
|
-
|
|
307
|
-
// releaseTime
|
|
308
|
-
if (info.download?.android?.release_at) {
|
|
309
|
-
info.releaseTime = formatUTC(info.download.android.release_at);
|
|
310
|
-
} else {
|
|
311
|
-
info.releaseTime = "暂无";
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// managers
|
|
315
|
-
info.managers = Array.isArray(info.managers) ? info.managers : [];
|
|
316
|
-
info.chiefManagers = info.managers.filter(m => m.role === 'chief')
|
|
317
|
-
info.normalManagers = info.managers.filter(m => m.role !== 'chief')
|
|
318
|
-
// activities
|
|
319
|
-
info.activities = Array.isArray(info.activities) ? info.activities : [];
|
|
320
|
-
// 分组:is_face_slap === 1 的单独存,最多取一个
|
|
321
|
-
const faceSlapActivity = info.activities.find(a => a.is_face_slap === 1);
|
|
322
|
-
info.faceSlapActivity = faceSlapActivity || null; // 单个对象或 null
|
|
323
|
-
|
|
324
|
-
// 其余的(不含 is_face_slap === 1 的)还放回 activities
|
|
325
|
-
info.activities = info.activities.filter(a => a.is_face_slap !== 1);
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
let banners = Array.isArray(info.banners) ?
|
|
329
|
-
info.banners.map(url => ({
|
|
330
|
-
type: 'image',
|
|
331
|
-
url
|
|
332
|
-
})) : [];
|
|
333
|
-
|
|
334
|
-
// 如果有视频封面,则插入视频 banner
|
|
335
|
-
if (info.video_cover_url) {
|
|
336
|
-
banners.unshift({
|
|
337
|
-
type: 'video',
|
|
338
|
-
poster: info.video_cover_url,
|
|
339
|
-
videoUrl: '', // 点击播放时再获取
|
|
340
|
-
needFetch: true
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
info.banners = banners;
|
|
345
|
-
|
|
346
|
-
// 生成 tabs 动态列表
|
|
347
|
-
const baseTabs = ["简介", "帖子", "攻略", "版规", "我的"];
|
|
348
|
-
if (info.activities.length > 0) {
|
|
349
|
-
baseTabs.push('活动'); // 在帖子前插入活动
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
this.setData({
|
|
355
|
-
gameInfo: info,
|
|
356
|
-
tabs: baseTabs
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
wx.setNavigationBarTitle({
|
|
360
|
-
title: info.name || '社区中心',
|
|
361
|
-
})
|
|
362
|
-
}
|
|
363
|
-
} catch (e) {
|
|
364
|
-
console.error("获取游戏信息失败", e);
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
async getGameIntroduce() {
|
|
370
|
-
try {
|
|
371
|
-
const res = await queryGameInfo(this.data.gameId, 1, 2);
|
|
372
|
-
if (res.code === 0) {
|
|
373
|
-
this.setData({
|
|
374
|
-
introduceInfo: res.data
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
} catch (e) {
|
|
378
|
-
console.error("获取研发商信息失败", e);
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
|
|
382
|
-
async getGameWikiInfo() {
|
|
383
|
-
try {
|
|
384
|
-
const res = await queryGameWiki(this.data.gameId);
|
|
385
|
-
if (res.code === 0) {
|
|
386
|
-
if (res.data?.images && Array.isArray(res.data?.images)) {
|
|
387
|
-
this.setData({
|
|
388
|
-
images: res.data?.images
|
|
389
|
-
})
|
|
390
|
-
}
|
|
391
|
-
if (res.data?.page) {
|
|
392
|
-
try {
|
|
393
|
-
const result = decompressBase64Gzip(res.data.page?.payload)
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
// 递归将所有图片 url 中的 http:// 替换为 https://
|
|
398
|
-
function replaceHttpToHttps(obj) {
|
|
399
|
-
if (Array.isArray(obj)) {
|
|
400
|
-
return obj.map(replaceHttpToHttps)
|
|
401
|
-
} else if (obj !== null && typeof obj === 'object') {
|
|
402
|
-
const newObj = {}
|
|
403
|
-
Object.keys(obj).forEach(function (key) {
|
|
404
|
-
const value = obj[key]
|
|
405
|
-
if (key === 'url' && typeof value === 'string') {
|
|
406
|
-
newObj[key] = value.replace(/^http:\/\//i, 'https://')
|
|
407
|
-
} else {
|
|
408
|
-
newObj[key] = replaceHttpToHttps(value)
|
|
409
|
-
}
|
|
410
|
-
})
|
|
411
|
-
return newObj
|
|
412
|
-
}
|
|
413
|
-
return obj
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
let httpsResult = replaceHttpToHttps(result)
|
|
417
|
-
|
|
418
|
-
if (res.data.stats) {
|
|
419
|
-
httpsResult = httpsResult.map(item =>
|
|
420
|
-
item.type === 6 ? {
|
|
421
|
-
...item,
|
|
422
|
-
stats: res.data.stats
|
|
423
|
-
} : item
|
|
424
|
-
)
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
console.log('解压后的 JSON:', httpsResult)
|
|
428
|
-
|
|
429
|
-
this.setData({
|
|
430
|
-
wiki_created_at: formatUTCYear(res.data.page?.created_at),
|
|
431
|
-
gameWikiJson: httpsResult
|
|
432
|
-
})
|
|
433
|
-
|
|
434
|
-
} catch (err) {
|
|
435
|
-
console.error('解压失败', err)
|
|
436
|
-
}
|
|
437
|
-
} else {
|
|
438
|
-
this.setData({
|
|
439
|
-
gameWikiJson: null
|
|
440
|
-
})
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
const usersData = await queryGameWikiUsers(this.data.gameId);
|
|
445
|
-
if (usersData.code === 0) {
|
|
446
|
-
this.setData({
|
|
447
|
-
wikiUsers: Array.isArray(usersData.data) ? usersData.data : []
|
|
448
|
-
})
|
|
449
|
-
}
|
|
450
|
-
} catch (e) {
|
|
451
|
-
console.error("获取研发商信息失败", e);
|
|
452
|
-
}
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
async getGameProtocol() {
|
|
456
|
-
try {
|
|
457
|
-
const res = await queryGameInfo(this.data.gameId, 1, 3);
|
|
458
|
-
if (res.code === 0) {
|
|
459
|
-
// 处理接口返回的版规
|
|
460
|
-
const apiRules = (Array.isArray(res.data?.rules) ? res.data?.rules : []).map(item => ({
|
|
461
|
-
icon: item.level,
|
|
462
|
-
title: item.content,
|
|
463
|
-
desc: item.supplement || '',
|
|
464
|
-
open: false
|
|
465
|
-
}));
|
|
466
|
-
|
|
467
|
-
// 默认版规
|
|
468
|
-
const defaultRules = rulesData.rules.map(i => ({
|
|
469
|
-
...i,
|
|
470
|
-
open: false
|
|
471
|
-
}));
|
|
472
|
-
|
|
473
|
-
// 合并并排序: 只按 icon 升序
|
|
474
|
-
const mergedRules = [...apiRules, ...defaultRules].sort((a, b) => {
|
|
475
|
-
return a.icon - b.icon;
|
|
476
|
-
});
|
|
477
|
-
|
|
478
|
-
this.setData({
|
|
479
|
-
protocolInfo: res.data ?? {},
|
|
480
|
-
ruleList: mergedRules
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
} catch (e) {
|
|
484
|
-
console.error("获取版规信息失败", e);
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
async getGameEmpiricValue() {
|
|
489
|
-
try {
|
|
490
|
-
const res = await queryGameInfo(this.data.gameId, 1, 4);
|
|
491
|
-
if (res.code === 0) {
|
|
492
|
-
this.setData({
|
|
493
|
-
empiricInfo: res.data
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
} catch (e) {
|
|
497
|
-
console.error("获取经验信息失败", e);
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
|
|
501
|
-
changeTab(e) {
|
|
502
|
-
const index = e.currentTarget.dataset.index;
|
|
503
|
-
this.onPauseAllVideo()
|
|
504
|
-
this.setData({
|
|
505
|
-
currentTab: index
|
|
506
|
-
});
|
|
507
|
-
},
|
|
508
|
-
|
|
509
|
-
toggleJoin(e) {
|
|
510
|
-
if (!checkLogin()) return; // 🔥 登录校验
|
|
511
|
-
|
|
512
|
-
const is_fans = this.data.gameInfo.is_fans;
|
|
513
|
-
const gameInfo = e.currentTarget.dataset.gameinfo
|
|
514
|
-
const nType = is_fans !== 1 ? 1 : 2
|
|
515
|
-
addGame(gameInfo.id, nType).then(res => {
|
|
516
|
-
wx.showToast({
|
|
517
|
-
title: nType === 1 ? '加入游戏库成功' : '移出游戏库',
|
|
518
|
-
})
|
|
519
|
-
this.setData({
|
|
520
|
-
"gameInfo.is_fans": is_fans === 1 ? 0 : 1
|
|
521
|
-
});
|
|
522
|
-
})
|
|
523
|
-
},
|
|
524
|
-
// 前往活动详情
|
|
525
|
-
goActivityDetail(e) {
|
|
526
|
-
this.onPauseAllVideo()
|
|
527
|
-
const item = e.currentTarget.dataset.item;
|
|
528
|
-
// h5活动直接跳官网
|
|
529
|
-
if (item.activity_type === 2) {
|
|
530
|
-
wx.navigateTo({
|
|
531
|
-
url: `../copyOfficial/copyOfficial?url=${encodeURIComponent('https://www.southnote.cn')}`
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
// 签到跳转
|
|
535
|
-
if (item.activity_type === 1) {
|
|
536
|
-
wx.navigateTo({
|
|
537
|
-
url: `../sevenDaySignDetail/sevenDaySignDetail?activity_id=${item.activity_id}`
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
// 大转盘跳转
|
|
541
|
-
if (item.activity_type === 4) {
|
|
542
|
-
if (!checkLogin()) return; // 🔥 登录校验
|
|
543
|
-
|
|
544
|
-
wx.navigateTo({
|
|
545
|
-
url: `../wheelActivivty/wheelActivivty?activity_id=${item.activity_id}`
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
// 话题活动跳转话题
|
|
549
|
-
if (item.activity_type === 3) {
|
|
550
|
-
wx.navigateTo({
|
|
551
|
-
url: `../topic/topic?id=${item.activity_topic}`
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
},
|
|
555
|
-
|
|
556
|
-
/** 页面触底事件(上拉加载更多) */
|
|
557
|
-
/** 页面触底事件(上拉加载更多) */
|
|
558
|
-
onReachBottom() {
|
|
559
|
-
const {
|
|
560
|
-
currentTab,
|
|
561
|
-
subTab,
|
|
562
|
-
postTabs,
|
|
563
|
-
hasMore,
|
|
564
|
-
loading
|
|
565
|
-
} = this.data;
|
|
566
|
-
|
|
567
|
-
// 只在「帖子」这个主 Tab 下才加载更多
|
|
568
|
-
if (currentTab !== 1) return;
|
|
569
|
-
|
|
570
|
-
const filter = postTabs[subTab].filter;
|
|
571
|
-
|
|
572
|
-
// 如果当前过滤条件下还有更多且未在加载中,则加载下一页
|
|
573
|
-
if (hasMore[filter] && !loading[filter]) {
|
|
574
|
-
this.loadPosts(filter, true);
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
// 底部弹窗
|
|
580
|
-
|
|
581
|
-
onMoreTap(e) {
|
|
582
|
-
const index = e.currentTarget.dataset.index; // 当前帖子在列表中的索引
|
|
583
|
-
|
|
584
|
-
const item = e.detail.item;
|
|
585
|
-
const currentUserId = wx.getStorageSync('appuid'); // 当前登录用户id
|
|
586
|
-
const isOwner = item.user.id === currentUserId;
|
|
587
|
-
this.setData({
|
|
588
|
-
isOwner,
|
|
589
|
-
moreSheetVisible: true,
|
|
590
|
-
moreSheetItem: item,
|
|
591
|
-
currentPostIndex: index
|
|
592
|
-
|
|
593
|
-
});
|
|
594
|
-
},
|
|
595
|
-
|
|
596
|
-
onPinTap() {
|
|
597
|
-
const post = this.data.moreSheetItem.post;
|
|
598
|
-
const type = this.data.isPinned ? 2 : 1; // 1置顶,2取消置顶
|
|
599
|
-
|
|
600
|
-
wx.showLoading({
|
|
601
|
-
title: '处理中...'
|
|
602
|
-
});
|
|
603
|
-
setUserPostTop(post.id, type).then(res => {
|
|
604
|
-
wx.hideLoading();
|
|
605
|
-
if (res.code === 0) {
|
|
606
|
-
wx.showToast({
|
|
607
|
-
title: type === 1 ? '置顶成功' : '取消置顶成功',
|
|
608
|
-
icon: 'success'
|
|
609
|
-
});
|
|
610
|
-
|
|
611
|
-
// 更新当前组件状态
|
|
612
|
-
this.setData({
|
|
613
|
-
'item.post.is_user_top': type === 1 ? 1 : 0,
|
|
614
|
-
isPinned: type === 1 ? 1 : 0
|
|
615
|
-
});
|
|
616
|
-
|
|
617
|
-
this.onCloseMoreSheet();
|
|
618
|
-
|
|
619
|
-
// 如果置顶,则需要移动帖子到列表第一位,取消其他帖子置顶,并滚动到顶部
|
|
620
|
-
if (type === 1) {
|
|
621
|
-
const pages = getCurrentPages();
|
|
622
|
-
const currentPage = pages[pages.length - 1];
|
|
623
|
-
|
|
624
|
-
if (currentPage.route === 'pages/user/user') {
|
|
625
|
-
let postsData = currentPage.data.posts;
|
|
626
|
-
|
|
627
|
-
if (Array.isArray(postsData)) {
|
|
628
|
-
// 先取消其他帖子置顶
|
|
629
|
-
postsData = postsData.map(p => {
|
|
630
|
-
if (p.post.id !== post.id && p.post.is_user_top === 1) {
|
|
631
|
-
p.post.is_user_top = 0;
|
|
632
|
-
}
|
|
633
|
-
return p;
|
|
634
|
-
});
|
|
635
|
-
|
|
636
|
-
// 找到当前帖子在数组中的索引
|
|
637
|
-
const currentIndex = postsData.findIndex(p => p.post.id === post.id);
|
|
638
|
-
if (currentIndex > -1) {
|
|
639
|
-
const [pinnedPost] = postsData.splice(currentIndex, 1);
|
|
640
|
-
pinnedPost.post.is_user_top = 1
|
|
641
|
-
// 插入到数组第一个位置
|
|
642
|
-
postsData.unshift(pinnedPost);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
currentPage.setData({
|
|
646
|
-
posts: postsData
|
|
647
|
-
});
|
|
648
|
-
|
|
649
|
-
// 页面滚动到顶部
|
|
650
|
-
wx.pageScrollTo({
|
|
651
|
-
scrollTop: 0,
|
|
652
|
-
duration: 300
|
|
653
|
-
});
|
|
654
|
-
} else if (postsData && typeof postsData === 'object') {
|
|
655
|
-
const newPostsObj = {};
|
|
656
|
-
Object.keys(postsData).forEach(key => {
|
|
657
|
-
if (Array.isArray(postsData[key])) {
|
|
658
|
-
// 取消其他帖子置顶
|
|
659
|
-
let arr = postsData[key].map(p => {
|
|
660
|
-
if (p.post.id !== post.id && p.post.is_user_top === 1) {
|
|
661
|
-
p.post.is_user_top = 0;
|
|
662
|
-
}
|
|
663
|
-
return p;
|
|
664
|
-
});
|
|
665
|
-
|
|
666
|
-
// 将当前帖子移动到第一个
|
|
667
|
-
const currentIndex = arr.findIndex(p => p.post.id === post.id);
|
|
668
|
-
if (currentIndex > -1) {
|
|
669
|
-
const [pinnedPost] = arr.splice(currentIndex, 1);
|
|
670
|
-
pinnedPost.post.is_user_top = 1
|
|
671
|
-
arr.unshift(pinnedPost);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
newPostsObj[key] = arr;
|
|
675
|
-
} else {
|
|
676
|
-
newPostsObj[key] = postsData[key];
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
|
-
|
|
680
|
-
currentPage.setData({
|
|
681
|
-
posts: newPostsObj
|
|
682
|
-
});
|
|
683
|
-
|
|
684
|
-
wx.pageScrollTo({
|
|
685
|
-
scrollTop: 0,
|
|
686
|
-
duration: 300
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
} else {
|
|
692
|
-
wx.showToast({
|
|
693
|
-
title: res.msg || '操作失败',
|
|
694
|
-
icon: 'error'
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
});
|
|
698
|
-
},
|
|
699
|
-
// 关闭弹窗
|
|
700
|
-
onCloseMoreSheet() {
|
|
701
|
-
this.setData({
|
|
702
|
-
moreSheetVisible: false
|
|
703
|
-
});
|
|
704
|
-
},
|
|
705
|
-
|
|
706
|
-
// 弹窗选项点击
|
|
707
|
-
onDelete() {
|
|
708
|
-
const postId = this.data.moreSheetItem.post.id;
|
|
709
|
-
deleteContent(postId).then(res => {
|
|
710
|
-
if (res.code === 0) {
|
|
711
|
-
wx.showToast({
|
|
712
|
-
title: '删除成功',
|
|
713
|
-
icon: 'success'
|
|
714
|
-
});
|
|
715
|
-
|
|
716
|
-
// 删除父页面列表里的帖子(兼容数组和对象)
|
|
717
|
-
const pages = getCurrentPages();
|
|
718
|
-
const currentPage = pages[pages.length - 1]; // 当前页
|
|
719
|
-
|
|
720
|
-
const postsData = currentPage.data.posts;
|
|
721
|
-
if (Array.isArray(postsData)) {
|
|
722
|
-
// posts 是数组
|
|
723
|
-
currentPage.setData({
|
|
724
|
-
posts: postsData.filter(p => p.post.id !== postId)
|
|
725
|
-
});
|
|
726
|
-
} else if (postsData && typeof postsData === 'object') {
|
|
727
|
-
// posts 是对象,每个 value 都可能是帖子数组
|
|
728
|
-
const newPosts = {};
|
|
729
|
-
Object.keys(postsData).forEach(key => {
|
|
730
|
-
if (Array.isArray(postsData[key])) {
|
|
731
|
-
newPosts[key] = postsData[key].filter(p => p.post.id !== postId);
|
|
732
|
-
} else {
|
|
733
|
-
newPosts[key] = postsData[key]; // 保留原值
|
|
734
|
-
}
|
|
735
|
-
});
|
|
736
|
-
currentPage.setData({
|
|
737
|
-
posts: newPosts
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
this.triggerEvent('deletePost', {
|
|
743
|
-
post: this.data.moreSheetItem.post
|
|
744
|
-
});
|
|
745
|
-
this.onCloseMoreSheet();
|
|
746
|
-
} else {
|
|
747
|
-
wx.showToast({
|
|
748
|
-
title: res.msg || '删除失败',
|
|
749
|
-
icon: 'error'
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
},
|
|
754
|
-
|
|
755
|
-
// 举报帖子
|
|
756
|
-
onReport() {
|
|
757
|
-
this.onPauseAllVideo()
|
|
758
|
-
wx.navigateTo({
|
|
759
|
-
url: `../report-category/report-category?postId=${this.data.moreSheetItem.post.id}`,
|
|
760
|
-
})
|
|
761
|
-
|
|
762
|
-
this.triggerEvent('reportPost', {
|
|
763
|
-
post: this.data.moreSheetItem.post
|
|
764
|
-
});
|
|
765
|
-
this.onCloseMoreSheet();
|
|
766
|
-
},
|
|
767
|
-
|
|
768
|
-
// 收藏/取消收藏
|
|
769
|
-
// 收藏/取消收藏(放在 Page({ ... }) 里)
|
|
770
|
-
async onFavorite() {
|
|
771
|
-
const post = this.data.moreSheetItem.post;
|
|
772
|
-
const nType = post.is_collect === 1 ? 2 : 1; // 1收藏,2取消收藏
|
|
773
|
-
|
|
774
|
-
// 可选:先显示 loading,防止重复点击
|
|
775
|
-
wx.showLoading({
|
|
776
|
-
title: nType === 1 ? '收藏中...' : '取消中...'
|
|
777
|
-
});
|
|
778
|
-
|
|
779
|
-
try {
|
|
780
|
-
const res = await collectPost(post.id, nType);
|
|
781
|
-
wx.hideLoading();
|
|
782
|
-
|
|
783
|
-
if (res.code === 0) {
|
|
784
|
-
wx.showToast({
|
|
785
|
-
title: nType === 1 ? '已收藏' : '取消收藏',
|
|
786
|
-
icon: 'success'
|
|
787
|
-
});
|
|
788
|
-
|
|
789
|
-
// 1) 更新当前页面的 moreSheetItem(弹窗)
|
|
790
|
-
const updatedMoreSheetItem = {
|
|
791
|
-
...this.data.moreSheetItem,
|
|
792
|
-
post: {
|
|
793
|
-
...this.data.moreSheetItem.post,
|
|
794
|
-
is_collect: nType === 1 ? 1 : 0
|
|
795
|
-
}
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
// 2) 更新当前页面的 posts(兼容两种结构:object map 或 数组)
|
|
799
|
-
const {
|
|
800
|
-
posts
|
|
801
|
-
} = this.data;
|
|
802
|
-
let newPosts;
|
|
803
|
-
|
|
804
|
-
if (Array.isArray(posts)) {
|
|
805
|
-
// posts 本身是数组
|
|
806
|
-
newPosts = posts.map(p => {
|
|
807
|
-
if (p.post && p.post.id === post.id) {
|
|
808
|
-
return {
|
|
809
|
-
...p,
|
|
810
|
-
post: {
|
|
811
|
-
...p.post,
|
|
812
|
-
is_collect: nType === 1 ? 1 : 0
|
|
813
|
-
}
|
|
814
|
-
};
|
|
815
|
-
}
|
|
816
|
-
return p;
|
|
817
|
-
});
|
|
818
|
-
} else if (posts && typeof posts === 'object') {
|
|
819
|
-
// posts 是按 filter 分组的对象 {1: [...], 2: [...], ...}
|
|
820
|
-
newPosts = {};
|
|
821
|
-
Object.keys(posts).forEach(key => {
|
|
822
|
-
const arr = posts[key];
|
|
823
|
-
if (Array.isArray(arr)) {
|
|
824
|
-
newPosts[key] = arr.map(p => {
|
|
825
|
-
if (p.post && p.post.id === post.id) {
|
|
826
|
-
return {
|
|
827
|
-
...p,
|
|
828
|
-
post: {
|
|
829
|
-
...p.post,
|
|
830
|
-
is_collect: nType === 1 ? 1 : 0
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
return p;
|
|
835
|
-
});
|
|
836
|
-
} else {
|
|
837
|
-
// 保持原样(防止意外结构)
|
|
838
|
-
newPosts[key] = posts[key];
|
|
839
|
-
}
|
|
840
|
-
});
|
|
841
|
-
} else {
|
|
842
|
-
// posts 为空或未知结构,直接保持 undefined
|
|
843
|
-
newPosts = posts;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
// 3) 批量 setData 更新(保持 atomic)
|
|
847
|
-
this.setData({
|
|
848
|
-
moreSheetItem: updatedMoreSheetItem,
|
|
849
|
-
posts: newPosts
|
|
850
|
-
});
|
|
851
|
-
|
|
852
|
-
// 4) 可选:同步更新其他页面(如果你项目里还有 userDetail / postDetail 也需要同步)
|
|
853
|
-
// 这里做一个遍历所有页面并更新它们的 posts,如果存在的话
|
|
854
|
-
const pages = getCurrentPages();
|
|
855
|
-
pages.forEach(pg => {
|
|
856
|
-
if (!pg || !pg.data) return;
|
|
857
|
-
const pgPosts = pg.data.posts;
|
|
858
|
-
if (!pgPosts) return;
|
|
859
|
-
|
|
860
|
-
// 同上:支持 array 或 object
|
|
861
|
-
if (Array.isArray(pgPosts)) {
|
|
862
|
-
const updated = pgPosts.map(p => {
|
|
863
|
-
if (p.post && p.post.id === post.id) {
|
|
864
|
-
return {
|
|
865
|
-
...p,
|
|
866
|
-
post: {
|
|
867
|
-
...p.post,
|
|
868
|
-
is_collect: nType === 1 ? 1 : 0
|
|
869
|
-
}
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
return p;
|
|
873
|
-
});
|
|
874
|
-
pg.setData({
|
|
875
|
-
posts: updated
|
|
876
|
-
});
|
|
877
|
-
} else if (pgPosts && typeof pgPosts === 'object') {
|
|
878
|
-
const updatedObj = {};
|
|
879
|
-
let needSet = false;
|
|
880
|
-
Object.keys(pgPosts).forEach(k => {
|
|
881
|
-
const arr = pgPosts[k];
|
|
882
|
-
if (Array.isArray(arr)) {
|
|
883
|
-
const newArr = arr.map(p => {
|
|
884
|
-
if (p.post && p.post.id === post.id) {
|
|
885
|
-
needSet = true;
|
|
886
|
-
return {
|
|
887
|
-
...p,
|
|
888
|
-
post: {
|
|
889
|
-
...p.post,
|
|
890
|
-
is_collect: nType === 1 ? 1 : 0
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
}
|
|
894
|
-
return p;
|
|
895
|
-
});
|
|
896
|
-
updatedObj[k] = newArr;
|
|
897
|
-
} else {
|
|
898
|
-
updatedObj[k] = pgPosts[k];
|
|
899
|
-
}
|
|
900
|
-
});
|
|
901
|
-
if (needSet) {
|
|
902
|
-
pg.setData({
|
|
903
|
-
posts: updatedObj
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
});
|
|
908
|
-
|
|
909
|
-
// 5) 关闭弹窗(如果你希望操作后自动关闭)
|
|
910
|
-
this.onCloseMoreSheet();
|
|
911
|
-
|
|
912
|
-
} else {
|
|
913
|
-
wx.showToast({
|
|
914
|
-
title: res.msg || (nType === 1 ? '收藏失败' : '取消收藏失败'),
|
|
915
|
-
icon: 'error'
|
|
916
|
-
});
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
} catch (err) {
|
|
920
|
-
wx.hideLoading();
|
|
921
|
-
console.error('收藏接口失败', err);
|
|
922
|
-
wx.showToast({
|
|
923
|
-
title: '网络错误,请稍后重试',
|
|
924
|
-
icon: 'error'
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
onFollowChanged(e) {
|
|
930
|
-
const {
|
|
931
|
-
userId,
|
|
932
|
-
isFans
|
|
933
|
-
} = e.detail;
|
|
934
|
-
|
|
935
|
-
const {
|
|
936
|
-
posts
|
|
937
|
-
} = this.data;
|
|
938
|
-
let updatedPosts;
|
|
939
|
-
|
|
940
|
-
if (Array.isArray(posts)) {
|
|
941
|
-
// posts 是数组
|
|
942
|
-
updatedPosts = posts.map(p => {
|
|
943
|
-
if (p.user.id === userId) {
|
|
944
|
-
p.user.is_fans = isFans ? 1 : 0;
|
|
945
|
-
}
|
|
946
|
-
return p;
|
|
947
|
-
});
|
|
948
|
-
} else if (posts && typeof posts === 'object') {
|
|
949
|
-
// posts 是按 filter 分组的对象 {1: [...], 2: [...], ...}
|
|
950
|
-
updatedPosts = {};
|
|
951
|
-
Object.keys(posts).forEach(key => {
|
|
952
|
-
const arr = posts[key];
|
|
953
|
-
if (Array.isArray(arr)) {
|
|
954
|
-
updatedPosts[key] = arr.map(p => {
|
|
955
|
-
if (p.user.id === userId) {
|
|
956
|
-
p.user.is_fans = isFans ? 1 : 0;
|
|
957
|
-
}
|
|
958
|
-
return p;
|
|
959
|
-
});
|
|
960
|
-
} else {
|
|
961
|
-
updatedPosts[key] = arr;
|
|
962
|
-
}
|
|
963
|
-
});
|
|
964
|
-
} else {
|
|
965
|
-
updatedPosts = posts;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
this.setData({
|
|
969
|
-
posts: updatedPosts
|
|
970
|
-
});
|
|
971
|
-
|
|
972
|
-
wx.showToast({
|
|
973
|
-
title: isFans ? '关注成功' : '已取消关注',
|
|
974
|
-
icon: 'success'
|
|
975
|
-
});
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
// 下拉刷新
|
|
979
|
-
async onPullDownRefresh() {
|
|
980
|
-
const {
|
|
981
|
-
currentTab,
|
|
982
|
-
subTab,
|
|
983
|
-
postTabs
|
|
984
|
-
} = this.data;
|
|
985
|
-
|
|
986
|
-
// ✅ 只在「帖子」tab 下刷新
|
|
987
|
-
if (currentTab !== 1) {
|
|
988
|
-
wx.stopPullDownRefresh();
|
|
989
|
-
return;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
const filter = postTabs[subTab].filter;
|
|
993
|
-
|
|
994
|
-
try {
|
|
995
|
-
// 1️⃣ 重置当前 filter 的状态
|
|
996
|
-
this.setData({
|
|
997
|
-
[`page.${filter}`]: 0,
|
|
998
|
-
[`hasMore.${filter}`]: true,
|
|
999
|
-
[`loading.${filter}`]: false
|
|
1000
|
-
});
|
|
1001
|
-
|
|
1002
|
-
// 2️⃣ 重新拉第一页(append = false)
|
|
1003
|
-
await this.loadPosts(filter, false);
|
|
1004
|
-
|
|
1005
|
-
} catch (e) {
|
|
1006
|
-
console.error('下拉刷新失败', e);
|
|
1007
|
-
} finally {
|
|
1008
|
-
// 3️⃣ 结束下拉动画
|
|
1009
|
-
wx.stopPullDownRefresh();
|
|
1010
|
-
}
|
|
1011
|
-
},
|
|
1012
|
-
// 点击video内部按钮视频回调
|
|
1013
|
-
handlePlayVideo() {
|
|
1014
|
-
|
|
1015
|
-
this.pausePostVideo()
|
|
1016
|
-
},
|
|
1017
|
-
// 点击banner播放
|
|
1018
|
-
async onBannerVideoPlay(e) {
|
|
1019
|
-
const index = e.currentTarget.dataset.index;
|
|
1020
|
-
const banners = this.data.gameInfo.banners;
|
|
1021
|
-
const item = banners[index];
|
|
1022
|
-
|
|
1023
|
-
if (item.videoUrl || item.loading) return;
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
// 暂停当前播放的帖子视频
|
|
1027
|
-
this.pausePostVideo()
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
// 加载 banner 视频
|
|
1031
|
-
item.loading = true;
|
|
1032
|
-
this.setData({
|
|
1033
|
-
'gameInfo.banners': banners
|
|
1034
|
-
});
|
|
1035
|
-
|
|
1036
|
-
wx.showLoading({
|
|
1037
|
-
title: '加载中...'
|
|
1038
|
-
});
|
|
1039
|
-
|
|
1040
|
-
try {
|
|
1041
|
-
const res = await queryGameBannerVideo(this.data.gameId);
|
|
1042
|
-
|
|
1043
|
-
if (res.code === 0 && res.data) {
|
|
1044
|
-
item.videoUrl = res.data;
|
|
1045
|
-
item.loading = false;
|
|
1046
|
-
|
|
1047
|
-
this.setData({
|
|
1048
|
-
'gameInfo.banners': banners
|
|
1049
|
-
}, () => {
|
|
1050
|
-
// 自动播放
|
|
1051
|
-
wx.createVideoContext(`bannerVideo-${index}`, this).play();
|
|
1052
|
-
});
|
|
1053
|
-
} else {
|
|
1054
|
-
throw new Error('无视频地址');
|
|
1055
|
-
}
|
|
1056
|
-
} catch (err) {
|
|
1057
|
-
item.loading = false;
|
|
1058
|
-
this.setData({
|
|
1059
|
-
'gameInfo.banners': banners
|
|
1060
|
-
});
|
|
1061
|
-
wx.showToast({
|
|
1062
|
-
title: '视频加载失败',
|
|
1063
|
-
icon: 'none'
|
|
1064
|
-
});
|
|
1065
|
-
} finally {
|
|
1066
|
-
wx.hideLoading();
|
|
1067
|
-
}
|
|
1068
|
-
},
|
|
1069
|
-
|
|
1070
|
-
pausePostVideo() {
|
|
1071
|
-
const prevId = this.data.currentPlayingVideoId;
|
|
1072
|
-
if (prevId) {
|
|
1073
|
-
const posts = this.data.posts;
|
|
1074
|
-
for (const key in posts) {
|
|
1075
|
-
const arr = posts[key];
|
|
1076
|
-
if (Array.isArray(arr)) {
|
|
1077
|
-
const idx = arr.findIndex(p => p.post.id === prevId);
|
|
1078
|
-
if (idx !== -1) {
|
|
1079
|
-
const prevComponent = this.selectComponent(`#postItem-${key}-${idx}`);
|
|
1080
|
-
if (prevComponent && prevComponent.pauseVideo) {
|
|
1081
|
-
prevComponent.pauseVideo();
|
|
1082
|
-
}
|
|
1083
|
-
break;
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
this.setData({
|
|
1088
|
-
currentPlayingVideoId: null
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
},
|
|
1092
|
-
onBannerChange(e) {
|
|
1093
|
-
// 暂停第一个视频
|
|
1094
|
-
const videoContext = wx.createVideoContext('bannerVideo-0', this);
|
|
1095
|
-
videoContext.pause();
|
|
1096
|
-
|
|
1097
|
-
// 记录的时间存下来,下次播放用
|
|
1098
|
-
const time = this.data.videoCurrentTime;
|
|
1099
|
-
|
|
1100
|
-
// seek 到记录时间
|
|
1101
|
-
videoContext.seek(time);
|
|
1102
|
-
|
|
1103
|
-
this.setData({
|
|
1104
|
-
currentBanner: e.detail.current
|
|
1105
|
-
})
|
|
1106
|
-
},
|
|
1107
|
-
|
|
1108
|
-
onVideoTimeUpdate(e) {
|
|
1109
|
-
this.setData({
|
|
1110
|
-
videoCurrentTime: e.detail.currentTime
|
|
1111
|
-
});
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
pauseFirstVideo() {
|
|
1119
|
-
// video 可能还没加载
|
|
1120
|
-
const ctx = wx.createVideoContext('bannerVideo-0', this)
|
|
1121
|
-
ctx.pause()
|
|
1122
|
-
},
|
|
1123
|
-
onBannerScroll(e) {
|
|
1124
|
-
const now = Date.now()
|
|
1125
|
-
if (now - (this._lastScrollTime || 0) < 100) return
|
|
1126
|
-
this._lastScrollTime = now
|
|
1127
|
-
|
|
1128
|
-
const scrollLeft = e.detail.scrollLeft
|
|
1129
|
-
|
|
1130
|
-
const bannerWidthPx = wx.getWindowInfo().windowWidth * 300 / 750
|
|
1131
|
-
const threshold = bannerWidthPx * 0.8
|
|
1132
|
-
|
|
1133
|
-
if (scrollLeft > threshold) {
|
|
1134
|
-
this.pauseFirstVideo()
|
|
1135
|
-
}
|
|
1136
|
-
},
|
|
1137
|
-
|
|
1138
|
-
prevBanner() {
|
|
1139
|
-
const total = this.data.gameInfo.banners.length
|
|
1140
|
-
let cur = this.data.currentBanner
|
|
1141
|
-
|
|
1142
|
-
cur = cur === 0 ? total - 1 : cur - 1
|
|
1143
|
-
|
|
1144
|
-
this.setData({
|
|
1145
|
-
currentBanner: cur
|
|
1146
|
-
})
|
|
1147
|
-
},
|
|
1148
|
-
|
|
1149
|
-
nextBanner() {
|
|
1150
|
-
const total = this.data.gameInfo.banners.length
|
|
1151
|
-
let cur = this.data.currentBanner
|
|
1152
|
-
|
|
1153
|
-
cur = cur === total - 1 ? 0 : cur + 1
|
|
1154
|
-
|
|
1155
|
-
this.setData({
|
|
1156
|
-
currentBanner: cur
|
|
1157
|
-
})
|
|
1158
|
-
},
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
onVideoPlay(e) {
|
|
1162
|
-
const postId = e.detail.id;
|
|
1163
|
-
const prevId = this.data.currentPlayingVideoId;
|
|
1164
|
-
|
|
1165
|
-
if (prevId && prevId !== postId) {
|
|
1166
|
-
|
|
1167
|
-
let prevComponent = null;
|
|
1168
|
-
const posts = this.data.posts;
|
|
1169
|
-
for (const key in posts) {
|
|
1170
|
-
const arr = posts[key];
|
|
1171
|
-
const idx = arr.findIndex(p => p.post.id === prevId);
|
|
1172
|
-
|
|
1173
|
-
if (idx !== -1) {
|
|
1174
|
-
prevComponent = this.selectComponent(`#postItem-${key}-${idx}`);
|
|
1175
|
-
break;
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
if (prevComponent) prevComponent.pauseVideo();
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
// 暂停 banner 视频
|
|
1183
|
-
this.pauseFirstVideo()
|
|
1184
|
-
|
|
1185
|
-
this.setData({
|
|
1186
|
-
currentPlayingVideoId: postId
|
|
1187
|
-
});
|
|
1188
|
-
},
|
|
1189
|
-
|
|
1190
|
-
/**
|
|
1191
|
-
* 暂停当前页面所有正在播放的视频
|
|
1192
|
-
* - 帖子视频
|
|
1193
|
-
* - banner 视频
|
|
1194
|
-
*/
|
|
1195
|
-
onPauseAllVideo() {
|
|
1196
|
-
// 1️⃣ 暂停帖子视频
|
|
1197
|
-
const prevId = this.data.currentPlayingVideoId;
|
|
1198
|
-
if (prevId) {
|
|
1199
|
-
const posts = this.data.posts;
|
|
1200
|
-
|
|
1201
|
-
for (const key in posts) {
|
|
1202
|
-
const arr = posts[key];
|
|
1203
|
-
if (!Array.isArray(arr)) continue;
|
|
1204
|
-
|
|
1205
|
-
const idx = arr.findIndex(p => p.post?.id === prevId);
|
|
1206
|
-
if (idx !== -1) {
|
|
1207
|
-
const comp = this.selectComponent(`#postItem-${key}-${idx}`);
|
|
1208
|
-
if (comp && typeof comp.pauseVideo === 'function') {
|
|
1209
|
-
comp.pauseVideo();
|
|
1210
|
-
}
|
|
1211
|
-
break;
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
this.setData({
|
|
1216
|
-
currentPlayingVideoId: null
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
// 2️⃣ 暂停 banner 视频(可能还没渲染,try-catch 保命)
|
|
1221
|
-
this.pauseFirstVideo()
|
|
1222
|
-
},
|
|
1223
|
-
|
|
1224
|
-
/**
|
|
1225
|
-
* 复制QQ号到剪贴板
|
|
1226
|
-
* @param {string} qqNumber
|
|
1227
|
-
*/
|
|
1228
|
-
copyQQNumber() {
|
|
1229
|
-
const qq = this.data.introduceInfo.qq
|
|
1230
|
-
|
|
1231
|
-
if (!qq) {
|
|
1232
|
-
wx.showToast({
|
|
1233
|
-
title: '暂无QQ号',
|
|
1234
|
-
icon: 'none'
|
|
1235
|
-
})
|
|
1236
|
-
return
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
wx.setClipboardData({
|
|
1240
|
-
data: qq,
|
|
1241
|
-
success: () => {
|
|
1242
|
-
wx.showToast({
|
|
1243
|
-
title: 'QQ号已复制',
|
|
1244
|
-
icon: 'success'
|
|
1245
|
-
})
|
|
1246
|
-
}
|
|
1247
|
-
})
|
|
1248
|
-
},
|
|
1249
|
-
onShareTap(e) {
|
|
1250
|
-
this.setData({
|
|
1251
|
-
sheetMode: 'forward',
|
|
1252
|
-
showSheet: true,
|
|
1253
|
-
originPost: e.detail.item,
|
|
1254
|
-
commentData: null
|
|
1255
|
-
}, () => {
|
|
1256
|
-
const sheet = this.selectComponent('#bottomSheet');
|
|
1257
|
-
if (sheet) {
|
|
1258
|
-
if (wx.getStorageSync('height') != 0) {
|
|
1259
|
-
sheet.updateSheetPosition(wx.getStorageSync('height'));
|
|
1260
|
-
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
});
|
|
1264
|
-
},
|
|
1265
|
-
onCommentTap(e) {
|
|
1266
|
-
debugger
|
|
1267
|
-
// this.setData({
|
|
1268
|
-
// sheetMode: 'comment',
|
|
1269
|
-
// showSheet: true,
|
|
1270
|
-
// originPost: e.detail.item
|
|
1271
|
-
// })
|
|
1272
|
-
|
|
1273
|
-
const postId = e.detail.item.post.id;
|
|
1274
|
-
this.onPauseAllVideo()
|
|
1275
|
-
wx.navigateTo({
|
|
1276
|
-
url: `/pages/post/post?id=${postId}&isCommentIn=true`
|
|
1277
|
-
});
|
|
1278
|
-
},
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
onCloseSheet() {
|
|
1282
|
-
this.setData({
|
|
1283
|
-
showSheet: false
|
|
1284
|
-
});
|
|
1285
|
-
},
|
|
1286
|
-
|
|
1287
|
-
onSubmitSheet() {
|
|
1288
|
-
this.setData({
|
|
1289
|
-
showSheet: false
|
|
1290
|
-
});
|
|
1291
|
-
},
|
|
1292
|
-
|
|
1293
|
-
chooseTopic(e) {
|
|
1294
|
-
this.onPauseAllVideo()
|
|
1295
|
-
wx.navigateTo({
|
|
1296
|
-
url: '../addSubject/addSubject',
|
|
1297
|
-
});
|
|
1298
|
-
},
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
});
|
|
1
|
+
function _0x472b(){const _0x34ab55=['Cg9ZDhmU','B2HhBeq','BwfUywDLCNm','y3vYCMvUDejHBM5LCG','Ag52uhi','qxvoy1m','shrLyK0','zfntq0S','z2v0u3rVCMfNzvn5BMm','CKflwg4','zMfJzvnSyxbby3rPDML0Eq','BgfUzhnJyxbL','C3rHDhm','C3rYAw5N','ywn0AxzPDhLFAwq','5lIl5OUj5yI35PAW5AsX6lsL','5Ps26jEp5AsX6lsL','5y+w5RAi5Ps26jEp5AsX6lsL','sK5tBLq','5PEG6kEg6Akr5zYW5z2a','DMLKzw9vCMW','CgfNzvnJCM9SBfrV','sufkwK8','Bw9YzvnOzwv0sxrLBq','572U6Ag25OIq5yQF','C2HVD1rVyxn0','yMfUBMvYCW','CMvSzwfZzvrPBwu','rgL6BuC','zxHW','DMLKzw9Fy292zxjFDxjS','5Ps26jEp5lITlI4U','uNnptue','5yQG6l295lITlI4U','A25rDhu','z2v0r2fTzvbYB3rVy29S','y3vYCMvUDfbSyxLPBMDwAwrLB0LK','zxjYB3i','y29UDgvUDa','jMDHBwvoyw1Lpq','mJm3odrivw5LvhG','DMLKzw8','Aw1OC00','zgfcswe','yu1tExC','AxnFzMfUCW','D2jeruu','AxnbCNjHEq','CMvSzwfZzv9HDa','BejlzLa','5Pon5l2C5AsX6lsL','zgf0yq','svzAtK8','z2v0r2fTzvDPA2LjBMzV','vLD4zeS','v29OEuq','yKDTtNu','ndmYndi2nMHhzMnHzW','C2vLAW','EvnTBue','v0LJD0O','yMfUBMvYvMLKzw8Tma','uMPmwNi','qK1vsNi','z3v4AMS','mtu2munQAvPQyW','Cgf1C2vqB3n0vMLKzw8','BM93','zg93BMXVywq','Bw1ZzvC','AxnqAw5Uzwq','teLVEeu','u0HnqNu','uvzwzxy','zNvUy3rPB24','rwX2u0S','EuX0CNC','CNvSzuXPC3q','y3vYCMvUDa','vwzODe0','shLovum','r3Pcq2W','yw5KCM9Pza','C3vJy2vZCW','uKvWBwq','D3vNCLa','zgv0ywLS','Cg9ZDa','zgvSzxrLug9ZDa','zvPovgi','yNn3zNK','Cgf1C2u','Ahr0Chm6lY8','ywn0AxzPDgLLCW','BeHMD0O','zgD5wxq','Ehrouwu','Eev6rwu','AxnFy29SBgvJDa','5Ase55cg5lITlI4U','Aw5KzxG','uMXLr0y','weXPwxu','Cgf5Bg9Hza','BMLJA25HBwu','y2rwA1y','z2fTzwLUzM8','Cgf1C2vwAwrLBW','EMvZrge','CMvWB3j0ug9ZDa','DxnLCG','r1n2reG','vNPsww8','swvdt00','xs5VCgvU','lI4VDg9WAwmVDg9WAwm/Awq9','v0rKDe8','BMf2AwDHDgvuBW','mNvnA2XgDW','AgfZtw9Yzs4','6i635y+w54Mi6kEe5l+H5OgV5AsX6lsL','z2fTzuLK','Ahr0Chm6lY93D3CUC291DgHUB3rLlMnU','nZK2otuXoerjsuXXEa','C3vWCgXLBwvUDa','tezXwLq','vhjOvxe','lI4VC2v2zw5eyxLtAwDUrgv0ywLSl3nLDMvUrgf5u2LNBKrLDgfPBd9Hy3rPDML0Ev9Pzd0','zKnHCwq','z2fTzq','C2HVD0XVywrPBMC','AxnFDxnLCL90B3a','mZzUz0zhuwu','5Ps26jEp5O6L5y+J5AsX6lsL','B25dBg9Zzu1VCMvtAgvLDa','AfzerM4','tuTJDMW','CvDUC1q','D1jYt1a','q25yChe','AwTSvei','AwnVBG','BgvUz3rO','Au1Zy0m','5y+w5RAi572U6Ag25OIq5yQF','De1bDva','qxjbuM8','C3bSAwnL','DKPYq0q','BMfTzq','yLzHEhK','mJqWndC1DeDWt01s','Bg9HzgLUzY4','DgP1C3e','BxnN','EMjJy2u','zgf0yxnLDa','Aw1Hz2vZ','vKvhB2W','Dw5ZAgLMDa','EeD6wvy','yxLnt1u','5y+w5RAi5lITlI4U','Dg9Rzw4','DMLKzw9dDxjYzw50vgLTzq','Dhrjzwu','y3jLyxrLzf9HDa','v2jtCMC','5yIG6zMK5AsX6lsL','CgfNzxmVDxnLCI91C2vY','Bgv2zwW','Cg9ZDhm','zeveChy','CMvWBgfJzq','BwfW','BM9Uzq','ywn0AxzPDhLFDhLWzq','ywn0AxzPDhLFDg9WAwm','C3bSAxq','yxDmEfC','5BEY5Ps26jEp','ChvZAa','q3jbChm','D0v3s3O','B25qyxvZzufSBfzPzgvV','AgvPz2H0','y29Kzq','zxfsAfq','tgTLufy','C2vSzwn0q29TCg9Uzw50','AxnFzMfJzv9ZBgfW','y3jLyxrLvMLKzw9dB250zxH0','C2v0rgf0yq','B2jQzwn0','vfzVy2S','Bg9HzfbVC3rZ','y2HPzwy','C29YDa','z2v0r2fTzuvTCgLYAwnwywX1zq','lI4VlI4VyxnZzxrZl2zPBguVCNvSzxmUANm','C2nYB2XSvg9W','lI4Vy29WEu9MzMLJAwfSl2nVChLpzMzPy2LHBd91CMW9','zeHcvfK','yxzHDgfY','wxLkwg0','B1fetxy','zMLUzeLUzgv4','DgHLBG','AgLKzuXVywrPBMC','BLfKBxe','i2jVDhrVBvnOzwv0','CM91Dgu','BM9YBwfStwfUywDLCNm','6kEJ5y6l5zco55QeiePtt07VVjO','y3vYCMvUDfrHCMDLDa','lI4Vy29TBw9Utg9NAw4Vy29TBw9Utg9NAw4','CNvSzuXPC3rB','DhLWzq','lI4VDxnLCI91C2vYp2LKpq','56E75yE65RI45OIp5BQt','5BEY5y+w5RAi5ywZ5RoO','EwrMz2e','6i635y+w56cu5y+r5zwg5l+H5OgV5AsX6lsL','x2XHC3rty3jVBgXuAw1L','t3ztBKC','CM9Szq','rur4z1q','Eg9RtuK','D2XXuxi','nZaWmtiXmezKDuT2EG','sxvKA2S','zM9YD2fYza','z2fTzuLUzM8','vvfYCK4','rKvjsuC','BKrpBLO','EKLYuLy','yxbWDwLK','mJtLSi/ML7BMPPW','z2v0r2fTzuLUDhjVzhvJzq','zM9YrwfJAa','i3bVC3rjDgvTlq','l3bHz2vZl3bVC3qVCg9ZDd9Pzd0','y2HPzwznyw5Hz2vYCW','v1vwsuO','CgfNzs4','mZiWmZKYDvvnuLDH','6i635y+w5RI45OIp5l+H5OgV5AsX6lsL','lI4VCMvWB3j0lwnHDgvNB3j5l3jLCg9YDc1JyxrLz29YEt9WB3n0swq9','zMLSDgvY','lI4VD2HLzwXby3rPDML2DhKVD2HLzwXby3rPDML2DhK/ywn0AxzPDhLFAwq9','uLD5ugO','t0vbtfu','Bg9HzgLUzW','r1r0u2e','AxrLBq','B3bLBG','mZi0ntm4whPuyxjJ','5PQc5PEGuvhLJ7C','DhjPz2DLCKv2zw50','sw15s1q','Cgf1C2vgAxjZDfzPzgvV','DKLVzvK','C2H1vMO','A2v5CW','CgfNzq','uvhLJ7FLT7lLPi3LIly','56s+5yY65lIT5B+d','5P+L55Yl5RI45OIp6k+M5Oof','AKrJDwq','CKTutfa','C2HHCMvK'];_0x472b=function(){return _0x34ab55;};return _0x472b();}const _0x31be10=_0x4b1a;(function(_0x2ec830,_0x41d585){const _0x1d9e0e=_0x4b1a,_0x19ef6b=_0x2ec830();while(!![]){try{const _0x20eb83=parseInt(_0x1d9e0e(0xe1))/0x1*(parseInt(_0x1d9e0e(0x166))/0x2)+-parseInt(_0x1d9e0e(0x174))/0x3*(parseInt(_0x1d9e0e(0xd6))/0x4)+-parseInt(_0x1d9e0e(0x187))/0x5+parseInt(_0x1d9e0e(0x129))/0x6+parseInt(_0x1d9e0e(0x131))/0x7*(parseInt(_0x1d9e0e(0x118))/0x8)+-parseInt(_0x1d9e0e(0x16b))/0x9+parseInt(_0x1d9e0e(0xc5))/0xa;if(_0x20eb83===_0x41d585)break;else _0x19ef6b['push'](_0x19ef6b['shift']());}catch(_0x5e2fbb){_0x19ef6b['push'](_0x19ef6b['shift']());}}}(_0x472b,0x7d628));import{queryGameInfo,queryGameWiki,queryGameWikiUsers,queryGamePosts,addGame,deleteContent,collectPost,setUserPostTop,queryGameBannerVideo}from'../../services/home';import{decompressBase64Gzip,isEmptyObject}from'../../utils/base64';import{formatUTCYear}from'../../utils/formatPost';import _0x27eae0 from'../../utils/formatPost';import{getLevelByExp,getLevelImg}from'../../utils/exp';function _0x4b1a(_0x25c5dc,_0x3338de){_0x25c5dc=_0x25c5dc-0x79;const _0x472b7d=_0x472b();let _0x4b1a1c=_0x472b7d[_0x25c5dc];if(_0x4b1a['eNRJoG']===undefined){var _0x13a876=function(_0x59d9c0){const _0x307beb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2663e0='',_0x3bef52='';for(let _0x147e94=0x0,_0x42e038,_0x4653c7,_0x3099ff=0x0;_0x4653c7=_0x59d9c0['charAt'](_0x3099ff++);~_0x4653c7&&(_0x42e038=_0x147e94%0x4?_0x42e038*0x40+_0x4653c7:_0x4653c7,_0x147e94++%0x4)?_0x2663e0+=String['fromCharCode'](0xff&_0x42e038>>(-0x2*_0x147e94&0x6)):0x0){_0x4653c7=_0x307beb['indexOf'](_0x4653c7);}for(let _0x40024d=0x0,_0x35706a=_0x2663e0['length'];_0x40024d<_0x35706a;_0x40024d++){_0x3bef52+='%'+('00'+_0x2663e0['charCodeAt'](_0x40024d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3bef52);};_0x4b1a['SMmzaN']=_0x13a876,_0x4b1a['EfLMGg']={},_0x4b1a['eNRJoG']=!![];}const _0x2fa2b4=_0x472b7d[0x0],_0xf3528b=_0x25c5dc+_0x2fa2b4,_0x4df539=_0x4b1a['EfLMGg'][_0xf3528b];return!_0x4df539?(_0x4b1a1c=_0x4b1a['SMmzaN'](_0x4b1a1c),_0x4b1a['EfLMGg'][_0xf3528b]=_0x4b1a1c):_0x4b1a1c=_0x4df539,_0x4b1a1c;}import{checkLogin}from'../../utils/auth';import _0xe18550 from'../../index';const rulesData=require(_0x31be10(0xa7));Page({'data':{'gameId':0x0,'gameInfo':{},'introduceInfo':{},'protocolInfo':{},'empiricInfo':{},'tabs':[],'currentTab':0x1,'gameWikiJson':[],'wikiUsers':[],'wiki_created_at':'','showSheet':![],'sheetMode':'forward','originPost':{},'postTabs':[{'title':'最新','filter':0x1},{'title':'最热','filter':0x2},{'title':_0x31be10(0xce),'filter':0x3},{'title':'官方','filter':0x4},{'title':'精品','filter':0x5},{'title':'文章','filter':0x6}],'subTab':0x1,'activities':[],'posts':{},'page':{},'hasMore':{},'loading':{},'ruleList':[],'avatar':'','nickname':'','moreSheetVisible':![],'moreSheetItem':{},'isOwner':![],'currentBanner':0x0,'bannerRect':null,'currentPlayingVideoId':null},'onPageScroll'(_0x2f0568){const _0x1bcb13=_0x31be10,_0x2c9c81={'MKcvl':function(_0x867860,_0x287b91){return _0x867860===_0x287b91;},'zbcce':function(_0x45fb49,_0x29ef68){return _0x45fb49>=_0x29ef68;},'LkePV':function(_0x1ed026,_0x2a8732){return _0x1ed026===_0x2a8732;}},_0x3fe7ac=_0x2f0568[_0x1bcb13(0xa8)];_0x3fe7ac>=0x15e&&_0x2c9c81[_0x1bcb13(0x178)](this[_0x1bcb13(0x123)][_0x1bcb13(0xc8)][_0x1bcb13(0xfb)],0x1)&&this[_0x1bcb13(0xe5)](),_0x2c9c81[_0x1bcb13(0x7b)](_0x3fe7ac,0x190)&&_0x2c9c81[_0x1bcb13(0x9c)](this[_0x1bcb13(0x123)]['gameInfo']['landscape'],0x0)&&this[_0x1bcb13(0xe5)]();},'onPublish'(){const _0x579312=_0x31be10,_0x18ec14={'xjMUM':_0x579312(0x83),'xEzEe':function(_0x113db1,_0x285053){return _0x113db1(_0x285053);}};this[_0x579312(0x98)]();const _0x32ba27=wx['getStorageSync'](_0x18ec14['xjMUM']),{gameId:_0x17142e,gameInfo:_0x34b576}=this[_0x579312(0x123)];_0x32ba27?wx['navigateTo']({'url':'../post-editor/post-editor?gameId='+_0x17142e+_0x579312(0x117)+_0x18ec14[_0x579312(0x151)](encodeURIComponent,_0x34b576[_0x579312(0x185)]||'')}):wx[_0x579312(0x165)]({'url':_0x579312(0xb7)});},'gotoUserDetail'(_0x169d50){const _0x24125b=_0x31be10;this['onPauseAllVideo']();const _0x1b460b=_0x169d50['currentTarget'][_0x24125b(0x7c)]['id'];wx['navigateTo']({'url':_0x24125b(0xba)+_0x1b460b});},'onShareAppMessage'(){const _0x20da40=_0x31be10,_0x50cfcf={'wbDEE':_0x20da40(0xec)},{gameInfo:_0x320c82,gameId:_0x28246c}=this[_0x20da40(0x123)],_0x44ce45=_0x320c82?.[_0x20da40(0x185)]||_0x50cfcf[_0x20da40(0x11e)];return{'title':_0x44ce45,'path':'../game/game?id='+_0x28246c};},'onLoad'(_0x4e2e11){const _0x38e691=_0x31be10,_0x18bf55={'shuVj':'缺少gameId参数','nQdmq':_0x38e691(0x8f),'AuNcS':_0x38e691(0x158),'wlqQr':_0x38e691(0xab)},_0x2c8b5f=_0x4e2e11['id']||_0xe18550[_0x38e691(0x169)];if(!_0x2c8b5f){wx[_0x38e691(0x109)]({'title':_0x18bf55[_0x38e691(0xe7)],'icon':_0x18bf55[_0x38e691(0xb1)]});return;}this[_0x38e691(0xa0)]({'gameId':_0x2c8b5f}),this['getGameInfo'](),this[_0x38e691(0xcf)](),this[_0x38e691(0x113)](),this[_0x38e691(0xa6)](),this[_0x38e691(0x125)](),this[_0x38e691(0xa3)](0x2),this['setData']({'nickname':wx['getStorageSync'](_0x18bf55[_0x38e691(0xf5)]),'avatar':wx['getStorageSync'](_0x18bf55[_0x38e691(0xc4)])});},'changeSubTab'(_0x117910){const _0x37a842=_0x31be10,_0x44d3e0=_0x117910[_0x37a842(0x146)][_0x37a842(0x154)],_0x306448=this[_0x37a842(0x123)]['postTabs'][_0x44d3e0]['filter'];this[_0x37a842(0xa0)]({'subTab':_0x44d3e0}),!this[_0x37a842(0x123)][_0x37a842(0x8b)][_0x306448]&&this[_0x37a842(0xa3)](_0x306448);},async 'loadPosts'(_0x5b397f,_0x47f5a1=![]){const _0x4c6021=_0x31be10,_0x119e22={'SHMBu':function(_0x145ca4,_0x5989f2){return _0x145ca4!=_0x5989f2;},'xtNQe':function(_0x11e46d,_0x2b97c8){return _0x11e46d(_0x2b97c8);},'HtebM':function(_0x4852da,_0x990198){return _0x4852da+_0x990198;},'tjusq':function(_0x3cae9b,_0x1b5f3d,_0x10f5db,_0x17b6c9){return _0x3cae9b(_0x1b5f3d,_0x10f5db,_0x17b6c9);},'imhsM':function(_0x2b0e1a,_0x4bf714){return _0x2b0e1a===_0x4bf714;},'dgyYt':function(_0xefe763,_0x1eb4b2){return _0xefe763>_0x1eb4b2;},'RsOMA':'获取帖子失败'},{gameId:_0x3d55c7,page:_0xfaffa0,posts:_0x5743cf,loading:_0x20aaea}=this['data'];if(_0x20aaea[_0x5b397f])return;const _0x13a8d6=_0x47f5a1?_0x119e22[_0x4c6021(0xf6)](_0xfaffa0[_0x5b397f]||0x1,0x1):0x1;this['setData']({[_0x4c6021(0x188)+_0x5b397f]:!![]});try{const _0x1a1088=await _0x119e22[_0x4c6021(0x79)](queryGamePosts,_0x3d55c7,_0x13a8d6,_0x5b397f);if(_0x119e22[_0x4c6021(0x11a)](_0x1a1088?.[_0x4c6021(0x9a)],0x0)&&Array['isArray'](_0x1a1088[_0x4c6021(0x123)])){const _0x1d33f4=_0x1a1088[_0x4c6021(0x123)][_0x4c6021(0x8e)](_0x51e310=>{const _0x352a3c=_0x4c6021,_0x3b438f=_0x51e310['post']||{},_0xaeeee0=_0x51e310[_0x352a3c(0xef)],_0x329a47=_0x51e310[_0x352a3c(0x15e)]||{},_0x3e08ab=_0x51e310[_0x352a3c(0x171)]||{};return _0x119e22[_0x352a3c(0x138)](_0x3e08ab['exp'],null)&&(_0x329a47[_0x352a3c(0x8a)]=getLevelByExp(_0x3e08ab?.[_0x352a3c(0x10d)]),_0x329a47['levelImg']=getLevelImg(_0x329a47[_0x352a3c(0x8a)])),{..._0x51e310,'post':{..._0x3b438f,'imageArray':_0x3b438f[_0x352a3c(0x7d)]?_0x3b438f[_0x352a3c(0x7d)][_0x352a3c(0x92)](','):[],'formatTime':_0x119e22[_0x352a3c(0x150)](_0x27eae0,_0x3b438f['created_at'])},'shared':_0xaeeee0?.['post']?{..._0xaeeee0,'post':{..._0xaeeee0[_0x352a3c(0x147)],'imageArray':_0xaeeee0[_0x352a3c(0x147)][_0x352a3c(0x7d)]?_0xaeeee0[_0x352a3c(0x147)][_0x352a3c(0x7d)][_0x352a3c(0x92)](','):[],'formatTime':_0x119e22['xtNQe'](_0x27eae0,_0xaeeee0[_0x352a3c(0x147)][_0x352a3c(0x86)])}}:_0xaeeee0};}),_0x5df936=_0x119e22[_0x4c6021(0x14f)](_0x1d33f4[_0x4c6021(0x17e)],0x0);if(_0x47f5a1){const _0x473892=_0x5743cf[_0x5b397f]?.[_0x4c6021(0x17e)]||0x0;let _0x30a136={};_0x1d33f4[_0x4c6021(0xd0)]((_0x2ee8ae,_0x135f3d)=>{_0x30a136['posts.'+_0x5b397f+'['+(_0x473892+_0x135f3d)+']']=_0x2ee8ae;}),this[_0x4c6021(0xa0)]({..._0x30a136,[_0x4c6021(0xd5)+_0x5b397f]:_0x13a8d6,[_0x4c6021(0x167)+_0x5b397f]:_0x5df936,[_0x4c6021(0x188)+_0x5b397f]:![]});}else this['setData']({[_0x4c6021(0xf0)+_0x5b397f]:_0x1d33f4,[_0x4c6021(0xd5)+_0x5b397f]:_0x13a8d6,[_0x4c6021(0x167)+_0x5b397f]:_0x5df936,[_0x4c6021(0x188)+_0x5b397f]:![]});}else this[_0x4c6021(0xa0)]({['hasMore.'+_0x5b397f]:![],[_0x4c6021(0x188)+_0x5b397f]:![]});}catch(_0x5a8319){console[_0x4c6021(0x115)](_0x119e22[_0x4c6021(0x110)],_0x5a8319),this['setData']({[_0x4c6021(0x188)+_0x5b397f]:![]});}},'loadMore'(_0x50851b){const _0x294afa=_0x31be10,_0x390fa4=_0x50851b['currentTarget'][_0x294afa(0x7c)]['filter'];this[_0x294afa(0xa3)](_0x390fa4,!![]);},'toggleRule'(_0x281413){const _0x20084e=_0x31be10,_0x1470c8=_0x281413[_0x20084e(0xb6)][_0x20084e(0x7c)][_0x20084e(0x154)],_0x37de44=_0x20084e(0xb8)+_0x1470c8+_0x20084e(0x162);this[_0x20084e(0xa0)]({[_0x37de44]:!this[_0x20084e(0x123)][_0x20084e(0x13d)][_0x1470c8][_0x20084e(0xe0)]});},async 'getGameInfo'(){const _0x4619ad=_0x31be10,_0xb584f1={'YgsaW':function(_0x16f782,_0x25beba,_0x20ab85,_0x348339){return _0x16f782(_0x25beba,_0x20ab85,_0x348339);},'bVaxy':function(_0x4e433f,_0x419528){return _0x4e433f===_0x419528;},'RleGF':function(_0x50849d,_0x475431){return _0x50849d(_0x475431);},'YyJXm':function(_0x28c11f,_0x56c639){return _0x28c11f||_0x56c639;},'JNSnT':_0x4619ad(0x119),'LVZxQ':_0x4619ad(0xeb)};try{const _0x6e4ead=await _0xb584f1['YgsaW'](queryGameInfo,this[_0x4619ad(0x123)][_0x4619ad(0x169)],0x1,0x1);if(_0xb584f1[_0x4619ad(0x186)](_0x6e4ead[_0x4619ad(0x9a)],0x0)){const _0x216873=_0x6e4ead[_0x4619ad(0x123)];_0x216873[_0x4619ad(0x134)]?.[_0x4619ad(0x142)]?.[_0x4619ad(0x120)]?_0x216873[_0x4619ad(0x10b)]=_0xb584f1[_0x4619ad(0x155)](_0x27eae0,_0x216873[_0x4619ad(0x134)][_0x4619ad(0x142)][_0x4619ad(0x120)]):_0x216873[_0x4619ad(0x10b)]='暂无';_0x216873[_0x4619ad(0xf2)]=Array[_0x4619ad(0x11f)](_0x216873[_0x4619ad(0xf2)])?_0x216873[_0x4619ad(0xf2)]:[],_0x216873[_0x4619ad(0xd3)]=_0x216873[_0x4619ad(0xf2)]['filter'](_0x265a0d=>_0x265a0d[_0x4619ad(0xc1)]===_0x4619ad(0xa4)),_0x216873[_0x4619ad(0xb4)]=_0x216873[_0x4619ad(0xf2)][_0x4619ad(0xd9)](_0x36163f=>_0x36163f['role']!==_0x4619ad(0xa4)),_0x216873['activities']=Array['isArray'](_0x216873[_0x4619ad(0x14d)])?_0x216873['activities']:[];const _0x1a0cdb=_0x216873['activities']['find'](_0x194022=>_0x194022['is_face_slap']===0x1);_0x216873[_0x4619ad(0xfa)]=_0xb584f1[_0x4619ad(0xac)](_0x1a0cdb,null),_0x216873['activities']=_0x216873[_0x4619ad(0x14d)][_0x4619ad(0xd9)](_0x307f52=>_0x307f52[_0x4619ad(0x9e)]!==0x1);let _0x6bb251=Array[_0x4619ad(0x11f)](_0x216873[_0x4619ad(0x10a)])?_0x216873['banners'][_0x4619ad(0x8e)](_0x143f7e=>({'type':'image','url':_0x143f7e})):[];_0x216873[_0x4619ad(0x10e)]&&_0x6bb251[_0x4619ad(0x7f)]({'type':_0xb584f1[_0x4619ad(0x102)],'poster':_0x216873['video_cover_url'],'videoUrl':'','needFetch':!![]});_0x216873[_0x4619ad(0x10a)]=_0x6bb251;const _0x236915=['简介','帖子','攻略','版规','我的'];_0x216873['activities'][_0x4619ad(0x17e)]>0x0&&_0x236915[_0x4619ad(0x95)]('活动'),this[_0x4619ad(0xa0)]({'gameInfo':_0x216873,'tabs':_0x236915}),wx['setNavigationBarTitle']({'title':_0x216873[_0x4619ad(0x185)]||_0xb584f1['LVZxQ']});}}catch(_0x4ea8b4){console['error'](_0x4619ad(0xd7),_0x4ea8b4);}},async 'getGameIntroduce'(){const _0x5dc79c=_0x31be10,_0x1082cb={'ayMOU':function(_0x7c09d4,_0x417425,_0x33c9b8,_0x35f7d3){return _0x7c09d4(_0x417425,_0x33c9b8,_0x35f7d3);},'GSvDH':function(_0x49b6a3,_0x2313de){return _0x49b6a3===_0x2313de;},'iMscC':_0x5dc79c(0xbe)};try{const _0x4c2bc1=await _0x1082cb[_0x5dc79c(0x81)](queryGameInfo,this[_0x5dc79c(0x123)][_0x5dc79c(0x169)],0x1,0x2);_0x1082cb[_0x5dc79c(0x15f)](_0x4c2bc1[_0x5dc79c(0x9a)],0x0)&&this[_0x5dc79c(0xa0)]({'introduceInfo':_0x4c2bc1[_0x5dc79c(0x123)]});}catch(_0x3e084b){console[_0x5dc79c(0x115)](_0x1082cb[_0x5dc79c(0x17f)],_0x3e084b);}},async 'getGameWikiInfo'(){const _0x141583=_0x31be10,_0x576872={'IAJZO':function(_0x912492,_0x7f6261){return _0x912492===_0x7f6261;},'knQtu':function(_0xe186af,_0x58414b){return _0xe186af(_0x58414b);},'nDOnZ':function(_0x5c19ea,_0x166075){return _0x5c19ea!==_0x166075;},'TurMh':_0x141583(0xa1),'ffPhh':function(_0x5aedd5,_0x272b34){return _0x5aedd5(_0x272b34);},'BMUJr':_0x141583(0xb5),'WohyD':'解压失败','ohGlD':'获取研发商信息失败'};try{const _0x1920cc=await _0x576872['ffPhh'](queryGameWiki,this[_0x141583(0x123)][_0x141583(0x169)]);if(_0x1920cc['code']===0x0){_0x1920cc[_0x141583(0x123)]?.[_0x141583(0x7d)]&&Array[_0x141583(0x11f)](_0x1920cc[_0x141583(0x123)]?.[_0x141583(0x7d)])&&this[_0x141583(0xa0)]({'images':_0x1920cc['data']?.[_0x141583(0x7d)]});if(_0x1920cc[_0x141583(0x123)]?.['page'])try{const _0xb74b80=_0x576872[_0x141583(0x112)](decompressBase64Gzip,_0x1920cc[_0x141583(0x123)][_0x141583(0xe9)]?.[_0x141583(0x157)]);function _0x2e9a0a(_0x124a2d){const _0x594c54=_0x141583,_0x3726e8={'xGzYV':'url','VEGol':function(_0x1578f8,_0x1a2a93){return _0x576872['IAJZO'](_0x1578f8,_0x1a2a93);},'iklTB':function(_0x2ea2f5,_0xcbd1c8){return _0x576872['knQtu'](_0x2ea2f5,_0xcbd1c8);}};if(Array[_0x594c54(0x11f)](_0x124a2d))return _0x124a2d[_0x594c54(0x8e)](_0x2e9a0a);else{if(_0x576872[_0x594c54(0xcb)](_0x124a2d,null)&&_0x576872[_0x594c54(0x106)](typeof _0x124a2d,_0x576872['TurMh'])){const _0x4b18c8={};return Object[_0x594c54(0xe8)](_0x124a2d)[_0x594c54(0xd0)](function(_0x5294aa){const _0x79bae9=_0x594c54,_0x2983a4=_0x124a2d[_0x5294aa];_0x5294aa===_0x3726e8[_0x79bae9(0x80)]&&_0x3726e8[_0x79bae9(0x7e)](typeof _0x2983a4,_0x79bae9(0xfd))?_0x4b18c8[_0x5294aa]=_0x2983a4[_0x79bae9(0x8d)](/^http:\/\//i,_0x79bae9(0x14c)):_0x4b18c8[_0x5294aa]=_0x3726e8[_0x79bae9(0x17c)](_0x2e9a0a,_0x2983a4);}),_0x4b18c8;}}return _0x124a2d;}let _0x9c150e=_0x2e9a0a(_0xb74b80);_0x1920cc['data']['stats']&&(_0x9c150e=_0x9c150e[_0x141583(0x8e)](_0x278c6c=>_0x278c6c[_0x141583(0xb9)]===0x6?{..._0x278c6c,'stats':_0x1920cc[_0x141583(0x123)][_0x141583(0xfc)]}:_0x278c6c)),console['log'](_0x576872[_0x141583(0x12f)],_0x9c150e),this['setData']({'wiki_created_at':_0x576872['ffPhh'](formatUTCYear,_0x1920cc[_0x141583(0x123)][_0x141583(0xe9)]?.['created_at']),'gameWikiJson':_0x9c150e});}catch(_0xcd7cdf){console[_0x141583(0x115)](_0x576872[_0x141583(0x127)],_0xcd7cdf);}else this[_0x141583(0xa0)]({'gameWikiJson':null});}const _0x50a5c7=await _0x576872[_0x141583(0x112)](queryGameWikiUsers,this['data'][_0x141583(0x169)]);_0x576872[_0x141583(0x106)](_0x50a5c7[_0x141583(0x9a)],0x0)&&this[_0x141583(0xa0)]({'wikiUsers':Array[_0x141583(0x11f)](_0x50a5c7['data'])?_0x50a5c7[_0x141583(0x123)]:[]});}catch(_0x543c02){console[_0x141583(0x115)](_0x576872[_0x141583(0xf1)],_0x543c02);}},async 'getGameProtocol'(){const _0x2affd5=_0x31be10,_0x3e14a8={'Iudkk':function(_0x5cbce4,_0x1fc2de,_0x4045ae,_0x4af173){return _0x5cbce4(_0x1fc2de,_0x4045ae,_0x4af173);},'ArARo':function(_0x3c381e,_0x1a253b){return _0x3c381e===_0x1a253b;},'zIrRV':_0x2affd5(0x168)};try{const _0x1beaad=await _0x3e14a8[_0x2affd5(0xc6)](queryGameInfo,this[_0x2affd5(0x123)][_0x2affd5(0x169)],0x1,0x3);if(_0x3e14a8[_0x2affd5(0x182)](_0x1beaad[_0x2affd5(0x9a)],0x0)){const _0xce6445=(Array[_0x2affd5(0x11f)](_0x1beaad[_0x2affd5(0x123)]?.['rules'])?_0x1beaad[_0x2affd5(0x123)]?.['rules']:[])[_0x2affd5(0x8e)](_0x3448cb=>({'icon':_0x3448cb[_0x2affd5(0x8a)],'title':_0x3448cb[_0x2affd5(0x116)],'desc':_0x3448cb[_0x2affd5(0x16c)]||'','open':![]})),_0x583cb4=rulesData['rules'][_0x2affd5(0x8e)](_0x50b220=>({..._0x50b220,'open':![]})),_0x53e995=[..._0xce6445,..._0x583cb4][_0x2affd5(0xa5)]((_0x317fb5,_0x5468a6)=>{const _0x2c7fcc=_0x2affd5;return _0x317fb5[_0x2c7fcc(0x17d)]-_0x5468a6['icon'];});this[_0x2affd5(0xa0)]({'protocolInfo':_0x1beaad[_0x2affd5(0x123)]??{},'ruleList':_0x53e995});}}catch(_0x5e782a){console[_0x2affd5(0x115)](_0x3e14a8[_0x2affd5(0xcc)],_0x5e782a);}},async 'getGameEmpiricValue'(){const _0x2ed195=_0x31be10,_0x483f79={'TlSnD':function(_0x19b476,_0x18bbd6,_0x563686,_0x54e59a){return _0x19b476(_0x18bbd6,_0x563686,_0x54e59a);},'eZNTb':function(_0x2ae10d,_0x288a4f){return _0x2ae10d===_0x288a4f;}};try{const _0x32deac=await _0x483f79['TlSnD'](queryGameInfo,this[_0x2ed195(0x123)][_0x2ed195(0x169)],0x1,0x4);_0x483f79[_0x2ed195(0x149)](_0x32deac[_0x2ed195(0x9a)],0x0)&&this['setData']({'empiricInfo':_0x32deac['data']});}catch(_0x24a046){console[_0x2ed195(0x115)]('获取经验信息失败',_0x24a046);}},'changeTab'(_0x4ab63e){const _0x24eb10=_0x31be10,_0x213688=_0x4ab63e[_0x24eb10(0xb6)]['dataset'][_0x24eb10(0x154)];this[_0x24eb10(0x98)](),this[_0x24eb10(0xa0)]({'currentTab':_0x213688});},'toggleJoin'(_0x4ecc28){const _0x11372f=_0x31be10,_0x3b1196={'wsLHr':function(_0xa3a8d0,_0x19c040){return _0xa3a8d0===_0x19c040;},'GzBCl':_0x11372f(0xbb),'tMAuP':function(_0x2c02e1,_0x277889){return _0x2c02e1===_0x277889;},'rKTLP':function(_0x16951e){return _0x16951e();},'eqRhT':function(_0x45e5e2,_0x156d4a){return _0x45e5e2!==_0x156d4a;},'WIcwJ':function(_0xfed0b6,_0x59ae32,_0x422f06){return _0xfed0b6(_0x59ae32,_0x422f06);}};if(!_0x3b1196[_0x11372f(0xee)](checkLogin))return;const _0x3211c1=this[_0x11372f(0x123)][_0x11372f(0xc8)]['is_fans'],_0x39d7ec=_0x4ecc28[_0x11372f(0xb6)][_0x11372f(0x7c)][_0x11372f(0x15a)],_0x14804f=_0x3b1196[_0x11372f(0x9b)](_0x3211c1,0x1)?0x1:0x2;_0x3b1196[_0x11372f(0x12c)](addGame,_0x39d7ec['id'],_0x14804f)[_0x11372f(0xaf)](_0x148c31=>{const _0x5db480=_0x11372f;wx[_0x5db480(0x109)]({'title':_0x3b1196['wsLHr'](_0x14804f,0x1)?'加入游戏库成功':_0x3b1196[_0x5db480(0x141)]}),this[_0x5db480(0xa0)]({'gameInfo.is_fans':_0x3b1196[_0x5db480(0x181)](_0x3211c1,0x1)?0x0:0x1});});},'goActivityDetail'(_0x6b7f95){const _0x459131=_0x31be10,_0x5bfc0a={'REpmd':function(_0x3776ff,_0x390af7){return _0x3776ff===_0x390af7;},'mmseW':function(_0x4229b0,_0x20372b){return _0x4229b0(_0x20372b);},'OvSnG':_0x459131(0x16a),'dSSCK':function(_0x42227d,_0x584fee){return _0x42227d===_0x584fee;},'tqFxz':function(_0x224295){return _0x224295();}};this[_0x459131(0x98)]();const _0x3351f1=_0x6b7f95[_0x459131(0xb6)][_0x459131(0x7c)]['item'];_0x5bfc0a['REpmd'](_0x3351f1['activity_type'],0x2)&&wx[_0x459131(0x165)]({'url':_0x459131(0xa9)+_0x5bfc0a[_0x459131(0x135)](encodeURIComponent,_0x5bfc0a[_0x459131(0xc0)])});_0x5bfc0a[_0x459131(0x144)](_0x3351f1['activity_type'],0x1)&&wx['navigateTo']({'url':_0x459131(0x16f)+_0x3351f1[_0x459131(0xfe)]});if(_0x5bfc0a['dSSCK'](_0x3351f1[_0x459131(0x90)],0x4)){if(!_0x5bfc0a['tqFxz'](checkLogin))return;wx['navigateTo']({'url':_0x459131(0xda)+_0x3351f1[_0x459131(0xfe)]});}_0x5bfc0a[_0x459131(0xf7)](_0x3351f1[_0x459131(0x90)],0x3)&&wx[_0x459131(0x165)]({'url':_0x459131(0x163)+_0x3351f1[_0x459131(0x91)]});},'onReachBottom'(){const _0x714c9f=_0x31be10,_0x3061f2={'VWxdK':function(_0x3cb957,_0x34a949){return _0x3cb957!==_0x34a949;}},{currentTab:_0xb511bc,subTab:_0x5b26c9,postTabs:_0x2d94d6,hasMore:_0x343b4c,loading:_0x1411f1}=this[_0x714c9f(0x123)];if(_0x3061f2[_0x714c9f(0x126)](_0xb511bc,0x1))return;const _0x1bd3c8=_0x2d94d6[_0x5b26c9][_0x714c9f(0xd9)];_0x343b4c[_0x1bd3c8]&&!_0x1411f1[_0x1bd3c8]&&this[_0x714c9f(0xa3)](_0x1bd3c8,!![]);},'onMoreTap'(_0x218269){const _0x51d7b0=_0x31be10,_0x4db33b={'MxOcl':_0x51d7b0(0xcd),'lHfwJ':function(_0x59aa3a,_0x4e383c){return _0x59aa3a===_0x4e383c;}},_0x33f184=_0x218269[_0x51d7b0(0xb6)][_0x51d7b0(0x7c)]['index'],_0x13849e=_0x218269[_0x51d7b0(0x146)][_0x51d7b0(0xdf)],_0x1f74f2=wx[_0x51d7b0(0xf8)](_0x4db33b['MxOcl']),_0x4adc06=_0x4db33b[_0x51d7b0(0x14e)](_0x13849e[_0x51d7b0(0x15e)]['id'],_0x1f74f2);this[_0x51d7b0(0xa0)]({'isOwner':_0x4adc06,'moreSheetVisible':!![],'moreSheetItem':_0x13849e,'currentPostIndex':_0x33f184});},'onPinTap'(){const _0x3536fe=_0x31be10,_0x1902e3={'guxjk':function(_0x287771,_0x28028e){return _0x287771===_0x28028e;},'MOPik':function(_0x5eb595,_0x12dc61){return _0x5eb595===_0x12dc61;},'yEjCj':_0x3536fe(0x108),'ttIee':_0x3536fe(0x180),'ImyKT':_0x3536fe(0x143),'vIoeY':function(_0x51413d,_0x217c5e){return _0x51413d-_0x217c5e;},'qWnsT':_0x3536fe(0x89),'bswfy':function(_0x20a724,_0x557138){return _0x20a724>_0x557138;},'vJrCD':'object','DizmG':_0x3536fe(0x122),'MSeNH':_0x3536fe(0x115),'OEALU':_0x3536fe(0x153),'tnicW':function(_0x2790ec,_0x260967,_0xaf472e){return _0x2790ec(_0x260967,_0xaf472e);}},_0x5580c8=this[_0x3536fe(0x123)][_0x3536fe(0x107)][_0x3536fe(0x147)],_0x38ed14=this[_0x3536fe(0x123)][_0x3536fe(0x136)]?0x2:0x1;wx[_0x3536fe(0x172)]({'title':_0x1902e3[_0x3536fe(0xdc)]}),_0x1902e3['tnicW'](setUserPostTop,_0x5580c8['id'],_0x38ed14)[_0x3536fe(0xaf)](_0x2889a8=>{const _0x1d58f0=_0x3536fe,_0x5a297b={'XLiYu':function(_0x5740fe,_0x30f5c0){return _0x5740fe!==_0x30f5c0;},'fCaqd':function(_0x32b4fb,_0x5a7105){const _0x4c3b3a=_0x4b1a;return _0x1902e3[_0x4c3b3a(0x130)](_0x32b4fb,_0x5a7105);}};wx[_0x1d58f0(0xb0)]();if(_0x2889a8[_0x1d58f0(0x9a)]===0x0){wx[_0x1d58f0(0x109)]({'title':_0x1902e3['MOPik'](_0x38ed14,0x1)?_0x1902e3['yEjCj']:_0x1902e3[_0x1d58f0(0x85)],'icon':_0x1902e3[_0x1d58f0(0xe4)]}),this[_0x1d58f0(0xa0)]({'item.post.is_user_top':_0x1902e3['MOPik'](_0x38ed14,0x1)?0x1:0x0,'isPinned':_0x38ed14===0x1?0x1:0x0}),this[_0x1d58f0(0x176)]();if(_0x38ed14===0x1){const _0x438ccc=getCurrentPages(),_0x1e9dcf=_0x438ccc[_0x1902e3[_0x1d58f0(0xe6)](_0x438ccc[_0x1d58f0(0x17e)],0x1)];if(_0x1e9dcf[_0x1d58f0(0xb3)]===_0x1902e3[_0x1d58f0(0x179)]){let _0x5f52e3=_0x1e9dcf[_0x1d58f0(0x123)]['posts'];if(Array[_0x1d58f0(0x11f)](_0x5f52e3)){_0x5f52e3=_0x5f52e3[_0x1d58f0(0x8e)](_0x5ab224=>{const _0x3a03a2=_0x1d58f0;return _0x5a297b['XLiYu'](_0x5ab224[_0x3a03a2(0x147)]['id'],_0x5580c8['id'])&&_0x5a297b[_0x3a03a2(0x170)](_0x5ab224[_0x3a03a2(0x147)][_0x3a03a2(0x173)],0x1)&&(_0x5ab224[_0x3a03a2(0x147)][_0x3a03a2(0x173)]=0x0),_0x5ab224;});const _0x238be3=_0x5f52e3[_0x1d58f0(0xae)](_0x1a8c33=>_0x1a8c33[_0x1d58f0(0x147)]['id']===_0x5580c8['id']);if(_0x1902e3[_0x1d58f0(0x14a)](_0x238be3,-0x1)){const [_0x45dedc]=_0x5f52e3['splice'](_0x238be3,0x1);_0x45dedc[_0x1d58f0(0x147)][_0x1d58f0(0x173)]=0x1,_0x5f52e3[_0x1d58f0(0x7f)](_0x45dedc);}_0x1e9dcf[_0x1d58f0(0xa0)]({'posts':_0x5f52e3}),wx['pageScrollTo']({'scrollTop':0x0,'duration':0x12c});}else{if(_0x5f52e3&&typeof _0x5f52e3===_0x1902e3[_0x1d58f0(0x184)]){const _0x4385ab={};Object[_0x1d58f0(0xe8)](_0x5f52e3)['forEach'](_0x1868eb=>{const _0x70bb75=_0x1d58f0;if(Array['isArray'](_0x5f52e3[_0x1868eb])){let _0x3296ff=_0x5f52e3[_0x1868eb][_0x70bb75(0x8e)](_0x24ba05=>{const _0x2d7b7d=_0x70bb75;return _0x5a297b[_0x2d7b7d(0x156)](_0x24ba05[_0x2d7b7d(0x147)]['id'],_0x5580c8['id'])&&_0x5a297b[_0x2d7b7d(0x170)](_0x24ba05[_0x2d7b7d(0x147)][_0x2d7b7d(0x173)],0x1)&&(_0x24ba05[_0x2d7b7d(0x147)][_0x2d7b7d(0x173)]=0x0),_0x24ba05;});const _0x245c3a=_0x3296ff['findIndex'](_0x385571=>_0x385571[_0x70bb75(0x147)]['id']===_0x5580c8['id']);if(_0x245c3a>-0x1){const [_0x5d469c]=_0x3296ff[_0x70bb75(0x183)](_0x245c3a,0x1);_0x5d469c[_0x70bb75(0x147)][_0x70bb75(0x173)]=0x1,_0x3296ff[_0x70bb75(0x7f)](_0x5d469c);}_0x4385ab[_0x1868eb]=_0x3296ff;}else _0x4385ab[_0x1868eb]=_0x5f52e3[_0x1868eb];}),_0x1e9dcf['setData']({'posts':_0x4385ab}),wx[_0x1d58f0(0x105)]({'scrollTop':0x0,'duration':0x12c});}}}}}else wx[_0x1d58f0(0x109)]({'title':_0x2889a8[_0x1d58f0(0x7a)]||_0x1902e3[_0x1d58f0(0x10c)],'icon':_0x1902e3['MSeNH']});});},'onCloseMoreSheet'(){const _0x40a447=_0x31be10;this[_0x40a447(0xa0)]({'moreSheetVisible':![]});},'onDelete'(){const _0x57dc0b=_0x31be10,_0x21490b={'WUVIJ':function(_0x2cf476,_0x521dd1){return _0x2cf476===_0x521dd1;},'wugrP':_0x57dc0b(0x143),'oQDMv':function(_0x4ffc98){return _0x4ffc98();},'QVVev':_0x57dc0b(0xa1),'CnXpq':_0x57dc0b(0x148),'tEZxd':_0x57dc0b(0x88),'SXZzu':function(_0x84934e,_0x53088d){return _0x84934e(_0x53088d);}},_0x322bd0=this[_0x57dc0b(0x123)][_0x57dc0b(0x107)]['post']['id'];_0x21490b['SXZzu'](deleteContent,_0x322bd0)[_0x57dc0b(0xaf)](_0x4e6188=>{const _0x4efe94=_0x57dc0b;if(_0x21490b[_0x4efe94(0xd4)](_0x4e6188['code'],0x0)){wx[_0x4efe94(0x109)]({'title':'删除成功','icon':_0x21490b[_0x4efe94(0x145)]});const _0x560b6b=_0x21490b[_0x4efe94(0xad)](getCurrentPages),_0x45ca8b=_0x560b6b[_0x560b6b[_0x4efe94(0x17e)]-0x1],_0x1e3f2f=_0x45ca8b['data'][_0x4efe94(0x8b)];if(Array[_0x4efe94(0x11f)](_0x1e3f2f))_0x45ca8b['setData']({'posts':_0x1e3f2f[_0x4efe94(0xd9)](_0x150940=>_0x150940[_0x4efe94(0x147)]['id']!==_0x322bd0)});else{if(_0x1e3f2f&&_0x21490b[_0x4efe94(0xd4)](typeof _0x1e3f2f,_0x21490b[_0x4efe94(0x139)])){const _0x1e4371={};Object[_0x4efe94(0xe8)](_0x1e3f2f)[_0x4efe94(0xd0)](_0x4c11a9=>{const _0x4245c2=_0x4efe94;Array['isArray'](_0x1e3f2f[_0x4c11a9])?_0x1e4371[_0x4c11a9]=_0x1e3f2f[_0x4c11a9][_0x4245c2(0xd9)](_0x493b6b=>_0x493b6b[_0x4245c2(0x147)]['id']!==_0x322bd0):_0x1e4371[_0x4c11a9]=_0x1e3f2f[_0x4c11a9];}),_0x45ca8b[_0x4efe94(0xa0)]({'posts':_0x1e4371});}}this[_0x4efe94(0xe3)](_0x21490b[_0x4efe94(0x17b)],{'post':this[_0x4efe94(0x123)][_0x4efe94(0x107)][_0x4efe94(0x147)]}),this[_0x4efe94(0x176)]();}else wx['showToast']({'title':_0x4e6188[_0x4efe94(0x7a)]||_0x21490b['tEZxd'],'icon':_0x4efe94(0x115)});});},'onReport'(){const _0x564f49=_0x31be10,_0x4c96af={'xEkXb':_0x564f49(0x15d)};this['onPauseAllVideo'](),wx['navigateTo']({'url':_0x564f49(0xd8)+this['data'][_0x564f49(0x107)][_0x564f49(0x147)]['id']}),this[_0x564f49(0xe3)](_0x4c96af['xEkXb'],{'post':this[_0x564f49(0x123)][_0x564f49(0x107)][_0x564f49(0x147)]}),this['onCloseMoreSheet']();},async 'onFavorite'(){const _0x26ea22=_0x31be10,_0x2004d8={'TCKpU':function(_0x41a107,_0x2b6a77){return _0x41a107===_0x2b6a77;},'SxxUy':function(_0x13d629,_0x1dfde8){return _0x13d629===_0x1dfde8;},'eZVUL':'object','FEIIG':function(_0x3d7c55,_0x5ac246){return _0x3d7c55===_0x5ac246;},'IVZNO':_0x26ea22(0x10f),'kXLok':_0x26ea22(0x82),'LFqZT':function(_0x5373c5,_0x54daaa){return _0x5373c5===_0x54daaa;},'ElvSK':function(_0xa37c43,_0x32fd03){return _0xa37c43===_0x32fd03;},'EDxgT':_0x26ea22(0x143),'CrAps':function(_0x471497,_0x3e8165){return _0x471497===_0x3e8165;},'hVDFn':function(_0x4fd1d5,_0x7d7fd3){return _0x4fd1d5===_0x7d7fd3;},'WbSrg':_0x26ea22(0x100),'UQrrN':_0x26ea22(0x101),'dHBTY':'error','bGmNu':_0x26ea22(0x175),'RWyPj':'网络错误,请稍后重试'},_0x182152=this[_0x26ea22(0x123)][_0x26ea22(0x107)][_0x26ea22(0x147)],_0x3a44f5=_0x182152[_0x26ea22(0x152)]===0x1?0x2:0x1;wx[_0x26ea22(0x172)]({'title':_0x2004d8[_0x26ea22(0xca)](_0x3a44f5,0x1)?_0x2004d8[_0x26ea22(0x124)]:_0x2004d8['kXLok']});try{const _0xe97daa=await collectPost(_0x182152['id'],_0x3a44f5);wx[_0x26ea22(0xb0)]();if(_0x2004d8[_0x26ea22(0x16d)](_0xe97daa[_0x26ea22(0x9a)],0x0)){wx[_0x26ea22(0x109)]({'title':_0x2004d8[_0x26ea22(0x13b)](_0x3a44f5,0x1)?_0x26ea22(0x94):'取消收藏','icon':_0x2004d8[_0x26ea22(0xc2)]});const _0x25b338={...this[_0x26ea22(0x123)][_0x26ea22(0x107)],'post':{...this['data'][_0x26ea22(0x107)][_0x26ea22(0x147)],'is_collect':_0x2004d8[_0x26ea22(0x96)](_0x3a44f5,0x1)?0x1:0x0}},{posts:_0x185e0d}=this['data'];let _0x5e7269;if(Array[_0x26ea22(0x11f)](_0x185e0d))_0x5e7269=_0x185e0d[_0x26ea22(0x8e)](_0x773b18=>{const _0x266300=_0x26ea22;if(_0x773b18[_0x266300(0x147)]&&_0x2004d8['TCKpU'](_0x773b18[_0x266300(0x147)]['id'],_0x182152['id']))return{..._0x773b18,'post':{..._0x773b18[_0x266300(0x147)],'is_collect':_0x2004d8['SxxUy'](_0x3a44f5,0x1)?0x1:0x0}};return _0x773b18;});else _0x185e0d&&_0x2004d8[_0x26ea22(0xca)](typeof _0x185e0d,'object')?(_0x5e7269={},Object['keys'](_0x185e0d)[_0x26ea22(0xd0)](_0x4a6fe7=>{const _0x5564b2=_0x26ea22,_0x1c5fad=_0x185e0d[_0x4a6fe7];Array[_0x5564b2(0x11f)](_0x1c5fad)?_0x5e7269[_0x4a6fe7]=_0x1c5fad[_0x5564b2(0x8e)](_0x25adf8=>{const _0x255872=_0x5564b2;if(_0x25adf8[_0x255872(0x147)]&&_0x25adf8[_0x255872(0x147)]['id']===_0x182152['id'])return{..._0x25adf8,'post':{..._0x25adf8['post'],'is_collect':_0x3a44f5===0x1?0x1:0x0}};return _0x25adf8;}):_0x5e7269[_0x4a6fe7]=_0x185e0d[_0x4a6fe7];})):_0x5e7269=_0x185e0d;this[_0x26ea22(0xa0)]({'moreSheetItem':_0x25b338,'posts':_0x5e7269});const _0x37a370=getCurrentPages();_0x37a370[_0x26ea22(0xd0)](_0x26d87c=>{const _0x44998a=_0x26ea22,_0x41c7d4={'yLtrw':function(_0xb800f1,_0x246a7c){return _0x2004d8['SxxUy'](_0xb800f1,_0x246a7c);},'WDdtO':function(_0x3ffcb2,_0x589499){return _0x2004d8['TCKpU'](_0x3ffcb2,_0x589499);}};if(!_0x26d87c||!_0x26d87c['data'])return;const _0x4c88e2=_0x26d87c[_0x44998a(0x123)][_0x44998a(0x8b)];if(!_0x4c88e2)return;if(Array['isArray'](_0x4c88e2)){const _0x7dd853=_0x4c88e2[_0x44998a(0x8e)](_0x235ca7=>{const _0x293d8d=_0x44998a;if(_0x235ca7[_0x293d8d(0x147)]&&_0x41c7d4[_0x293d8d(0x13c)](_0x235ca7[_0x293d8d(0x147)]['id'],_0x182152['id']))return{..._0x235ca7,'post':{..._0x235ca7['post'],'is_collect':_0x41c7d4[_0x293d8d(0x164)](_0x3a44f5,0x1)?0x1:0x0}};return _0x235ca7;});_0x26d87c[_0x44998a(0xa0)]({'posts':_0x7dd853});}else{if(_0x4c88e2&&_0x2004d8['TCKpU'](typeof _0x4c88e2,_0x2004d8['eZVUL'])){const _0x326da4={};let _0x281467=![];Object[_0x44998a(0xe8)](_0x4c88e2)['forEach'](_0x2999c3=>{const _0x109d57=_0x44998a,_0x2a5053=_0x4c88e2[_0x2999c3];if(Array[_0x109d57(0x11f)](_0x2a5053)){const _0x269ef0=_0x2a5053[_0x109d57(0x8e)](_0x1738c9=>{const _0x18d41a=_0x109d57;if(_0x1738c9[_0x18d41a(0x147)]&&_0x41c7d4[_0x18d41a(0x164)](_0x1738c9['post']['id'],_0x182152['id']))return _0x281467=!![],{..._0x1738c9,'post':{..._0x1738c9['post'],'is_collect':_0x41c7d4[_0x18d41a(0x13c)](_0x3a44f5,0x1)?0x1:0x0}};return _0x1738c9;});_0x326da4[_0x2999c3]=_0x269ef0;}else _0x326da4[_0x2999c3]=_0x4c88e2[_0x2999c3];}),_0x281467&&_0x26d87c[_0x44998a(0xa0)]({'posts':_0x326da4});}}}),this[_0x26ea22(0x176)]();}else wx[_0x26ea22(0x109)]({'title':_0xe97daa[_0x26ea22(0x7a)]||(_0x2004d8[_0x26ea22(0x177)](_0x3a44f5,0x1)?_0x2004d8[_0x26ea22(0x87)]:_0x2004d8[_0x26ea22(0xc9)]),'icon':_0x2004d8[_0x26ea22(0xaa)]});}catch(_0x375f40){wx[_0x26ea22(0xb0)](),console[_0x26ea22(0x115)](_0x2004d8[_0x26ea22(0x128)],_0x375f40),wx[_0x26ea22(0x109)]({'title':_0x2004d8[_0x26ea22(0xdb)],'icon':_0x2004d8[_0x26ea22(0xaa)]});}},'onFollowChanged'(_0xc8e857){const _0x426bdd=_0x31be10,_0x1e8580={'IeCOM':function(_0x3c28f1,_0x1db6d2){return _0x3c28f1===_0x1db6d2;},'RjLZr':_0x426bdd(0xa1),'zesDa':'关注成功','cJzSX':_0x426bdd(0x143)},{userId:_0x47e564,isFans:_0x425b42}=_0xc8e857['detail'],{posts:_0x1872fd}=this[_0x426bdd(0x123)];let _0x7f2c34;if(Array[_0x426bdd(0x11f)](_0x1872fd))_0x7f2c34=_0x1872fd['map'](_0x115507=>{const _0x86d3dd=_0x426bdd;return _0x1e8580[_0x86d3dd(0x161)](_0x115507[_0x86d3dd(0x15e)]['id'],_0x47e564)&&(_0x115507[_0x86d3dd(0x15e)]['is_fans']=_0x425b42?0x1:0x0),_0x115507;});else _0x1872fd&&typeof _0x1872fd===_0x1e8580[_0x426bdd(0x12e)]?(_0x7f2c34={},Object[_0x426bdd(0xe8)](_0x1872fd)[_0x426bdd(0xd0)](_0x177dbb=>{const _0x28bfc1=_0x1872fd[_0x177dbb];Array['isArray'](_0x28bfc1)?_0x7f2c34[_0x177dbb]=_0x28bfc1['map'](_0x3ac485=>{const _0x1a847b=_0x4b1a;return _0x3ac485[_0x1a847b(0x15e)]['id']===_0x47e564&&(_0x3ac485[_0x1a847b(0x15e)][_0x1a847b(0x11d)]=_0x425b42?0x1:0x0),_0x3ac485;}):_0x7f2c34[_0x177dbb]=_0x28bfc1;})):_0x7f2c34=_0x1872fd;this[_0x426bdd(0xa0)]({'posts':_0x7f2c34}),wx[_0x426bdd(0x109)]({'title':_0x425b42?_0x1e8580[_0x426bdd(0x15c)]:_0x426bdd(0xbc),'icon':_0x1e8580['cJzSX']});},async 'onPullDownRefresh'(){const _0x324c8b=_0x31be10,_0xda25fb={'daBIa':function(_0x738c0b,_0x37b5ac){return _0x738c0b!==_0x37b5ac;},'xokMI':_0x324c8b(0xff)},{currentTab:_0x1a833f,subTab:_0x147210,postTabs:_0x45dbc8}=this[_0x324c8b(0x123)];if(_0xda25fb[_0x324c8b(0x11b)](_0x1a833f,0x1)){wx['stopPullDownRefresh']();return;}const _0x161d3a=_0x45dbc8[_0x147210]['filter'];try{this[_0x324c8b(0xa0)]({[_0x324c8b(0xd5)+_0x161d3a]:0x0,[_0x324c8b(0x167)+_0x161d3a]:!![],[_0x324c8b(0x188)+_0x161d3a]:![]}),await this[_0x324c8b(0xa3)](_0x161d3a,![]);}catch(_0x1c3c07){console[_0x324c8b(0x115)](_0xda25fb[_0x324c8b(0xc3)],_0x1c3c07);}finally{wx['stopPullDownRefresh']();}},'handlePlayVideo'(){const _0x53bab6=_0x31be10;this[_0x53bab6(0x132)]();},async 'onBannerVideoPlay'(_0x2d6d27){const _0xf53756=_0x31be10,_0x1b909f={'aMSyw':function(_0x192843,_0x4507cb){return _0x192843(_0x4507cb);},'XFNhE':function(_0x2eb00e,_0x1d6201){return _0x2eb00e===_0x1d6201;},'TVock':'视频加载失败','awLxW':'none'},_0x38b646=_0x2d6d27['currentTarget']['dataset'][_0xf53756(0x154)],_0x3cec3c=this[_0xf53756(0x123)][_0xf53756(0xc8)]['banners'],_0x4c338c=_0x3cec3c[_0x38b646];if(_0x4c338c[_0xf53756(0x104)]||_0x4c338c[_0xf53756(0xdd)])return;this[_0xf53756(0x132)](),_0x4c338c[_0xf53756(0xdd)]=!![],this[_0xf53756(0xa0)]({'gameInfo.banners':_0x3cec3c}),wx['showLoading']({'title':_0xf53756(0x111)});try{const _0x2c671e=await _0x1b909f[_0xf53756(0x11c)](queryGameBannerVideo,this[_0xf53756(0x123)]['gameId']);if(_0x1b909f['XFNhE'](_0x2c671e['code'],0x0)&&_0x2c671e[_0xf53756(0x123)])_0x4c338c[_0xf53756(0x104)]=_0x2c671e[_0xf53756(0x123)],_0x4c338c[_0xf53756(0xdd)]=![],this['setData']({'gameInfo.banners':_0x3cec3c},()=>{const _0x1cc492=_0xf53756;wx[_0x1cc492(0x9f)]('bannerVideo-'+_0x38b646,this)['play']();});else throw new Error(_0xf53756(0x103));}catch(_0xd3f26f){_0x4c338c[_0xf53756(0xdd)]=![],this[_0xf53756(0xa0)]({'gameInfo.banners':_0x3cec3c}),wx[_0xf53756(0x109)]({'title':_0x1b909f[_0xf53756(0xa2)],'icon':_0x1b909f[_0xf53756(0x93)]});}finally{wx[_0xf53756(0xb0)]();}},'pausePostVideo'(){const _0x389b7b=_0x31be10,_0x2f47c2={'HyNUC':function(_0x569d44,_0x2c92f9){return _0x569d44!==_0x2c92f9;}},_0x2292f4=this[_0x389b7b(0x123)][_0x389b7b(0x114)];if(_0x2292f4){const _0x53c210=this['data'][_0x389b7b(0x8b)];for(const _0x36076c in _0x53c210){const _0x1ae07a=_0x53c210[_0x36076c];if(Array[_0x389b7b(0x11f)](_0x1ae07a)){const _0x5a8c9b=_0x1ae07a['findIndex'](_0x2ebb0a=>_0x2ebb0a[_0x389b7b(0x147)]['id']===_0x2292f4);if(_0x2f47c2[_0x389b7b(0x140)](_0x5a8c9b,-0x1)){const _0x13b64a=this[_0x389b7b(0x9d)](_0x389b7b(0xd1)+_0x36076c+'-'+_0x5a8c9b);_0x13b64a&&_0x13b64a[_0x389b7b(0x15b)]&&_0x13b64a[_0x389b7b(0x15b)]();break;}}}this[_0x389b7b(0xa0)]({'currentPlayingVideoId':null});}},'onBannerChange'(_0x3bcb5c){const _0x562704=_0x31be10,_0x126572={'TivAJ':_0x562704(0x12d)},_0x25322a=wx['createVideoContext'](_0x126572['TivAJ'],this);_0x25322a[_0x562704(0x14b)]();const _0x5b5df9=this['data'][_0x562704(0x84)];_0x25322a[_0x562704(0x12a)](_0x5b5df9),this['setData']({'currentBanner':_0x3bcb5c[_0x562704(0x146)][_0x562704(0x13e)]});},'onVideoTimeUpdate'(_0x2885d0){const _0x31252f=_0x31be10;this[_0x31252f(0xa0)]({'videoCurrentTime':_0x2885d0[_0x31252f(0x146)]['currentTime']});},'pauseFirstVideo'(){const _0x3bd71a=_0x31be10,_0x332dcc={'RzkJs':_0x3bd71a(0x12d)},_0xc381fd=wx['createVideoContext'](_0x332dcc['RzkJs'],this);_0xc381fd[_0x3bd71a(0x14b)]();},'onBannerScroll'(_0xb82909){const _0x4d996e=_0x31be10,_0x32a155={'ZpJtQ':function(_0xaeb0,_0xd0203b){return _0xaeb0-_0xd0203b;},'rAKXn':function(_0x1b8fc1,_0x26a790){return _0x1b8fc1/_0x26a790;},'RuDOr':function(_0x467c87,_0x54b544){return _0x467c87*_0x54b544;},'ySmmA':function(_0x5d58fb,_0x361a3e){return _0x5d58fb>_0x361a3e;}},_0x5d34ac=Date[_0x4d996e(0x133)]();if(_0x32a155['ZpJtQ'](_0x5d34ac,this[_0x4d996e(0xbf)]||0x0)<0x64)return;this['_lastScrollTime']=_0x5d34ac;const _0x32693e=_0xb82909[_0x4d996e(0x146)]['scrollLeft'],_0x284197=_0x32a155[_0x4d996e(0xf9)](_0x32a155['RuDOr'](wx['getWindowInfo']()['windowWidth'],0x12c),0x2ee),_0x23ad15=_0x284197*0.8;_0x32a155[_0x4d996e(0x12b)](_0x32693e,_0x23ad15)&&this[_0x4d996e(0xe5)]();},'prevBanner'(){const _0x469f9d=_0x31be10,_0x2d7202={'UfhtM':function(_0x226095,_0x332e46){return _0x226095-_0x332e46;},'hnvPr':function(_0x3c53ec,_0x25addc){return _0x3c53ec-_0x25addc;}},_0x303267=this[_0x469f9d(0x123)][_0x469f9d(0xc8)]['banners'][_0x469f9d(0x17e)];let _0x533d64=this[_0x469f9d(0x123)]['currentBanner'];_0x533d64=_0x533d64===0x0?_0x2d7202[_0x469f9d(0x13f)](_0x303267,0x1):_0x2d7202[_0x469f9d(0xf4)](_0x533d64,0x1),this[_0x469f9d(0xa0)]({'currentBanner':_0x533d64});},'nextBanner'(){const _0xa2551a=_0x31be10,_0x3fe9a9={'LIoxE':function(_0x266ea1,_0x49a0af){return _0x266ea1===_0x49a0af;},'TrhUq':function(_0x20e3fa,_0x1a808d){return _0x20e3fa+_0x1a808d;}},_0x3f5f53=this['data'][_0xa2551a(0xc8)][_0xa2551a(0x10a)]['length'];let _0x26a724=this[_0xa2551a(0x123)][_0xa2551a(0xf3)];_0x26a724=_0x3fe9a9[_0xa2551a(0x137)](_0x26a724,_0x3f5f53-0x1)?0x0:_0x3fe9a9[_0xa2551a(0x16e)](_0x26a724,0x1),this[_0xa2551a(0xa0)]({'currentBanner':_0x26a724});},'onVideoPlay'(_0x35cf98){const _0x4cbd25=_0x31be10,_0x37c7f5={'lBKfP':function(_0x17e6e9,_0x4f8be6){return _0x17e6e9!==_0x4f8be6;},'dIWeF':function(_0x48ef3a,_0x4bbdeb){return _0x48ef3a!==_0x4bbdeb;}},_0x513f9a=_0x35cf98[_0x4cbd25(0x146)]['id'],_0x2c5b61=this[_0x4cbd25(0x123)]['currentPlayingVideoId'];if(_0x2c5b61&&_0x37c7f5[_0x4cbd25(0x121)](_0x2c5b61,_0x513f9a)){let _0x40ad4f=null;const _0x43f692=this[_0x4cbd25(0x123)][_0x4cbd25(0x8b)];for(const _0x279b9a in _0x43f692){const _0x55ed54=_0x43f692[_0x279b9a],_0x22683c=_0x55ed54[_0x4cbd25(0xae)](_0x46b88c=>_0x46b88c['post']['id']===_0x2c5b61);if(_0x37c7f5['dIWeF'](_0x22683c,-0x1)){_0x40ad4f=this[_0x4cbd25(0x9d)](_0x4cbd25(0xd1)+_0x279b9a+'-'+_0x22683c);break;}}if(_0x40ad4f)_0x40ad4f[_0x4cbd25(0x15b)]();}this['pauseFirstVideo'](),this[_0x4cbd25(0xa0)]({'currentPlayingVideoId':_0x513f9a});},'onPauseAllVideo'(){const _0x38014a=_0x31be10,_0x2fdb53={'dEDpv':function(_0x35d339,_0x4157b8){return _0x35d339!==_0x4157b8;},'cdVkV':function(_0x3e5b0e,_0x3dcd15){return _0x3e5b0e===_0x3dcd15;},'VzRYo':_0x38014a(0x13a)},_0x224ea3=this[_0x38014a(0x123)][_0x38014a(0x114)];if(_0x224ea3){const _0x572478=this[_0x38014a(0x123)][_0x38014a(0x8b)];for(const _0x1c7520 in _0x572478){const _0x37d286=_0x572478[_0x1c7520];if(!Array['isArray'](_0x37d286))continue;const _0x305337=_0x37d286['findIndex'](_0x485d5b=>_0x485d5b[_0x38014a(0x147)]?.['id']===_0x224ea3);if(_0x2fdb53[_0x38014a(0x8c)](_0x305337,-0x1)){const _0x1cf320=this[_0x38014a(0x9d)](_0x38014a(0xd1)+_0x1c7520+'-'+_0x305337);_0x1cf320&&_0x2fdb53[_0x38014a(0x159)](typeof _0x1cf320['pauseVideo'],_0x2fdb53[_0x38014a(0x160)])&&_0x1cf320[_0x38014a(0x15b)]();break;}}this[_0x38014a(0xa0)]({'currentPlayingVideoId':null});}this[_0x38014a(0xe5)]();},'copyQQNumber'(){const _0x4ee638=_0x31be10,_0x3b71fd={'jDcud':_0x4ee638(0xea),'pkyuC':_0x4ee638(0xe2),'GTtSa':_0x4ee638(0x8f)},_0x5ac874=this[_0x4ee638(0x123)]['introduceInfo']['qq'];if(!_0x5ac874){wx[_0x4ee638(0x109)]({'title':_0x3b71fd['pkyuC'],'icon':_0x3b71fd[_0x4ee638(0xde)]});return;}wx['setClipboardData']({'data':_0x5ac874,'success':()=>{const _0x32f37b=_0x4ee638;wx[_0x32f37b(0x109)]({'title':_0x3b71fd[_0x32f37b(0xed)],'icon':_0x32f37b(0x143)});}});},'onShareTap'(_0xe56985){const _0x59c5ba=_0x31be10,_0x55d3dd={'wEwKz':_0x59c5ba(0xb2),'SeZBx':function(_0x1bc436,_0x1293cd){return _0x1bc436!=_0x1293cd;},'ydfga':_0x59c5ba(0x99),'EwBHJ':_0x59c5ba(0xc7)};this[_0x59c5ba(0xa0)]({'sheetMode':_0x55d3dd['EwBHJ'],'showSheet':!![],'originPost':_0xe56985[_0x59c5ba(0x146)][_0x59c5ba(0xdf)],'commentData':null},()=>{const _0x25190a=_0x59c5ba,_0x79bf29=this[_0x25190a(0x9d)](_0x55d3dd[_0x25190a(0x97)]);_0x79bf29&&(_0x55d3dd['SeZBx'](wx[_0x25190a(0xf8)](_0x55d3dd[_0x25190a(0xbd)]),0x0)&&_0x79bf29['updateSheetPosition'](wx[_0x25190a(0xf8)](_0x55d3dd[_0x25190a(0xbd)])));});},'onCommentTap'(_0x74dedb){const _0x152d6d=_0x31be10;debugger;const _0x42b570=_0x74dedb[_0x152d6d(0x146)][_0x152d6d(0xdf)]['post']['id'];this[_0x152d6d(0x98)](),wx['navigateTo']({'url':_0x152d6d(0xd2)+_0x42b570+'&isCommentIn=true'});},'onCloseSheet'(){const _0x404439=_0x31be10;this[_0x404439(0xa0)]({'showSheet':![]});},'onSubmitSheet'(){const _0x369c74=_0x31be10;this[_0x369c74(0xa0)]({'showSheet':![]});},'chooseTopic'(_0x1bcbe2){const _0x47d715=_0x31be10,_0x41913a={'wRrOP':'../addSubject/addSubject'};this['onPauseAllVideo'](),wx['navigateTo']({'url':_0x41913a[_0x47d715(0x17a)]});}});
|