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
9e65f492
Commit
9e65f492
authored
Jun 24, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理一下代码
parent
93619f7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
103 deletions
+7
-103
TaskCenter.ts
assets/Scripts/TaskCenter.ts
+1
-1
appFn.ts
assets/Scripts/Utils/appFn.ts
+0
-96
index.html
build/web-mobile/index.html
+6
-6
No files found.
assets/Scripts/TaskCenter.ts
View file @
9e65f492
...
...
@@ -2,10 +2,10 @@ import { showPanel, showToast } from "../Module/UIFast";
import
{
sendWebNetWithToken
,
WebNetName
}
from
"./Utils/WebNet/WebNet"
;
import
{
SHARE_TYPE
}
from
"./const"
;
import
ShareCenter
from
"./ShareCenter"
;
import
{
appJump
}
from
"./Utils/appFn"
;
import
PosterPanel
from
"./Panels/PosterPanel"
;
import
BrowseImgPanel
from
"./Panels/BrowseImgPanel"
;
import
store
from
"../store/store"
;
import
{
appJump
}
from
"../AppTool"
;
const
levelToast
=
{
3
:
"恭喜您今日运势极佳,可领取3次挑战次数"
,
...
...
assets/Scripts/Utils/appFn.ts
View file @
9e65f492
/**
* 获取cookie的值
* @param {*} cookieName
*/
function
getCookie
(
cookieName
)
{
const
strCookie
=
document
.
cookie
;
const
arrCookie
=
strCookie
.
split
(
"; "
);
for
(
let
i
=
0
;
i
<
arrCookie
.
length
;
i
++
)
{
const
arr
=
arrCookie
[
i
].
split
(
"="
);
if
(
cookieName
==
arr
[
0
])
{
return
arr
[
1
];
}
}
return
""
;
}
// 跳转苏银豆商城
export
const
onToAppMall
=
()
=>
{
appJump
(
"jfsc"
);
};
// 行方跳转
export
function
appJump
(
url
,
needlogin
=
"1"
)
{
console
.
info
(
'appJump url===> '
,
url
);
if
(
!!!
url
)
return
;
cookieSetInSession
();
const
ThirdApp
=
window
[
"ThirdApp"
];
if
(
url
.
slice
(
0
,
4
)
==
"http"
)
{
// http开头
ThirdApp
&&
ThirdApp
.
loadUrlNewJSMB
(
url
,
"1"
,
"1"
,
""
,
needlogin
,
"1"
);
}
else
if
(
url
.
slice
(
0
,
4
)
==
"page"
)
{
// 客户端
ThirdApp
&&
ThirdApp
.
loadUrlNewJSMB
(
url
,
"1"
,
"1"
,
""
,
needlogin
,
"0"
);
}
else
{
// 第三方
ThirdApp
&&
ThirdApp
.
loadUrlNewJSMB
(
url
,
"3"
,
"1"
,
""
,
needlogin
,
"0"
);
}
cookieSetBack
();
window
.
setTimeout
(()
=>
{
cookieSetBack
();
},
1000
);
}
export
function
cookieSetInSession
()
{
if
(
getCookie
(
"tokenId"
)
!=
""
)
{
console
.
info
(
"cooke保存有tokenid"
);
console
.
info
(
document
.
cookie
,
"cookie"
);
const
ThirdApp
=
window
[
"ThirdApp"
];
ThirdApp
&&
ThirdApp
.
setSession
(
"final"
,
{
tokenId
:
getCookie
(
"tokenId"
),
wdata3
:
getCookie
(
"wdata3"
),
wdata4
:
getCookie
(
"wdata4"
),
createdAtToday
:
getCookie
(
"createdAtToday"
),
isNotLoginUser
:
getCookie
(
"isNotLoginUser"
),
dcustom
:
getCookie
(
"dcustom"
),
});
}
}
export
function
cookieSetBack
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
ThirdApp
=
window
[
"ThirdApp"
];
ThirdApp
&&
ThirdApp
.
getSession
(
"final"
,
function
(
data
)
{
console
.
info
(
"getsessionFinal"
,
data
);
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
document
.
cookie
=
String
(
key
)
+
"="
+
data
[
key
];
});
resolve
(
data
);
});
setTimeout
(()
=>
{
resolve
({});
},
5000
);
});
}
/**
* @description 把图片保存到相册<br>
* @param {string}
* data 图片base64
*
*/
export
function
saveDCPic
(
data
)
{
// console.info('saveDCPic data', data)
const
ThirdApp
=
window
[
"ThirdApp"
];
try
{
var
cfg
=
{
base64
:
data
,
};
ThirdApp
&&
ThirdApp
.
_callHandler
(
"saveDCPic"
,
JSON
.
stringify
(
cfg
));
}
catch
(
e
)
{
console
.
info
(
"saveDCPic error"
,
e
);
ThirdApp
&&
ThirdApp
.
alertinfo
(
"把图片保存到相册异常"
,
"saveDCPic:"
+
e
);
}
}
// 分享海报
export
function
wxShareImg
(
url
)
{
...
...
build/web-mobile/index.html
View file @
9e65f492
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"utf-8"
>
<title>
cocos-template-3d
</title>
<title>
财富游园会
</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta
name=
"viewport"
...
...
@@ -39,7 +39,7 @@
<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/1719215
04590
5/style.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
98759
5/style.css"
/>
<style>
.sui-captcha
{
...
...
@@ -94,17 +94,17 @@
</div>
<!-- Polyfills bundle. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
04590
5/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
98759
5/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
04590
5/src/system.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
98759
5/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
04590
5/src/import-map.json"
type=
"systemjs-importmap"
charset=
"utf-8"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
98759
5/src/import-map.json"
type=
"systemjs-importmap"
charset=
"utf-8"
></script>
<script>
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
04590
5/index.js'
).
catch
(
function
(
err
)
{
System
.
import
(
'//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215
98759
5/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
})
</script>
...
...
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