Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
MingSnake_241120
Commits
b78776e8
Commit
b78776e8
authored
May 22, 2025
by
俞嘉婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 未登录拦截 按钮级别
parent
8128d88b
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
530 additions
and
807 deletions
+530
-807
HomeScene.scene
assets/Bundles/HomeScene/HomeScene.scene
+14
-14
SignPanel.ts
assets/Scripts/Panels/SignPanel.ts
+1
-0
HomeScene.ts
assets/Scripts/Scenes/HomeScene.ts
+13
-0
PropPage.ts
assets/Scripts/Scenes/PropPage.ts
+2
-0
store.ts
assets/Scripts/store/store.ts
+29
-1
index.html
build/web-mobile/index.html
+12
-12
package-lock.json
extensions/duiba-publish/package-lock.json
+344
-601
package-lock.json
extensions/prefab-tab/package-lock.json
+95
-171
package-lock.json
package-lock.json
+12
-0
builder.json
profiles/v2/packages/builder.json
+3
-3
information.json
settings/v2/packages/information.json
+2
-2
yarn.lock
yarn.lock
+3
-3
No files found.
assets/Bundles/HomeScene/HomeScene.scene
View file @
b78776e8
...
...
@@ -191,7 +191,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight":
649.8014888337469
,
"_orthoHeight":
511.2592592592593
,
"_near": 1,
"_far": 2000,
"_color": {
...
...
@@ -484,7 +484,7 @@
"y": -180,
"z": -12.000012657215834
},
"_id": "
33cdppi3RCh6+w/MwU4Y5p
"
"_id": "
66zHPKca5AuKXji48gOV01
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -506,7 +506,7 @@
"x": 0,
"y": 1
},
"_id": "
a2YJ7xiCVLUasHmSrWY4oR
"
"_id": "
74Ar5zmjxPWqOaxvK4VMfJ
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -542,7 +542,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "
a65LTbrRtKE5a7azKPdLqY
"
"_id": "
32+9E1Y81Hhbr7Qv2NOOU5
"
},
{
"__type__": "cc.Node",
...
...
@@ -590,7 +590,7 @@
"y": -180,
"z": -11.00000220913452
},
"_id": "
48uc236PpNQKSETdHkl4GU
"
"_id": "
25LltY72NPvKRjFc0VvIPy
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -612,7 +612,7 @@
"x": 0,
"y": 1
},
"_id": "
63YjKzt31E1Z/iKSfWcG/7
"
"_id": "
11kfEKv0JAwIbTwxpN6CVs
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -648,7 +648,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "
d0eY8/KMFDCY3y4lKKYuJ5
"
"_id": "
b1IJQxdxdJgZkRsqjuA0Lj
"
},
{
"__type__": "cc.Node",
...
...
@@ -696,7 +696,7 @@
"y": -180,
"z": -64.00000614258742
},
"_id": "
43AedY7YVKSZRUl19pk1Wm
"
"_id": "
667xSBwhBH+ol8Sfn9NF0y
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -718,7 +718,7 @@
"x": 0,
"y": 1
},
"_id": "
8bohUlN4pKQb5+bQbEBZMx
"
"_id": "
5bPVzE6fRPU4HyniApMuKU
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -754,7 +754,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "
3fEmXm5j1Fc5Iuy5id3pUs
"
"_id": "
b46OUzX3VA67Fxagjz3adu
"
},
{
"__type__": "cc.Node",
...
...
@@ -802,7 +802,7 @@
"y": 180,
"z": 25.99999385741257
},
"_id": "
7d1CkhdfRFMqlacS8mAsI8
"
"_id": "
57v3STW2tGzYwjNSNA9FVW
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -824,7 +824,7 @@
"x": 0,
"y": 1
},
"_id": "
c6qbIyj3FP8ZA4XwU69q+q
"
"_id": "
d2Ln3+fhJHsa3kOUODkdmL
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -860,7 +860,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "
efoD4VqvBElLRM4l81tvSq
"
"_id": "
5dPaXrbiBPlKQNN7q+BejP
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -7244,7 +7244,7 @@
"__id__": 2
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 188
...
...
assets/Scripts/Panels/SignPanel.ts
View file @
b78776e8
...
...
@@ -88,6 +88,7 @@ export default class SignPanel extends Panel {
}
doSign
=
_asyncThrottle
(
async
()
=>
{
if
(
!
store
.
judgeLogin
())
return
;
const
{
success
,
data
}
=
await
sendWebNetWithToken
(
WebNetName
.
doSign
);
if
(
success
)
{
showPanel
(
SignSucPanel
,
{
prizeInfo
:
data
});
...
...
assets/Scripts/Scenes/HomeScene.ts
View file @
b78776e8
...
...
@@ -76,6 +76,7 @@ export class HomeScene extends Scene {
?
"https://yun.duiba.com.cn/polaris/img.546cbcd3811aa2265e50d495c078108a217450b7.png"
:
"https://yun.duiba.com.cn/polaris/%E9%BB%84%E8%89%B2user_img.7a7a3f11540b4fdb4645860ec3517c31564804bb.png"
;
/**
doLogin() {
// 赵一鸣:
// path: package/pages/login/index
...
...
@@ -95,6 +96,7 @@ export class HomeScene extends Scene {
// @ts-ignore
wx.miniProgram.navigateTo({ url: url });
}
*/
onLoad
()
{
this
.
startBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickStart
,
this
);
...
...
@@ -108,7 +110,9 @@ export class HomeScene extends Scene {
this
.
bagBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickMyBag
,
this
);
this
.
shareBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickShare
,
this
);
this
.
userInfo
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickUserInfo
,
this
);
/**
this.noLoginMask.on(Button.EventType.CLICK, this.doLogin, this);
*/
}
async
start
()
{
...
...
@@ -169,7 +173,9 @@ export class HomeScene extends Scene {
boolNotLogin
,
}
=
store
.
homeInfo
||
{};
/**
this.noLoginMask.active = boolNotLogin;
*/
this
.
userName
.
string
=
strFormat
(
nickname
||
"微信用户"
,
8
);
this
.
pointNum
.
string
=
`
${
creditsNum
>
999999
?
"999999+"
:
creditsNum
}
`
;
...
...
@@ -201,6 +207,7 @@ export class HomeScene extends Scene {
clickStart
=
_asyncThrottle
(
async
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
5
);
if
(
!
store
.
judgeLogin
())
return
;
if
(
!
store
.
checkActTime
())
return
;
await
gameStore
.
startGame
();
...
...
@@ -216,6 +223,7 @@ export class HomeScene extends Scene {
clickRank
=
_asyncThrottle
(
async
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
4
);
if
(
!
store
.
judgeLogin
())
return
;
if
(
!
store
.
checkActTime
())
return
;
await
changeScene
(
RankScence
);
...
...
@@ -228,6 +236,7 @@ export class HomeScene extends Scene {
showToast
(
"暂未开启"
);
return
;
}
if
(
!
store
.
judgeLogin
())
return
;
await
changeScene
(
BlessingBagPage
);
});
...
...
@@ -238,6 +247,7 @@ export class HomeScene extends Scene {
});
clickMyBag
=
_asyncThrottle
(
async
()
=>
{
if
(
!
store
.
judgeLogin
())
return
;
if
(
!
store
.
checkActTime
(
true
))
return
;
store
.
homeInfo
.
bagLightFlag
=
false
;
showPanel
(
MyBagPanel
);
...
...
@@ -251,18 +261,21 @@ export class HomeScene extends Scene {
});
clickDetail
=
_asyncThrottle
(
async
()
=>
{
if
(
!
store
.
judgeLogin
())
return
;
if
(
!
store
.
checkActTime
())
return
;
await
changeScene
(
PointDetailScene
,
{
ifFrom
:
HomeScene
});
});
clickShare
=
_asyncThrottle
(
async
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
2
);
if
(
!
store
.
judgeLogin
())
return
;
if
(
!
store
.
checkActTime
())
return
;
shareStore
.
doShare
(
true
);
});
clickUserInfo
=
_asyncThrottle
(
async
()
=>
{
if
(
!
store
.
judgeLogin
())
return
;
if
(
store
.
homeInfo
.
avatarGuide
)
{
sendWebNet
(
WebNetName
.
avatarGuide
,
null
,
{
hideMsg
:
true
,
...
...
assets/Scripts/Scenes/PropPage.ts
View file @
b78776e8
...
...
@@ -77,6 +77,7 @@ export class PropPage extends Scene {
/** 点击积分按钮*/
clickToChange
()
{
if
(
!
store
.
judgeLogin
())
return
;
changeScene
(
PointDetailScene
,
{
ifFrom
:
PropPage
,
back
:
this
.
data
.
isFrom
});
}
...
...
@@ -91,6 +92,7 @@ export class PropPage extends Scene {
};
clickToConfirm
=
async
(
item
)
=>
{
if
(
!
store
.
judgeLogin
())
return
;
const
{
consumeCreditsNum
,
}
=
item
;
if
(
store
.
exchangeInfo
.
remainCredits
<
consumeCreditsNum
)
{
...
...
assets/Scripts/store/store.ts
View file @
b78776e8
import
mobx
from
"mobx"
;
import
{
sendWebNet
,
sendWebNetWithToken
,
WebNetName
}
from
"../Utils/WebNet/WebNet"
;
import
{
getProjectId
,
sendWebNet
,
sendWebNetWithToken
,
WebNetName
}
from
"../Utils/WebNet/WebNet"
;
import
{
showPanel
,
showToast
}
from
"../../Module/UIFast"
;
import
RankPrizePanel
from
"../Panels/RankPrizePanel"
;
import
{
getUrlParams
}
from
"../Utils/WebNet/web/webTools"
;
...
...
@@ -134,6 +134,34 @@ class Store {
}
}
// 判断是否登录状态
judgeLogin
=
()
=>
{
const
{
boolNotLogin
}
=
store
.
homeInfo
||
{};
if
(
boolNotLogin
)
{
this
.
doLogin
()
return
false
}
return
true
}
doLogin
()
{
// 赵一鸣:
// path: package/pages/login/index
// appid: wxf7010270499c9a16
// 零食很忙:
// path: package/pages/login/index
// appid:wxb7d4a6d67d4ca5e1
const
type
=
getUrlParams
(
"type"
)
||
"1"
;
const
loginId
=
getProjectId
()
==
"p8ec64a64"
?
"Did1NTg5NTE"
:
"Did1NTkzNDM"
;
const
centerUrl
=
`https://98112-activity.dexfu.cn/customShare/share?id=
${
loginId
}
&type=
${
type
}
`
;
const
url
=
"/package/pages/login/index?callback="
+
encodeURIComponent
(
centerUrl
);
// @ts-ignore
wx
.
miniProgram
.
navigateTo
({
url
:
url
});
}
checkActTime
=
(
isAllow
=
false
)
=>
{
...
...
build/web-mobile/index.html
View file @
b78776e8
...
...
@@ -98,14 +98,14 @@
</style>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/assets/plugin/rem.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/assets/plugin/jszip.min.v3.10.1.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/assets/plugin/rem.min.js"
></script>
<script
src=
"//res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/custom.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/custom.css" />-->
<!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>-->
<!-- <script>eruda.init()</script>-->
...
...
@@ -118,20 +118,20 @@
</div>
<!-- Polyfills bundle. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/system.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<script
type=
"systemjs-importmap"
charset=
"utf-8"
>
{
"imports"
:{
"cc"
:
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/cocos-js/cc.js"
}}
{
"imports"
:{
"cc"
:
"//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/cocos-js/cc.js"
}}
</script>
<script>
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
1926917
7/index.js'
).
catch
(
function
(
err
)
{
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/17478
8455094
7/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
})
</script>
...
...
extensions/duiba-publish/package-lock.json
View file @
b78776e8
This diff is collapsed.
Click to expand it.
extensions/prefab-tab/package-lock.json
View file @
b78776e8
This diff is collapsed.
Click to expand it.
package-lock.json
View file @
b78776e8
...
...
@@ -7,6 +7,7 @@
"name"
:
"cocos-template-3d"
,
"hasInstallScript"
:
true
,
"dependencies"
:
{
"@cocos/creator-types"
:
"^3.8.4"
,
"@types/crypto-js"
:
"^4.2.2"
,
"@types/zepto"
:
"^1.0.36"
,
"crypto-js"
:
"^4.2.0"
,
...
...
@@ -16,6 +17,12 @@
"node-xlsx"
:
"^0.24.0"
}
},
"node_modules/@cocos/creator-types"
:
{
"version"
:
"3.8.6"
,
"resolved"
:
"http://npm.dui88.com:80/@cocos%2fcreator-types/-/creator-types-3.8.6.tgz"
,
"integrity"
:
"sha512-hyZ4aoqqLxoRtKbBLSJM5RgtK3oGOlTEryHDcyH4znq3h9cFk+MSbQC2aJHvK5/bMlJzsZ641/hD77RGSrvo8Q=="
,
"license"
:
"ISC"
},
"node_modules/@types/crypto-js"
:
{
"version"
:
"4.2.2"
,
"resolved"
:
"http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.2.2.tgz"
,
...
...
@@ -119,6 +126,11 @@
}
},
"dependencies"
:
{
"@cocos/creator-types"
:
{
"version"
:
"3.8.6"
,
"resolved"
:
"http://npm.dui88.com:80/@cocos%2fcreator-types/-/creator-types-3.8.6.tgz"
,
"integrity"
:
"sha512-hyZ4aoqqLxoRtKbBLSJM5RgtK3oGOlTEryHDcyH4znq3h9cFk+MSbQC2aJHvK5/bMlJzsZ641/hD77RGSrvo8Q=="
},
"@types/crypto-js"
:
{
"version"
:
"4.2.2"
,
"resolved"
:
"http://npm.dui88.com:80/@types%2fcrypto-js/-/crypto-js-4.2.2.tgz"
,
...
...
profiles/v2/packages/builder.json
View file @
b78776e8
...
...
@@ -45,8 +45,8 @@
"progress"
:
1
,
"state"
:
"success"
,
"stage"
:
"build"
,
"message"
:
"2025-5-2
1 17:21:51 build success in 43
s!"
,
"detailMessage"
:
"builder:build-project-total (
43479
ms)
\r
"
,
"message"
:
"2025-5-2
2 11:33:59 build success in 4 min 49
s!"
,
"detailMessage"
:
"builder:build-project-total (
288461
ms)
\r
"
,
"options"
:
{
"name"
:
"cocos-template-3d"
,
"server"
:
""
,
...
...
@@ -112,7 +112,7 @@
"mangleProperties"
:
false
,
"inlineEnum"
:
true
},
"time"
:
"
2025-5-21 17:21:08
"
,
"time"
:
"
5-22-2025 11:29:10
"
,
"dirty"
:
false
}
}
...
...
settings/v2/packages/information.json
View file @
b78776e8
...
...
@@ -7,7 +7,7 @@
"enable"
:
true
,
"customSplash"
:
{
"complete"
:
true
,
"form"
:
"https://creator-api.cocos.com/api/form/show?sid=
441e6f8e3e7ba0c9581ed7936daee45d
"
"form"
:
"https://creator-api.cocos.com/api/form/show?sid=
0cabb9f83b4ae7b4476456a30932ea05
"
}
},
"removeSplash"
:
{
...
...
@@ -16,7 +16,7 @@
"enable"
:
true
,
"removeSplash"
:
{
"complete"
:
true
,
"form"
:
"https://creator-api.cocos.com/api/form/show?sid=
441e6f8e3e7ba0c9581ed7936daee45d
"
"form"
:
"https://creator-api.cocos.com/api/form/show?sid=
0cabb9f83b4ae7b4476456a30932ea05
"
}
}
}
...
...
yarn.lock
View file @
b78776e8
...
...
@@ -3,9 +3,9 @@
"@cocos/creator-types@^3.8.4":
version "3.8.
4
"
resolved "http
s://registry.npmmirror.com/@cocos/creator-types/-/creator-types-3.8.4.tgz#a4486dcfe58d30b348c030eaaf30e3e09a59ccd9
"
integrity sha512-
z+8qx726Zl/8rUUpbLjVAiNPn4XweRACEaY1vHeR3EHIcSQ9wtFlIFd2SZX5rOE8lt1S95nxv8OeLYXfbN4/2
Q==
version "3.8.
6
"
resolved "http
://npm.dui88.com:80/@cocos%2fcreator-types/-/creator-types-3.8.6.tgz
"
integrity sha512-
hyZ4aoqqLxoRtKbBLSJM5RgtK3oGOlTEryHDcyH4znq3h9cFk+MSbQC2aJHvK5/bMlJzsZ641/hD77RGSrvo8
Q==
"@types/crypto-js@^4.2.2":
version "4.2.2"
...
...
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