Commit b3d28c98 authored by 俞嘉婷's avatar 俞嘉婷

feat: 分享蒙层

parent 76c5640a
...@@ -69,6 +69,9 @@ export class UIMgr { ...@@ -69,6 +69,9 @@ export class UIMgr {
this.waiting = this.uiCanvas.getChildByName("Waiting"); this.waiting = this.uiCanvas.getChildByName("Waiting");
this.share = this.uiCanvas.getChildByName("Share");
this.share.on(Node.EventType.TOUCH_END, this.hideShare, this);
this.panel = this.uiCanvas.getChildByName("Panel"); this.panel = this.uiCanvas.getChildByName("Panel");
this.panelMask = this.panel.getChildByName("mask"); this.panelMask = this.panel.getChildByName("mask");
...@@ -384,4 +387,15 @@ export class UIMgr { ...@@ -384,4 +387,15 @@ export class UIMgr {
/********* Waiting *********/ /********* Waiting *********/
/********* Share *********/
share: Node;
showShare() {
this.share.active = true;
}
hideShare() {
this.share.active = false;
}
} }
...@@ -32,17 +32,17 @@ export default class ShareCenter { ...@@ -32,17 +32,17 @@ export default class ShareCenter {
url = url + '&inviteCode=' + data?.inviteCode; url = url + '&inviteCode=' + data?.inviteCode;
} }
const inviteInfo = shareInfo.filter(item => item.type == type)[0] const inviteInfo = shareInfo.filter(item => item.type == type)[0]
// TODO 要不要投微信端? if (this.isWeChat()) {
// if (isWeChat()) { UIMgr.ins.showShare();
// if (needHelp) showShareGuide('点击右上角分享'); // FISH_TODO
// onUpdateShare({ // onUpdateShare({
// title: inviteInfo?.title, // title: inviteInfo?.title,
// content: inviteInfo?.content, // content: inviteInfo?.content,
// url: url, // url: url,
// thumbnail: inviteInfo?.thumbnail, // thumbnail: inviteInfo?.thumbnail,
// }); // });
// return; return;
// } }
console.info({ console.info({
title: inviteInfo?.title, title: inviteInfo?.title,
content: inviteInfo?.content, content: inviteInfo?.content,
......
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "afb52640-178c-4038-8acd-a8792536bbfa",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "afb52640-178c-4038-8acd-a8792536bbfa@6c48a",
"displayName": "share_guide",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "afb52640-178c-4038-8acd-a8792536bbfa",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "afb52640-178c-4038-8acd-a8792536bbfa@f9941",
"displayName": "share_guide",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 470,
"height": 350,
"rawWidth": 470,
"rawHeight": 350,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-235,
-175,
0,
235,
-175,
0,
-235,
175,
0,
235,
175,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
350,
470,
350,
0,
0,
470,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-235,
-175,
0
],
"maxPos": [
235,
175,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "afb52640-178c-4038-8acd-a8792536bbfa@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "afb52640-178c-4038-8acd-a8792536bbfa@6c48a"
}
}
...@@ -33,8 +33,10 @@ ...@@ -33,8 +33,10 @@
<!--<link rel="apple-touch-icon" href=".png" />--> <!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />--> <!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<script src="//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"></script> <script src="//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"></script>
<!-- 杭州银行sdk文件 --> <script type="text/javascript" src="//yun.duiba.com.cn/polaris/mfs_ios_compatible.493edcebd8faac35cc87ffedebf9cc64cc10f74e.js"></script>
<script src="https://yun.duiba.com.cn/polaris/HZBank241209.750241063621ccec7147ce1760be526bbd6619b8.js"></script> <script type="text/javascript" src="//yun.duiba.com.cn/polaris/mfs_common.6f1f2157acb0f6e2687cbf905de5a87c6a4c71c3.js"></script>
<script type="text/javascript" src="//yun.duiba.com.cn/polaris/mfs_oauth.98b042d60a897e0c7616cbf0d22226d381e0c2dd.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<style> <style>
html { html {
-ms-touch-action: none; -ms-touch-action: none;
...@@ -104,12 +106,12 @@ ...@@ -104,12 +106,12 @@
} }
</style> </style>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/src/assets/plugin/zepto.min.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/src/assets/plugin/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/src/assets/plugin/declare-process.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/src/assets/plugin/declare-process.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/src/assets/plugin/jszip.min.v3.10.1.js"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/src/assets/plugin/jszip.min.v3.10.1.js"></script>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/style.css" /> <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/style.css" />
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/custom.css" /> <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/custom.css" />
<!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>--> <!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>-->
<!-- <script>eruda.init()</script>--> <!-- <script>eruda.init()</script>-->
...@@ -123,20 +125,20 @@ ...@@ -123,20 +125,20 @@
</div> </div>
<!-- Polyfills bundle. --> <!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/src/polyfills.bundle.js" charset="utf-8"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. --> <!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/src/system.bundle.js" charset="utf-8"></script> <script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/src/system.bundle.js" charset="utf-8"></script>
<script src="https://yun.duiba.com.cn/aurora/assets/03cc8b25df7f900745f5db17effa0eccc2ae724e.js"></script> <script src="https://yun.duiba.com.cn/aurora/assets/03cc8b25df7f900745f5db17effa0eccc2ae724e.js"></script>
<!-- Import map --> <!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>--> <!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<script type="systemjs-importmap" charset="utf-8"> <script type="systemjs-importmap" charset="utf-8">
{"imports":{"cc":"//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/cocos-js/cc.js"}} {"imports":{"cc":"//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/cocos-js/cc.js"}}
</script> </script>
<script> <script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1734694891689/index.js').catch(function (err) { System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1735085111830/index.js').catch(function (err) {
console.error(err); console.error(err);
}) })
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment