Commit 3ed3fb0d authored by haiyoucuv's avatar haiyoucuv

整理代码1

parent be0ab010
......@@ -237,7 +237,7 @@ export function sendWebNet(
})
}
export async function sendWebNetWithToken(
export function sendWebNetWithToken(
netName: WebNetName,
parameter?: any,
callback?: (success: boolean, res?: dataOut) => void,
......@@ -245,32 +245,20 @@ export async function sendWebNetWithToken(
isGet: boolean = true,//这两个参数基本不设置,放后面吧
headers?: any,
): Promise<dataOut> {
return await sendWebNet(netName, {...parameter}, callback, hideMsg, isGet, headers);
return new Promise(async r => {
const token = await getPxTokenSave();
// getPxToken(async (msg, token) => {
if (!token) {
showToast(DEFAULF_ERROR);
r({success: false})
return;
}
const res = await sendWebNet(netName, {token, ...parameter}, callback, hideMsg, isGet, headers);
r(res);
// })
});
}
// export function sendWebNetWithToken(
// netName: WebNetName,
// parameter?: any,
// callback?: (success: boolean, res?: dataOut) => void,
// hideMsg: boolean = false,
// isGet: boolean = true,//这两个参数基本不设置,放后面吧
// headers?: any,
// ): Promise<dataOut> {
// return new Promise(async r => {
// const token = await getPxTokenSave();
// // getPxToken(async (msg, token) => {
// if (!token) {
// showToast(DEFAULF_ERROR);
// r({success: false})
// return;
// }
// const res = await sendWebNet(netName, {token, ...parameter}, callback, hideMsg, isGet, headers);
// r(res);
// // })
// });
// }
/**
* 获取数据
* @param netName
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>套圈挑战赛</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/1723514774737/style.css"/>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1723515084063/style.css"/>
<style>
.sui-captcha {
......@@ -99,16 +99,16 @@
</script>
<!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1723514774737/src/polyfills.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1723515084063/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1723514774737/src/system.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1723515084063/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1723514774737/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1723515084063/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1723514774737/index.js').catch(function (err) {
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1723515084063/index.js').catch(function (err) {
console.error(err);
})
</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