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,52 +1 @@
|
|
|
1
|
-
Component({
|
|
2
|
-
options: {
|
|
3
|
-
styleIsolation: 'apply-shared',
|
|
4
|
-
multipleSlots: true
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
properties: {
|
|
8
|
-
tabs: {
|
|
9
|
-
// 格式: [{ name: 'Tab A' }, { name: 'Tab B' }]
|
|
10
|
-
type: Array,
|
|
11
|
-
value: []
|
|
12
|
-
},
|
|
13
|
-
// 激活颜色,对应 van-tabs 的 color 参数
|
|
14
|
-
color: {
|
|
15
|
-
type: String,
|
|
16
|
-
value: '#1989fa'
|
|
17
|
-
},
|
|
18
|
-
// 受控模式:外部传入当前激活 tab 名
|
|
19
|
-
active: {
|
|
20
|
-
type: String,
|
|
21
|
-
value: ''
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
data: {
|
|
26
|
-
activeTab: ''
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
observers: {
|
|
30
|
-
'tabs, active': function (tabs, active) {
|
|
31
|
-
if (!tabs || !tabs.length) return
|
|
32
|
-
|
|
33
|
-
// 如果外部传了 active 且合法,就用外部的;否则默认第一个
|
|
34
|
-
const names = tabs.map(t => t.name)
|
|
35
|
-
if (active && names.includes(active)) {
|
|
36
|
-
this.setData({ activeTab: active })
|
|
37
|
-
} else if (!this.data.activeTab || !names.includes(this.data.activeTab)) {
|
|
38
|
-
this.setData({ activeTab: tabs[0].name })
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
methods: {
|
|
44
|
-
onTabTap(e) {
|
|
45
|
-
const name = e.currentTarget.dataset.name
|
|
46
|
-
if (name === this.data.activeTab) return
|
|
47
|
-
this.setData({ activeTab: name })
|
|
48
|
-
// 触发 change 事件,与 van-tabs 保持一致,detail.name 是新 tab 名
|
|
49
|
-
this.triggerEvent('change', { name })
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
})
|
|
1
|
+
function _0x4fbb(_0x3f1043,_0xcfa48b){_0x3f1043=_0x3f1043-0x1ba;const _0x1c5e51=_0x1c5e();let _0x4fbbd2=_0x1c5e51[_0x3f1043];if(_0x4fbb['jcTduz']===undefined){var _0x269467=function(_0x3111ed){const _0x240e49='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x34e6d2='',_0x4425e0='';for(let _0x3fd5ea=0x0,_0x5d6723,_0x46ddfa,_0x18d5da=0x0;_0x46ddfa=_0x3111ed['charAt'](_0x18d5da++);~_0x46ddfa&&(_0x5d6723=_0x3fd5ea%0x4?_0x5d6723*0x40+_0x46ddfa:_0x46ddfa,_0x3fd5ea++%0x4)?_0x34e6d2+=String['fromCharCode'](0xff&_0x5d6723>>(-0x2*_0x3fd5ea&0x6)):0x0){_0x46ddfa=_0x240e49['indexOf'](_0x46ddfa);}for(let _0x3ee56f=0x0,_0x4dbb83=_0x34e6d2['length'];_0x3ee56f<_0x4dbb83;_0x3ee56f++){_0x4425e0+='%'+('00'+_0x34e6d2['charCodeAt'](_0x3ee56f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4425e0);};_0x4fbb['clOaRJ']=_0x269467,_0x4fbb['SIWyQn']={},_0x4fbb['jcTduz']=!![];}const _0x5bfed5=_0x1c5e51[0x0],_0xc1d84f=_0x3f1043+_0x5bfed5,_0x58e452=_0x4fbb['SIWyQn'][_0xc1d84f];return!_0x58e452?(_0x4fbbd2=_0x4fbb['clOaRJ'](_0x4fbbd2),_0x4fbb['SIWyQn'][_0xc1d84f]=_0x4fbbd2):_0x4fbbd2=_0x58e452,_0x4fbbd2;}const _0x913fca=_0x4fbb;function _0x1c5e(){const _0x53922=['odeYmdveC1DRrMm','mtjRweXtu1q','nJiWmZm5AxjtrNHj','y2HHBMDL','mJeXnJu5ntH0uNnQv20','zgf0yq','mZG4zwvNvLno','C2v0rgf0yq','mJyZmdi5meDQCfnzyW','DhjPz2DLCKv2zw50','nJndDgTWzum','oty4u0nNB2XW','mtm1odiYr3P6wwr1','ywn0AxzLvgfI','yxbWBhKTC2HHCMvK','BMfTzq','nMXvr1r6tq','BwfW','mtG0nJq3ngPnvMjbqW','nJiYntnkzMrZBui','Dfjkr00','iZe5odLMyq'];_0x1c5e=function(){return _0x53922;};return _0x1c5e();}(function(_0x230865,_0x40bc2e){const _0x3980e9=_0x4fbb,_0xf1725f=_0x230865();while(!![]){try{const _0x3ccd4b=parseInt(_0x3980e9(0x1cb))/0x1+-parseInt(_0x3980e9(0x1c5))/0x2*(parseInt(_0x3980e9(0x1c3))/0x3)+-parseInt(_0x3980e9(0x1cf))/0x4*(-parseInt(_0x3980e9(0x1c9))/0x5)+parseInt(_0x3980e9(0x1bf))/0x6*(-parseInt(_0x3980e9(0x1bd))/0x7)+-parseInt(_0x3980e9(0x1be))/0x8*(parseInt(_0x3980e9(0x1c6))/0x9)+-parseInt(_0x3980e9(0x1bb))/0xa+parseInt(_0x3980e9(0x1cd))/0xb*(parseInt(_0x3980e9(0x1ca))/0xc);if(_0x3ccd4b===_0x40bc2e)break;else _0xf1725f['push'](_0xf1725f['shift']());}catch(_0x407c07){_0xf1725f['push'](_0xf1725f['shift']());}}}(_0x1c5e,0xecbe5),Component({'options':{'styleIsolation':_0x913fca(0x1c1),'multipleSlots':!![]},'properties':{'tabs':{'type':Array,'value':[]},'color':{'type':String,'value':_0x913fca(0x1c8)},'active':{'type':String,'value':''}},'data':{'activeTab':''},'observers':{'tabs,\x20active':function(_0x140d40,_0x46ff71){const _0x445938=_0x913fca;if(!_0x140d40||!_0x140d40['length'])return;const _0x41d1bd=_0x140d40[_0x445938(0x1c4)](_0x5d6938=>_0x5d6938['name']);if(_0x46ff71&&_0x41d1bd['includes'](_0x46ff71))this[_0x445938(0x1ba)]({'activeTab':_0x46ff71});else(!this[_0x445938(0x1ce)]['activeTab']||!_0x41d1bd['includes'](this['data'][_0x445938(0x1c0)]))&&this['setData']({'activeTab':_0x140d40[0x0][_0x445938(0x1c2)]});}},'methods':{'onTabTap'(_0x15e5ed){const _0x250edd=_0x913fca,_0x47b0b6={'Lvrbi':function(_0x2c4d3a,_0x24246c){return _0x2c4d3a===_0x24246c;},'tRJGM':_0x250edd(0x1cc)},_0x9b7ad4=_0x15e5ed['currentTarget']['dataset'][_0x250edd(0x1c2)];if(_0x47b0b6['Lvrbi'](_0x9b7ad4,this[_0x250edd(0x1ce)][_0x250edd(0x1c0)]))return;this[_0x250edd(0x1ba)]({'activeTab':_0x9b7ad4}),this[_0x250edd(0x1bc)](_0x47b0b6[_0x250edd(0x1c7)],{'name':_0x9b7ad4});}}}));
|
package/index.js
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
class GameSDK {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.gameId = 100000;
|
|
4
|
-
this.isInitialized = false;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
init(options = {}) {
|
|
8
|
-
const { gameId } = options;
|
|
9
|
-
|
|
10
|
-
if (!gameId) {
|
|
11
|
-
throw new Error('gameId is required');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
this.gameId = gameId;
|
|
15
|
-
this.isInitialized = true;
|
|
16
|
-
|
|
17
|
-
return this;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
navigateToGame(params = {}) {
|
|
21
|
-
this._checkInit();
|
|
22
|
-
wx.navigateTo({
|
|
23
|
-
url: `/miniprogram_npm/southnote-mini-sdk/pages/game/game?gameId=${this.gameId}&${this._buildQuery(params)}`
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
navigateToWiki(params = {}) {
|
|
28
|
-
this._checkInit();
|
|
29
|
-
wx.navigateTo({
|
|
30
|
-
url: `/miniprogram_npm/southnote-mini-sdk/pages/wiki/wiki?gameId=${this.gameId}&${this._buildQuery(params)}`
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
_checkInit() {
|
|
35
|
-
if (!this.isInitialized) {
|
|
36
|
-
throw new Error('SDK not initialized, please call init() first');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
_buildQuery(params) {
|
|
41
|
-
if (!Object.keys(params).length) return '';
|
|
42
|
-
return Object.keys(params)
|
|
43
|
-
.map(key => `${key}=${encodeURIComponent(params[key])}`)
|
|
44
|
-
.join('&');
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const sdk = new GameSDK();
|
|
49
|
-
module.exports = sdk;
|
|
1
|
+
const _0x32bf72=_0x2fc5;(function(_0x472625,_0x420e6c){const _0xe26774=_0x2fc5,_0x46507a=_0x472625();while(!![]){try{const _0x3bcc62=parseInt(_0xe26774(0x164))/0x1*(parseInt(_0xe26774(0x15b))/0x2)+-parseInt(_0xe26774(0x16d))/0x3*(-parseInt(_0xe26774(0x158))/0x4)+-parseInt(_0xe26774(0x16b))/0x5+-parseInt(_0xe26774(0x16c))/0x6*(parseInt(_0xe26774(0x171))/0x7)+parseInt(_0xe26774(0x15c))/0x8+parseInt(_0xe26774(0x169))/0x9*(parseInt(_0xe26774(0x16f))/0xa)+-parseInt(_0xe26774(0x165))/0xb;if(_0x3bcc62===_0x420e6c)break;else _0x46507a['push'](_0x46507a['shift']());}catch(_0x8bfc5d){_0x46507a['push'](_0x46507a['shift']());}}}(_0x3d65,0xdb3a6));function _0x2fc5(_0x59b015,_0xcb6fae){_0x59b015=_0x59b015-0x158;const _0x3d6511=_0x3d65();let _0x2fc57c=_0x3d6511[_0x59b015];if(_0x2fc5['fcgLQz']===undefined){var _0x2a8b0f=function(_0x5eb083){const _0x2dcb78='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x14cfbc='',_0x1d4273='';for(let _0x2df107=0x0,_0x311ca4,_0x3242ca,_0x3345ec=0x0;_0x3242ca=_0x5eb083['charAt'](_0x3345ec++);~_0x3242ca&&(_0x311ca4=_0x2df107%0x4?_0x311ca4*0x40+_0x3242ca:_0x3242ca,_0x2df107++%0x4)?_0x14cfbc+=String['fromCharCode'](0xff&_0x311ca4>>(-0x2*_0x2df107&0x6)):0x0){_0x3242ca=_0x2dcb78['indexOf'](_0x3242ca);}for(let _0xbdf3e6=0x0,_0x373189=_0x14cfbc['length'];_0xbdf3e6<_0x373189;_0xbdf3e6++){_0x1d4273+='%'+('00'+_0x14cfbc['charCodeAt'](_0xbdf3e6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1d4273);};_0x2fc5['qNwHws']=_0x2a8b0f,_0x2fc5['xNDlvR']={},_0x2fc5['fcgLQz']=!![];}const _0x30258e=_0x3d6511[0x0],_0x40a548=_0x59b015+_0x30258e,_0x18e073=_0x2fc5['xNDlvR'][_0x40a548];return!_0x18e073?(_0x2fc57c=_0x2fc5['qNwHws'](_0x2fc57c),_0x2fc5['xNDlvR'][_0x40a548]=_0x2fc57c):_0x2fc57c=_0x18e073,_0x2fc57c;}function _0x3d65(){const _0x1d7445=['ndKXmteYmfbMuKvdyq','AM9PBG','BMf2AwDHDgvuB0DHBwu','l21PBMLWCM9NCMfTx25WBs9ZB3v0Ag5VDguTBwLUAs1ZzgSVCgfNzxmVz2fTzs9Nyw1Lp2DHBwvjzd0','A2v5CW','BMf2AwDHDgvuB1DPA2K','z2fTzuLK','BgvUz3rO','mufpuMLiAG','mtCYnZK0mdvps2LXtuC','zxHWB3j0CW','BwfW','x2j1AwXKuxvLCNK','nZyXmtqXn0ryDfvmAq','AxnjBML0AwfSAxPLza','ndKWmJy5mfPnveL2AW','mJrktufRsgi','mtvpEgLIEMe','u0rlig5VDcbPBML0AwfSAxPLzcWGCgXLyxnLignHBgWGAw5PDcGPigzPCNn0','mtbXvgTct1G','z2fTzuLKigLZihjLCxvPCMvK','odu5ndzlCeTtCMu','Aw5PDa','ntaYmJa0z2jZCenr','x2nOzwnRsw5PDa','BMf2AwDHDgvuBW','mJGYmJiXmgf1thfJAW'];_0x3d65=function(){return _0x1d7445;};return _0x3d65();}class GameSDK{constructor(){const _0x51493e=_0x2fc5;this[_0x51493e(0x162)]=0x186a0,this[_0x51493e(0x16a)]=![];}[_0x32bf72(0x172)](_0x2dae2b={}){const _0x501af9=_0x32bf72,{gameId:_0x4dba14}=_0x2dae2b;if(!_0x4dba14)throw new Error(_0x501af9(0x170));return this[_0x501af9(0x162)]=_0x4dba14,this[_0x501af9(0x16a)]=!![],this;}[_0x32bf72(0x15e)](_0x502ca6={}){const _0x24f3fe=_0x32bf72;this['_checkInit'](),wx[_0x24f3fe(0x15a)]({'url':_0x24f3fe(0x15f)+this[_0x24f3fe(0x162)]+'&'+this['_buildQuery'](_0x502ca6)});}[_0x32bf72(0x161)](_0x2d0c13={}){const _0x3da7d8=_0x32bf72;this[_0x3da7d8(0x159)](),wx[_0x3da7d8(0x15a)]({'url':'/miniprogram_npm/southnote-mini-sdk/pages/wiki/wiki?gameId='+this['gameId']+'&'+this[_0x3da7d8(0x168)](_0x2d0c13)});}[_0x32bf72(0x159)](){const _0x41b8e4=_0x32bf72,_0x5603d0={'BZrgE':_0x41b8e4(0x16e)};if(!this[_0x41b8e4(0x16a)])throw new Error(_0x5603d0['BZrgE']);}[_0x32bf72(0x168)](_0x3fe727){const _0x48a1d7=_0x32bf72;if(!Object['keys'](_0x3fe727)[_0x48a1d7(0x163)])return'';return Object[_0x48a1d7(0x160)](_0x3fe727)[_0x48a1d7(0x167)](_0x1f82a6=>_0x1f82a6+'='+encodeURIComponent(_0x3fe727[_0x1f82a6]))[_0x48a1d7(0x15d)]('&');}}const sdk=new GameSDK();module[_0x32bf72(0x166)]=sdk;
|
package/package.json
CHANGED
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "southnote-mini-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "小南书SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"miniprogram": ".",
|
|
7
|
-
"files": [
|
|
8
|
-
"assets",
|
|
9
|
-
"components",
|
|
10
|
-
"pages",
|
|
11
|
-
"request",
|
|
12
|
-
"services",
|
|
13
|
-
"towxml",
|
|
14
|
-
"utils",
|
|
15
|
-
"app.js",
|
|
16
|
-
"app.json",
|
|
17
|
-
"app.wxss",
|
|
18
|
-
"index.js"
|
|
19
|
-
],
|
|
20
7
|
"keywords": [
|
|
21
8
|
"wechat",
|
|
22
9
|
"miniprogram",
|
|
@@ -25,18 +12,11 @@
|
|
|
25
12
|
],
|
|
26
13
|
"author": "你的名字",
|
|
27
14
|
"license": "MIT",
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "node build.js",
|
|
30
|
-
"publish:sdk": "npm run build && cd dist && npm publish"
|
|
31
|
-
},
|
|
32
15
|
"dependencies": {
|
|
33
16
|
"pako": "^2.1.0",
|
|
34
17
|
"underscore": "^1.13.6"
|
|
35
18
|
},
|
|
36
19
|
"peerDependencies": {
|
|
37
20
|
"@vant/weapp": ">=1.0.0"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"javascript-obfuscator": "^5.4.2"
|
|
41
21
|
}
|
|
42
|
-
}
|
|
22
|
+
}
|
package/pages/addGame/addGame.js
CHANGED
|
@@ -1,454 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
queryUserGames,
|
|
3
|
-
queryGames,
|
|
4
|
-
search
|
|
5
|
-
} from "../../services/home";
|
|
6
|
-
|
|
7
|
-
Page({
|
|
8
|
-
data: {
|
|
9
|
-
// tabs / categories
|
|
10
|
-
categories: [{
|
|
11
|
-
key: 'recent',
|
|
12
|
-
title: '最近添加'
|
|
13
|
-
}, // 特殊 tab,用 index 管理
|
|
14
|
-
{
|
|
15
|
-
key: 'my',
|
|
16
|
-
title: '我的游戏库'
|
|
17
|
-
}, // 特殊 tab,用 index 管理
|
|
18
|
-
{
|
|
19
|
-
key: 1,
|
|
20
|
-
title: '总榜'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
key: 2,
|
|
24
|
-
title: '期待'
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
key: 3,
|
|
28
|
-
title: '新品'
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
key: 4,
|
|
32
|
-
title: '策略'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: 5,
|
|
36
|
-
title: '动作'
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
key: 6,
|
|
40
|
-
title: '角色扮演'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: 7,
|
|
44
|
-
title: '竞速'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
key: 8,
|
|
48
|
-
title: '聚会'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
key: 9,
|
|
52
|
-
title: '卡牌'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
key: 10,
|
|
56
|
-
title: '冒险'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
key: 11,
|
|
60
|
-
title: '模拟'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
key: 12,
|
|
64
|
-
title: '体育'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
key: 13,
|
|
68
|
-
title: '文字'
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
key: 14,
|
|
72
|
-
title: '问答'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
key: 15,
|
|
76
|
-
title: '休闲'
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
key: 16,
|
|
80
|
-
title: '益智解密'
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: 17,
|
|
84
|
-
title: '音乐'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
key: 18,
|
|
88
|
-
title: '娱乐场'
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
key: 19,
|
|
92
|
-
title: '桌游'
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
key: 20,
|
|
96
|
-
title: '射击'
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
key: 21,
|
|
100
|
-
title: '二次元'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
key: 22,
|
|
104
|
-
title: 'Roguelike'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
key: 23,
|
|
108
|
-
title: '女性向'
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
key: 24,
|
|
112
|
-
title: '沙盒'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
key: 25,
|
|
116
|
-
title: '开放世界'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
key: 26,
|
|
120
|
-
title: 'MMORPG'
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
key: 27,
|
|
124
|
-
title: '武侠'
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
key: 28,
|
|
128
|
-
title: 'MOBA'
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
key: 29,
|
|
132
|
-
title: '放置'
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
key: 30,
|
|
136
|
-
title: '塔防'
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
key: 31,
|
|
140
|
-
title: '影游'
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
activeKey: 0,
|
|
146
|
-
games: [],
|
|
147
|
-
loading: false,
|
|
148
|
-
refreshing: false,
|
|
149
|
-
page: 1,
|
|
150
|
-
hasMore: true,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
// 我的库分页单独管理
|
|
154
|
-
myPage: 1,
|
|
155
|
-
myHasMore: true,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
// 搜索
|
|
159
|
-
searchValue: '',
|
|
160
|
-
showSearchResult: false,
|
|
161
|
-
searchResults: [],
|
|
162
|
-
searchPage: 1, // 当前搜索页码
|
|
163
|
-
searchHasMore: true, // 搜索是否还有更多
|
|
164
|
-
searchLoading: false,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
onLoad() {
|
|
170
|
-
const recentGames = wx.getStorageSync('recentGames') || [];
|
|
171
|
-
// 最近添加属于 categories[0], 如果当前 activeKey 是 0,展示缓存
|
|
172
|
-
if (this.data.activeKey === 0) {
|
|
173
|
-
this.setData({
|
|
174
|
-
games: recentGames
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
this.setData({
|
|
178
|
-
recentGames
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
saveRecentGame(game) {
|
|
184
|
-
let recentGames = wx.getStorageSync('recentGames') || [];
|
|
185
|
-
recentGames = recentGames.filter(item => item.id !== game.id);
|
|
186
|
-
recentGames.unshift(game);
|
|
187
|
-
if (recentGames.length > 10) recentGames = recentGames.slice(0, 10);
|
|
188
|
-
wx.setStorageSync('recentGames', recentGames);
|
|
189
|
-
this.setData({
|
|
190
|
-
recentGames
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
// 放在 Page({ ... }) 内,与其它方法同级
|
|
195
|
-
loadRecentGames() {
|
|
196
|
-
// 最近缓存直接从 storage 里读
|
|
197
|
-
const recentGames = wx.getStorageSync('recentGames') || [];
|
|
198
|
-
this.setData({
|
|
199
|
-
games: recentGames,
|
|
200
|
-
refreshing: false,
|
|
201
|
-
loading: false,
|
|
202
|
-
hasMore: false // 最近列表是缓存,不走分页
|
|
203
|
-
});
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
async loadCategoryGames(reset = false) {
|
|
207
|
-
// 分类页(从 categories 中取 key)用 queryGames(filter, page)
|
|
208
|
-
// 防抖 / 防重入
|
|
209
|
-
if (this.data.loading) return;
|
|
210
|
-
this.setData({
|
|
211
|
-
loading: true
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
// 计算 page(reset 则回到 1)
|
|
215
|
-
let page = reset ? 1 : this.data.page || 1;
|
|
216
|
-
|
|
217
|
-
// 取当前分类 key(注意:activeKey 可能是数字索引)
|
|
218
|
-
const idx = this.data.activeKey;
|
|
219
|
-
const category = this.data.categories && this.data.categories[idx];
|
|
220
|
-
const filter = category ? category.key : ''; // 例如 'total' 'strategy' 等
|
|
221
|
-
|
|
222
|
-
try {
|
|
223
|
-
// 假设 queryGames(filter, page) 返回 { code: 0, data: [...] }
|
|
224
|
-
const res = await queryGames(filter, page);
|
|
225
|
-
if (res && res.code === 0) {
|
|
226
|
-
const list = Array.isArray(res.data) ? res.data : [];
|
|
227
|
-
|
|
228
|
-
// reset 时替换列表;否则追加
|
|
229
|
-
const newGames = reset ? list : [...(this.data.games || []), ...list];
|
|
230
|
-
|
|
231
|
-
// 下一页逻辑:如果本次返回有数据就认为还有更多(简单判断)
|
|
232
|
-
const hasMore = list.length > 0;
|
|
233
|
-
|
|
234
|
-
// 如果有数据并且不是 reset,则 page++
|
|
235
|
-
const nextPage = (reset ? 1 : page) + (list.length > 0 ? 1 : 0);
|
|
236
|
-
|
|
237
|
-
this.setData({
|
|
238
|
-
games: newGames,
|
|
239
|
-
page: nextPage,
|
|
240
|
-
hasMore,
|
|
241
|
-
});
|
|
242
|
-
} else {
|
|
243
|
-
// 请求失败或 code !== 0:保守处理为没有更多
|
|
244
|
-
this.setData({
|
|
245
|
-
hasMore: false
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
} catch (err) {
|
|
249
|
-
console.error('加载分类游戏失败:', err);
|
|
250
|
-
this.setData({
|
|
251
|
-
hasMore: false
|
|
252
|
-
});
|
|
253
|
-
} finally {
|
|
254
|
-
this.setData({
|
|
255
|
-
loading: false,
|
|
256
|
-
refreshing: false
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
onSearchReachBottom() {
|
|
262
|
-
if (!this.data.showSearchResult) return;
|
|
263
|
-
this.loadSearchResults(); // 调用搜索接口分页
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
onSearchInput(e) {
|
|
268
|
-
const value = e.detail.value.trim();
|
|
269
|
-
|
|
270
|
-
this.setData({
|
|
271
|
-
searchValue: value,
|
|
272
|
-
showSearchResult: !!value,
|
|
273
|
-
searchPage: 1,
|
|
274
|
-
searchResults: [],
|
|
275
|
-
searchHasMore: true,
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
if (value) {
|
|
279
|
-
this.loadSearchResults(true);
|
|
280
|
-
} else {
|
|
281
|
-
this.setData({
|
|
282
|
-
searchResults: [],
|
|
283
|
-
searchHasMore: true,
|
|
284
|
-
searchLoading: false,
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
async loadSearchResults(reset = false) {
|
|
290
|
-
if (this.data.searchLoading || !this.data.searchHasMore) return;
|
|
291
|
-
|
|
292
|
-
this.setData({
|
|
293
|
-
searchLoading: true
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
const page = reset ? 1 : this.data.searchPage;
|
|
297
|
-
const input = this.data.searchValue;
|
|
298
|
-
|
|
299
|
-
try {
|
|
300
|
-
const res = await search(input, 3, page); // nType 固定 3
|
|
301
|
-
if (res && res.code === 0) {
|
|
302
|
-
const list = Array.isArray(res.data.games) ? res.data.games : [];
|
|
303
|
-
|
|
304
|
-
const newResults = reset ? list : [...(this.data.searchResults || []), ...list];
|
|
305
|
-
|
|
306
|
-
const hasMore = list.length > 0;
|
|
307
|
-
|
|
308
|
-
this.setData({
|
|
309
|
-
searchResults: newResults,
|
|
310
|
-
searchPage: page + (list.length > 0 ? 1 : 0),
|
|
311
|
-
searchHasMore: hasMore,
|
|
312
|
-
});
|
|
313
|
-
} else {
|
|
314
|
-
this.setData({
|
|
315
|
-
searchHasMore: false,
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
} catch (err) {
|
|
319
|
-
console.error('搜索失败', err);
|
|
320
|
-
this.setData({
|
|
321
|
-
searchHasMore: false,
|
|
322
|
-
});
|
|
323
|
-
} finally {
|
|
324
|
-
this.setData({
|
|
325
|
-
searchLoading: false
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
onChangeTab(e) {
|
|
332
|
-
const key = e.detail;
|
|
333
|
-
this.setData({
|
|
334
|
-
activeKey: key,
|
|
335
|
-
page: 1,
|
|
336
|
-
hasMore: true,
|
|
337
|
-
loading: false
|
|
338
|
-
});
|
|
339
|
-
// 切 tab 时清空右侧列表,避免闪烁数据
|
|
340
|
-
this.setData({
|
|
341
|
-
games: []
|
|
342
|
-
});
|
|
343
|
-
this.loadActiveTab(true);
|
|
344
|
-
},
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
loadActiveTab(reset = false) {
|
|
348
|
-
const idx = this.data.activeKey;
|
|
349
|
-
// idx 0 -> 最近缓存
|
|
350
|
-
if (idx === 0) {
|
|
351
|
-
this.loadRecentGames();
|
|
352
|
-
this.setData({
|
|
353
|
-
refreshing: false
|
|
354
|
-
});
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
// idx 1 -> 我的游戏库 调用 queryUserGames(target_id=当前用户id, page)
|
|
360
|
-
if (idx === 1) {
|
|
361
|
-
this.loadMyGames(reset);
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
// idx >=2 -> 从总榜开始使用 queryGames(filter, page)
|
|
367
|
-
this.loadCategoryGames(reset);
|
|
368
|
-
},
|
|
369
|
-
|
|
370
|
-
async loadMyGames(reset = false) {
|
|
371
|
-
const user_id = wx.getStorageSync('appuid')
|
|
372
|
-
const {
|
|
373
|
-
myPage
|
|
374
|
-
} = this.data
|
|
375
|
-
try {
|
|
376
|
-
const res = await queryUserGames(
|
|
377
|
-
user_id,
|
|
378
|
-
myPage
|
|
379
|
-
);
|
|
380
|
-
if (res && res.code === 0) {
|
|
381
|
-
const list = reset ? res.data : [...this.data.games, ...res.data];
|
|
382
|
-
this.setData({
|
|
383
|
-
games: list,
|
|
384
|
-
myPage,
|
|
385
|
-
hasMore: res.data.length > 0
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
} catch (err) {
|
|
389
|
-
console.error('加载分类游戏失败:', err);
|
|
390
|
-
} finally {
|
|
391
|
-
this.setData({
|
|
392
|
-
loading: false,
|
|
393
|
-
refreshing: false
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
onRefresh() {
|
|
400
|
-
this.setData({
|
|
401
|
-
refreshing: true
|
|
402
|
-
});
|
|
403
|
-
const idx = this.data.activeKey;
|
|
404
|
-
if (idx === 0) {
|
|
405
|
-
this.loadRecentGames();
|
|
406
|
-
} else if (idx === 1) {
|
|
407
|
-
this.loadMyGames(true);
|
|
408
|
-
} else {
|
|
409
|
-
this.loadCategoryGames(true);
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
onReachBottom() {
|
|
415
|
-
const idx = this.data.activeKey;
|
|
416
|
-
if (idx === 0) return; // 最近缓存不分页
|
|
417
|
-
if (idx === 1) {
|
|
418
|
-
this.loadMyGames();
|
|
419
|
-
} else {
|
|
420
|
-
this.loadCategoryGames();
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
onSelectGame(e) {
|
|
426
|
-
const game = e.currentTarget.dataset.game;
|
|
427
|
-
if (!game) return;
|
|
428
|
-
this.saveRecentGame(game);
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
const pages = getCurrentPages();
|
|
432
|
-
const prevPage = pages[pages.length - 2];
|
|
433
|
-
if (!prevPage) {
|
|
434
|
-
console.warn('未找到上一个页面');
|
|
435
|
-
wx.navigateBack();
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
const bottomSheet = prevPage.selectComponent?.('#bottomSheet');
|
|
441
|
-
if (bottomSheet) {
|
|
442
|
-
setTimeout(() => {
|
|
443
|
-
bottomSheet.setData({
|
|
444
|
-
selectedGame: game
|
|
445
|
-
});
|
|
446
|
-
}, 100);
|
|
447
|
-
} else {
|
|
448
|
-
prevPage.setData({
|
|
449
|
-
selectedGame: game
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
wx.navigateBack();
|
|
453
|
-
}
|
|
454
|
-
});
|
|
1
|
+
const _0x187255=_0x4029;(function(_0x3a7f63,_0x5e6057){const _0x470d75=_0x4029,_0x422965=_0x3a7f63();while(!![]){try{const _0x139ed2=parseInt(_0x470d75(0x162))/0x1*(parseInt(_0x470d75(0x193))/0x2)+-parseInt(_0x470d75(0x16d))/0x3+parseInt(_0x470d75(0x17b))/0x4+-parseInt(_0x470d75(0x18c))/0x5+parseInt(_0x470d75(0x18d))/0x6*(-parseInt(_0x470d75(0x16f))/0x7)+-parseInt(_0x470d75(0x177))/0x8+parseInt(_0x470d75(0x16a))/0x9;if(_0x139ed2===_0x5e6057)break;else _0x422965['push'](_0x422965['shift']());}catch(_0x36fe40){_0x422965['push'](_0x422965['shift']());}}}(_0x2d9f,0xc06d1));import{queryUserGames,queryGames,search}from'../../services/home';function _0x4029(_0x150057,_0x31a02e){_0x150057=_0x150057-0x159;const _0x2d9f4c=_0x2d9f();let _0x4029cd=_0x2d9f4c[_0x150057];if(_0x4029['NoAhUG']===undefined){var _0x256962=function(_0x484958){const _0x2915f0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x58962e='',_0x180a8c='';for(let _0x543418=0x0,_0x2b4fab,_0x2a366c,_0x5dc0dc=0x0;_0x2a366c=_0x484958['charAt'](_0x5dc0dc++);~_0x2a366c&&(_0x2b4fab=_0x543418%0x4?_0x2b4fab*0x40+_0x2a366c:_0x2a366c,_0x543418++%0x4)?_0x58962e+=String['fromCharCode'](0xff&_0x2b4fab>>(-0x2*_0x543418&0x6)):0x0){_0x2a366c=_0x2915f0['indexOf'](_0x2a366c);}for(let _0x2f813b=0x0,_0x2816e9=_0x58962e['length'];_0x2f813b<_0x2816e9;_0x2f813b++){_0x180a8c+='%'+('00'+_0x58962e['charCodeAt'](_0x2f813b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x180a8c);};_0x4029['lqiFdO']=_0x256962,_0x4029['rJMhpn']={},_0x4029['NoAhUG']=!![];}const _0x4c2c95=_0x2d9f4c[0x0],_0x5c1eb2=_0x150057+_0x4c2c95,_0x288807=_0x4029['rJMhpn'][_0x5c1eb2];return!_0x288807?(_0x4029cd=_0x4029['lqiFdO'](_0x4029cd),_0x4029['rJMhpn'][_0x5c1eb2]=_0x4029cd):_0x4029cd=_0x288807,_0x4029cd;}Page({'data':{'categories':[{'key':_0x187255(0x19d),'title':_0x187255(0x15e)},{'key':'my','title':_0x187255(0x185)},{'key':0x1,'title':'总榜'},{'key':0x2,'title':'期待'},{'key':0x3,'title':'新品'},{'key':0x4,'title':'策略'},{'key':0x5,'title':'动作'},{'key':0x6,'title':_0x187255(0x19e)},{'key':0x7,'title':'竞速'},{'key':0x8,'title':'聚会'},{'key':0x9,'title':'卡牌'},{'key':0xa,'title':'冒险'},{'key':0xb,'title':'模拟'},{'key':0xc,'title':'体育'},{'key':0xd,'title':'文字'},{'key':0xe,'title':'问答'},{'key':0xf,'title':'休闲'},{'key':0x10,'title':_0x187255(0x19a)},{'key':0x11,'title':'音乐'},{'key':0x12,'title':_0x187255(0x196)},{'key':0x13,'title':'桌游'},{'key':0x14,'title':'射击'},{'key':0x15,'title':'二次元'},{'key':0x16,'title':_0x187255(0x161)},{'key':0x17,'title':_0x187255(0x180)},{'key':0x18,'title':'沙盒'},{'key':0x19,'title':_0x187255(0x18e)},{'key':0x1a,'title':'MMORPG'},{'key':0x1b,'title':'武侠'},{'key':0x1c,'title':_0x187255(0x165)},{'key':0x1d,'title':'放置'},{'key':0x1e,'title':'塔防'},{'key':0x1f,'title':'影游'}],'activeKey':0x0,'games':[],'loading':![],'refreshing':![],'page':0x1,'hasMore':!![],'myPage':0x1,'myHasMore':!![],'searchValue':'','showSearchResult':![],'searchResults':[],'searchPage':0x1,'searchHasMore':!![],'searchLoading':![]},'onLoad'(){const _0x4acf71=_0x187255,_0x3f637e={'vBqqM':_0x4acf71(0x188)},_0x1c0796=wx[_0x4acf71(0x18a)](_0x3f637e['vBqqM'])||[];this[_0x4acf71(0x17c)][_0x4acf71(0x197)]===0x0&&this[_0x4acf71(0x160)]({'games':_0x1c0796}),this[_0x4acf71(0x160)]({'recentGames':_0x1c0796});},'saveRecentGame'(_0x167a33){const _0x1c486a=_0x187255,_0x36c983={'ScRfa':_0x1c486a(0x188),'SEkWB':function(_0x3893e9,_0x4732e2){return _0x3893e9>_0x4732e2;}};let _0x3a88f9=wx['getStorageSync'](_0x36c983['ScRfa'])||[];_0x3a88f9=_0x3a88f9[_0x1c486a(0x184)](_0x1c8b6c=>_0x1c8b6c['id']!==_0x167a33['id']),_0x3a88f9[_0x1c486a(0x16e)](_0x167a33);if(_0x36c983[_0x1c486a(0x16b)](_0x3a88f9['length'],0xa))_0x3a88f9=_0x3a88f9[_0x1c486a(0x187)](0x0,0xa);wx[_0x1c486a(0x15f)](_0x36c983[_0x1c486a(0x15a)],_0x3a88f9),this[_0x1c486a(0x160)]({'recentGames':_0x3a88f9});},'loadRecentGames'(){const _0x44fdf0=_0x187255,_0x21aa68={'PVSjV':_0x44fdf0(0x188)},_0x2f7b85=wx[_0x44fdf0(0x18a)](_0x21aa68[_0x44fdf0(0x17a)])||[];this[_0x44fdf0(0x160)]({'games':_0x2f7b85,'refreshing':![],'loading':![],'hasMore':![]});},async 'loadCategoryGames'(_0x569402=![]){const _0x2f24e1=_0x187255,_0x448afd={'izHRP':function(_0x4a0817,_0x1466fc,_0x307a46){return _0x4a0817(_0x1466fc,_0x307a46);},'muVKm':function(_0x1d3507,_0x440dfb){return _0x1d3507===_0x440dfb;},'cGXVe':function(_0x2bbd8,_0x384987){return _0x2bbd8+_0x384987;},'SzUBN':function(_0x128bf6,_0x3728e8){return _0x128bf6>_0x3728e8;},'SMvuQ':_0x2f24e1(0x167)};if(this[_0x2f24e1(0x17c)]['loading'])return;this[_0x2f24e1(0x160)]({'loading':!![]});let _0x35091f=_0x569402?0x1:this[_0x2f24e1(0x17c)][_0x2f24e1(0x17e)]||0x1;const _0x19328e=this['data']['activeKey'],_0x883465=this[_0x2f24e1(0x17c)][_0x2f24e1(0x15b)]&&this[_0x2f24e1(0x17c)][_0x2f24e1(0x15b)][_0x19328e],_0x487050=_0x883465?_0x883465[_0x2f24e1(0x166)]:'';try{const _0x22f77b=await _0x448afd[_0x2f24e1(0x190)](queryGames,_0x487050,_0x35091f);if(_0x22f77b&&_0x448afd[_0x2f24e1(0x15d)](_0x22f77b['code'],0x0)){const _0x34c459=Array['isArray'](_0x22f77b[_0x2f24e1(0x17c)])?_0x22f77b[_0x2f24e1(0x17c)]:[],_0x24a78b=_0x569402?_0x34c459:[...this[_0x2f24e1(0x17c)][_0x2f24e1(0x198)]||[],..._0x34c459],_0x1f7aa5=_0x34c459[_0x2f24e1(0x192)]>0x0,_0x50ae6c=_0x448afd[_0x2f24e1(0x182)](_0x569402?0x1:_0x35091f,_0x448afd[_0x2f24e1(0x174)](_0x34c459[_0x2f24e1(0x192)],0x0)?0x1:0x0);this['setData']({'games':_0x24a78b,'page':_0x50ae6c,'hasMore':_0x1f7aa5});}else this[_0x2f24e1(0x160)]({'hasMore':![]});}catch(_0x15921e){console[_0x2f24e1(0x19c)](_0x448afd[_0x2f24e1(0x178)],_0x15921e),this[_0x2f24e1(0x160)]({'hasMore':![]});}finally{this[_0x2f24e1(0x160)]({'loading':![],'refreshing':![]});}},'onSearchReachBottom'(){if(!this['data']['showSearchResult'])return;this['loadSearchResults']();},'onSearchInput'(_0x22bfa2){const _0x1d89c4=_0x187255,_0x2f4268=_0x22bfa2['detail']['value'][_0x1d89c4(0x163)]();this[_0x1d89c4(0x160)]({'searchValue':_0x2f4268,'showSearchResult':!!_0x2f4268,'searchPage':0x1,'searchResults':[],'searchHasMore':!![]}),_0x2f4268?this[_0x1d89c4(0x181)](!![]):this[_0x1d89c4(0x160)]({'searchResults':[],'searchHasMore':!![],'searchLoading':![]});},async 'loadSearchResults'(_0x289be8=![]){const _0x37409e=_0x187255,_0x1595f9={'qUPQu':function(_0x5d0951,_0x47305b,_0x288462,_0x20eda8){return _0x5d0951(_0x47305b,_0x288462,_0x20eda8);},'gZVSn':function(_0x5582f8,_0x2dc732){return _0x5582f8+_0x2dc732;},'KGSmi':_0x37409e(0x172)};if(this[_0x37409e(0x17c)]['searchLoading']||!this[_0x37409e(0x17c)][_0x37409e(0x191)])return;this['setData']({'searchLoading':!![]});const _0x5e5f6a=_0x289be8?0x1:this[_0x37409e(0x17c)]['searchPage'],_0x4ef1db=this[_0x37409e(0x17c)][_0x37409e(0x179)];try{const _0x3e2c07=await _0x1595f9[_0x37409e(0x173)](search,_0x4ef1db,0x3,_0x5e5f6a);if(_0x3e2c07&&_0x3e2c07[_0x37409e(0x168)]===0x0){const _0x5e279c=Array[_0x37409e(0x159)](_0x3e2c07[_0x37409e(0x17c)][_0x37409e(0x198)])?_0x3e2c07[_0x37409e(0x17c)][_0x37409e(0x198)]:[],_0x50b17a=_0x289be8?_0x5e279c:[...this[_0x37409e(0x17c)]['searchResults']||[],..._0x5e279c],_0x17aed1=_0x5e279c[_0x37409e(0x192)]>0x0;this[_0x37409e(0x160)]({'searchResults':_0x50b17a,'searchPage':_0x1595f9[_0x37409e(0x195)](_0x5e5f6a,_0x5e279c['length']>0x0?0x1:0x0),'searchHasMore':_0x17aed1});}else this['setData']({'searchHasMore':![]});}catch(_0xe3721a){console[_0x37409e(0x19c)](_0x1595f9[_0x37409e(0x15c)],_0xe3721a),this[_0x37409e(0x160)]({'searchHasMore':![]});}finally{this['setData']({'searchLoading':![]});}},'onChangeTab'(_0x7e124f){const _0x4e889f=_0x187255,_0x477b33=_0x7e124f['detail'];this[_0x4e889f(0x160)]({'activeKey':_0x477b33,'page':0x1,'hasMore':!![],'loading':![]}),this[_0x4e889f(0x160)]({'games':[]}),this[_0x4e889f(0x18b)](!![]);},'loadActiveTab'(_0x410bf6=![]){const _0x5a8ff3=_0x187255,_0x5f35ff={'IRxYe':function(_0x182603,_0x1ac715){return _0x182603===_0x1ac715;}},_0x4bb41e=this['data'][_0x5a8ff3(0x197)];if(_0x5f35ff[_0x5a8ff3(0x199)](_0x4bb41e,0x0)){this[_0x5a8ff3(0x183)](),this[_0x5a8ff3(0x160)]({'refreshing':![]});return;}if(_0x5f35ff[_0x5a8ff3(0x199)](_0x4bb41e,0x1)){this[_0x5a8ff3(0x175)](_0x410bf6);return;}this[_0x5a8ff3(0x170)](_0x410bf6);},async 'loadMyGames'(_0x1ea643=![]){const _0x4a3500=_0x187255,_0x4cd521={'MyCuY':_0x4a3500(0x18f),'Bkrai':function(_0x22f5f5,_0x4cd5e5,_0x54dc69){return _0x22f5f5(_0x4cd5e5,_0x54dc69);}},_0x35395=wx[_0x4a3500(0x18a)](_0x4cd521['MyCuY']),{myPage:_0x1134fd}=this[_0x4a3500(0x17c)];try{const _0x13a834=await _0x4cd521[_0x4a3500(0x189)](queryUserGames,_0x35395,_0x1134fd);if(_0x13a834&&_0x13a834[_0x4a3500(0x168)]===0x0){const _0x16a2c4=_0x1ea643?_0x13a834[_0x4a3500(0x17c)]:[...this[_0x4a3500(0x17c)]['games'],..._0x13a834['data']];this['setData']({'games':_0x16a2c4,'myPage':_0x1134fd,'hasMore':_0x13a834[_0x4a3500(0x17c)][_0x4a3500(0x192)]>0x0});}}catch(_0x1b1bdd){console[_0x4a3500(0x19c)](_0x4a3500(0x167),_0x1b1bdd);}finally{this[_0x4a3500(0x160)]({'loading':![],'refreshing':![]});}},'onRefresh'(){const _0x19e136=_0x187255,_0x2cac2f={'JcgsC':function(_0x4c2a93,_0x45a8a4){return _0x4c2a93===_0x45a8a4;}};this['setData']({'refreshing':!![]});const _0x52b0dd=this[_0x19e136(0x17c)][_0x19e136(0x197)];if(_0x2cac2f[_0x19e136(0x17d)](_0x52b0dd,0x0))this['loadRecentGames']();else _0x2cac2f['JcgsC'](_0x52b0dd,0x1)?this[_0x19e136(0x175)](!![]):this[_0x19e136(0x170)](!![]);},'onReachBottom'(){const _0x54d8bf=_0x187255,_0x344ffa={'dJkDu':function(_0xc0e70d,_0x28695a){return _0xc0e70d===_0x28695a;},'UEcoZ':function(_0x12bc72,_0x1a0060){return _0x12bc72===_0x1a0060;}},_0x1316d5=this[_0x54d8bf(0x17c)]['activeKey'];if(_0x344ffa['dJkDu'](_0x1316d5,0x0))return;_0x344ffa[_0x54d8bf(0x194)](_0x1316d5,0x1)?this[_0x54d8bf(0x175)]():this[_0x54d8bf(0x170)]();},'onSelectGame'(_0x501ef2){const _0x36bf5e=_0x187255,_0x3ddeeb={'tvwye':function(_0x594fc9){return _0x594fc9();},'NbSpc':function(_0xcf855b,_0x18ddab){return _0xcf855b-_0x18ddab;},'BvZMV':_0x36bf5e(0x17f),'cPCVJ':_0x36bf5e(0x16c),'SimYt':function(_0xd27824,_0xf24b02,_0xf96ef){return _0xd27824(_0xf24b02,_0xf96ef);}},_0x2d8143=_0x501ef2[_0x36bf5e(0x164)][_0x36bf5e(0x176)][_0x36bf5e(0x186)];if(!_0x2d8143)return;this['saveRecentGame'](_0x2d8143);const _0x31b7bc=_0x3ddeeb['tvwye'](getCurrentPages),_0xe534d7=_0x31b7bc[_0x3ddeeb['NbSpc'](_0x31b7bc[_0x36bf5e(0x192)],0x2)];if(!_0xe534d7){console['warn'](_0x3ddeeb[_0x36bf5e(0x19b)]),wx[_0x36bf5e(0x171)]();return;}const _0x37368b=_0xe534d7[_0x36bf5e(0x169)]?.(_0x3ddeeb['cPCVJ']);_0x37368b?_0x3ddeeb['SimYt'](setTimeout,()=>{const _0x414321=_0x36bf5e;_0x37368b[_0x414321(0x160)]({'selectedGame':_0x2d8143});},0x64):_0xe534d7[_0x36bf5e(0x160)]({'selectedGame':_0x2d8143}),wx['navigateBack']();}});function _0x2d9f(){const _0x220848=['ndaYv2LsyNfN','vuvJB1O','z1Pwu24','5AIX5lMq5zY6','ywn0AxzLs2v5','z2fTzxm','svj4wwu','55Uk5PM66kEJ5A+g','qNzAtvy','zxjYB3i','CMvJzw50','6kEs6iMY5OMU5RYu','AxnbCNjHEq','u2nszMe','y2f0zwDVCMLLCW','s0DtBwK','Bxvws20','5PYa6l+r5RE75yQG','C2v0u3rVCMfNzvn5BMm','C2v0rgf0yq','uM9NDwvSAwTL','mZi1muPLqxHUvq','DhjPBq','y3vYCMvUDfrHCMDLDa','tu9cqq','A2v5','5yQG6l295yIg57g75RI45OIp5AsX6lsLoG','y29Kzq','C2vSzwn0q29TCg9Uzw50','ndi1ota2ndzbywrQvfu','u0vRv0i','i2jVDhrVBvnOzwv0','mZa5nJe2mKjxqvbMAa','Dw5ZAgLMDa','mJm4nJu1oxrnALndqq','Bg9HzenHDgvNB3j5r2fTzxm','BMf2AwDHDgvcywnR','5PcC57sI5AsX6lsL','Cvvquxu','u3PvqK4','Bg9Hze15r2fTzxm','zgf0yxnLDa','mte2mZiWmZjwvwjnvuG','u012Dve','C2vHCMnOvMfSDwu','ufztALy','mtC4mJCWoePJuK1IBW','zgf0yq','sMnNC0m','CgfNzq','5PYQ5OM+5yIW5lIk5lIa5lIQ6Ag16z2I','5AwZ5OcN5zcr','Bg9HzfnLyxjJAfjLC3vSDhm','y0DyvMu','Bg9HzfjLy2vUDeDHBwvZ','zMLSDgvY','5OIr55Qe5RI45OIp5BQt','z2fTzq','C2XPy2u','CMvJzw50r2fTzxm','qMTYywK','z2v0u3rVCMfNzvn5BMm','Bg9HzefJDgL2zvrHyG','nZy3mtG4mgHgsufTCa','mtHNt25tzNe','5BYa5Ps+5lIw55wm','yxbWDwLK','AxPiuLa','C2vHCMnOsgfZtw9Yzq','BgvUz3rO'];_0x2d9f=function(){return _0x220848;};return _0x2d9f();}
|