Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
ZheShangBank_TaoQuan_20240612
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
ZheShangBank_TaoQuan_20240612
Commits
04812804
Commit
04812804
authored
Jul 05, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理一下代码
parent
26ea7b5a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
179 additions
and
1 deletion
+179
-1
encodings.xml
.idea/encodings.xml
+2
-0
GameMgr.ts
assets/Scripts/GameMgr.ts
+5
-1
Crypto.ts
assets/Scripts/Utils/Crypto.ts
+32
-0
Crypto.ts.meta
assets/Scripts/Utils/Crypto.ts.meta
+9
-0
index.html
build/web-mobile/index.html
+119
-0
package.json
package.json
+2
-0
yarn.lock
yarn.lock
+10
-0
No files found.
.idea/encodings.xml
View file @
04812804
...
...
@@ -6,6 +6,8 @@
<file
url=
"file://$PROJECT_DIR$/assets/AppTool.ts"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/assets/Component/Svga"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/assets/Module/hooks"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/assets/Scripts/Utils/Crypto.ts"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/assets/Scripts/Utils/Crypto.ts.meta"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/assets/plugin/SVGA.Lite.v2.1.1.js"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/assets/plugin/SVGA.Lite.v2.1.1.js.meta"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/assets/plugin/declare-process.js"
charset=
"UTF-8"
/>
...
...
assets/Scripts/GameMgr.ts
View file @
04812804
...
...
@@ -5,6 +5,7 @@ import NoBoxPanel from "db://assets/Scripts/Panels/NoBoxPanel";
import
PrizePanel
from
"db://assets/Scripts/Panels/PrizePanel"
;
import
NoPrizePanel
from
"db://assets/Scripts/Panels/NoPrizePanel"
;
import
{
HomeScene
}
from
"./Scenes/HomeScene"
;
import
{
AESEncrypt
}
from
"./Utils/Crypto"
;
export
default
class
GameMgr
{
...
...
@@ -88,7 +89,10 @@ export default class GameMgr {
score
,
hitNum
,
}
const
{
success
,
data
}
=
await
sendWebNetWithToken
(
WebNetName
.
submit
,
params
);
const
decrypt
=
AESEncrypt
(
JSON
.
stringify
(
params
),
"3C8C48E792E9241B"
,
"cDOiBC1n2QrkAY2P"
);
const
{
success
,
data
}
=
await
sendWebNetWithToken
(
WebNetName
.
submit
,
{
params
:
decrypt
},
null
,
false
,
false
);
hideWaiting
();
if
(
!
success
)
{
...
...
assets/Scripts/Utils/Crypto.ts
0 → 100644
View file @
04812804
import
CryptoJS
from
"crypto-js"
;
const
{
AES
,
enc
,
mode
,
pad
}
=
CryptoJS
;
const
getOptions
=
(
iv
)
=>
{
return
{
iv
:
enc
.
Utf8
.
parse
(
iv
),
mode
:
mode
.
CBC
,
padding
:
pad
.
ZeroPadding
,
};
}
/** 加密 */
export
const
AESEncrypt
=
(
str
,
key
,
iv
)
=>
{
const
options
=
getOptions
(
iv
);
return
AES
.
encrypt
(
str
,
enc
.
Utf8
.
parse
(
key
),
options
).
toString
();
};
/** 解密 */
export
const
AESDecrypt
=
(
cipherText
,
key
,
iv
)
=>
{
const
options
=
getOptions
(
iv
);
return
AES
.
decrypt
(
cipherText
,
enc
.
Utf8
.
parse
(
key
),
options
)
.
toString
(
enc
.
Utf8
)
.
trim
()
.
replace
(
//g
,
''
)
.
replace
(
//g
,
''
)
.
replace
(
/
\v
/g
,
''
)
.
replace
(
/
\x
00/g
,
''
);
};
assets/Scripts/Utils/Crypto.ts.meta
0 → 100644
View file @
04812804
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "4fb942f9-023b-4382-b39b-d5a73303015d",
"files": [],
"subMetas": {},
"userData": {}
}
build/web-mobile/index.html
0 → 100644
View file @
04812804
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
套圈挑战赛
</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta
name=
"viewport"
content=
"width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true"
/>
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black-translucent"
>
<meta
name=
"format-detection"
content=
"telephone=no"
>
<!-- force webkit on 360 -->
<meta
name=
"renderer"
content=
"webkit"
/>
<meta
name=
"force-rendering"
content=
"webkit"
/>
<!-- force edge on IE -->
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
>
<!-- force full screen on some browser -->
<meta
name=
"full-screen"
content=
"yes"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta
name=
"x5-page-mode"
content=
"app"
>
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<script
src=
"//yun.duiba.com.cn/h5/lib/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/polaris/declare-process.edbd0793356569c4e3aa91ec7d0aebf5a7bd7364.js"
crossorigin=
"anonymous"
></script>
<script
src=
"//yun.duiba.com.cn/polaris/SVGA.Lite.v2.1.1.d3a67cbc13c591c53c6f87ab34c57ce387010374.js"
crossorigin=
"anonymous"
></script>
<script
src=
"//yun.duiba.com.cn/aurora/assets/2403d1edf2acd15b179306b6ddaa5f0967d78a8f.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1720197230881/style.css"
/>
<style>
.sui-captcha
{
visibility
:
hidden
;
position
:
fixed
;
z-index
:
10000
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.7
);
/*.neCaptcha-dialog::after {
position: absolute;
content: '加载中…';
width: 100%;
height: 30px;
top: -40px;
left: 0;
text-align: center;
line-height: 30px;
font-size: 16px;
color: #ffff00;
}*/
}
.neCaptcha-dialog
{
visibility
:
hidden
;
background-color
:
#fff
;
box-shadow
:
0
0
8px
0
rgba
(
0
,
0
,
0
,
0.35
);
-webkit-box-shadow
:
0
0
8px
0
rgba
(
0
,
0
,
0
,
0.35
);
position
:
absolute
;
left
:
50%
;
top
:
45%
;
-moz-transform
:
translate
(
-50%
,
-50%
);
-ms-transform
:
translate
(
-50%
,
-50%
);
-o-transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
-webkit-transform
:
translate
(
-50%
,
-50%
);
padding
:
10px
;
min-width
:
100px
;
border-radius
:
10px
;
width
:
80%
;
}
</style>
<script
id=
"sparkVConsoleJS"
>
var
script
=
document
.
createElement
(
'script'
);
script
.
src
=
"//yun.duiba.com.cn/webapp/js/duiba-vconsole-1.0.0.js"
document
.
head
.
append
(
script
);
</script></head>
<body>
<div
id=
"GameDiv"
cc_exact_fit_screen=
"true"
>
<div
id=
"Cocos3dGameContainer"
>
<canvas
id=
"GameCanvas"
oncontextmenu=
"event.preventDefault()"
tabindex=
"99"
></canvas>
</div>
</div>
<script>
window
.
voucherPackUrl
=
"https://mobapp.czbank.com/life/voucherPack.html"
;
</script>
<!-- Polyfills bundle. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1720197230881/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1720197230881/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1720197230881/src/import-map.json"
type=
"systemjs-importmap"
charset=
"utf-8"
></script>
<script>
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/1720197230881/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
})
</script>
</body>
</html>
package.json
View file @
04812804
...
...
@@ -12,6 +12,8 @@
"dependencies"
:
{}
},
"dependencies"
:
{
"
@types/crypto-js
"
:
"
^4.2.2
"
,
"
crypto-js
"
:
"
^4.2.0
"
,
"
mobx
"
:
"
^6.12.3
"
}
}
yarn.lock
View file @
04812804
...
...
@@ -2,6 +2,16 @@
# yarn lockfile v1
"@types/crypto-js@^4.2.2":
version "4.2.2"
resolved "http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.2.2.tgz#771c4a768d94eb5922cc202a3009558204df0cea"
integrity sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==
crypto-js@^4.2.0:
version "4.2.0"
resolved "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631"
integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==
mobx@^6.12.3:
version "6.12.3"
resolved "http://npm.dui88.com:80/mobx/-/mobx-6.12.3.tgz#b6a0fde4268116be602d50bffb32f1b90a8fb077"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment