Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TNGD_CaveCruiser
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
TNGD_CaveCruiser
Commits
8719e87d
Commit
8719e87d
authored
Aug 23, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GuideLayer
parent
895aa150
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
38 additions
and
1145 deletions
+38
-1145
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+3
-3
GameMgr.ts
assets/Scripts/GameMgr.ts
+2
-10
GuideScene.ts
assets/Scripts/Scenes/GuideScene.ts
+6
-3
HomeScene.ts
assets/Scripts/Scenes/HomeScene.ts
+3
-2
Crypto.ts
assets/Scripts/Utils/Crypto.ts
+10
-1
WebNet.ts
assets/Scripts/Utils/WebNet/WebNet.ts
+5
-3
Start.scene
assets/Start/Start.scene
+2
-2
package.json
package.json
+3
-0
start.json
preview-template/app/game/start.json
+1
-3
test.js
scripts/test.js
+3
-0
HTMLRichText.js
test/HTMLRichText.js
+0
-1077
免登中间页.html
免登中间页.html
+0
-41
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
8719e87d
...
...
@@ -101,7 +101,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 375,
"x": 375
.00000000000006
,
"y": 812,
"z": 0
},
...
...
@@ -622,7 +622,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"width": 750
.0000000000001
,
"height": 0
},
"_anchorPoint": {
...
...
@@ -674,7 +674,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"width": 750
.0000000000001
,
"height": 1624
},
"_anchorPoint": {
...
...
assets/Scripts/GameMgr.ts
View file @
8719e87d
...
...
@@ -3,14 +3,6 @@ import { hideWaiting, showWaiting } from "db://assets/Module/UIFast";
import
{
AESDecrypt
,
AESEncrypt
}
from
"./Utils/Crypto"
;
import
store
from
"./store/store"
;
// const en = AESEncrypt(JSON.stringify({
// recordId: 232323,
// oneGameHammerQuantity: 99,
// oneGameProteanQuantity: 99,
// }), "FDF817451A60EB8F", "cDOiBC1n2QrkAY2P");
//
// console.log(en);
export
default
class
GameMgr
{
private
static
_ins
:
GameMgr
=
null
;
...
...
@@ -40,7 +32,7 @@ export default class GameMgr {
return
false
;
}
const
decrypt
=
JSON
.
parse
(
AESDecrypt
(
data
,
"FDF817451A60EB
8
F"
,
"cDOiBC1n2QrkAY2P"
));
const
decrypt
=
JSON
.
parse
(
AESDecrypt
(
data
,
"FDF817451A60EB
6
F"
,
"cDOiBC1n2QrkAY2P"
));
const
{
recordId
,
oneGameHammerQuantity
,
oneGameProteanQuantity
}
=
decrypt
;
...
...
@@ -72,7 +64,7 @@ export default class GameMgr {
timestamp
:
Date
.
now
(),
}
const
encrypt
=
AESEncrypt
(
JSON
.
stringify
(
params
),
"FDF817451A60EB
8
F"
,
"cDOiBC1n2QrkAY2P"
);
const
encrypt
=
AESEncrypt
(
JSON
.
stringify
(
params
),
"FDF817451A60EB
6
F"
,
"cDOiBC1n2QrkAY2P"
);
const
res
=
await
sendWebNet
(
WebNetName
.
submit
,
{
param
:
encrypt
,
...
...
assets/Scripts/Scenes/GuideScene.ts
View file @
8719e87d
...
...
@@ -2,6 +2,8 @@ import { _decorator, Button, Component, Node } from 'cc';
import
Scene
from
"../../Module/Scene"
;
import
{
changeScene
}
from
"../../Module/UIFast"
;
import
{
MainGame
}
from
"./MainGame/MainGame"
;
import
GameMgr
from
"../GameMgr"
;
import
{
_asyncThrottle
}
from
"../Utils/Utils"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -40,9 +42,10 @@ export class GuideScene extends Scene {
this
.
guideIndex
++
;
}
clickStart
()
{
changeScene
(
MainGame
);
}
clickStart
=
_asyncThrottle
(
async
()
=>
{
await
GameMgr
.
ins
.
start
();
await
changeScene
(
MainGame
);
})
}
assets/Scripts/Scenes/HomeScene.ts
View file @
8719e87d
...
...
@@ -7,6 +7,7 @@ import { observer, render } from "../store/decorators";
import
{
_asyncThrottle
}
from
"../Utils/Utils"
;
import
RulePanel
from
"../Panels/RulePanel"
;
import
{
GuideScene
}
from
"./GuideScene"
;
import
GameMgr
from
"../GameMgr"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -42,11 +43,11 @@ export class HomeScene extends Scene {
const
{
alreadyGuideSteps
,
allGuideSteps
}
=
store
.
homeInfo
;
console
.
log
(
allGuideSteps
,
alreadyGuideSteps
);
if
(
alreadyGuideSteps
<
allGuideSteps
)
{
changeScene
(
GuideScene
);
}
else
{
await
GameMgr
.
ins
.
start
();
changeScene
(
MainGame
);
}
...
...
assets/Scripts/Utils/Crypto.ts
View file @
8719e87d
import
CryptoJS
from
"crypto-js"
;
import
CryptoJS
from
"crypto-js/core.js"
;
import
"crypto-js/aes.js"
;
import
"crypto-js/pad-zeropadding.js"
;
const
{
AES
,
enc
,
mode
,
pad
}
=
CryptoJS
;
...
...
@@ -30,3 +32,10 @@ export const AESDecrypt = (cipherText, key, iv) => {
.
replace
(
/
\v
/g
,
''
)
.
replace
(
/
\x
00/g
,
''
);
};
// const en = AESEncrypt(JSON.stringify({
// recordId: "recordId",
// }), "FDF817451A60EB6F", "cDOiBC1n2QrkAY2P");
//
// console.log(en);
\ No newline at end of file
assets/Scripts/Utils/WebNet/WebNet.ts
View file @
8719e87d
...
...
@@ -3,7 +3,9 @@ import { getUrlParams } from "./web/webTools";
import
{
showToast
}
from
"db://assets/Module/UIFast"
;
import
{
PREVIEW
}
from
'cc/env'
;
import
CryptoJS
from
"crypto-js"
;
import
MD5
from
"crypto-js/md5.js"
;
// const {MD5} = CryptoJS;
export
const
randomStr
=
(
length
=
16
)
=>
{
let
str
=
''
;
...
...
@@ -28,13 +30,13 @@ function getSign(data) {
signStr
=
`
${
app_secret
}${
nonceStr
}${
timestamp
}
`
;
}
const
sign
=
CryptoJS
.
MD5
(
signStr
).
toString
();
const
sign
=
MD5
(
signStr
).
toString
();
if
(
!
data
)
{
data
=
{};
}
data
.
sign
=
CryptoJS
.
MD5
(
`
${
app_secret
}${
nonceStr
}${
timestamp
}
`
).
toString
();
data
.
sign
=
MD5
(
`
${
app_secret
}${
nonceStr
}${
timestamp
}
`
).
toString
();
data
.
nonceStr
=
nonceStr
;
data
.
timestamp
=
timestamp
;
...
...
assets/Start/Start.scene
View file @
8719e87d
...
...
@@ -95,7 +95,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 375,
"x": 375
.00000000000006
,
"y": 812,
"z": 0
},
...
...
@@ -961,7 +961,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.999999999999
8
,
"width": 749.999999999999
9
,
"height": 1624
},
"_anchorPoint": {
...
...
package.json
View file @
8719e87d
...
...
@@ -4,6 +4,9 @@
"scripts"
:
{
"preinstall"
:
"node ./scripts/preInstall.js"
},
"mocker"
:
{
"port"
:
7456
},
"creator"
:
{
"version"
:
"3.8.3"
,
"registry"
:
{
...
...
preview-template/app/game/start.json
View file @
8719e87d
...
...
@@ -2,8 +2,6 @@
"ok"
:
true
,
"msg"
:
"ok"
,
"code"
:
0
,
"data"
:
{
"recordId"
:
"recordId"
},
"data"
:
"hId4l6KOn3coexfedjTQ48vx0NEZcG0Se2UrnuDcr8Y="
,
"timestamp"
:
1724379274542
}
\ No newline at end of file
scripts/test.js
0 → 100644
View file @
8719e87d
const
fs
=
require
(
'fs'
);
fs
.
writeFileSync
(
'./test.json'
,
''
);
\ No newline at end of file
test/HTMLRichText.js
deleted
100644 → 0
View file @
895aa150
This diff is collapsed.
Click to expand it.
免登中间页.html
deleted
100644 → 0
View file @
895aa150
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta
name=
"theme-color"
content=
"#000000"
/>
<title>
跳转中...
</title>
<body>
</body>
<script>
var
clientId
=
'a301020000000000bcb5855d1eab6bfe'
;
//网易云音乐开放平台APPID
var
dbredirect
=
'https://activity-6.m.duiba.com.cn/projectx/p9aaaf990/index.html?appID=97278'
;
//活动链接
//免登接口地址 获取code和活动地址
var
duibaLoginUrl
=
'https://activity.m.duiba.com.cn/customActivity/wangyiyun/autoLogin?redirect='
+
encodeURIComponent
(
dbredirect
);
//授权地址,网易云授权回调地址
var
authUrl
=
'https://music.163.com/st/platform/oauth/authorize?clientId='
+
clientId
+
'&clientType=web&redirectUrl='
+
encodeURIComponent
(
duibaLoginUrl
)
+
'&state='
+
generateRandomString
(
16
);
location
.
replace
(
authUrl
);
//获取链接的特定参数,比如chanID
function
getUrlParam
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
}
//生成随机字符串
function
generateRandomString
(
length
)
{
let
result
=
''
;
const
characters
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
;
const
charactersLength
=
characters
.
length
;
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
result
+=
characters
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
charactersLength
));
}
return
result
;
}
</script>
</html>
\ No newline at end of file
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