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,65 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
reportPost
|
|
3
|
-
} from "../../services/home"
|
|
4
|
-
|
|
5
|
-
Page({
|
|
6
|
-
data: {
|
|
7
|
-
category: '',
|
|
8
|
-
description: ''
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
onLoad(options) {
|
|
13
|
-
if (options && options.category) {
|
|
14
|
-
if (options.postId) {
|
|
15
|
-
this.setData({
|
|
16
|
-
postId: options.postId,
|
|
17
|
-
nType: options.nType
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
const category = decodeURIComponent(options.category);
|
|
21
|
-
this.setData({
|
|
22
|
-
category
|
|
23
|
-
});
|
|
24
|
-
wx.setNavigationBarTitle({
|
|
25
|
-
title: category
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onInputDescription(e) {
|
|
32
|
-
this.setData({
|
|
33
|
-
description: e.detail.value.slice(0, 500)
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onSubmit() {
|
|
39
|
-
const {
|
|
40
|
-
description
|
|
41
|
-
} = this.data;
|
|
42
|
-
if (!description.trim()) {
|
|
43
|
-
wx.showToast({
|
|
44
|
-
title: '请填写举报理由',
|
|
45
|
-
icon: 'none'
|
|
46
|
-
});
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
let nType = this.data.nType == '10' ? '100' : this.data.nType
|
|
50
|
-
reportPost(this.data.postId, nType, this.data.description).then(res => {
|
|
51
|
-
wx.showToast({
|
|
52
|
-
title: '举报已提交',
|
|
53
|
-
icon: 'success'
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
setTimeout(() => {
|
|
57
|
-
wx.navigateBack({
|
|
58
|
-
delta: 2
|
|
59
|
-
});
|
|
60
|
-
}, 800);
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
1
|
+
function _0x2f92(_0x16a548,_0x3da958){_0x16a548=_0x16a548-0xe7;const _0x179328=_0x1793();let _0x2f9232=_0x179328[_0x16a548];if(_0x2f92['FgetBw']===undefined){var _0x4ab754=function(_0x55537c){const _0x172abd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x44e6a2='',_0x5ef914='';for(let _0x299014=0x0,_0x5b1c97,_0x91b49e,_0x5761b5=0x0;_0x91b49e=_0x55537c['charAt'](_0x5761b5++);~_0x91b49e&&(_0x5b1c97=_0x299014%0x4?_0x5b1c97*0x40+_0x91b49e:_0x91b49e,_0x299014++%0x4)?_0x44e6a2+=String['fromCharCode'](0xff&_0x5b1c97>>(-0x2*_0x299014&0x6)):0x0){_0x91b49e=_0x172abd['indexOf'](_0x91b49e);}for(let _0x56e683=0x0,_0x3d0a83=_0x44e6a2['length'];_0x56e683<_0x3d0a83;_0x56e683++){_0x5ef914+='%'+('00'+_0x44e6a2['charCodeAt'](_0x56e683)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ef914);};_0x2f92['uuwJbx']=_0x4ab754,_0x2f92['YjGcQF']={},_0x2f92['FgetBw']=!![];}const _0x36f74d=_0x179328[0x0],_0xd4d1b0=_0x16a548+_0x36f74d,_0x505fc6=_0x2f92['YjGcQF'][_0xd4d1b0];return!_0x505fc6?(_0x2f9232=_0x2f92['uuwJbx'](_0x2f9232),_0x2f92['YjGcQF'][_0xd4d1b0]=_0x2f9232):_0x2f9232=_0x505fc6,_0x2f9232;}(function(_0x57ddab,_0x74b5e0){const _0x532032=_0x2f92,_0x27772c=_0x57ddab();while(!![]){try{const _0x45ae1b=parseInt(_0x532032(0xe9))/0x1+parseInt(_0x532032(0xf5))/0x2+-parseInt(_0x532032(0xf6))/0x3*(-parseInt(_0x532032(0xef))/0x4)+-parseInt(_0x532032(0xe8))/0x5+parseInt(_0x532032(0x101))/0x6*(-parseInt(_0x532032(0xfe))/0x7)+parseInt(_0x532032(0xf8))/0x8*(parseInt(_0x532032(0xf2))/0x9)+-parseInt(_0x532032(0xfb))/0xa;if(_0x45ae1b===_0x74b5e0)break;else _0x27772c['push'](_0x27772c['shift']());}catch(_0x3ad6dd){_0x27772c['push'](_0x27772c['shift']());}}}(_0x1793,0xbb199));function _0x1793(){const _0x59ab78=['DhjPBq','C2XPy2u','mJHtqvPXCwK','rwjTDfe','BM9Uzq','mtyZndy0nNnIqvfIwq','DMfSDwu','zgvZy3jPChrPB24','mZC2mtuXnwHNy0zqwq','mtiZotiYofnhCvzNwa','wxrdBhu','Cg9ZDeLK','y2f0zwDVCNK','D3bKu28','BLr5Cgu','odrQsgnpC2u','zgv0ywLS','mtaW','mtCXzvv6uff2','BMf2AwDHDgvcywnR','C2HVD1rVyxn0','mZyXodeWyMXqwwrl','nZu2nZHZEvfXs2i','C2v0rgf0yq','mZK1odmYBMXyBejX','zgf0yq','6k+35AgR5yAz5lI+5OQL55cg55sX','mJGXntuYmg5pzuPNAq'];_0x1793=function(){return _0x59ab78;};return _0x1793();}import{reportPost}from'../../services/home';Page({'data':{'category':'','description':''},'onLoad'(_0x234ea7){const _0x556dec=_0x2f92,_0x1fa227={'YtClu':function(_0x3649fd,_0x2b21c1){return _0x3649fd(_0x2b21c1);}};if(_0x234ea7&&_0x234ea7[_0x556dec(0xec)]){_0x234ea7[_0x556dec(0xeb)]&&this[_0x556dec(0xf7)]({'postId':_0x234ea7['postId'],'nType':_0x234ea7[_0x556dec(0xee)]});const _0x1d65de=_0x1fa227[_0x556dec(0xea)](decodeURIComponent,_0x234ea7[_0x556dec(0xec)]);this['setData']({'category':_0x1d65de}),wx['setNavigationBarTitle']({'title':_0x1d65de});}},'onInputDescription'(_0x10f876){const _0x4f8d06=_0x2f92;this[_0x4f8d06(0xf7)]({'description':_0x10f876[_0x4f8d06(0xf0)][_0x4f8d06(0x102)][_0x4f8d06(0xfd)](0x0,0x1f4)});},'onSubmit'(){const _0x18d2d2=_0x2f92,_0x1f5edc={'dOARZ':'success','wpdSo':_0x18d2d2(0xfa),'cBmqc':_0x18d2d2(0x100),'EbmtQ':_0x18d2d2(0xf1),'yxYhd':function(_0x5a6df5,_0x2692eb,_0x465c81,_0x4e6e0c){return _0x5a6df5(_0x2692eb,_0x465c81,_0x4e6e0c);}},{description:_0x54f8b4}=this[_0x18d2d2(0xf9)];if(!_0x54f8b4[_0x18d2d2(0xfc)]()){wx['showToast']({'title':_0x1f5edc[_0x18d2d2(0xed)],'icon':_0x1f5edc['cBmqc']});return;}let _0x5d74ac=this['data'][_0x18d2d2(0xee)]=='10'?_0x1f5edc[_0x18d2d2(0xff)]:this[_0x18d2d2(0xf9)][_0x18d2d2(0xee)];_0x1f5edc['yxYhd'](reportPost,this[_0x18d2d2(0xf9)][_0x18d2d2(0xeb)],_0x5d74ac,this['data'][_0x18d2d2(0xe7)])['then'](_0x47edf4=>{const _0x5707e9=_0x18d2d2;wx[_0x5707e9(0xf4)]({'title':'举报已提交','icon':_0x1f5edc['dOARZ']}),setTimeout(()=>{const _0x2bed71=_0x5707e9;wx[_0x2bed71(0xf3)]({'delta':0x2});},0x320);});}});
|
|
@@ -1,273 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
queryGameActivityInfo
|
|
3
|
-
} from "../../services/home";
|
|
4
|
-
|
|
5
|
-
Page({
|
|
6
|
-
data: {
|
|
7
|
-
detail: {},
|
|
8
|
-
loading: true,
|
|
9
|
-
|
|
10
|
-
// 视图衍生字段
|
|
11
|
-
rewardsList: [], // 数组形式排序后的 day 对象
|
|
12
|
-
signedCount: 0,
|
|
13
|
-
daysLeft: 0,
|
|
14
|
-
descList: [],
|
|
15
|
-
timeRange: ''
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
onLoad(options) {
|
|
19
|
-
const activity_id = options.activity_id;
|
|
20
|
-
this.loadDetail(activity_id);
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
/* 加载详情并格式化数据 */
|
|
24
|
-
loadDetail(activity_id) {
|
|
25
|
-
this.setData({
|
|
26
|
-
loading: true
|
|
27
|
-
});
|
|
28
|
-
queryGameActivityInfo(activity_id).then(res => {
|
|
29
|
-
// 假设接口返回结构同你贴出的示例
|
|
30
|
-
const payload = res.data || res;
|
|
31
|
-
|
|
32
|
-
// 你示例是 { code:0, data: { ... } } 风格
|
|
33
|
-
const data = payload.data || payload;
|
|
34
|
-
|
|
35
|
-
// 设置基础 detail
|
|
36
|
-
this.setData({
|
|
37
|
-
detail: data || {}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// 处理奖励对象(rewards:{ day1: {...}, day2: {...} ... })
|
|
41
|
-
const rewardsObj = (data.rewards) || {};
|
|
42
|
-
const rewardsList = [];
|
|
43
|
-
|
|
44
|
-
// 将 day1..dayN 按天数顺序转换为数组
|
|
45
|
-
Object.keys(rewardsObj).forEach(key => {
|
|
46
|
-
const m = key.match(/^day(\d+)$/);
|
|
47
|
-
if (m) {
|
|
48
|
-
const idx = parseInt(m[1], 10);
|
|
49
|
-
const item = rewardsObj[key] || {};
|
|
50
|
-
// 归一化字段
|
|
51
|
-
rewardsList.push({
|
|
52
|
-
dayKey: key,
|
|
53
|
-
index: idx,
|
|
54
|
-
is_signed: item.is_signed || 0,
|
|
55
|
-
item_image: item.item_image || '',
|
|
56
|
-
item_name: item.item_name || '',
|
|
57
|
-
cdkCount: (item.cdk && item.cdk[0] && item.cdk[0].count) ? item.cdk[0].count : 0,
|
|
58
|
-
raw: item
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// 按 index 排序升序(day1, day2..)
|
|
64
|
-
rewardsList.sort((a, b) => a.index - b.index);
|
|
65
|
-
|
|
66
|
-
// 计算已累计签到天数(统计 is_signed === 1)
|
|
67
|
-
const signedCount = rewardsList.reduce((s, it) => s + (it.is_signed === 1 ? 1 : 0), 0);
|
|
68
|
-
|
|
69
|
-
// 计算距离结束还剩多少天(end_time 为秒级字符串)
|
|
70
|
-
const nowSec = Math.floor(Date.now() / 1000);
|
|
71
|
-
const endTimeSec = parseInt(data.end_time || 0, 10);
|
|
72
|
-
let daysLeft = 0;
|
|
73
|
-
if (endTimeSec > nowSec) {
|
|
74
|
-
// 计算剩余整天数(向上取整)
|
|
75
|
-
daysLeft = Math.ceil((endTimeSec - nowSec) / 86400);
|
|
76
|
-
} else {
|
|
77
|
-
daysLeft = 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// 标注哪个是当前可领取的 day(signedCount + 1)
|
|
81
|
-
const nextIndex = signedCount + 1;
|
|
82
|
-
const formattedRewards = rewardsList.map(it => {
|
|
83
|
-
const btnLabel = (it.is_signed === 1) ? '查看奖励' :
|
|
84
|
-
(it.index === nextIndex ? '立即领取' : `第${it.index}天`);
|
|
85
|
-
// border 激活条件:可领取当天显示 #eca900 边框
|
|
86
|
-
const borderActive = (it.is_signed !== 1 && it.index === nextIndex);
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
...it,
|
|
90
|
-
btnLabel,
|
|
91
|
-
borderActive
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// 解析 activity_desc
|
|
96
|
-
const descList = this.parseDescToList(data.activity_desc || '');
|
|
97
|
-
// 格式化活动时间显示(YYYY-MM-DD)
|
|
98
|
-
const start = this.formatDateFromSec(data.start_time);
|
|
99
|
-
const end = this.formatDateFromSec(data.end_time);
|
|
100
|
-
const timeRange = `${start}-${end}`;
|
|
101
|
-
|
|
102
|
-
this.setData({
|
|
103
|
-
loading: false,
|
|
104
|
-
rewardsList: formattedRewards,
|
|
105
|
-
signedCount,
|
|
106
|
-
daysLeft,
|
|
107
|
-
descList,
|
|
108
|
-
timeRange
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
}).catch(err => {
|
|
112
|
-
console.error(err);
|
|
113
|
-
wx.showToast({
|
|
114
|
-
title: '加载失败',
|
|
115
|
-
icon: 'none'
|
|
116
|
-
});
|
|
117
|
-
this.setData({
|
|
118
|
-
loading: false
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
/* 点击奖励单元(整个 cell)*/
|
|
124
|
-
onTapRewardCell(e) {
|
|
125
|
-
// 如果用户点 cell(而不是按钮),我们和按钮逻辑一致:判断状态
|
|
126
|
-
const day = e.currentTarget.dataset.day;
|
|
127
|
-
this._handleRewardAction(parseInt(day, 10));
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
/* 点击单元内按钮(阻止事件冒泡)*/
|
|
131
|
-
onTapCellButton(e) {
|
|
132
|
-
e.stopPropagation && e.stopPropagation();
|
|
133
|
-
const idx = parseInt(e.currentTarget.dataset.index, 10);
|
|
134
|
-
this._handleRewardAction(idx);
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
/* 统一处理领取 / 查看 / 未到的逻辑 */
|
|
138
|
-
_handleRewardAction(dayIndex) {
|
|
139
|
-
const rl = this.data.rewardsList;
|
|
140
|
-
const item = rl.find(x => x.index === dayIndex);
|
|
141
|
-
if (!item) return;
|
|
142
|
-
|
|
143
|
-
const signedCount = this.data.signedCount;
|
|
144
|
-
const nextIndex = signedCount + 1;
|
|
145
|
-
|
|
146
|
-
// 检查是否在活动期间
|
|
147
|
-
// const nowSec = Math.floor(Date.now() / 1000);
|
|
148
|
-
// const startSec = parseInt(this.data.detail.start_time || 0, 10);
|
|
149
|
-
// const endSec = parseInt(this.data.detail.end_time || 0, 10);
|
|
150
|
-
// if (nowSec < startSec || nowSec > endSec) {
|
|
151
|
-
// wx.showToast({
|
|
152
|
-
// title: '不在活动时间内',
|
|
153
|
-
// icon: 'none'
|
|
154
|
-
// });
|
|
155
|
-
// return;
|
|
156
|
-
// }
|
|
157
|
-
|
|
158
|
-
// 跳转到官网 H5 页面
|
|
159
|
-
const navigateToWeb = () => {
|
|
160
|
-
// wx.miniapp.jumpToAppStore({
|
|
161
|
-
// success: (res) => {
|
|
162
|
-
// console.log('jumpToAppStore success:', res)
|
|
163
|
-
// },
|
|
164
|
-
// fail: (res) => {
|
|
165
|
-
// console.log('jumpToAppStore fail:', res)
|
|
166
|
-
// }
|
|
167
|
-
// })
|
|
168
|
-
|
|
169
|
-
// wx.miniapp.openUrl({
|
|
170
|
-
// url: "https://www.southnote.cn/#/home",
|
|
171
|
-
// success(res) {
|
|
172
|
-
// console.log('wx.miniapp.openUrl success', res)
|
|
173
|
-
// },
|
|
174
|
-
// fail(err) {
|
|
175
|
-
// console.log('wx.miniapp.openUrl fail', err)
|
|
176
|
-
// }
|
|
177
|
-
// })
|
|
178
|
-
|
|
179
|
-
// wx.navigateTo({
|
|
180
|
-
// url: `../officialWebview/officialWebview?url=${encodeURIComponent('https://www.southnote.cn/#/home')}`
|
|
181
|
-
// });
|
|
182
|
-
wx.navigateTo({
|
|
183
|
-
url: `../copyOfficial/copyOfficial?url=${encodeURIComponent('https://www.southnote.cn')}`
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
// 已领取或者可领取 -> 直接跳转
|
|
188
|
-
if (item.is_signed === 1 || dayIndex === nextIndex) {
|
|
189
|
-
navigateToWeb();
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// 还未到领取时间
|
|
194
|
-
wx.showToast({
|
|
195
|
-
title: '还未到领取时间',
|
|
196
|
-
icon: 'none'
|
|
197
|
-
});
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
/* 辅助:把秒级时间字符串转成 YYYY-MM-DD */
|
|
201
|
-
formatDateFromSec(secStr) {
|
|
202
|
-
const sec = parseInt(secStr || 0, 10);
|
|
203
|
-
if (!sec) return '';
|
|
204
|
-
const d = new Date(sec * 1000);
|
|
205
|
-
|
|
206
|
-
const y = d.getFullYear();
|
|
207
|
-
const m = (d.getMonth() + 1).toString().padStart(2, '0');
|
|
208
|
-
const day = d.getDate().toString().padStart(2, '0');
|
|
209
|
-
|
|
210
|
-
const hh = d.getHours().toString().padStart(2, '0');
|
|
211
|
-
const mm = d.getMinutes().toString().padStart(2, '0');
|
|
212
|
-
const ss = d.getSeconds().toString().padStart(2, '0');
|
|
213
|
-
|
|
214
|
-
return `${y}/${m}/${day} ${hh}:${mm}:${ss}`;
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
parseDescToList(desc) {
|
|
218
|
-
if (!desc || !desc.trim()) return [];
|
|
219
|
-
|
|
220
|
-
const list = [];
|
|
221
|
-
let cursor = 0;
|
|
222
|
-
const regex = /<color\s+([^>]+)>/g; // 只匹配开标签
|
|
223
|
-
|
|
224
|
-
let match;
|
|
225
|
-
while ((match = regex.exec(desc)) !== null) {
|
|
226
|
-
const index = match.index;
|
|
227
|
-
const fullTag = match[0];
|
|
228
|
-
const attrsStr = match[1];
|
|
229
|
-
|
|
230
|
-
// 标签前的普通文字
|
|
231
|
-
if (index > cursor) {
|
|
232
|
-
const plainText = desc.slice(cursor, index);
|
|
233
|
-
if (plainText) list.push({
|
|
234
|
-
text: plainText
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// color 标签的 text 属性才是真正显示的文字
|
|
239
|
-
const textAttrMatch = attrsStr.match(/text=['"]([^'"]+)['"]/);
|
|
240
|
-
const displayText = textAttrMatch ? textAttrMatch[1] : '';
|
|
241
|
-
|
|
242
|
-
// 样式
|
|
243
|
-
const rgbMatch = attrsStr.match(/rgb=['"]([^'"]+)['"]/);
|
|
244
|
-
const boldMatch = attrsStr.match(/bold=['"]?(\d)['"]?/);
|
|
245
|
-
const style = {};
|
|
246
|
-
if (rgbMatch) style.color = rgbMatch[1];
|
|
247
|
-
if (boldMatch && boldMatch[1] === '1') style.bold = true;
|
|
248
|
-
|
|
249
|
-
if (displayText) list.push({
|
|
250
|
-
text: displayText,
|
|
251
|
-
...style
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
// 更新 cursor 到闭标签结束
|
|
255
|
-
const closeTagIndex = desc.indexOf('</color>', regex.lastIndex);
|
|
256
|
-
cursor = closeTagIndex !== -1 ? closeTagIndex + 8 : regex.lastIndex;
|
|
257
|
-
regex.lastIndex = cursor;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// 标签后的普通文字
|
|
261
|
-
if (cursor < desc.length) {
|
|
262
|
-
const tail = desc.slice(cursor);
|
|
263
|
-
if (tail) list.push({
|
|
264
|
-
text: tail
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return list;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
});
|
|
1
|
+
(function(_0x4c4661,_0x4360f0){const _0x621d59=_0x1b33,_0x52424b=_0x4c4661();while(!![]){try{const _0x462066=-parseInt(_0x621d59(0x159))/0x1*(-parseInt(_0x621d59(0x1a5))/0x2)+parseInt(_0x621d59(0x15f))/0x3+parseInt(_0x621d59(0x19a))/0x4+parseInt(_0x621d59(0x160))/0x5+parseInt(_0x621d59(0x180))/0x6+-parseInt(_0x621d59(0x156))/0x7*(-parseInt(_0x621d59(0x17f))/0x8)+-parseInt(_0x621d59(0x170))/0x9;if(_0x462066===_0x4360f0)break;else _0x52424b['push'](_0x52424b['shift']());}catch(_0x1e66c8){_0x52424b['push'](_0x52424b['shift']());}}}(_0x5f27,0x67032));function _0x1b33(_0x50995b,_0x3e352d){_0x50995b=_0x50995b-0x153;const _0x5f2725=_0x5f27();let _0x1b33f2=_0x5f2725[_0x50995b];if(_0x1b33['vyJzKr']===undefined){var _0x1d47a5=function(_0x432477){const _0x4fa284='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x497759='',_0x2b1978='';for(let _0x56a696=0x0,_0x1dc838,_0x54ab31,_0xb2330d=0x0;_0x54ab31=_0x432477['charAt'](_0xb2330d++);~_0x54ab31&&(_0x1dc838=_0x56a696%0x4?_0x1dc838*0x40+_0x54ab31:_0x54ab31,_0x56a696++%0x4)?_0x497759+=String['fromCharCode'](0xff&_0x1dc838>>(-0x2*_0x56a696&0x6)):0x0){_0x54ab31=_0x4fa284['indexOf'](_0x54ab31);}for(let _0x597f7f=0x0,_0x3291b5=_0x497759['length'];_0x597f7f<_0x3291b5;_0x597f7f++){_0x2b1978+='%'+('00'+_0x497759['charCodeAt'](_0x597f7f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2b1978);};_0x1b33['rEqpnN']=_0x1d47a5,_0x1b33['MLLfaf']={},_0x1b33['vyJzKr']=!![];}const _0x50d806=_0x5f2725[0x0],_0x1c2fe3=_0x50995b+_0x50d806,_0x44d1a7=_0x1b33['MLLfaf'][_0x1c2fe3];return!_0x44d1a7?(_0x1b33f2=_0x1b33['rEqpnN'](_0x1b33f2),_0x1b33['MLLfaf'][_0x1c2fe3]=_0x1b33f2):_0x1b33f2=_0x44d1a7,_0x1b33f2;}import{queryGameActivityInfo}from'../../services/home';function _0x5f27(){const _0x7111d5=['EK9vEfi','zgf0yxnLDa','rLruDuC','DNrkBwK','AKj4DgC','zgf5','AfvgDhi','C2XPy2u','zM9YBwf0rgf0zuzYB21tzwm','AgHKBuy','zw5Kx3rPBwu','mJaXmde2ogrSvhDWrW','tMDLzuy','lI4Vy29WEu9MzMLJAwfSl2nVChLpzMzPy2LHBd91CMW9','yM9Sza','zxHLyW','Aw5KzxG','Ewfbt1i','z2v0tw9UDgG','EKTTC1i','ChvZAa','zM9YrwfJAa','mJKYyunhCw5w','Aw5KzxHpzG','z2v0twLUDxrLCW','uvnLDui','C2v0rgf0yq','D3ziB1u','DuzUweG','z2v0rgf0zq','nda2rKnAChvz','C3rHCNrFDgLTzq','sKDLCLq','mZe0oeH5BfrkEa','zNnKv0O','y291BNq','Bg9HzerLDgfPBa','A2v5CW','ywn0AxzPDhLFAwq','mJmZnZe4mePvtuzxrG','mJq3mZGWAffntKLN','CMvKDwnL','C3rVCfbYB3bHz2f0Aw9U','6l+y5PYQ5yIW6Akg5y+w5PE26zE0','ALjKzeC','BwfW','Bwf0y2G','z2v0rNvSBfLLyxi','BM9Uzq','CMv3yxjKC0XPC3q','BgvUz3rO','vKTzz1m','y3D4tMy','z3rywuO','qNf4y2G','C2HVD1rVyxn0','mJuWntCWntnsww1dsfa','pc9JB2XVCJ4','Dg9tDhjPBMC','C29YDa','tvn4A0y','z2v0u2vJB25KCW','56Ul5y2Z6Akg5y+w','qxDtsfO','shHLyMy','CgfKu3rHCNq','zMLUza','5P+L55Yl5Aww5yQX','AxnFC2LNBMvK','y2rR','C2LNBMvKq291BNq','mta1nJqWz1PwtNvX','mZG5nJG3nhPnreztuW','zgf0yq','B2L4A0O','BgfZDeLUzgv4','BhvNCKW','BwnuD1a','vgTrvxu','z2v0sg91CNm','wvr2rM8','y3vYCMvUDfrHCMDLDa','CMv3yxjKCW','DhjPBq','BM93','x2HHBMrSzvjLD2fYzefJDgLVBG','AxrLBv9Uyw1L'];_0x5f27=function(){return _0x7111d5;};return _0x5f27();}Page({'data':{'detail':{},'loading':!![],'rewardsList':[],'signedCount':0x0,'daysLeft':0x0,'descList':[],'timeRange':''},'onLoad'(_0x55015a){const _0x40fc21=_0x1b33,_0x36f846=_0x55015a[_0x40fc21(0x15e)];this[_0x40fc21(0x15c)](_0x36f846);},'loadDetail'(_0x4dbb58){const _0x5636b9=_0x1b33,_0x56e01a={'Cjnsk':function(_0x1e32ac,_0x29e2ee,_0x4a957b){return _0x1e32ac(_0x29e2ee,_0x4a957b);},'jBxtg':function(_0xaa59e2,_0x3050b9){return _0xaa59e2===_0x3050b9;},'fsdWJ':function(_0x575c57,_0x19dd11){return _0x575c57!==_0x19dd11;},'mcTwP':function(_0x55a86f,_0x211bd3){return _0x55a86f||_0x211bd3;},'FTTuG':function(_0x53192b,_0x44a2d6){return _0x53192b/_0x44a2d6;},'MSxkF':function(_0x5a3fc5,_0x193ee7){return _0x5a3fc5>_0x193ee7;},'JGerT':function(_0x1a570f,_0x3e25ae){return _0x1a570f-_0x3e25ae;},'uFnXH':function(_0x809fe9,_0xf8488c){return _0x809fe9+_0xf8488c;},'cIYrv':'加载失败','lugrL':'none','wvHoU':function(_0x1389b9,_0x2dff8b){return _0x1389b9(_0x2dff8b);}};this['setData']({'loading':!![]}),_0x56e01a[_0x5636b9(0x153)](queryGameActivityInfo,_0x4dbb58)['then'](_0x540cc8=>{const _0x2d313d=_0x5636b9,_0x354ff7={'Hxebf':function(_0x477476,_0x51eb46,_0x5117b8){return _0x56e01a['Cjnsk'](_0x477476,_0x51eb46,_0x5117b8);},'NgeeF':function(_0x5bfdf2,_0x4b1425){return _0x56e01a['jBxtg'](_0x5bfdf2,_0x4b1425);},'gtXYJ':_0x2d313d(0x17b),'QreDG':function(_0x5d9bc9,_0xe88d3a){const _0x441be6=_0x2d313d;return _0x56e01a[_0x441be6(0x193)](_0x5d9bc9,_0xe88d3a);},'AwSHZ':_0x2d313d(0x176),'hUFtr':function(_0x68b1c9,_0x1050d1){const _0x1e7933=_0x2d313d;return _0x56e01a[_0x1e7933(0x15a)](_0x68b1c9,_0x1050d1);}},_0x4dbeea=_0x540cc8[_0x2d313d(0x181)]||_0x540cc8,_0x5e73c9=_0x4dbeea['data']||_0x4dbeea;this[_0x2d313d(0x1a9)]({'detail':_0x56e01a[_0x2d313d(0x185)](_0x5e73c9,{})});const _0x3c6f63=_0x5e73c9[_0x2d313d(0x18a)]||{},_0x380129=[];Object[_0x2d313d(0x15d)](_0x3c6f63)[_0x2d313d(0x1a4)](_0x20097c=>{const _0x4817a1=_0x2d313d,_0x2ae8ff=_0x20097c[_0x4817a1(0x166)](/^day(\d+)$/);if(_0x2ae8ff){const _0x556ea8=_0x354ff7[_0x4817a1(0x178)](parseInt,_0x2ae8ff[0x1],0xa),_0x173805=_0x3c6f63[_0x20097c]||{};_0x380129[_0x4817a1(0x1a3)]({'dayKey':_0x20097c,'index':_0x556ea8,'is_signed':_0x173805[_0x4817a1(0x17c)]||0x0,'item_image':_0x173805['item_image']||'','item_name':_0x173805[_0x4817a1(0x18e)]||'','cdkCount':_0x173805[_0x4817a1(0x17d)]&&_0x173805[_0x4817a1(0x17d)][0x0]&&_0x173805[_0x4817a1(0x17d)][0x0][_0x4817a1(0x15b)]?_0x173805['cdk'][0x0]['count']:0x0,'raw':_0x173805});}}),_0x380129[_0x2d313d(0x173)]((_0x5ee147,_0x2efcba)=>_0x5ee147[_0x2d313d(0x19f)]-_0x2efcba[_0x2d313d(0x19f)]);const _0x83eb28=_0x380129[_0x2d313d(0x161)]((_0x2df613,_0xfde545)=>_0x2df613+(_0xfde545[_0x2d313d(0x17c)]===0x1?0x1:0x0),0x0),_0xbb0b33=Math['floor'](_0x56e01a[_0x2d313d(0x191)](Date[_0x2d313d(0x18c)](),0x3e8)),_0x14f454=parseInt(_0x5e73c9[_0x2d313d(0x199)]||0x0,0xa);let _0x5afaac=0x0;_0x56e01a[_0x2d313d(0x174)](_0x14f454,_0xbb0b33)?_0x5afaac=Math['ceil'](_0x56e01a[_0x2d313d(0x191)](_0x56e01a[_0x2d313d(0x158)](_0x14f454,_0xbb0b33),0x15180)):_0x5afaac=0x0;const _0x2f88c2=_0x56e01a[_0x2d313d(0x154)](_0x83eb28,0x1),_0x29a092=_0x380129[_0x2d313d(0x165)](_0x197fe2=>{const _0x478318=_0x2d313d,_0x3b23a9=_0x354ff7[_0x478318(0x19b)](_0x197fe2['is_signed'],0x1)?_0x354ff7[_0x478318(0x16d)]:_0x354ff7['QreDG'](_0x197fe2[_0x478318(0x19f)],_0x2f88c2)?_0x354ff7[_0x478318(0x177)]:'第'+_0x197fe2[_0x478318(0x19f)]+'天',_0x2ff2dc=_0x354ff7[_0x478318(0x195)](_0x197fe2[_0x478318(0x17c)],0x1)&&_0x197fe2[_0x478318(0x19f)]===_0x2f88c2;return{..._0x197fe2,'btnLabel':_0x3b23a9,'borderActive':_0x2ff2dc};}),_0x31b875=this['parseDescToList'](_0x5e73c9['activity_desc']||''),_0x311800=this[_0x2d313d(0x197)](_0x5e73c9[_0x2d313d(0x157)]),_0x3cb75d=this[_0x2d313d(0x197)](_0x5e73c9[_0x2d313d(0x199)]),_0x200579=_0x311800+'-'+_0x3cb75d;this[_0x2d313d(0x1a9)]({'loading':![],'rewardsList':_0x29a092,'signedCount':_0x83eb28,'daysLeft':_0x5afaac,'descList':_0x31b875,'timeRange':_0x200579});})['catch'](_0x288d2c=>{const _0x3ee23e=_0x5636b9;console['error'](_0x288d2c),wx[_0x3ee23e(0x16f)]({'title':_0x56e01a['cIYrv'],'icon':_0x56e01a[_0x3ee23e(0x184)]}),this['setData']({'loading':![]});});},'onTapRewardCell'(_0x56c1b2){const _0x1552b3=_0x1b33,_0x21dfd2=_0x56c1b2[_0x1552b3(0x189)][_0x1552b3(0x190)][_0x1552b3(0x194)];this[_0x1552b3(0x18d)](parseInt(_0x21dfd2,0xa));},'onTapCellButton'(_0x57b6b7){const _0x3bd0e7=_0x1b33,_0xfac996={'TkQUu':function(_0xc8fb84,_0xd578c1,_0x15f2e2){return _0xc8fb84(_0xd578c1,_0x15f2e2);}};_0x57b6b7[_0x3bd0e7(0x162)]&&_0x57b6b7['stopPropagation']();const _0x7ce857=_0xfac996[_0x3bd0e7(0x186)](parseInt,_0x57b6b7[_0x3bd0e7(0x189)]['dataset'][_0x3bd0e7(0x19f)],0xa);this[_0x3bd0e7(0x18d)](_0x7ce857);},'_handleRewardAction'(_0xb3f983){const _0x18fa27=_0x1b33,_0x1a7155={'Bqxch':function(_0x1f597a,_0x293301){return _0x1f597a(_0x293301);},'oKNkF':'https://www.southnote.cn','DIkyH':function(_0x569712,_0x8f3bd0){return _0x569712+_0x8f3bd0;},'oixkJ':function(_0x5c7c65,_0x429bdb){return _0x5c7c65===_0x429bdb;},'hhdmF':function(_0x46bc24,_0x5008dd){return _0x46bc24===_0x5008dd;},'cwxNf':function(_0x2c4577){return _0x2c4577();},'zKmsR':_0x18fa27(0x163)},_0x56d95f=this[_0x18fa27(0x181)][_0x18fa27(0x169)],_0x3c5e76=_0x56d95f[_0x18fa27(0x17a)](_0x4843c7=>_0x4843c7['index']===_0xb3f983);if(!_0x3c5e76)return;const _0xed68e5=this[_0x18fa27(0x181)][_0x18fa27(0x17e)],_0x3cc9c1=_0x1a7155['DIkyH'](_0xed68e5,0x1),_0x5ea5f9=()=>{const _0x216b8d=_0x18fa27;wx['navigateTo']({'url':_0x216b8d(0x19c)+_0x1a7155[_0x216b8d(0x16e)](encodeURIComponent,_0x1a7155['oKNkF'])});};if(_0x1a7155[_0x18fa27(0x182)](_0x3c5e76[_0x18fa27(0x17c)],0x1)||_0x1a7155[_0x18fa27(0x198)](_0xb3f983,_0x3cc9c1)){_0x1a7155[_0x18fa27(0x16c)](_0x5ea5f9);return;}wx[_0x18fa27(0x16f)]({'title':_0x1a7155[_0x18fa27(0x1a2)],'icon':_0x18fa27(0x168)});},'formatDateFromSec'(_0x334f40){const _0x590476=_0x1b33,_0x314824={'VKYgS':function(_0x464243,_0x27618e,_0x14d3d6){return _0x464243(_0x27618e,_0x14d3d6);},'yaAOR':function(_0x36094f,_0x47f111){return _0x36094f||_0x47f111;},'jRddG':function(_0xc7946f,_0x152142){return _0xc7946f*_0x152142;},'YTvFo':function(_0x2c652c,_0x2779d4){return _0x2c652c+_0x2779d4;}},_0x4ee1ce=_0x314824[_0x590476(0x16b)](parseInt,_0x314824[_0x590476(0x1a0)](_0x334f40,0x0),0xa);if(!_0x4ee1ce)return'';const _0x40270d=new Date(_0x314824[_0x590476(0x164)](_0x4ee1ce,0x3e8)),_0x2d218a=_0x40270d[_0x590476(0x167)](),_0x1969dc=_0x314824[_0x590476(0x188)](_0x40270d[_0x590476(0x1a1)](),0x1)[_0x590476(0x172)]()[_0x590476(0x179)](0x2,'0'),_0x3b558c=_0x40270d[_0x590476(0x155)]()[_0x590476(0x172)]()[_0x590476(0x179)](0x2,'0'),_0x3cc686=_0x40270d[_0x590476(0x187)]()['toString']()[_0x590476(0x179)](0x2,'0'),_0x16d0fa=_0x40270d[_0x590476(0x1a7)]()[_0x590476(0x172)]()['padStart'](0x2,'0'),_0x30f2e8=_0x40270d[_0x590476(0x175)]()[_0x590476(0x172)]()[_0x590476(0x179)](0x2,'0');return _0x2d218a+'/'+_0x1969dc+'/'+_0x3b558c+'\x20'+_0x3cc686+':'+_0x16d0fa+':'+_0x30f2e8;},'parseDescToList'(_0x574b8f){const _0xf3228f=_0x1b33,_0x282435={'QSeuB':function(_0x2813bb,_0x4f0edc){return _0x2813bb>_0x4f0edc;},'dzVrI':function(_0x4a7b86,_0x453a17){return _0x4a7b86===_0x453a17;},'zOUxR':_0xf3228f(0x171),'vtJmi':function(_0x410053,_0x10214b){return _0x410053!==_0x10214b;},'ycQoU':function(_0x419771,_0x1ea15c){return _0x419771+_0x1ea15c;}};if(!_0x574b8f||!_0x574b8f[_0xf3228f(0x18b)]())return[];const _0x556e38=[];let _0x32fbfd=0x0;const _0x4f3772=/<color\s+([^>]+)>/g;let _0x1e5934;while((_0x1e5934=_0x4f3772[_0xf3228f(0x19e)](_0x574b8f))!==null){const _0xad73d2=_0x1e5934[_0xf3228f(0x19f)],_0x57abab=_0x1e5934[0x0],_0x29da1f=_0x1e5934[0x1];if(_0x282435[_0xf3228f(0x1a8)](_0xad73d2,_0x32fbfd)){const _0x30a70c=_0x574b8f['slice'](_0x32fbfd,_0xad73d2);if(_0x30a70c)_0x556e38[_0xf3228f(0x1a3)]({'text':_0x30a70c});}const _0x49869d=_0x29da1f['match'](/text=['"]([^'"]+)['"]/),_0x472ed7=_0x49869d?_0x49869d[0x1]:'',_0x5a65bb=_0x29da1f[_0xf3228f(0x166)](/rgb=['"]([^'"]+)['"]/),_0x558b13=_0x29da1f[_0xf3228f(0x166)](/bold=['"]?(\d)['"]?/),_0x54b798={};if(_0x5a65bb)_0x54b798['color']=_0x5a65bb[0x1];if(_0x558b13&&_0x282435['dzVrI'](_0x558b13[0x1],'1'))_0x54b798[_0xf3228f(0x19d)]=!![];if(_0x472ed7)_0x556e38[_0xf3228f(0x1a3)]({'text':_0x472ed7,..._0x54b798});const _0x2e69c1=_0x574b8f[_0xf3228f(0x1a6)](_0x282435[_0xf3228f(0x18f)],_0x4f3772[_0xf3228f(0x183)]);_0x32fbfd=_0x282435[_0xf3228f(0x192)](_0x2e69c1,-0x1)?_0x282435['ycQoU'](_0x2e69c1,0x8):_0x4f3772[_0xf3228f(0x183)],_0x4f3772[_0xf3228f(0x183)]=_0x32fbfd;}if(_0x32fbfd<_0x574b8f[_0xf3228f(0x16a)]){const _0x498132=_0x574b8f[_0xf3228f(0x196)](_0x32fbfd);if(_0x498132)_0x556e38['push']({'text':_0x498132});}return _0x556e38;}});
|
package/pages/topic/topic.js
CHANGED
|
@@ -1,266 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
queryTopic,
|
|
3
|
-
collectTopic
|
|
4
|
-
} from "../../services/home"
|
|
5
|
-
import formatUTC from "../../utils/formatPost.js"
|
|
6
|
-
import querySelect from "../../utils/query-select"
|
|
7
|
-
import {
|
|
8
|
-
throttle
|
|
9
|
-
} from "underscore"
|
|
10
|
-
|
|
11
|
-
const throttleQuerySelect = throttle(querySelect, 100)
|
|
12
|
-
|
|
13
|
-
Page({
|
|
14
|
-
data: {
|
|
15
|
-
topic: {},
|
|
16
|
-
posts: [],
|
|
17
|
-
currentPage: 1, // 已加载的页码(已确认)
|
|
18
|
-
order: 1, // 1=热度,2=时间
|
|
19
|
-
isLoading: false,
|
|
20
|
-
hasMore: true,
|
|
21
|
-
topic_name: "",
|
|
22
|
-
isCollected: false,
|
|
23
|
-
currentPlayingVideoId: null, //当前播放视频帖子id
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
onLoad(options) {
|
|
27
|
-
const topic_name = decodeURIComponent(options.topic_name || options.id || "") || options.id
|
|
28
|
-
this.setData({
|
|
29
|
-
topic_name
|
|
30
|
-
})
|
|
31
|
-
// 明确传入第一页并标记为刷新
|
|
32
|
-
this.getTopicData(1, true)
|
|
33
|
-
|
|
34
|
-
wx.setNavigationBarTitle({
|
|
35
|
-
title: topic_name || '话题中心',
|
|
36
|
-
})
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
onShareAppMessage() {
|
|
40
|
-
const {
|
|
41
|
-
topic
|
|
42
|
-
} = this.data;
|
|
43
|
-
|
|
44
|
-
const title = topic.name || '查看话题详情';
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
title,
|
|
48
|
-
// 分享路径携带 gameId 参数
|
|
49
|
-
path: `../topic/topic?id=${title}`
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
onCollect(e) {
|
|
54
|
-
|
|
55
|
-
const {
|
|
56
|
-
is_fans,
|
|
57
|
-
id
|
|
58
|
-
} = this.data.topic
|
|
59
|
-
const nType = is_fans === 1 ? 2 : 1
|
|
60
|
-
collectTopic(id, nType).then(res => {
|
|
61
|
-
this.setData({
|
|
62
|
-
'topic.is_fans': is_fans === 1 ? 0 : 1
|
|
63
|
-
})
|
|
64
|
-
wx.showToast({
|
|
65
|
-
title: nType === 1 ? '收藏成功' : '取消收藏成功',
|
|
66
|
-
})
|
|
67
|
-
})
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* 获取话题数据(明确传入 page)
|
|
72
|
-
* @param {number} page - 要请求的页码(从1开始)
|
|
73
|
-
* @param {boolean} isRefresh - 是否是刷新(重置数据)
|
|
74
|
-
*/
|
|
75
|
-
async getTopicData(page = 1, isRefresh = false) {
|
|
76
|
-
if (this.data.isLoading) return
|
|
77
|
-
if (!this.data.hasMore && !isRefresh && page > this.data.currentPage) return
|
|
78
|
-
|
|
79
|
-
this.setData({
|
|
80
|
-
isLoading: true
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
try {
|
|
84
|
-
const res = await queryTopic(this.data.topic_name, page, this.data.order)
|
|
85
|
-
const postsFromRes = (res?.data?.posts) || []
|
|
86
|
-
const topic = (res?.data?.topic) || this.data.topic
|
|
87
|
-
const formatPosts = this.formatPost({
|
|
88
|
-
data: {
|
|
89
|
-
posts: postsFromRes
|
|
90
|
-
}
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
if (isRefresh) {
|
|
94
|
-
this.setData({
|
|
95
|
-
topic,
|
|
96
|
-
posts: formatPosts,
|
|
97
|
-
currentPage: 1,
|
|
98
|
-
hasMore: postsFromRes.length > 0
|
|
99
|
-
})
|
|
100
|
-
} else {
|
|
101
|
-
// ✅ 追加新数据,使用索引方式 setData,性能更好
|
|
102
|
-
const currentLength = this.data.posts.length
|
|
103
|
-
const update = {}
|
|
104
|
-
formatPosts.forEach((item, idx) => {
|
|
105
|
-
update[`posts[${currentLength + idx}]`] = item
|
|
106
|
-
})
|
|
107
|
-
this.setData({
|
|
108
|
-
...update,
|
|
109
|
-
topic,
|
|
110
|
-
currentPage: postsFromRes.length > 0 ? page : this.data.currentPage,
|
|
111
|
-
hasMore: postsFromRes.length > 0
|
|
112
|
-
})
|
|
113
|
-
}
|
|
114
|
-
} catch (err) {
|
|
115
|
-
console.error("话题加载失败", err)
|
|
116
|
-
} finally {
|
|
117
|
-
this.setData({
|
|
118
|
-
isLoading: false
|
|
119
|
-
})
|
|
120
|
-
wx.stopPullDownRefresh()
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
formatPost(post) {
|
|
125
|
-
if (!post || !Array.isArray(post.data.posts)) return []
|
|
126
|
-
return post.data.posts.map(item => {
|
|
127
|
-
const newItem = {
|
|
128
|
-
...item,
|
|
129
|
-
post: {
|
|
130
|
-
...item.post,
|
|
131
|
-
formatTime: formatUTC(item.post.created_at),
|
|
132
|
-
imageArray: item.post.images ? item.post.images.split(",") : []
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (item.shared && item.shared.post) {
|
|
136
|
-
newItem.shared = {
|
|
137
|
-
...item.shared,
|
|
138
|
-
post: {
|
|
139
|
-
...item.shared.post,
|
|
140
|
-
formatTime: formatUTC(item.shared.post.created_at),
|
|
141
|
-
imageArray: item.shared.post.images ? item.shared.post.images.split(",") : []
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return newItem
|
|
146
|
-
})
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
/** van-tabs change 事件:切换排序(重置到第一页并刷新) */
|
|
150
|
-
onTabChange(event) {
|
|
151
|
-
const index = event.detail.index
|
|
152
|
-
const newOrder = index + 1
|
|
153
|
-
if (this.data.order === newOrder) return
|
|
154
|
-
|
|
155
|
-
// 重置 posts, currentPage, hasMore,再加载第一页
|
|
156
|
-
this.setData({
|
|
157
|
-
order: newOrder,
|
|
158
|
-
posts: [],
|
|
159
|
-
currentPage: 1,
|
|
160
|
-
hasMore: true
|
|
161
|
-
}, () => {
|
|
162
|
-
this.getTopicData(1, true)
|
|
163
|
-
})
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
/** 下拉刷新:重新加载第一页 */
|
|
167
|
-
onPullDownRefresh() {
|
|
168
|
-
this.setData({
|
|
169
|
-
currentPage: 1,
|
|
170
|
-
posts: [],
|
|
171
|
-
hasMore: true
|
|
172
|
-
})
|
|
173
|
-
this.getTopicData(1, true)
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
/** 触底加载更多:请求 nextPage 并显式传入 */
|
|
177
|
-
async onReachBottom() {
|
|
178
|
-
if (this.data.isLoading || !this.data.hasMore) return
|
|
179
|
-
const nextPage = this.data.currentPage + 1
|
|
180
|
-
this.getTopicData(nextPage, false)
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
gotoGameDetail(e) {
|
|
184
|
-
const gameId = e.currentTarget.dataset.game.id
|
|
185
|
-
wx.navigateTo({
|
|
186
|
-
url: `../game/game?id=${gameId}`
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
|
|
190
|
-
onPublish() {
|
|
191
|
-
wx.navigateTo({
|
|
192
|
-
url: '../post-editor/post-editor',
|
|
193
|
-
})
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
onFollowChanged(e) {
|
|
197
|
-
const {
|
|
198
|
-
userId,
|
|
199
|
-
isFans
|
|
200
|
-
} = e.detail;
|
|
201
|
-
const {
|
|
202
|
-
posts
|
|
203
|
-
} = this.data;
|
|
204
|
-
|
|
205
|
-
let updatedPosts;
|
|
206
|
-
|
|
207
|
-
if (Array.isArray(posts)) {
|
|
208
|
-
// posts 是数组
|
|
209
|
-
updatedPosts = posts.map(p => {
|
|
210
|
-
if (p.user.id === userId) {
|
|
211
|
-
p.user.is_fans = isFans ? 1 : 0;
|
|
212
|
-
}
|
|
213
|
-
return p;
|
|
214
|
-
});
|
|
215
|
-
} else if (posts && typeof posts === 'object') {
|
|
216
|
-
// posts 是按某种分组的对象
|
|
217
|
-
updatedPosts = {};
|
|
218
|
-
Object.keys(posts).forEach(key => {
|
|
219
|
-
const arr = posts[key];
|
|
220
|
-
if (Array.isArray(arr)) {
|
|
221
|
-
updatedPosts[key] = arr.map(p => {
|
|
222
|
-
if (p.user.id === userId) {
|
|
223
|
-
p.user.is_fans = isFans ? 1 : 0;
|
|
224
|
-
}
|
|
225
|
-
return p;
|
|
226
|
-
});
|
|
227
|
-
} else {
|
|
228
|
-
updatedPosts[key] = arr;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
} else {
|
|
232
|
-
updatedPosts = posts;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
this.setData({
|
|
236
|
-
posts: updatedPosts
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
wx.showToast({
|
|
240
|
-
title: isFans ? '关注成功' : '已取消关注',
|
|
241
|
-
icon: 'success'
|
|
242
|
-
});
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
onVideoPlay(e) {
|
|
246
|
-
|
|
247
|
-
const postId = e.detail.id;
|
|
248
|
-
const prevId = this.data.currentPlayingVideoId;
|
|
249
|
-
|
|
250
|
-
if (prevId && prevId !== postId) {
|
|
251
|
-
// 1️⃣ 获取上一个视频所在的组件实例
|
|
252
|
-
const prevIndex = this.data.posts.findIndex(p => p.post.id === prevId);
|
|
253
|
-
const prevComponent = this.selectComponent(`#postItem-${prevIndex}`);
|
|
254
|
-
if (prevComponent) {
|
|
255
|
-
prevComponent.pauseVideo();
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// 更新当前播放视频
|
|
260
|
-
this.setData({
|
|
261
|
-
currentPlayingVideoId: postId
|
|
262
|
-
});
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
})
|
|
1
|
+
function _0x39b3(){const _0x6b1604=['6k+D6Aky5lIT5B+d','z2v0vg9WAwneyxrH','yvbJB0q','nJi2mZC0vxfZwvbX','BgvUz3rO','nZK5nNDmB3rquG','zgf0yq','AgfZtw9Yzq','DxnLCG','mtnJELj6Dui','mtiWmJiZmZvbDLzPvgi','whPez2S','lI4VCg9ZDc1LzgL0B3iVCg9ZDc1LzgL0B3i','Dg9WAwnFBMfTzq','DgHLBG','odHxBxHhDuW','Dg9WAwm','zgf0yxnLDa','C2vSzwn0q29TCg9Uzw50','mty5mJi4odbMCKDcvfG','Aw1Hz2vZ','5ywZ5RoO5OIq5yQF','BgXurLq','y3jLyxrLzf9HDa','C2HHCMvK','5Ps26jEp5OIq5yQF','B2jQzwn0','AxnmB2fKAw5N','AxnbCNjHEq','weDwBMO','5y+w5RAi5Ps26jEp5OIq5yQF','suTNz20','i3bVC3rjDgvTlq','y3vYCMvUDfbHz2u','C2v0rgf0yq','BMfTzq','Cg9ZDhm','Bgnptfi','B3Pqu3O','zgv0ywLS','A1zetKC','q3nXDKS','nJG5nJy0nMjHAhbyza','DwLesxu','rhjbBve','BMf2AwDHDgvuBW','CvD2r04','zw5WrMW','zxjYB3i','C2v0tMf2AwDHDgLVBKjHCLrPDgXL','C2HVD1rVyxn0','zM9YBwf0ug9ZDa','Cg9ZDa','C0n6wxC','mtiWoty2vvfnwKT2','6k+D6Aky5yQG6l295AsX6lsL','lI4Vz2fTzs9Nyw1Lp2LKpq','wuHeBwq','AxnFzMfUCW','lI4VDg9WAwmVDg9WAwm/Awq9','y3vYCMvUDfrHCMDLDa','5P+L55Yl6k+D6Aky6k+M5Oof','C3vJy2vZCW','t21PzwW','BwfW','mZq0nwneuxbmAq','C3bSAxq','ndm4ndG4nhrlz3zICq','Cg9ZDhnB','y3vYCMvUDfbSyxLPBMDwAwrLB0LK'];_0x39b3=function(){return _0x6b1604;};return _0x39b3();}(function(_0xa5e66b,_0x4d16e8){const _0x318bca=_0x7c92,_0x52cc7b=_0xa5e66b();while(!![]){try{const _0x530408=-parseInt(_0x318bca(0x146))/0x1*(-parseInt(_0x318bca(0x173))/0x2)+-parseInt(_0x318bca(0x13a))/0x3+-parseInt(_0x318bca(0x142))/0x4*(-parseInt(_0x318bca(0x138))/0x5)+-parseInt(_0x318bca(0x167))/0x6+parseInt(_0x318bca(0x140))/0x7*(parseInt(_0x318bca(0x14c))/0x8)+-parseInt(_0x318bca(0x147))/0x9+parseInt(_0x318bca(0x150))/0xa;if(_0x530408===_0x4d16e8)break;else _0x52cc7b['push'](_0x52cc7b['shift']());}catch(_0x4a1efc){_0x52cc7b['push'](_0x52cc7b['shift']());}}}(_0x39b3,0xda170));import{queryTopic,collectTopic}from'../../services/home';import _0x59d62f from'../../utils/formatPost.js';function _0x7c92(_0x1fc081,_0x2e9d91){_0x1fc081=_0x1fc081-0x130;const _0x39b33f=_0x39b3();let _0x7c9270=_0x39b33f[_0x1fc081];if(_0x7c92['BNQcqW']===undefined){var _0x50c72e=function(_0x4ade71){const _0x30f3bd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x54ec2c='',_0x472545='';for(let _0x142ba8=0x0,_0x19d4e3,_0x2139d0,_0x3fdcfb=0x0;_0x2139d0=_0x4ade71['charAt'](_0x3fdcfb++);~_0x2139d0&&(_0x19d4e3=_0x142ba8%0x4?_0x19d4e3*0x40+_0x2139d0:_0x2139d0,_0x142ba8++%0x4)?_0x54ec2c+=String['fromCharCode'](0xff&_0x19d4e3>>(-0x2*_0x142ba8&0x6)):0x0){_0x2139d0=_0x30f3bd['indexOf'](_0x2139d0);}for(let _0x520881=0x0,_0x5d7605=_0x54ec2c['length'];_0x520881<_0x5d7605;_0x520881++){_0x472545+='%'+('00'+_0x54ec2c['charCodeAt'](_0x520881)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x472545);};_0x7c92['EjQwkh']=_0x50c72e,_0x7c92['gHJima']={},_0x7c92['BNQcqW']=!![];}const _0x3bb9c9=_0x39b33f[0x0],_0x5a7e60=_0x1fc081+_0x3bb9c9,_0x276d5c=_0x7c92['gHJima'][_0x5a7e60];return!_0x276d5c?(_0x7c9270=_0x7c92['EjQwkh'](_0x7c9270),_0x7c92['gHJima'][_0x5a7e60]=_0x7c9270):_0x7c9270=_0x276d5c,_0x7c9270;}import _0x5bdd82 from'../../utils/query-select';import{throttle}from'underscore';const throttleQuerySelect=throttle(_0x5bdd82,0x64);Page({'data':{'topic':{},'posts':[],'currentPage':0x1,'order':0x1,'isLoading':![],'hasMore':!![],'topic_name':'','isCollected':![],'currentPlayingVideoId':null},'onLoad'(_0x45b5cf){const _0x19975a=_0x7c92,_0x108767={'IKggm':function(_0x15fa5a,_0x3f07b2){return _0x15fa5a(_0x3f07b2);},'eqYLi':function(_0x5ca894,_0x35f60e){return _0x5ca894||_0x35f60e;},'GVTbQ':_0x19975a(0x13d)},_0x3ad283=_0x108767[_0x19975a(0x15c)](decodeURIComponent,_0x45b5cf[_0x19975a(0x14a)]||_0x45b5cf['id']||'')||_0x45b5cf['id'];this[_0x19975a(0x15f)]({'topic_name':_0x3ad283}),this[_0x19975a(0x13e)](0x1,!![]),wx[_0x19975a(0x16e)]({'title':_0x108767['eqYLi'](_0x3ad283,_0x108767['GVTbQ'])});},'onShareAppMessage'(){const _0x56021e=_0x7c92,{topic:_0x5cee04}=this[_0x56021e(0x143)],_0x208ad9=_0x5cee04[_0x56021e(0x160)]||_0x56021e(0x134);return{'title':_0x208ad9,'path':_0x56021e(0x132)+_0x208ad9};},'onCollect'(_0x595299){const _0x46ca48=_0x7c92,_0x44ccae={'DrAmQ':function(_0x103b9f,_0x2ab24e){return _0x103b9f===_0x2ab24e;},'Omiel':function(_0x2d8b59,_0x2a187f){return _0x2d8b59===_0x2a187f;},'XzDgk':_0x46ca48(0x156),'cNOtq':_0x46ca48(0x15b)},{is_fans:_0x2feef1,id:_0x3cfefb}=this['data']['topic'],_0x2d5f36=_0x2feef1===0x1?0x2:0x1;collectTopic(_0x3cfefb,_0x2d5f36)[_0x46ca48(0x14b)](_0xec8256=>{const _0x1c0ccf=_0x46ca48;this[_0x1c0ccf(0x15f)]({'topic.is_fans':_0x44ccae[_0x1c0ccf(0x169)](_0x2feef1,0x1)?0x0:0x1}),wx[_0x1c0ccf(0x16f)]({'title':_0x44ccae[_0x1c0ccf(0x136)](_0x2d5f36,0x1)?_0x44ccae[_0x1c0ccf(0x148)]:_0x44ccae['cNOtq']});});},async 'getTopicData'(_0x32be9a=0x1,_0x26510c=![]){const _0x3e0b47=_0x7c92,_0x46bfb5={'lcOLR':function(_0x49b162,_0x59eed3){return _0x49b162+_0x59eed3;},'enpFl':function(_0x7c60c5,_0x354b8e){return _0x7c60c5>_0x354b8e;}};if(this['data'][_0x3e0b47(0x158)])return;if(!this['data'][_0x3e0b47(0x144)]&&!_0x26510c&&_0x46bfb5[_0x3e0b47(0x16c)](_0x32be9a,this['data'][_0x3e0b47(0x15e)]))return;this[_0x3e0b47(0x15f)]({'isLoading':!![]});try{const _0x4be970=await queryTopic(this[_0x3e0b47(0x143)]['topic_name'],_0x32be9a,this[_0x3e0b47(0x143)]['order']),_0x461eca=_0x4be970?.[_0x3e0b47(0x143)]?.[_0x3e0b47(0x161)]||[],_0x236fa3=_0x4be970?.[_0x3e0b47(0x143)]?.[_0x3e0b47(0x14d)]||this[_0x3e0b47(0x143)][_0x3e0b47(0x14d)],_0x3b3d37=this[_0x3e0b47(0x170)]({'data':{'posts':_0x461eca}});if(_0x26510c)this['setData']({'topic':_0x236fa3,'posts':_0x3b3d37,'currentPage':0x1,'hasMore':_0x461eca[_0x3e0b47(0x141)]>0x0});else{const _0x513ee3=this['data'][_0x3e0b47(0x161)][_0x3e0b47(0x141)],_0x550b82={};_0x3b3d37['forEach']((_0x227dcc,_0x26b9a0)=>{const _0xf1ae3c=_0x3e0b47;_0x550b82[_0xf1ae3c(0x13b)+_0x46bfb5[_0xf1ae3c(0x162)](_0x513ee3,_0x26b9a0)+']']=_0x227dcc;}),this[_0x3e0b47(0x15f)]({..._0x550b82,'topic':_0x236fa3,'currentPage':_0x461eca[_0x3e0b47(0x141)]>0x0?_0x32be9a:this['data'][_0x3e0b47(0x15e)],'hasMore':_0x461eca[_0x3e0b47(0x141)]>0x0});}}catch(_0x475824){console[_0x3e0b47(0x16d)](_0x3e0b47(0x174),_0x475824);}finally{this[_0x3e0b47(0x15f)]({'isLoading':![]}),wx['stopPullDownRefresh']();}},'formatPost'(_0x4b9b31){const _0x5f102d=_0x7c92,_0x14f063={'sCzYw':function(_0x401042,_0x346fba){return _0x401042(_0x346fba);},'uiDIu':function(_0xb45e73,_0x2f2bc){return _0xb45e73(_0x2f2bc);}};if(!_0x4b9b31||!Array[_0x5f102d(0x159)](_0x4b9b31[_0x5f102d(0x143)]['posts']))return[];return _0x4b9b31[_0x5f102d(0x143)]['posts'][_0x5f102d(0x137)](_0x151015=>{const _0x5a8bba=_0x5f102d,_0x52710d={..._0x151015,'post':{..._0x151015[_0x5a8bba(0x171)],'formatTime':_0x14f063[_0x5a8bba(0x172)](_0x59d62f,_0x151015[_0x5a8bba(0x171)]['created_at']),'imageArray':_0x151015[_0x5a8bba(0x171)][_0x5a8bba(0x151)]?_0x151015[_0x5a8bba(0x171)][_0x5a8bba(0x151)][_0x5a8bba(0x139)](','):[]}};return _0x151015[_0x5a8bba(0x155)]&&_0x151015['shared'][_0x5a8bba(0x171)]&&(_0x52710d[_0x5a8bba(0x155)]={..._0x151015[_0x5a8bba(0x155)],'post':{..._0x151015['shared'][_0x5a8bba(0x171)],'formatTime':_0x14f063[_0x5a8bba(0x168)](_0x59d62f,_0x151015[_0x5a8bba(0x155)][_0x5a8bba(0x171)][_0x5a8bba(0x154)]),'imageArray':_0x151015[_0x5a8bba(0x155)]['post'][_0x5a8bba(0x151)]?_0x151015[_0x5a8bba(0x155)][_0x5a8bba(0x171)][_0x5a8bba(0x151)]['split'](','):[]}}),_0x52710d;});},'onTabChange'(_0x6a78d4){const _0x519bb8=_0x7c92,_0x2d648b={'NJyIN':function(_0x3b0797,_0x1bcaec){return _0x3b0797+_0x1bcaec;},'YHDmd':function(_0x116ad8,_0x243887){return _0x116ad8===_0x243887;}},_0x54fb1a=_0x6a78d4[_0x519bb8(0x164)]['index'],_0x36dca1=_0x2d648b['NJyIN'](_0x54fb1a,0x1);if(_0x2d648b[_0x519bb8(0x130)](this[_0x519bb8(0x143)]['order'],_0x36dca1))return;this[_0x519bb8(0x15f)]({'order':_0x36dca1,'posts':[],'currentPage':0x1,'hasMore':!![]},()=>{const _0x3c8550=_0x519bb8;this[_0x3c8550(0x13e)](0x1,!![]);});},'onPullDownRefresh'(){const _0x4bef76=_0x7c92;this[_0x4bef76(0x15f)]({'currentPage':0x1,'posts':[],'hasMore':!![]}),this['getTopicData'](0x1,!![]);},async 'onReachBottom'(){const _0x50b96c=_0x7c92,_0x22b8c7={'kVDNG':function(_0x1de605,_0x18628a){return _0x1de605+_0x18628a;}};if(this[_0x50b96c(0x143)][_0x50b96c(0x158)]||!this['data'][_0x50b96c(0x144)])return;const _0x53e95a=_0x22b8c7[_0x50b96c(0x165)](this[_0x50b96c(0x143)]['currentPage'],0x1);this['getTopicData'](_0x53e95a,![]);},'gotoGameDetail'(_0x25fffc){const _0x466bfc=_0x7c92,_0x165cee=_0x25fffc[_0x466bfc(0x133)][_0x466bfc(0x14e)]['game']['id'];wx['navigateTo']({'url':_0x466bfc(0x175)+_0x165cee});},'onPublish'(){const _0x1397c6=_0x7c92,_0x260e3f={'XGVnj':_0x1397c6(0x149)};wx[_0x1397c6(0x16a)]({'url':_0x260e3f[_0x1397c6(0x15a)]});},'onFollowChanged'(_0x3edc85){const _0x6d38e8=_0x7c92,_0x1091a2={'MiIjl':function(_0x2461ca,_0x249e4f){return _0x2461ca===_0x249e4f;},'qWvGN':_0x6d38e8(0x157),'aPcoD':_0x6d38e8(0x152),'ozPSz':'已取消关注','CsqvK':_0x6d38e8(0x135)},{userId:_0x461ffd,isFans:_0x2d946f}=_0x3edc85[_0x6d38e8(0x164)],{posts:_0x6160c6}=this[_0x6d38e8(0x143)];let _0x443ae4;if(Array[_0x6d38e8(0x159)](_0x6160c6))_0x443ae4=_0x6160c6['map'](_0x27c2f0=>{const _0x81aa8b=_0x6d38e8;return _0x1091a2['MiIjl'](_0x27c2f0[_0x81aa8b(0x145)]['id'],_0x461ffd)&&(_0x27c2f0[_0x81aa8b(0x145)][_0x81aa8b(0x131)]=_0x2d946f?0x1:0x0),_0x27c2f0;});else _0x6160c6&&_0x1091a2['MiIjl'](typeof _0x6160c6,_0x1091a2[_0x6d38e8(0x16b)])?(_0x443ae4={},Object['keys'](_0x6160c6)['forEach'](_0x216ade=>{const _0x4ed71d=_0x6d38e8,_0x3e6788=_0x6160c6[_0x216ade];Array[_0x4ed71d(0x159)](_0x3e6788)?_0x443ae4[_0x216ade]=_0x3e6788[_0x4ed71d(0x137)](_0x53e6cb=>{const _0xe200da=_0x4ed71d;return _0x1091a2['MiIjl'](_0x53e6cb[_0xe200da(0x145)]['id'],_0x461ffd)&&(_0x53e6cb[_0xe200da(0x145)][_0xe200da(0x131)]=_0x2d946f?0x1:0x0),_0x53e6cb;}):_0x443ae4[_0x216ade]=_0x3e6788;})):_0x443ae4=_0x6160c6;this['setData']({'posts':_0x443ae4}),wx[_0x6d38e8(0x16f)]({'title':_0x2d946f?_0x1091a2[_0x6d38e8(0x13f)]:_0x1091a2[_0x6d38e8(0x163)],'icon':_0x1091a2[_0x6d38e8(0x166)]});},'onVideoPlay'(_0x4af030){const _0x13dc02=_0x7c92,_0x21fcd3={'llTFT':function(_0x2d2996,_0x36bbc0){return _0x2d2996!==_0x36bbc0;}},_0x23ec3b=_0x4af030[_0x13dc02(0x164)]['id'],_0x2a061b=this[_0x13dc02(0x143)][_0x13dc02(0x13c)];if(_0x2a061b&&_0x21fcd3[_0x13dc02(0x153)](_0x2a061b,_0x23ec3b)){const _0x3b47a2=this[_0x13dc02(0x143)][_0x13dc02(0x161)]['findIndex'](_0x389686=>_0x389686[_0x13dc02(0x171)]['id']===_0x2a061b),_0x23405d=this[_0x13dc02(0x14f)](_0x13dc02(0x15d)+_0x3b47a2);_0x23405d&&_0x23405d['pauseVideo']();}this[_0x13dc02(0x15f)]({'currentPlayingVideoId':_0x23ec3b});}});
|