southnote-mini-sdk 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +1 -22
- package/assets/file/badwords.js +1 -63008
- package/assets/file/rules.js +1 -38
- package/components/bottomSheet/bottomSheet.js +1 -473
- package/components/experience-item/experience-item.js +1 -105
- package/components/grid-item/grid-item.js +1 -8
- package/components/post-item/post-item.js +1 -1086
- package/components/wiki-renderer/wiki-renderer.js +1 -636
- package/components/wiki-tabs/wiki-tabs.js +1 -52
- package/index.js +1 -49
- package/package.json +2 -22
- package/pages/addGame/addGame.js +1 -454
- package/pages/addSubject/addSubject.js +1 -199
- package/pages/commonLogin/commonLogin.js +1 -269
- package/pages/copyOfficial/copyOfficial.js +1 -25
- package/pages/demo/demo.js +1 -23
- package/pages/game/game.js +1 -1305
- package/pages/home/home.js +1 -665
- package/pages/lottery-winners/lottery-winners.js +1 -60
- package/pages/message/messageCommentsAndAt/messageCommentsAndAt.js +1 -178
- package/pages/message/messageEntire/messageEntire.js +1 -112
- package/pages/message/messageLikeAndCollect/messageLikeAndCollect.js +1 -147
- package/pages/message/messageNewFans/messageNewFans.js +1 -139
- package/pages/officialWebview/officialWebview.js +1 -13
- package/pages/post/post.js +1 -1856
- package/pages/post-editor/post-editor.js +1 -465
- package/pages/postDialog/postDialog.js +1 -560
- package/pages/report-category/report-category.js +1 -29
- package/pages/report-form/report-form.js +1 -65
- package/pages/sevenDaySignDetail/sevenDaySignDetail.js +1 -273
- package/pages/topic/topic.js +1 -266
- package/pages/user/user.js +1 -939
- package/pages/userDatum/userDatum.js +1 -24
- package/pages/userGameLib/userGameLib.js +1 -105
- package/pages/webview/webview.js +1 -25
- package/pages/wheelActivivty/wheelActivivty.js +1 -492
- package/pages/wiki/wiki.js +1 -138
- package/request/JKRequest.js +1 -177
- package/services/home.js +1 -603
- package/utils/auth.js +1 -17
- package/utils/base64.js +1 -67
- package/utils/compressImage.js +1 -41
- package/utils/exp.js +1 -49
- package/utils/formatPost.js +1 -18
- package/utils/parseContent.js +1 -191
- package/utils/query-select.js +1 -9
- package/utils/sensitive.js +1 -82
|
@@ -1,560 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
emojiMap
|
|
3
|
-
} from "../../components/post-item/post-item"
|
|
4
|
-
import {
|
|
5
|
-
queryMoreShareComments,
|
|
6
|
-
|
|
7
|
-
} from "../../services/home";
|
|
8
|
-
import formatUTC from "../../utils/formatPost.js"
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
checkLogin
|
|
12
|
-
} from "../../utils/auth"
|
|
13
|
-
|
|
14
|
-
Page({
|
|
15
|
-
data: {
|
|
16
|
-
item: {},
|
|
17
|
-
itemDetial: {},
|
|
18
|
-
postId: 0,
|
|
19
|
-
contentParts: [],
|
|
20
|
-
commentedContentParts: [],
|
|
21
|
-
sharedContentParts: [],
|
|
22
|
-
comments: [],
|
|
23
|
-
likes: [],
|
|
24
|
-
shares: [],
|
|
25
|
-
showFull: false,
|
|
26
|
-
needShowReadMore: false,
|
|
27
|
-
isLongImage: false,
|
|
28
|
-
isSuperLongImage: false,
|
|
29
|
-
isHorizonImage: false,
|
|
30
|
-
loading: true,
|
|
31
|
-
floorPage: 1,
|
|
32
|
-
floorHasMore: true,
|
|
33
|
-
isLoadingMore: false
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
onLoad(options) {
|
|
37
|
-
const postId = options.id;
|
|
38
|
-
const isCommentIn = options.isCommentIn
|
|
39
|
-
this.setData({
|
|
40
|
-
postId,
|
|
41
|
-
isCommentIn
|
|
42
|
-
});
|
|
43
|
-
this.fetchPostDetail(postId).then(res => {
|
|
44
|
-
const currentUserId = wx.getStorageSync('appuid');
|
|
45
|
-
const isOwner = this.data.item.user.id === currentUserId;
|
|
46
|
-
this.setData({
|
|
47
|
-
isOwner
|
|
48
|
-
});
|
|
49
|
-
if (this.data.isCommentIn) {
|
|
50
|
-
this.setData({
|
|
51
|
-
showSheet: true,
|
|
52
|
-
originPost: this.data.item,
|
|
53
|
-
commentData: null
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
onImageLoad(e) {
|
|
60
|
-
const {
|
|
61
|
-
width,
|
|
62
|
-
height
|
|
63
|
-
} = e.detail;
|
|
64
|
-
const ratio = height / width;
|
|
65
|
-
|
|
66
|
-
this.setData({
|
|
67
|
-
isLongImage: ratio > 3 && ratio <= 4,
|
|
68
|
-
isSuperLongImage: ratio > 4,
|
|
69
|
-
isHorizonImage: ratio < 1
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
async fetchPostDetail(postId) {
|
|
74
|
-
try {
|
|
75
|
-
const res = await queryMoreShareComments(postId, 1);
|
|
76
|
-
|
|
77
|
-
if (res.code !== 0 || !Array.isArray(res.data)) {
|
|
78
|
-
this.setData({
|
|
79
|
-
loading: false
|
|
80
|
-
});
|
|
81
|
-
wx.showToast({
|
|
82
|
-
title: '加载失败',
|
|
83
|
-
icon: 'none'
|
|
84
|
-
});
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const dataList = res.data.map(item => this.formatPost(item));
|
|
89
|
-
|
|
90
|
-
// 第一个是楼主
|
|
91
|
-
const mainPostItem = dataList[0];
|
|
92
|
-
// 初始化楼主图片 meta(只取第一张,和你原逻辑一致)
|
|
93
|
-
const mainFirstImg = mainPostItem.post.imageArray?.[0] || null;
|
|
94
|
-
if (mainFirstImg) {
|
|
95
|
-
mainPostItem.imageMeta = {
|
|
96
|
-
src: mainFirstImg,
|
|
97
|
-
isLong: false,
|
|
98
|
-
isSuperLong: false,
|
|
99
|
-
isHorizon: false
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const contentParts = this.injectTitle(
|
|
105
|
-
this.parseContent(mainPostItem.post.content, mainPostItem.post.imageArray),
|
|
106
|
-
mainPostItem.post.title
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
this.initVoteData(mainPostItem.post.vote);
|
|
110
|
-
this.initLotteryData(mainPostItem.post.lottery);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// 剩余楼层
|
|
114
|
-
const floorPosts = dataList.slice(1).map(item => {
|
|
115
|
-
return {
|
|
116
|
-
...item,
|
|
117
|
-
contentParts: this.parseContent(item.post.content)
|
|
118
|
-
};
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
this.setData({
|
|
122
|
-
loading: false,
|
|
123
|
-
item: mainPostItem,
|
|
124
|
-
contentParts,
|
|
125
|
-
floorPosts
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
} catch (err) {
|
|
129
|
-
this.setData({
|
|
130
|
-
loading: false
|
|
131
|
-
});
|
|
132
|
-
console.error('加载帖子详情失败:', err);
|
|
133
|
-
wx.showToast({
|
|
134
|
-
title: '加载失败',
|
|
135
|
-
icon: 'none'
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
onReachBottom() {
|
|
141
|
-
this.loadMoreFloors();
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
async loadMoreFloors() {
|
|
145
|
-
if (this.data.isLoadingMore || !this.data.floorHasMore) return;
|
|
146
|
-
|
|
147
|
-
this.setData({
|
|
148
|
-
isLoadingMore: true
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
const nextPage = this.data.floorPage + 1;
|
|
152
|
-
|
|
153
|
-
try {
|
|
154
|
-
const res = await queryMoreShareComments(this.data.postId, nextPage);
|
|
155
|
-
|
|
156
|
-
if (res.code !== 0 || !Array.isArray(res.data) || res.data.length === 0) {
|
|
157
|
-
this.setData({
|
|
158
|
-
floorHasMore: false,
|
|
159
|
-
isLoadingMore: false
|
|
160
|
-
});
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
const newFloors = res.data.map(item => {
|
|
165
|
-
const formatted = this.formatPost(item);
|
|
166
|
-
return {
|
|
167
|
-
...formatted,
|
|
168
|
-
contentParts: this.parseContent(formatted.post.content)
|
|
169
|
-
};
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
this.setData({
|
|
173
|
-
floorPosts: this.data.floorPosts.concat(newFloors),
|
|
174
|
-
floorPage: nextPage,
|
|
175
|
-
isLoadingMore: true
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// 如果这页数据量很少,认为没更多了
|
|
179
|
-
if (res.data.length < 15) {
|
|
180
|
-
this.setData({
|
|
181
|
-
floorHasMore: false
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
} catch (err) {
|
|
186
|
-
console.error('加载更多失败', err);
|
|
187
|
-
} finally {
|
|
188
|
-
this.setData({
|
|
189
|
-
isLoadingMore: false
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
initVoteData(vote) {
|
|
194
|
-
if (!vote) return;
|
|
195
|
-
|
|
196
|
-
const userVotes = vote.user_votes || [];
|
|
197
|
-
const isVoted = userVotes.length > 0;
|
|
198
|
-
const isVoteEnded = Date.now() > vote.end_time * 1000;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
// 处理选项
|
|
202
|
-
const voteOptions = vote.options.map(o => ({
|
|
203
|
-
...o,
|
|
204
|
-
_selected: userVotes.includes(o.id),
|
|
205
|
-
vote_count: o.vote_count || 0
|
|
206
|
-
}));
|
|
207
|
-
|
|
208
|
-
const hasAnyImage = voteOptions.some(o => o.option_image); // 假设选项图片字段是 o.image
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
// 如果已投票,计算百分比
|
|
212
|
-
if (isVoted || isVoteEnded) {
|
|
213
|
-
const total = voteOptions.reduce((sum, o) => sum + o.vote_count, 0);
|
|
214
|
-
voteOptions.forEach(o => {
|
|
215
|
-
o.percent = total > 0 ? ((o.vote_count / total) * 100).toFixed(1) : '0.0';
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
this.setData({
|
|
220
|
-
voteOptions,
|
|
221
|
-
isVoted,
|
|
222
|
-
selectedVotes: [],
|
|
223
|
-
isVoteEnded: Date.now() > vote.end_time * 1000,
|
|
224
|
-
voteEndTime: vote.end_time ? this.formatTime(vote.end_time) : null,
|
|
225
|
-
voteTitle: this.getVoteTitle(isVoted, vote),
|
|
226
|
-
showVoteImages: hasAnyImage
|
|
227
|
-
|
|
228
|
-
});
|
|
229
|
-
},
|
|
230
|
-
getVoteTitle(isVoted, vote) {
|
|
231
|
-
const typeName = vote.max_choices === 1 ? "单选" : `${vote.max_choices}选`;
|
|
232
|
-
this.setData({
|
|
233
|
-
typeName: typeName
|
|
234
|
-
})
|
|
235
|
-
|
|
236
|
-
if (Date.now() > vote.end_time * 1000) {
|
|
237
|
-
return `投票已结束`;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
return isVoted ? `已投票` : `参与投票`;
|
|
241
|
-
},
|
|
242
|
-
formatTime(ts) {
|
|
243
|
-
const d = new Date(ts * 1000);
|
|
244
|
-
|
|
245
|
-
const Y = d.getFullYear();
|
|
246
|
-
const M = String(d.getMonth() + 1).padStart(2, '0');
|
|
247
|
-
const D = String(d.getDate()).padStart(2, '0');
|
|
248
|
-
const h = String(d.getHours()).padStart(2, '0');
|
|
249
|
-
const m = String(d.getMinutes()).padStart(2, '0');
|
|
250
|
-
|
|
251
|
-
return `${Y}-${M}-${D} ${h}:${m}`;
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
initLotteryData(lottery) {
|
|
255
|
-
if (!lottery) return;
|
|
256
|
-
|
|
257
|
-
const now = Date.now() / 1000;
|
|
258
|
-
const isEnded = now > lottery.end_time;
|
|
259
|
-
|
|
260
|
-
const conditionTextMap = {
|
|
261
|
-
1: '评论此贴',
|
|
262
|
-
2: '转发此贴',
|
|
263
|
-
3: '评论并转发此贴',
|
|
264
|
-
4: '发表话题',
|
|
265
|
-
5: '关注作者',
|
|
266
|
-
6: '关注游戏'
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
const lotteryConditions = (lottery.conditions || []).map((cond, idx) => {
|
|
270
|
-
let parts = [];
|
|
271
|
-
|
|
272
|
-
switch (cond.condition_type) {
|
|
273
|
-
case 1:
|
|
274
|
-
case 2:
|
|
275
|
-
case 3:
|
|
276
|
-
case 5:
|
|
277
|
-
parts.push({
|
|
278
|
-
text: conditionTextMap[cond.condition_type],
|
|
279
|
-
color: '#333',
|
|
280
|
-
clickable: false
|
|
281
|
-
});
|
|
282
|
-
break;
|
|
283
|
-
|
|
284
|
-
case 4: // 发表话题
|
|
285
|
-
parts.push({
|
|
286
|
-
text: '发表话题',
|
|
287
|
-
color: '#333',
|
|
288
|
-
clickable: false
|
|
289
|
-
});
|
|
290
|
-
parts.push({
|
|
291
|
-
text: `#${cond.condition_value}#`,
|
|
292
|
-
color: '#406ce3',
|
|
293
|
-
clickable: true,
|
|
294
|
-
data: {
|
|
295
|
-
type: 'topic',
|
|
296
|
-
name: cond.condition_value
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
break;
|
|
300
|
-
|
|
301
|
-
case 6: // 关注游戏
|
|
302
|
-
parts.push({
|
|
303
|
-
text: '关注游戏',
|
|
304
|
-
color: '#333',
|
|
305
|
-
clickable: false
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
parts.push({
|
|
310
|
-
text: `$${cond.condition_value.game_name}`,
|
|
311
|
-
color: '#406ce3',
|
|
312
|
-
clickable: true,
|
|
313
|
-
data: {
|
|
314
|
-
type: 'game',
|
|
315
|
-
id: cond.condition_value.game_id
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
return {
|
|
322
|
-
index: idx + 1,
|
|
323
|
-
parts
|
|
324
|
-
};
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
this.setData({
|
|
328
|
-
lotteryInfo: {
|
|
329
|
-
...lottery,
|
|
330
|
-
isEnded,
|
|
331
|
-
winnerCount: lottery.winner_count,
|
|
332
|
-
conditions: lotteryConditions,
|
|
333
|
-
endTimeText: this.formatTime(lottery.end_time)
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
},
|
|
337
|
-
|
|
338
|
-
// 点击抽奖条件(话题/游戏)
|
|
339
|
-
onLotteryConditionTap(e) {
|
|
340
|
-
const {
|
|
341
|
-
type,
|
|
342
|
-
name,
|
|
343
|
-
id
|
|
344
|
-
} = e.currentTarget.dataset;
|
|
345
|
-
if (!type) return;
|
|
346
|
-
|
|
347
|
-
if (type === 'topic') {
|
|
348
|
-
wx.navigateTo({
|
|
349
|
-
url: `../topic/topic?topic_name=${encodeURIComponent(name)}`
|
|
350
|
-
});
|
|
351
|
-
} else if (type === 'game') {
|
|
352
|
-
wx.navigateTo({
|
|
353
|
-
url: `../game/game?id=${id}`
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
// 查看中奖名单
|
|
359
|
-
// 查看中奖名单
|
|
360
|
-
onViewWinners() {
|
|
361
|
-
if (!checkLogin()) return;
|
|
362
|
-
const postItem = this.data.item;
|
|
363
|
-
|
|
364
|
-
// 构造抽奖公示页需要的最小帖子对象
|
|
365
|
-
const post = {
|
|
366
|
-
id: postItem.post.id,
|
|
367
|
-
user_id: postItem.user.id, // 发帖人 id(用于判断发起人)
|
|
368
|
-
nickname: postItem.user.nickname, // 发帖人昵称
|
|
369
|
-
avatar: postItem.user.avatar, // 发帖人头像
|
|
370
|
-
cover: postItem.post.imageArray?.[0] || '', // 帖子图(第一张)
|
|
371
|
-
content: postItem.post.content // 帖子内容
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
wx.navigateTo({
|
|
375
|
-
url: `../lottery-winners/lottery-winners?post=${encodeURIComponent(
|
|
376
|
-
JSON.stringify(post)
|
|
377
|
-
)}`
|
|
378
|
-
});
|
|
379
|
-
},
|
|
380
|
-
injectTitle(parts, title) {
|
|
381
|
-
if (!title) return parts;
|
|
382
|
-
parts.unshift({
|
|
383
|
-
text: title,
|
|
384
|
-
color: '#000',
|
|
385
|
-
type: 'title'
|
|
386
|
-
});
|
|
387
|
-
parts.splice(1, 0, {
|
|
388
|
-
type: 'br'
|
|
389
|
-
});
|
|
390
|
-
return parts;
|
|
391
|
-
},
|
|
392
|
-
|
|
393
|
-
// 以下解析、点赞、收藏、关注、投票、评论等逻辑保留
|
|
394
|
-
parseContent(content, images = [], isShared) {
|
|
395
|
-
const parts = [];
|
|
396
|
-
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;
|
|
397
|
-
let lastIndex = 0,
|
|
398
|
-
match;
|
|
399
|
-
while ((match = regex.exec(content)) !== null) {
|
|
400
|
-
if (match.index > lastIndex) {
|
|
401
|
-
const plainText = content.slice(lastIndex, match.index);
|
|
402
|
-
this.pushWithLineBreak(parts, plainText);
|
|
403
|
-
}
|
|
404
|
-
if (match[1]) parts.push({
|
|
405
|
-
text: match[1],
|
|
406
|
-
color: '#406ce3',
|
|
407
|
-
type: 'topic'
|
|
408
|
-
});
|
|
409
|
-
else if (match[2]) parts.push({
|
|
410
|
-
text: `@${match[3]}`,
|
|
411
|
-
color: '#406ce3',
|
|
412
|
-
type: 'at',
|
|
413
|
-
userId: match[4]
|
|
414
|
-
});
|
|
415
|
-
else if (match[5]) parts.push({
|
|
416
|
-
text: '[图片]',
|
|
417
|
-
src: match[5],
|
|
418
|
-
type: 'img'
|
|
419
|
-
});
|
|
420
|
-
else if (match[6]) parts.push({
|
|
421
|
-
text: match[6],
|
|
422
|
-
src: match[6],
|
|
423
|
-
type: 'click_img'
|
|
424
|
-
});
|
|
425
|
-
else if (match[7]) parts.push({
|
|
426
|
-
text: match[7],
|
|
427
|
-
color: '#999'
|
|
428
|
-
});
|
|
429
|
-
else if (match[8]) parts.push({
|
|
430
|
-
text: '',
|
|
431
|
-
src: match[8],
|
|
432
|
-
type: 'local_img'
|
|
433
|
-
});
|
|
434
|
-
else if (match[9]) parts.push({
|
|
435
|
-
text: '§网页链接',
|
|
436
|
-
url: match[9],
|
|
437
|
-
type: 'jump_url',
|
|
438
|
-
color: '#406ce3'
|
|
439
|
-
});
|
|
440
|
-
else if (match[10]) {
|
|
441
|
-
const code = match[10].match(/\[\/(\d+)\]/)[1];
|
|
442
|
-
const file = emojiMap[code];
|
|
443
|
-
parts.push(file ? {
|
|
444
|
-
type: 'emoji',
|
|
445
|
-
src: `../../assets/images/emoji/${file}`
|
|
446
|
-
} : {
|
|
447
|
-
text: match[10],
|
|
448
|
-
color: '#333'
|
|
449
|
-
});
|
|
450
|
-
} else if (match[11] && match[12]) parts.push({
|
|
451
|
-
text: `$${match[11]}`,
|
|
452
|
-
gameId: match[12],
|
|
453
|
-
type: 'game',
|
|
454
|
-
color: '#406ce3'
|
|
455
|
-
});
|
|
456
|
-
else if (match[0] === '<font bold=true>') parts.push({
|
|
457
|
-
text: '',
|
|
458
|
-
bold: true
|
|
459
|
-
});
|
|
460
|
-
else if (match[0] === '<font bold=false>') parts.push({
|
|
461
|
-
text: '',
|
|
462
|
-
bold: false
|
|
463
|
-
});
|
|
464
|
-
else if (match[0] === '<sign_line>') parts.push({
|
|
465
|
-
text: '————',
|
|
466
|
-
type: 'line'
|
|
467
|
-
});
|
|
468
|
-
else if (match[0] === '<feature_blog>') parts.push({
|
|
469
|
-
text: '[加精]',
|
|
470
|
-
type: 'feature'
|
|
471
|
-
});
|
|
472
|
-
lastIndex = regex.lastIndex;
|
|
473
|
-
}
|
|
474
|
-
if (lastIndex < content?.length) this.pushWithLineBreak(parts, content.slice(lastIndex));
|
|
475
|
-
if (isShared && images.length) images.forEach(src => parts.push({
|
|
476
|
-
type: 'image',
|
|
477
|
-
text: '[查看图片]',
|
|
478
|
-
color: '#406ce3',
|
|
479
|
-
src
|
|
480
|
-
}));
|
|
481
|
-
return parts;
|
|
482
|
-
},
|
|
483
|
-
|
|
484
|
-
pushWithLineBreak(parts, text) {
|
|
485
|
-
const segments = text.split(/(\r\n|\n|\r)/);
|
|
486
|
-
segments.forEach(seg => {
|
|
487
|
-
if (seg.match(/\r\n|\n|\r/)) parts.push({
|
|
488
|
-
type: 'br'
|
|
489
|
-
});
|
|
490
|
-
else if (seg.length > 0) parts.push({
|
|
491
|
-
text: seg,
|
|
492
|
-
color: '#333'
|
|
493
|
-
});
|
|
494
|
-
});
|
|
495
|
-
},
|
|
496
|
-
|
|
497
|
-
formatPost(item) {
|
|
498
|
-
const newItem = {
|
|
499
|
-
...item,
|
|
500
|
-
post: {
|
|
501
|
-
...item.post,
|
|
502
|
-
formatTime: formatUTC(item.post.created_at),
|
|
503
|
-
imageArray: item.post.images ? item.post.images.split(',') : []
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
if (item.shared && item.shared.post) {
|
|
507
|
-
newItem.shared = {
|
|
508
|
-
...item.shared,
|
|
509
|
-
post: {
|
|
510
|
-
...item.shared.post,
|
|
511
|
-
formatTime: formatUTC(item.shared.post.created_at),
|
|
512
|
-
imageArray: item.shared.post.images ? item.shared.post.images.split(',') : []
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
return newItem;
|
|
517
|
-
},
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
onPartTap(e) {
|
|
521
|
-
const {
|
|
522
|
-
type,
|
|
523
|
-
id,
|
|
524
|
-
text
|
|
525
|
-
} = e.currentTarget.dataset;
|
|
526
|
-
switch (type) {
|
|
527
|
-
case 'topic':
|
|
528
|
-
const topicText = text;
|
|
529
|
-
const topicName = topicText.replace(/#/g, ''); // 去掉首尾 #
|
|
530
|
-
wx.navigateTo({
|
|
531
|
-
url: `../topic/topic?topic_name=${encodeURIComponent(topicName)}`
|
|
532
|
-
});
|
|
533
|
-
break;
|
|
534
|
-
|
|
535
|
-
case 'at':
|
|
536
|
-
wx.navigateTo({
|
|
537
|
-
url: `../user/user?id=${id}`
|
|
538
|
-
});
|
|
539
|
-
break;
|
|
540
|
-
|
|
541
|
-
case 'game':
|
|
542
|
-
wx.navigateTo({
|
|
543
|
-
url: `../game/game?id=${id}`
|
|
544
|
-
});
|
|
545
|
-
break;
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
},
|
|
549
|
-
|
|
550
|
-
onJumpUrlTap(e) {
|
|
551
|
-
const url = e.currentTarget.dataset.url;
|
|
552
|
-
|
|
553
|
-
if (!url) return;
|
|
554
|
-
|
|
555
|
-
wx.navigateTo({
|
|
556
|
-
url: `../webview/webview?url=${encodeURIComponent(url)}`
|
|
557
|
-
});
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
});
|
|
1
|
+
(function(_0x47c988,_0x50161a){const _0x1bd149=_0x4aac,_0x5359df=_0x47c988();while(!![]){try{const _0xa56dcf=parseInt(_0x1bd149(0x175))/0x1*(-parseInt(_0x1bd149(0x189))/0x2)+parseInt(_0x1bd149(0x171))/0x3*(parseInt(_0x1bd149(0x191))/0x4)+-parseInt(_0x1bd149(0x1aa))/0x5*(parseInt(_0x1bd149(0x165))/0x6)+-parseInt(_0x1bd149(0x199))/0x7+-parseInt(_0x1bd149(0x151))/0x8+parseInt(_0x1bd149(0x158))/0x9+-parseInt(_0x1bd149(0x1a0))/0xa*(-parseInt(_0x1bd149(0x11a))/0xb);if(_0xa56dcf===_0x50161a)break;else _0x5359df['push'](_0x5359df['shift']());}catch(_0x93ceba){_0x5359df['push'](_0x5359df['shift']());}}}(_0x495d,0x1fb2b));import{emojiMap}from'../../components/post-item/post-item';import{queryMoreShareComments}from'../../services/home';function _0x495d(){const _0x3383d9=['AxnmB2fKAw5Ntw9Yzq','DxjS','yxbWDwLK','zM9YrwfJAa','DxnLCG','BM93','zM9YBwf0ug9ZDa','AgLAz0C','twDZB2K','BMf2AwDHDgvuBW','C3bSAwnL','mtuYmZi3nendvvfJza','B3b0Aw9Ux2LTywDL','zNftq0C','BgLUzq','lI4VD2vIDMLLDY93zwj2Awv3p3vYBd0','y2XPy2TFAw1N','BuT2BKW','AxrLBq','z2v0u3rVCMfNzvn5BMm','BM9Uzq','zgf0yq','v2XpCuG','m1LyBuXWzG','zxjYB3i','rwTgEg8','zgf0yxnLDa','nwr5sKTOta','A2zfBfy','5ywZ5RoO5RI45OIp','Bg90DgvYEq','D2LUBMvYx2nVDw50','DxnLCL92B3rLCW','qvnLyvi','BMvfAgK','z2v0sg91CNm','Bw9wAfe','C2XPy2u','Cg9ZDa','lI4Vz2fTzs9Nyw1Lp2LKpq','z2v0rNvSBfLLyxi','zxHLyW','y29Uy2f0','sLreDMy','Dg9WAwm','EfHYBeu','wevTv2q','otG5mJb0vgfpqLa','z2v0twLUDxrLCW','z2fTzq','Aw1Hz2u','z2v0rgf0zq','tePdzhC','zw5Kx3rPBwu','C3bSAxq','odC3mtG4svH3vMPu','y29UzgL0Aw9Ux3r5Cgu','5BEY5OQv56wO','z2fTzv9Pza','Bwz1yKC','uxnwsuG','Aw5Qzwn0vgL0Bgu','uNLhqKe','mty2mJuWn1HbrhfJCq','Bwf0y2G','Bwf4x2nOB2LJzxm','Aw5PDeXVDhrLCNLeyxrH','DgL0Bgu','DgHLBG','pgzVBNqGyM9Szd1MywXZzt4','mtbQvMzmzgK','zMv0y2HqB3n0rgv0ywLS','s3LoyMi','u25bCxi','EKjxEeK','WQFNVzhPOBxPK77MJQu','C29Tzq','DM90zq','mc4W','y3vYCMvUDfrHCMDLDa','nwL3z3rxBa','veHLsfe','ANvTCf91CMW','iZqWnMnLmW','lI4VBg90DgvYEs13Aw5UzxjZl2XVDhrLCNKTD2LUBMvYCZ9WB3n0pq','AxndB21Tzw50sw4','zMvHDhvYzq','BgfZDeLUzgv4','z2v0vM90zvrPDgXL','5y+c5lIo5OQv56wO','B3b0Aw9UCW','BwfW','Bg9Hze1VCMvgBg9VCNm','teLWCvm','Aw5PDfzVDgveyxrH','lI4VDxnLCI91C2vYp2LKpq','vhLwqvO','6k+e6k665BM26l2S5y+r5Q2K6ls0','uM9YDMO','pgzLyxr1CMvFyMXVzZ4','sfbOCuS','odG1nZCZowHWzeT0rW','DwvNs2K','CgfYC2vdB250zw50','C2v0rgf0yq','v25KDee','BgvUz3rO','zgv0ywLS','ChvZAa','5yQG6l295PU05AsA5AsX6lsL','y3jLyxrLzf9HDa','CgvYy2vUDa','C2HVD1rVyxn0','Aw1Hz2vZ','r2nHtuu','y29UzgL0Aw9Ux3zHBhvL','z2fTzv9Uyw1L','5yQG6l295AsX6lsL','ChvZAfDPDgHmAw5LqNjLywS','sw9RAwW','tKjSB3y','Aw1Hz2vbCNjHEq','A2nPDg0','thnJvK4','ywPos3a','5OQv56wO5BEY57Ut5P2F','6k+e6k665Q2K6ls0','y29Kzq','z2v0tw9UDgG','y29UzgL0Aw9UCW','Cfbhse8','Aw5KzxG','CMHTv3e','C3rYAw5NAwz5','zMXVB3jqB3n0CW','iZaWma','iZmZmW','zw1VAMK','v0vjCe8','5ywZ5RoO5l2C6icf','AxnbCNjHEq','C2HHCMvK','q1Hhzu4','zMXVB3jqywDL','y29UDgvUDa','phnPz25FBgLUzt4','Dw5ZAgLMDa','rKHqEve','whnABfy','CgfKu3rHCNq','tNvgt1u','suPvCeS','wujwq1G','Dg9gAxHLza','CMvWBgfJzq','rvb3ExC','mtyZotm2mfnSvK1lva','lI4VDg9WAwmVDg9WAwm/Dg9WAwnFBMfTzt0','D2nlr00','vg16Aeq','DM90zv9JB3vUDa','6l2S5y+r5Q2K6ls0','qwjSEe8','ndqWmdaXsMPdzunm','Aw5JBhvKzxm'];_0x495d=function(){return _0x3383d9;};return _0x495d();}import _0x445aee from'../../utils/formatPost.js';function _0x4aac(_0x2fbd03,_0x249bc0){_0x2fbd03=_0x2fbd03-0x10b;const _0x495d29=_0x495d();let _0x4aaca9=_0x495d29[_0x2fbd03];if(_0x4aac['WfZneb']===undefined){var _0x31b9b5=function(_0x890b82){const _0x1460ea='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47acc4='',_0x4ba7ed='';for(let _0x24e679=0x0,_0x139905,_0x3df3ec,_0x39cc4a=0x0;_0x3df3ec=_0x890b82['charAt'](_0x39cc4a++);~_0x3df3ec&&(_0x139905=_0x24e679%0x4?_0x139905*0x40+_0x3df3ec:_0x3df3ec,_0x24e679++%0x4)?_0x47acc4+=String['fromCharCode'](0xff&_0x139905>>(-0x2*_0x24e679&0x6)):0x0){_0x3df3ec=_0x1460ea['indexOf'](_0x3df3ec);}for(let _0x1ce819=0x0,_0x127165=_0x47acc4['length'];_0x1ce819<_0x127165;_0x1ce819++){_0x4ba7ed+='%'+('00'+_0x47acc4['charCodeAt'](_0x1ce819)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ba7ed);};_0x4aac['dAkXUW']=_0x31b9b5,_0x4aac['GBCled']={},_0x4aac['WfZneb']=!![];}const _0x12305a=_0x495d29[0x0],_0x555fb9=_0x2fbd03+_0x12305a,_0x5740eb=_0x4aac['GBCled'][_0x555fb9];return!_0x5740eb?(_0x4aaca9=_0x4aac['dAkXUW'](_0x4aaca9),_0x4aac['GBCled'][_0x555fb9]=_0x4aaca9):_0x4aaca9=_0x5740eb,_0x4aaca9;}import{checkLogin}from'../../utils/auth';Page({'data':{'item':{},'itemDetial':{},'postId':0x0,'contentParts':[],'commentedContentParts':[],'sharedContentParts':[],'comments':[],'likes':[],'shares':[],'showFull':![],'needShowReadMore':![],'isLongImage':![],'isSuperLongImage':![],'isHorizonImage':![],'loading':!![],'floorPage':0x1,'floorHasMore':!![],'isLoadingMore':![]},'onLoad'(_0x5e1eec){const _0x26e308=_0x4aac,_0x39561e={'VIUTe':_0x26e308(0x15c),'THeHQ':function(_0x978a5c,_0x598d2e){return _0x978a5c===_0x598d2e;}},_0x53df38=_0x5e1eec['id'],_0x14b669=_0x5e1eec['isCommentIn'];this[_0x26e308(0x11d)]({'postId':_0x53df38,'isCommentIn':_0x14b669}),this[_0x26e308(0x1a1)](_0x53df38)[_0x26e308(0x19e)](_0x4f8af3=>{const _0x14115e=_0x26e308,_0x5aac53=wx[_0x14115e(0x16d)](_0x39561e['VIUTe']),_0x2ee1a6=_0x39561e[_0x14115e(0x1ab)](this['data'][_0x14115e(0x16c)][_0x14115e(0x15e)]['id'],_0x5aac53);this['setData']({'isOwner':_0x2ee1a6}),this['data'][_0x14115e(0x1af)]&&this[_0x14115e(0x11d)]({'showSheet':!![],'originPost':this[_0x14115e(0x16f)]['item'],'commentData':null});});},'onImageLoad'(_0x318b65){const _0x5356af=_0x4aac,_0x5d234c={'NBlov':function(_0x107e49,_0x371e3b){return _0x107e49/_0x371e3b;},'FHPyQ':function(_0x562e2c,_0x4ece1a){return _0x562e2c>_0x4ece1a;},'PiHRA':function(_0x48603d,_0x4c3860){return _0x48603d<=_0x4c3860;}},{width:_0x3ab767,height:_0x22a1f4}=_0x318b65[_0x5356af(0x120)],_0x3664f8=_0x5d234c[_0x5356af(0x12d)](_0x22a1f4,_0x3ab767);this[_0x5356af(0x11d)]({'isLongImage':_0x5d234c[_0x5356af(0x148)](_0x3664f8,0x3)&&_0x5d234c['PiHRA'](_0x3664f8,0x4),'isSuperLongImage':_0x3664f8>0x4,'isHorizonImage':_0x3664f8<0x1});},async 'fetchPostDetail'(_0x288936){const _0x61676c=_0x4aac,_0x41e394={'XEmWd':_0x61676c(0x12a),'lbeSH':'加载帖子详情失败:','xXrlE':'none'};try{const _0x5be46d=await queryMoreShareComments(_0x288936,0x1);if(_0x5be46d[_0x61676c(0x134)]!==0x0||!Array[_0x61676c(0x141)](_0x5be46d[_0x61676c(0x16f)])){this[_0x61676c(0x11d)]({'loading':![]}),wx[_0x61676c(0x125)]({'title':_0x41e394['XEmWd'],'icon':_0x61676c(0x16e)});return;}const _0x1356b3=_0x5be46d['data'][_0x61676c(0x110)](_0x35ba7e=>this['formatPost'](_0x35ba7e)),_0x431dea=_0x1356b3[0x0],_0x1e2834=_0x431dea[_0x61676c(0x180)]['imageArray']?.[0x0]||null;_0x1e2834&&(_0x431dea['imageMeta']={'src':_0x1e2834,'isLong':![],'isSuperLong':![],'isHorizon':![]});const _0xae50b=this[_0x61676c(0x197)](this[_0x61676c(0x11c)](_0x431dea['post'][_0x61676c(0x145)],_0x431dea[_0x61676c(0x180)][_0x61676c(0x12e)]),_0x431dea[_0x61676c(0x180)][_0x61676c(0x19d)]);this[_0x61676c(0x113)](_0x431dea[_0x61676c(0x180)][_0x61676c(0x1a7)]),this[_0x61676c(0x19c)](_0x431dea[_0x61676c(0x180)][_0x61676c(0x178)]);const _0x189b48=_0x1356b3['slice'](0x1)[_0x61676c(0x110)](_0x30b869=>{const _0x3e82f4=_0x61676c;return{..._0x30b869,'contentParts':this['parseContent'](_0x30b869[_0x3e82f4(0x180)]['content'])};});this[_0x61676c(0x11d)]({'loading':![],'item':_0x431dea,'contentParts':_0xae50b,'floorPosts':_0x189b48});}catch(_0x3f4dfd){this[_0x61676c(0x11d)]({'loading':![]}),console[_0x61676c(0x172)](_0x41e394['lbeSH'],_0x3f4dfd),wx['showToast']({'title':_0x41e394[_0x61676c(0x188)],'icon':_0x41e394[_0x61676c(0x187)]});}},'onReachBottom'(){const _0x46b84d=_0x4aac;this[_0x46b84d(0x111)]();},async 'loadMoreFloors'(){const _0x180fa7=_0x4aac,_0x112fd6={'Mgsoi':function(_0xf5dad7,_0x29c2ef,_0x2427ac){return _0xf5dad7(_0x29c2ef,_0x2427ac);},'KJDmc':function(_0x4f3607,_0x49e7f0){return _0x4f3607!==_0x49e7f0;},'JTDvf':function(_0x2bd6d2,_0x22efc1){return _0x2bd6d2<_0x22efc1;}};if(this['data'][_0x180fa7(0x15a)]||!this[_0x180fa7(0x16f)]['floorHasMore'])return;this['setData']({'isLoadingMore':!![]});const _0x4dab91=this[_0x180fa7(0x16f)][_0x180fa7(0x144)]+0x1;try{const _0x3f4eae=await _0x112fd6[_0x180fa7(0x162)](queryMoreShareComments,this[_0x180fa7(0x16f)]['postId'],_0x4dab91);if(_0x112fd6['KJDmc'](_0x3f4eae['code'],0x0)||!Array[_0x180fa7(0x141)](_0x3f4eae['data'])||_0x3f4eae['data'][_0x180fa7(0x11f)]===0x0){this[_0x180fa7(0x11d)]({'floorHasMore':![],'isLoadingMore':![]});return;}const _0x1a0bbd=_0x3f4eae['data'][_0x180fa7(0x110)](_0x535693=>{const _0x52bd7e=_0x180fa7,_0x29ea1b=this[_0x52bd7e(0x160)](_0x535693);return{..._0x29ea1b,'contentParts':this[_0x52bd7e(0x11c)](_0x29ea1b[_0x52bd7e(0x180)][_0x52bd7e(0x145)])};});this[_0x180fa7(0x11d)]({'floorPosts':this[_0x180fa7(0x16f)][_0x180fa7(0x13b)][_0x180fa7(0x184)](_0x1a0bbd),'floorPage':_0x4dab91,'isLoadingMore':!![]}),_0x112fd6[_0x180fa7(0x185)](_0x3f4eae[_0x180fa7(0x16f)][_0x180fa7(0x11f)],0xf)&&this[_0x180fa7(0x11d)]({'floorHasMore':![]});}catch(_0x4265bb){console[_0x180fa7(0x172)](_0x180fa7(0x122),_0x4265bb);}finally{this[_0x180fa7(0x11d)]({'isLoadingMore':![]});}},'initVoteData'(_0x12f266){const _0x3a5fc6=_0x4aac,_0x34065d={'moVhQ':function(_0x1b44fe,_0x3b5461){return _0x1b44fe*_0x3b5461;},'IJUpK':function(_0x2057c1,_0x288362){return _0x2057c1/_0x288362;},'CXGeN':_0x3a5fc6(0x1a8),'uegKi':function(_0x2e01bd,_0xb7f702){return _0x2e01bd>_0xb7f702;},'ASeaR':function(_0x2dbb1b,_0xf6d00e){return _0x2dbb1b*_0xf6d00e;},'cdSPK':function(_0x5b3fd9,_0x35497f){return _0x5b3fd9||_0x35497f;},'rhmWq':function(_0x711075,_0x2d1bb5){return _0x711075>_0x2d1bb5;}};if(!_0x12f266)return;const _0x55d296=_0x12f266[_0x3a5fc6(0x17a)]||[],_0x1a000e=_0x34065d['uegKi'](_0x55d296['length'],0x0),_0x3541a6=_0x34065d[_0x3a5fc6(0x11b)](Date['now'](),_0x34065d[_0x3a5fc6(0x17b)](_0x12f266[_0x3a5fc6(0x18f)],0x3e8)),_0x1e0aef=_0x12f266[_0x3a5fc6(0x10f)][_0x3a5fc6(0x110)](_0x14169d=>({..._0x14169d,'_selected':_0x55d296[_0x3a5fc6(0x159)](_0x14169d['id']),'vote_count':_0x14169d['vote_count']||0x0})),_0x33816a=_0x1e0aef[_0x3a5fc6(0x1a6)](_0x46096f=>_0x46096f[_0x3a5fc6(0x166)]);if(_0x34065d['cdSPK'](_0x1a000e,_0x3541a6)){const _0x7b736d=_0x1e0aef['reduce']((_0x3bad9f,_0x5fba9d)=>_0x3bad9f+_0x5fba9d['vote_count'],0x0);_0x1e0aef[_0x3a5fc6(0x15d)](_0x1ef37a=>{const _0xb2b224=_0x3a5fc6;_0x1ef37a[_0xb2b224(0x124)]=_0x7b736d>0x0?_0x34065d[_0xb2b224(0x17e)](_0x34065d[_0xb2b224(0x14c)](_0x1ef37a[_0xb2b224(0x155)],_0x7b736d),0x64)[_0xb2b224(0x14e)](0x1):_0x34065d[_0xb2b224(0x143)];});}this[_0x3a5fc6(0x11d)]({'voteOptions':_0x1e0aef,'isVoted':_0x1a000e,'selectedVotes':[],'isVoteEnded':_0x34065d[_0x3a5fc6(0x139)](Date[_0x3a5fc6(0x15f)](),_0x34065d['moVhQ'](_0x12f266[_0x3a5fc6(0x18f)],0x3e8)),'voteEndTime':_0x12f266[_0x3a5fc6(0x18f)]?this['formatTime'](_0x12f266[_0x3a5fc6(0x18f)]):null,'voteTitle':this[_0x3a5fc6(0x10d)](_0x1a000e,_0x12f266),'showVoteImages':_0x33816a});},'getVoteTitle'(_0x47bb68,_0x10c672){const _0x52ba18=_0x4aac,_0x2c49d6={'QdeIJ':function(_0x538393,_0x4b7599){return _0x538393===_0x4b7599;},'hOaTH':function(_0x3d9975,_0x44cb48){return _0x3d9975*_0x44cb48;}},_0x54a499=_0x2c49d6['QdeIJ'](_0x10c672['max_choices'],0x1)?'单选':_0x10c672[_0x52ba18(0x19b)]+'选';this[_0x52ba18(0x11d)]({'typeName':_0x54a499});if(Date[_0x52ba18(0x15f)]()>_0x2c49d6['hOaTH'](_0x10c672[_0x52ba18(0x18f)],0x3e8))return _0x52ba18(0x132);return _0x47bb68?_0x52ba18(0x193):_0x52ba18(0x10e);},'formatTime'(_0x11c144){const _0x1d6052=_0x4aac,_0x5b4176={'XGTnD':function(_0x5c88eb,_0x36bd65){return _0x5c88eb+_0x36bd65;},'mfubG':function(_0x544c95,_0x3ffce4){return _0x544c95(_0x3ffce4);}},_0x3ecb91=new Date(_0x11c144*0x3e8),_0x2dbd13=_0x3ecb91[_0x1d6052(0x182)](),_0xef0615=String(_0x5b4176['XGTnD'](_0x3ecb91[_0x1d6052(0x135)](),0x1))['padStart'](0x2,'0'),_0x4c5c63=_0x5b4176[_0x1d6052(0x195)](String,_0x3ecb91[_0x1d6052(0x18d)]())[_0x1d6052(0x14a)](0x2,'0'),_0x3942f0=_0x5b4176[_0x1d6052(0x195)](String,_0x3ecb91[_0x1d6052(0x17d)]())[_0x1d6052(0x14a)](0x2,'0'),_0x220925=_0x5b4176[_0x1d6052(0x195)](String,_0x3ecb91[_0x1d6052(0x18a)]())[_0x1d6052(0x14a)](0x2,'0');return _0x2dbd13+'-'+_0xef0615+'-'+_0x4c5c63+'\x20'+_0x3942f0+':'+_0x220925;},'initLotteryData'(_0x566b68){const _0x326b13=_0x4aac,_0x1c99fa={'AblxO':_0x326b13(0x13d),'WlOqH':'发表话题','EPwyw':'#406ce3','QsVIH':_0x326b13(0x186),'RyGBA':_0x326b13(0x177),'JQFIk':'game','SnAqr':function(_0x3142b6,_0x45f717){return _0x3142b6+_0x45f717;},'nHdgG':function(_0x2cf615,_0x3fd146){return _0x2cf615>_0x3fd146;},'neEhi':_0x326b13(0x156),'WndtA':_0x326b13(0x140)};if(!_0x566b68)return;const _0x3c8225=Date[_0x326b13(0x15f)]()/0x3e8,_0x40d892=_0x1c99fa['nHdgG'](_0x3c8225,_0x566b68[_0x326b13(0x18f)]),_0x3822cf={0x1:_0x326b13(0x133),0x2:_0x1c99fa[_0x326b13(0x17c)],0x3:_0x326b13(0x116),0x4:_0x1c99fa[_0x326b13(0x170)],0x5:_0x1c99fa[_0x326b13(0x11e)],0x6:_0x1c99fa['RyGBA']},_0x56e37a=(_0x566b68[_0x326b13(0x136)]||[])[_0x326b13(0x110)]((_0x19703d,_0x348c26)=>{const _0x491ac3=_0x326b13;let _0x29245e=[];switch(_0x19703d[_0x491ac3(0x192)]){case 0x1:case 0x2:case 0x3:case 0x5:_0x29245e['push']({'text':_0x3822cf[_0x19703d[_0x491ac3(0x192)]],'color':_0x1c99fa['AblxO'],'clickable':![]});break;case 0x4:_0x29245e[_0x491ac3(0x121)]({'text':_0x1c99fa[_0x491ac3(0x170)],'color':_0x1c99fa[_0x491ac3(0x157)],'clickable':![]}),_0x29245e[_0x491ac3(0x121)]({'text':'#'+_0x19703d['condition_value']+'#','color':_0x1c99fa[_0x491ac3(0x150)],'clickable':!![],'data':{'type':_0x1c99fa[_0x491ac3(0x196)],'name':_0x19703d[_0x491ac3(0x128)]}});break;case 0x6:_0x29245e[_0x491ac3(0x121)]({'text':_0x1c99fa[_0x491ac3(0x198)],'color':_0x1c99fa[_0x491ac3(0x157)],'clickable':![]}),_0x29245e[_0x491ac3(0x121)]({'text':'$'+_0x19703d[_0x491ac3(0x128)][_0x491ac3(0x129)],'color':_0x1c99fa[_0x491ac3(0x150)],'clickable':!![],'data':{'type':_0x1c99fa['JQFIk'],'id':_0x19703d[_0x491ac3(0x128)][_0x491ac3(0x194)]}});break;}return{'index':_0x1c99fa[_0x491ac3(0x1a3)](_0x348c26,0x1),'parts':_0x29245e};});this[_0x326b13(0x11d)]({'lotteryInfo':{..._0x566b68,'isEnded':_0x40d892,'winnerCount':_0x566b68[_0x326b13(0x179)],'conditions':_0x56e37a,'endTimeText':this['formatTime'](_0x566b68[_0x326b13(0x18f)])}});},'onLotteryConditionTap'(_0x329af2){const _0x104c8c=_0x4aac,_0x156484={'ogiDf':_0x104c8c(0x186),'XsZlV':function(_0x51dfa8,_0x239c26){return _0x51dfa8===_0x239c26;},'LscVN':'game'},{type:_0x1870a1,name:_0x46b94d,id:_0x318170}=_0x329af2['currentTarget']['dataset'];if(!_0x1870a1)return;if(_0x1870a1===_0x156484['ogiDf'])wx['navigateTo']({'url':_0x104c8c(0x152)+encodeURIComponent(_0x46b94d)});else _0x156484[_0x104c8c(0x149)](_0x1870a1,_0x156484[_0x104c8c(0x130)])&&wx[_0x104c8c(0x163)]({'url':_0x104c8c(0x181)+_0x318170});},'onViewWinners'(){const _0x4d9e4d=_0x4aac,_0x2d4151={'WEIpO':function(_0x1aa343,_0x5207fb){return _0x1aa343(_0x5207fb);}};if(!checkLogin())return;const _0x1c709f=this['data']['item'],_0x22a8a5={'id':_0x1c709f[_0x4d9e4d(0x180)]['id'],'user_id':_0x1c709f[_0x4d9e4d(0x15e)]['id'],'nickname':_0x1c709f[_0x4d9e4d(0x15e)]['nickname'],'avatar':_0x1c709f[_0x4d9e4d(0x15e)]['avatar'],'cover':_0x1c709f['post'][_0x4d9e4d(0x12e)]?.[0x0]||'','content':_0x1c709f[_0x4d9e4d(0x180)][_0x4d9e4d(0x145)]};wx[_0x4d9e4d(0x163)]({'url':_0x4d9e4d(0x1ae)+_0x2d4151[_0x4d9e4d(0x13f)](encodeURIComponent,JSON[_0x4d9e4d(0x13a)](_0x22a8a5))});},'injectTitle'(_0x32c07d,_0x232b27){const _0x4729bd=_0x4aac,_0x330f0a={'zBWxI':_0x4729bd(0x19d)};if(!_0x232b27)return _0x32c07d;return _0x32c07d[_0x4729bd(0x147)]({'text':_0x232b27,'color':_0x4729bd(0x13c),'type':_0x330f0a[_0x4729bd(0x1a4)]}),_0x32c07d[_0x4729bd(0x164)](0x1,0x0,{'type':'br'}),_0x32c07d;},'parseContent'(_0x132676,_0x2d50ed=[],_0x2747f2){const _0x3af191=_0x4aac,_0x6ef68c={'LJCdw':function(_0x5d2499,_0x4bb965){return _0x5d2499!==_0x4bb965;},'HPhqK':function(_0x496f23,_0x50a66c){return _0x496f23>_0x50a66c;},'hiZgG':_0x3af191(0x186),'xajSc':'[图片]','TmzhD':_0x3af191(0x16a),'wcKGM':'#999','kfElV':_0x3af191(0x1a5),'Iokil':_0x3af191(0x1ac),'EkFxo':_0x3af191(0x1ad),'NuFOU':_0x3af191(0x13e),'KyNbb':_0x3af191(0x13d),'XwCgK':_0x3af191(0x18b),'CVAzg':function(_0x1c0842,_0x65d6ba){return _0x1c0842===_0x65d6ba;},'pPGHO':'<font\x20bold=true>','kcitm':function(_0x4dc36c,_0x27da51){return _0x4dc36c===_0x27da51;},'ajNKp':_0x3af191(0x146),'YBVCX':'————','mKvnL':_0x3af191(0x168),'Dfbwr':function(_0x36af59,_0x1aa0ff){return _0x36af59===_0x1aa0ff;},'fqSCG':_0x3af191(0x118),'WSRHe':'[加精]','LIpqS':_0x3af191(0x10b),'LiycF':function(_0x57d728,_0x186b6c){return _0x57d728<_0x186b6c;}},_0x545495=[],_0x39a560=/(#[^#]+#)|(\{@(.*?)\|(\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 _0x1a20f3=0x0,_0x2037e6;while(_0x6ef68c[_0x3af191(0x18e)](_0x2037e6=_0x39a560[_0x3af191(0x183)](_0x132676),null)){if(_0x6ef68c[_0x3af191(0x119)](_0x2037e6[_0x3af191(0x138)],_0x1a20f3)){const _0x4f8dc5=_0x132676[_0x3af191(0x17f)](_0x1a20f3,_0x2037e6['index']);this['pushWithLineBreak'](_0x545495,_0x4f8dc5);}if(_0x2037e6[0x1])_0x545495[_0x3af191(0x121)]({'text':_0x2037e6[0x1],'color':_0x3af191(0x1ad),'type':_0x6ef68c[_0x3af191(0x161)]});else{if(_0x2037e6[0x2])_0x545495[_0x3af191(0x121)]({'text':'@'+_0x2037e6[0x3],'color':_0x3af191(0x1ad),'type':'at','userId':_0x2037e6[0x4]});else{if(_0x2037e6[0x5])_0x545495[_0x3af191(0x121)]({'text':_0x6ef68c['xajSc'],'src':_0x2037e6[0x5],'type':'img'});else{if(_0x2037e6[0x6])_0x545495[_0x3af191(0x121)]({'text':_0x2037e6[0x6],'src':_0x2037e6[0x6],'type':_0x6ef68c[_0x3af191(0x154)]});else{if(_0x2037e6[0x7])_0x545495[_0x3af191(0x121)]({'text':_0x2037e6[0x7],'color':_0x6ef68c[_0x3af191(0x153)]});else{if(_0x2037e6[0x8])_0x545495[_0x3af191(0x121)]({'text':'','src':_0x2037e6[0x8],'type':'local_img'});else{if(_0x2037e6[0x9])_0x545495[_0x3af191(0x121)]({'text':_0x6ef68c[_0x3af191(0x176)],'url':_0x2037e6[0x9],'type':_0x6ef68c[_0x3af191(0x12c)],'color':_0x6ef68c[_0x3af191(0x173)]});else{if(_0x2037e6[0xa]){const _0x1a3e98=_0x2037e6[0xa][_0x3af191(0x19a)](/\[\/(\d+)\]/)[0x1],_0x4cd332=emojiMap[_0x1a3e98];_0x545495[_0x3af191(0x121)](_0x4cd332?{'type':_0x6ef68c[_0x3af191(0x14b)],'src':'../../assets/images/emoji/'+_0x4cd332}:{'text':_0x2037e6[0xa],'color':_0x6ef68c[_0x3af191(0x1a2)]});}else{if(_0x2037e6[0xb]&&_0x2037e6[0xc])_0x545495[_0x3af191(0x121)]({'text':'$'+_0x2037e6[0xb],'gameId':_0x2037e6[0xc],'type':_0x6ef68c['XwCgK'],'color':_0x3af191(0x1ad)});else{if(_0x6ef68c['CVAzg'](_0x2037e6[0x0],_0x6ef68c[_0x3af191(0x137)]))_0x545495[_0x3af191(0x121)]({'text':'','bold':!![]});else{if(_0x6ef68c[_0x3af191(0x12f)](_0x2037e6[0x0],_0x3af191(0x19f)))_0x545495[_0x3af191(0x121)]({'text':'','bold':![]});else{if(_0x6ef68c['kcitm'](_0x2037e6[0x0],_0x6ef68c[_0x3af191(0x131)]))_0x545495[_0x3af191(0x121)]({'text':_0x6ef68c[_0x3af191(0x14d)],'type':_0x6ef68c[_0x3af191(0x16b)]});else{if(_0x6ef68c['Dfbwr'](_0x2037e6[0x0],_0x6ef68c[_0x3af191(0x167)]))_0x545495['push']({'text':_0x6ef68c['WSRHe'],'type':_0x6ef68c[_0x3af191(0x112)]});}}}}}}}}}}}}_0x1a20f3=_0x39a560[_0x3af191(0x10c)];}if(_0x6ef68c['LiycF'](_0x1a20f3,_0x132676?.[_0x3af191(0x11f)]))this[_0x3af191(0x12b)](_0x545495,_0x132676[_0x3af191(0x17f)](_0x1a20f3));if(_0x2747f2&&_0x2d50ed[_0x3af191(0x11f)])_0x2d50ed[_0x3af191(0x15d)](_0x34c4c1=>_0x545495['push']({'type':_0x3af191(0x18c),'text':'[查看图片]','color':_0x3af191(0x1ad),'src':_0x34c4c1}));return _0x545495;},'pushWithLineBreak'(_0x5ceb9f,_0x4e9585){const _0x473eb5=_0x4aac,_0x19026b={'GcaME':function(_0x54c250,_0x183f5e){return _0x54c250>_0x183f5e;},'prUNc':_0x473eb5(0x13d)},_0x3e0a1f=_0x4e9585[_0x473eb5(0x190)](/(\r\n|\n|\r)/);_0x3e0a1f[_0x473eb5(0x15d)](_0xcbb9da=>{const _0x310570=_0x473eb5;if(_0xcbb9da[_0x310570(0x19a)](/\r\n|\n|\r/))_0x5ceb9f[_0x310570(0x121)]({'type':'br'});else{if(_0x19026b[_0x310570(0x127)](_0xcbb9da[_0x310570(0x11f)],0x0))_0x5ceb9f[_0x310570(0x121)]({'text':_0xcbb9da,'color':_0x19026b['prUNc']});}});},'formatPost'(_0x1b7ff7){const _0x564abd=_0x4aac,_0x5a8b9c={'TyVAZ':function(_0x22410b,_0x336a42){return _0x22410b(_0x336a42);}},_0x4b4b64={..._0x1b7ff7,'post':{..._0x1b7ff7[_0x564abd(0x180)],'formatTime':_0x5a8b9c[_0x564abd(0x115)](_0x445aee,_0x1b7ff7[_0x564abd(0x180)][_0x564abd(0x123)]),'imageArray':_0x1b7ff7[_0x564abd(0x180)][_0x564abd(0x126)]?_0x1b7ff7[_0x564abd(0x180)][_0x564abd(0x126)]['split'](','):[]}};return _0x1b7ff7[_0x564abd(0x142)]&&_0x1b7ff7['shared'][_0x564abd(0x180)]&&(_0x4b4b64[_0x564abd(0x142)]={..._0x1b7ff7[_0x564abd(0x142)],'post':{..._0x1b7ff7[_0x564abd(0x142)][_0x564abd(0x180)],'formatTime':_0x5a8b9c[_0x564abd(0x115)](_0x445aee,_0x1b7ff7[_0x564abd(0x142)][_0x564abd(0x180)][_0x564abd(0x123)]),'imageArray':_0x1b7ff7['shared'][_0x564abd(0x180)][_0x564abd(0x126)]?_0x1b7ff7[_0x564abd(0x142)][_0x564abd(0x180)]['images'][_0x564abd(0x190)](','):[]}}),_0x4b4b64;},'onPartTap'(_0x848ccc){const _0xa60451=_0x4aac,_0x5ec439={'CHNuV':_0xa60451(0x186)},{type:_0x849fff,id:_0x3b78a5,text:_0x937609}=_0x848ccc[_0xa60451(0x1a9)][_0xa60451(0x174)];switch(_0x849fff){case _0x5ec439['CHNuV']:const _0x42919f=_0x937609,_0x3808e7=_0x42919f[_0xa60451(0x14f)](/#/g,'');wx['navigateTo']({'url':_0xa60451(0x152)+encodeURIComponent(_0x3808e7)});break;case'at':wx['navigateTo']({'url':_0xa60451(0x114)+_0x3b78a5});break;case _0xa60451(0x18b):wx[_0xa60451(0x163)]({'url':_0xa60451(0x181)+_0x3b78a5});break;}},'onJumpUrlTap'(_0x779c22){const _0x4b9e2e=_0x4aac,_0x73ce82={'Rorvj':function(_0x145bb0,_0x55cc5b){return _0x145bb0(_0x55cc5b);}},_0x5273e6=_0x779c22[_0x4b9e2e(0x1a9)][_0x4b9e2e(0x174)][_0x4b9e2e(0x15b)];if(!_0x5273e6)return;wx[_0x4b9e2e(0x163)]({'url':_0x4b9e2e(0x169)+_0x73ce82[_0x4b9e2e(0x117)](encodeURIComponent,_0x5273e6)});}});
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
Page({
|
|
2
|
-
data: {
|
|
3
|
-
categories: [
|
|
4
|
-
'涉及政治敏感内容',
|
|
5
|
-
'涉及色情低俗内容',
|
|
6
|
-
'涉及违禁品',
|
|
7
|
-
'涉及未成年人有害信息',
|
|
8
|
-
'涉及垃圾或广告内容',
|
|
9
|
-
'涉及人身攻击、谩骂内容',
|
|
10
|
-
'涉及抄袭或侵权内容',
|
|
11
|
-
'引战',
|
|
12
|
-
'涉及企业侵权内容',
|
|
13
|
-
'其他'
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
onLoad(options) {
|
|
18
|
-
this.postId = options.postId; // 保存一下,等下继续传
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
onTap(e) {
|
|
22
|
-
const idx = e.currentTarget.dataset.index;
|
|
23
|
-
const category = this.data.categories[idx] || '';
|
|
24
|
-
// 跳转到举报填写页,并传递分类名称(作为 query)
|
|
25
|
-
wx.navigateTo({
|
|
26
|
-
url: `../report-form/report-form?category=${encodeURIComponent(category)}&postId=${this.postId}&nType=${idx+1}`
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
1
|
+
const _0x59e974=_0x208b;function _0x208b(_0x513ffa,_0x2c9ceb){_0x513ffa=_0x513ffa-0x163;const _0x395491=_0x3954();let _0x208b5c=_0x395491[_0x513ffa];if(_0x208b['DjewcK']===undefined){var _0x323507=function(_0x38874a){const _0x38a631='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x240898='',_0x1f0ed6='';for(let _0x5f2aba=0x0,_0x5888e7,_0xce9657,_0x3ce8a6=0x0;_0xce9657=_0x38874a['charAt'](_0x3ce8a6++);~_0xce9657&&(_0x5888e7=_0x5f2aba%0x4?_0x5888e7*0x40+_0xce9657:_0xce9657,_0x5f2aba++%0x4)?_0x240898+=String['fromCharCode'](0xff&_0x5888e7>>(-0x2*_0x5f2aba&0x6)):0x0){_0xce9657=_0x38a631['indexOf'](_0xce9657);}for(let _0x20d186=0x0,_0x323cab=_0x240898['length'];_0x20d186<_0x323cab;_0x20d186++){_0x1f0ed6+='%'+('00'+_0x240898['charCodeAt'](_0x20d186)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f0ed6);};_0x208b['AFvLNt']=_0x323507,_0x208b['YyDrEr']={},_0x208b['DjewcK']=!![];}const _0x272e08=_0x395491[0x0],_0x27fcc9=_0x513ffa+_0x272e08,_0x459c74=_0x208b['YyDrEr'][_0x27fcc9];return!_0x459c74?(_0x208b5c=_0x208b['AFvLNt'](_0x208b5c),_0x208b['YyDrEr'][_0x27fcc9]=_0x208b5c):_0x208b5c=_0x459c74,_0x208b5c;}(function(_0x35769c,_0xca26fe){const _0x3f0a0e=_0x208b,_0x2f5648=_0x35769c();while(!![]){try{const _0xd36443=parseInt(_0x3f0a0e(0x169))/0x1*(parseInt(_0x3f0a0e(0x16e))/0x2)+parseInt(_0x3f0a0e(0x170))/0x3*(-parseInt(_0x3f0a0e(0x16c))/0x4)+parseInt(_0x3f0a0e(0x17b))/0x5*(parseInt(_0x3f0a0e(0x179))/0x6)+-parseInt(_0x3f0a0e(0x165))/0x7*(-parseInt(_0x3f0a0e(0x167))/0x8)+-parseInt(_0x3f0a0e(0x17a))/0x9+parseInt(_0x3f0a0e(0x178))/0xa+-parseInt(_0x3f0a0e(0x171))/0xb;if(_0xd36443===_0xca26fe)break;else _0x2f5648['push'](_0x2f5648['shift']());}catch(_0x113902){_0x2f5648['push'](_0x2f5648['shift']());}}}(_0x3954,0x7de24),Page({'data':{'categories':[_0x59e974(0x176),_0x59e974(0x168),_0x59e974(0x16a),_0x59e974(0x163),_0x59e974(0x177),'涉及人身攻击、谩骂内容',_0x59e974(0x17c),'引战','涉及企业侵权内容','其他']},'onLoad'(_0x59fead){const _0x2dceda=_0x59e974;this[_0x2dceda(0x164)]=_0x59fead['postId'];},'onTap'(_0x25a09c){const _0x530c76=_0x59e974,_0x2f6823={'Hnqvq':function(_0x4b1c43,_0x282ca6){return _0x4b1c43+_0x282ca6;}},_0x210bbe=_0x25a09c['currentTarget'][_0x530c76(0x16d)][_0x530c76(0x166)],_0x3810bb=this[_0x530c76(0x16f)][_0x530c76(0x175)][_0x210bbe]||'';wx[_0x530c76(0x172)]({'url':'../report-form/report-form?category='+encodeURIComponent(_0x3810bb)+_0x530c76(0x174)+this[_0x530c76(0x164)]+_0x530c76(0x16b)+_0x2f6823[_0x530c76(0x173)](_0x210bbe,0x1)});}}));function _0x3954(){const _0x29f2d8=['mJe2otrAC1f1rKK','zgf0yq','mty3ntG1mvbyzxj5tq','mtaXodqYmJL3uenAv2K','BMf2AwDHDgvuBW','sg5XDNe','jNbVC3rjzd0','y2f0zwDVCMLLCW','5RAj5y+k5Ps/5Rk75Pwp5OsF5yAf5A65','5RAj5y+k5z6d5zY+5OIw5BM/5zgk5yAf5A65','odi2ode0mfjRB0Lrza','mJG4rvfluvHy','ntG5ntqXnhnQqvvUzW','odi2mdvRv01kD3O','5RAj5y+k5OQe6kkT5OIw5l615P2d5yAf5A65','5RAj5y+k5PYQ5OIq5BM05lQ65PYj5A6Z5l+H5OgV','Cg9ZDeLK','nty1mJu5mxDUyuHnzW','Aw5KzxG','ohz6wgLzCa','5RAj5y+k6iMY5Oof5l2o5l+x5yAf5A65','mJfMwfnlwhy','5RAj5y+k6l+D56Ab5zob','jM5uExbLpq','ngPdrfvVuG','zgf0yxnLDa'];_0x3954=function(){return _0x29f2d8;};return _0x3954();}
|