Commit cc11e77d authored by 王勇霞's avatar 王勇霞

xhr.send

parent bd582a83
......@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>21天"云"健身</title>
<title>21天“云”健身</title>
<meta name="viewport"
content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
......
......@@ -76,7 +76,9 @@ export function ajax(options: ajaxParameterInt) {
/**
* POST请求设置请求头
*/
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');
xhr.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
if (options.headers) {
for (let key in options.headers) {
xhr.setRequestHeader(key, options.headers[key]);
......@@ -85,7 +87,7 @@ export function ajax(options: ajaxParameterInt) {
/**
* 发送请求参数
*/
xhr.send(params);
xhr.send(JSON.stringify(options.data));
}
}
......
......@@ -10,11 +10,7 @@ let urlParams: { [key: string]: string | true };
export function getUrlParams(key: string, refreshCache: boolean = false): string | true {
if (urlParams && !refreshCache) return urlParams[key];
urlParams = {};
let search = window.location.search;
try {
search = top.location.search; //尝试获取顶层的链接
} catch (e) {
}
let search = '?' + window.location.href.split("?")[1]
//获取链接参数
for (let item of search.replace('?', '').split('&')) {
let arr = item.split('=');
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,632 +3,32 @@
{
"keys": "failbg.png,knowbtn.png,restartbtn.png",
"name": "FailPanel",
"atlas": {
"failbg.png": {
"x": 2,
"y": 2,
"w": 568,
"h": 598,
"ox": 0,
"oy": 0,
"sw": 568,
"sh": 598,
"ro": false
},
"knowbtn.png": {
"x": 572,
"y": 2,
"w": 230,
"h": 86,
"ox": 0,
"oy": 0,
"sw": 230,
"sh": 86,
"ro": true
},
"restartbtn.png": {
"x": 2,
"y": 602,
"w": 227,
"h": 90,
"ox": 0,
"oy": 0,
"sw": 227,
"sh": 90,
"ro": false
}
}
"atlas": "FailPanel.sht"
},
{
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png",
"name": "GameScene",
"atlas": {
"cloud2.png": {
"x": 2,
"y": 2,
"w": 350,
"h": 240,
"ox": 0,
"oy": 0,
"sw": 350,
"sh": 240,
"ro": false
},
"controlpeo.png": {
"x": 2,
"y": 244,
"w": 288,
"h": 305,
"ox": 0,
"oy": 0,
"sw": 288,
"sh": 305,
"ro": true
},
"cloud.png": {
"x": 354,
"y": 2,
"w": 222,
"h": 196,
"ox": 0,
"oy": 0,
"sw": 222,
"sh": 196,
"ro": true
},
"reset.png": {
"x": 354,
"y": 226,
"w": 138,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 138,
"sh": 62,
"ro": false
},
"cdbg.png": {
"x": 309,
"y": 290,
"w": 124,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 124,
"sh": 123,
"ro": false
},
"word_云.png": {
"x": 435,
"y": 290,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_休.png": {
"x": 435,
"y": 411,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_卷.png": {
"x": 309,
"y": 415,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_在.png": {
"x": 2,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_心.png": {
"x": 123,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_意.png": {
"x": 244,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_无.png": {
"x": 365,
"y": 532,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_晴.png": {
"x": 552,
"y": 2,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_水.png": {
"x": 552,
"y": 123,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_流.png": {
"x": 486,
"y": 532,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_深.png": {
"x": 549,
"y": 244,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_看.png": {
"x": 549,
"y": 365,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_自.png": {
"x": 2,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_舒.png": {
"x": 123,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_闲.png": {
"x": 244,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_静.png": {
"x": 365,
"y": 646,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"num_3.png": {
"x": 494,
"y": 226,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
},
"num_7.png": {
"x": 494,
"y": 253,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
},
"num_1.png": {
"x": 607,
"y": 486,
"w": 10,
"h": 45,
"ox": 10,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_9.png": {
"x": 549,
"y": 498,
"w": 27,
"h": 45,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_0.png": {
"x": 309,
"y": 244,
"w": 31,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": false
},
"num_2.png": {
"x": 596,
"y": 498,
"w": 31,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_4.png": {
"x": 607,
"y": 531,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_5.png": {
"x": 607,
"y": 563,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_6.png": {
"x": 607,
"y": 595,
"w": 28,
"h": 44,
"ox": 1,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_8.png": {
"x": 607,
"y": 625,
"w": 26,
"h": 44,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_s.png": {
"x": 642,
"y": 498,
"w": 22,
"h": 27,
"ox": 4,
"oy": 19,
"sw": 30,
"sh": 50,
"ro": false
}
}
"atlas": "GameScene.sht"
},
{
"keys": "guide.png,step1_img.png,step1_tips.png,step2_img.png,step2_tips.png,step3_img.png,step3_tips.png,step4_img.png",
"name": "GuidePanel",
"atlas": {
"step1_img.png": {
"x": 2,
"y": 2,
"w": 651,
"h": 388,
"ox": 0,
"oy": 0,
"sw": 651,
"sh": 388,
"ro": false
},
"step4_img.png": {
"x": 2,
"y": 392,
"w": 573,
"h": 623,
"ox": 0,
"oy": 0,
"sw": 573,
"sh": 623,
"ro": true
},
"step2_img.png": {
"x": 655,
"y": 2,
"w": 605,
"h": 470,
"ox": 0,
"oy": 0,
"sw": 605,
"sh": 470,
"ro": true
},
"guide.png": {
"x": 2,
"y": 967,
"w": 590,
"h": 586,
"ox": 0,
"oy": 0,
"sw": 590,
"sh": 586,
"ro": false
},
"step1_tips.png": {
"x": 627,
"y": 392,
"w": 379,
"h": 26,
"ox": 0,
"oy": 0,
"sw": 379,
"sh": 26,
"ro": true
},
"step2_tips.png": {
"x": 655,
"y": 609,
"w": 355,
"h": 26,
"ox": 0,
"oy": 0,
"sw": 355,
"sh": 26,
"ro": false
},
"step3_tips.png": {
"x": 1012,
"y": 609,
"w": 281,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 281,
"sh": 24,
"ro": true
},
"step3_img.png": {
"x": 655,
"y": 637,
"w": 123,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 123,
"sh": 123,
"ro": false
}
}
"atlas": "GuidePanel.sht"
},
{
"keys": "ruleBg.png",
"name": "RulePanel",
"atlas": {
"ruleBg.png": {
"x": 2,
"y": 2,
"w": 573,
"h": 572,
"ox": 0,
"oy": 0,
"sw": 573,
"sh": 572,
"ro": false
}
}
"atlas": "RulePanel.sht"
},
{
"keys": "backbtn.png,collect.png,rulebtn.png,startbg.jpg,startbtn.png,titile.png",
"name": "StartScene",
"atlas": {
"titile.png": {
"x": 2,
"y": 2,
"w": 574,
"h": 126,
"ox": 0,
"oy": 0,
"sw": 574,
"sh": 177,
"ro": false
},
"startbtn.png": {
"x": 2,
"y": 130,
"w": 350,
"h": 99,
"ox": 0,
"oy": 0,
"sw": 350,
"sh": 99,
"ro": false
},
"collect.png": {
"x": 2,
"y": 231,
"w": 308,
"h": 50,
"ox": 0,
"oy": 0,
"sw": 308,
"sh": 50,
"ro": false
},
"backbtn.png": {
"x": 354,
"y": 130,
"w": 145,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 145,
"sh": 62,
"ro": true
},
"rulebtn.png": {
"x": 418,
"y": 130,
"w": 138,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 138,
"sh": 62,
"ro": true
}
}
"atlas": "StartScene.sht"
},
{
"keys": "infoline.png,light.png,sucbg.png,sucstar.png,sun.png",
"name": "SuccessPanel",
"atlas": {
"sucbg.png": {
"x": 2,
"y": 2,
"w": 568,
"h": 502,
"ox": 0,
"oy": 0,
"sw": 568,
"sh": 502,
"ro": false
},
"light.png": {
"x": 2,
"y": 506,
"w": 463,
"h": 468,
"ox": 0,
"oy": 0,
"sw": 463,
"sh": 468,
"ro": true
},
"sucstar.png": {
"x": 472,
"y": 506,
"w": 227,
"h": 87,
"ox": 0,
"oy": 0,
"sw": 227,
"sh": 87,
"ro": true
},
"infoline.png": {
"x": 561,
"y": 506,
"w": 2,
"h": 113,
"ox": 1,
"oy": 1,
"sw": 4,
"sh": 115,
"ro": false
},
"sun.png": {
"x": 472,
"y": 735,
"w": 89,
"h": 83,
"ox": 0,
"oy": 0,
"sw": 89,
"sh": 83,
"ro": false
}
}
"atlas": "SuccessPanel.sht"
},
{
"keys": "bg.mp3,fail.mp3,get.mp3,jump.mp3",
......@@ -637,96 +37,7 @@
{
"keys": "closebtn.png,comCloseBtn.png,surebtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,关闭按钮2.png",
"name": "common",
"atlas": {
"toastBg.png": {
"x": 2,
"y": 2,
"w": 460,
"h": 130,
"ox": 0,
"oy": 0,
"sw": 460,
"sh": 130,
"ro": false
},
"surebtn.png": {
"x": 2,
"y": 134,
"w": 267,
"h": 90,
"ox": 0,
"oy": 0,
"sw": 267,
"sh": 90,
"ro": false
},
"waitingBg.png": {
"x": 2,
"y": 226,
"w": 160,
"h": 180,
"ox": 0,
"oy": 0,
"sw": 160,
"sh": 180,
"ro": true
},
"closebtn.png": {
"x": 184,
"y": 226,
"w": 74,
"h": 74,
"ox": 0,
"oy": 0,
"sw": 74,
"sh": 74,
"ro": false
},
"关闭按钮.png": {
"x": 184,
"y": 302,
"w": 60,
"h": 60,
"ox": 0,
"oy": 0,
"sw": 60,
"sh": 60,
"ro": false
},
"关闭按钮2.png": {
"x": 246,
"y": 302,
"w": 60,
"h": 60,
"ox": 0,
"oy": 0,
"sw": 60,
"sh": 60,
"ro": false
},
"waitingRot.png": {
"x": 260,
"y": 226,
"w": 56,
"h": 56,
"ox": 0,
"oy": 0,
"sw": 56,
"sh": 56,
"ro": false
},
"comCloseBtn.png": {
"x": 271,
"y": 134,
"w": 48,
"h": 48,
"ox": 0,
"oy": 0,
"sw": 48,
"sh": 48,
"ro": false
}
}
"atlas": "common.sht"
},
{
"keys": "atmosphere.svga,crypeo.svga,guidecount.svga,jumppeo.svga,left.svga,light.svga,popstar.svga,right.svga,startbtn.svga,startpeople.svga",
......
......@@ -3,632 +3,32 @@ export const ResJson = {
{
"keys": "failbg.png,knowbtn.png,restartbtn.png",
"name": "FailPanel",
"atlas": {
"failbg.png": {
"x": 2,
"y": 2,
"w": 568,
"h": 598,
"ox": 0,
"oy": 0,
"sw": 568,
"sh": 598,
"ro": false
},
"knowbtn.png": {
"x": 572,
"y": 2,
"w": 230,
"h": 86,
"ox": 0,
"oy": 0,
"sw": 230,
"sh": 86,
"ro": true
},
"restartbtn.png": {
"x": 2,
"y": 602,
"w": 227,
"h": 90,
"ox": 0,
"oy": 0,
"sw": 227,
"sh": 90,
"ro": false
}
}
"atlas": "FailPanel.sht"
},
{
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png",
"name": "GameScene",
"atlas": {
"cloud2.png": {
"x": 2,
"y": 2,
"w": 350,
"h": 240,
"ox": 0,
"oy": 0,
"sw": 350,
"sh": 240,
"ro": false
},
"controlpeo.png": {
"x": 2,
"y": 244,
"w": 288,
"h": 305,
"ox": 0,
"oy": 0,
"sw": 288,
"sh": 305,
"ro": true
},
"cloud.png": {
"x": 354,
"y": 2,
"w": 222,
"h": 196,
"ox": 0,
"oy": 0,
"sw": 222,
"sh": 196,
"ro": true
},
"reset.png": {
"x": 354,
"y": 226,
"w": 138,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 138,
"sh": 62,
"ro": false
},
"cdbg.png": {
"x": 309,
"y": 290,
"w": 124,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 124,
"sh": 123,
"ro": false
},
"word_云.png": {
"x": 435,
"y": 290,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_休.png": {
"x": 435,
"y": 411,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_卷.png": {
"x": 309,
"y": 415,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_在.png": {
"x": 2,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_心.png": {
"x": 123,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_意.png": {
"x": 244,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_无.png": {
"x": 365,
"y": 532,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_晴.png": {
"x": 552,
"y": 2,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_水.png": {
"x": 552,
"y": 123,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_流.png": {
"x": 486,
"y": 532,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_深.png": {
"x": 549,
"y": 244,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_看.png": {
"x": 549,
"y": 365,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
},
"word_自.png": {
"x": 2,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_舒.png": {
"x": 123,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_闲.png": {
"x": 244,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"word_静.png": {
"x": 365,
"y": 646,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
},
"num_3.png": {
"x": 494,
"y": 226,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
},
"num_7.png": {
"x": 494,
"y": 253,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
},
"num_1.png": {
"x": 607,
"y": 486,
"w": 10,
"h": 45,
"ox": 10,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_9.png": {
"x": 549,
"y": 498,
"w": 27,
"h": 45,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_0.png": {
"x": 309,
"y": 244,
"w": 31,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": false
},
"num_2.png": {
"x": 596,
"y": 498,
"w": 31,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_4.png": {
"x": 607,
"y": 531,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_5.png": {
"x": 607,
"y": 563,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_6.png": {
"x": 607,
"y": 595,
"w": 28,
"h": 44,
"ox": 1,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_8.png": {
"x": 607,
"y": 625,
"w": 26,
"h": 44,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
},
"num_s.png": {
"x": 642,
"y": 498,
"w": 22,
"h": 27,
"ox": 4,
"oy": 19,
"sw": 30,
"sh": 50,
"ro": false
}
}
"atlas": "GameScene.sht"
},
{
"keys": "guide.png,step1_img.png,step1_tips.png,step2_img.png,step2_tips.png,step3_img.png,step3_tips.png,step4_img.png",
"name": "GuidePanel",
"atlas": {
"step1_img.png": {
"x": 2,
"y": 2,
"w": 651,
"h": 388,
"ox": 0,
"oy": 0,
"sw": 651,
"sh": 388,
"ro": false
},
"step4_img.png": {
"x": 2,
"y": 392,
"w": 573,
"h": 623,
"ox": 0,
"oy": 0,
"sw": 573,
"sh": 623,
"ro": true
},
"step2_img.png": {
"x": 655,
"y": 2,
"w": 605,
"h": 470,
"ox": 0,
"oy": 0,
"sw": 605,
"sh": 470,
"ro": true
},
"guide.png": {
"x": 2,
"y": 967,
"w": 590,
"h": 586,
"ox": 0,
"oy": 0,
"sw": 590,
"sh": 586,
"ro": false
},
"step1_tips.png": {
"x": 627,
"y": 392,
"w": 379,
"h": 26,
"ox": 0,
"oy": 0,
"sw": 379,
"sh": 26,
"ro": true
},
"step2_tips.png": {
"x": 655,
"y": 609,
"w": 355,
"h": 26,
"ox": 0,
"oy": 0,
"sw": 355,
"sh": 26,
"ro": false
},
"step3_tips.png": {
"x": 1012,
"y": 609,
"w": 281,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 281,
"sh": 24,
"ro": true
},
"step3_img.png": {
"x": 655,
"y": 637,
"w": 123,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 123,
"sh": 123,
"ro": false
}
}
"atlas": "GuidePanel.sht"
},
{
"keys": "ruleBg.png",
"name": "RulePanel",
"atlas": {
"ruleBg.png": {
"x": 2,
"y": 2,
"w": 573,
"h": 572,
"ox": 0,
"oy": 0,
"sw": 573,
"sh": 572,
"ro": false
}
}
"atlas": "RulePanel.sht"
},
{
"keys": "backbtn.png,collect.png,rulebtn.png,startbg.jpg,startbtn.png,titile.png",
"name": "StartScene",
"atlas": {
"titile.png": {
"x": 2,
"y": 2,
"w": 574,
"h": 126,
"ox": 0,
"oy": 0,
"sw": 574,
"sh": 177,
"ro": false
},
"startbtn.png": {
"x": 2,
"y": 130,
"w": 350,
"h": 99,
"ox": 0,
"oy": 0,
"sw": 350,
"sh": 99,
"ro": false
},
"collect.png": {
"x": 2,
"y": 231,
"w": 308,
"h": 50,
"ox": 0,
"oy": 0,
"sw": 308,
"sh": 50,
"ro": false
},
"backbtn.png": {
"x": 354,
"y": 130,
"w": 145,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 145,
"sh": 62,
"ro": true
},
"rulebtn.png": {
"x": 418,
"y": 130,
"w": 138,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 138,
"sh": 62,
"ro": true
}
}
"atlas": "StartScene.sht"
},
{
"keys": "infoline.png,light.png,sucbg.png,sucstar.png,sun.png",
"name": "SuccessPanel",
"atlas": {
"sucbg.png": {
"x": 2,
"y": 2,
"w": 568,
"h": 502,
"ox": 0,
"oy": 0,
"sw": 568,
"sh": 502,
"ro": false
},
"light.png": {
"x": 2,
"y": 506,
"w": 463,
"h": 468,
"ox": 0,
"oy": 0,
"sw": 463,
"sh": 468,
"ro": true
},
"sucstar.png": {
"x": 472,
"y": 506,
"w": 227,
"h": 87,
"ox": 0,
"oy": 0,
"sw": 227,
"sh": 87,
"ro": true
},
"infoline.png": {
"x": 561,
"y": 506,
"w": 2,
"h": 113,
"ox": 1,
"oy": 1,
"sw": 4,
"sh": 115,
"ro": false
},
"sun.png": {
"x": 472,
"y": 735,
"w": 89,
"h": 83,
"ox": 0,
"oy": 0,
"sw": 89,
"sh": 83,
"ro": false
}
}
"atlas": "SuccessPanel.sht"
},
{
"keys": "bg.mp3,fail.mp3,get.mp3,jump.mp3",
......@@ -637,101 +37,12 @@ export const ResJson = {
{
"keys": "closebtn.png,comCloseBtn.png,surebtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,关闭按钮2.png",
"name": "common",
"atlas": {
"toastBg.png": {
"x": 2,
"y": 2,
"w": 460,
"h": 130,
"ox": 0,
"oy": 0,
"sw": 460,
"sh": 130,
"ro": false
},
"surebtn.png": {
"x": 2,
"y": 134,
"w": 267,
"h": 90,
"ox": 0,
"oy": 0,
"sw": 267,
"sh": 90,
"ro": false
},
"waitingBg.png": {
"x": 2,
"y": 226,
"w": 160,
"h": 180,
"ox": 0,
"oy": 0,
"sw": 160,
"sh": 180,
"ro": true
},
"closebtn.png": {
"x": 184,
"y": 226,
"w": 74,
"h": 74,
"ox": 0,
"oy": 0,
"sw": 74,
"sh": 74,
"ro": false
},
"关闭按钮.png": {
"x": 184,
"y": 302,
"w": 60,
"h": 60,
"ox": 0,
"oy": 0,
"sw": 60,
"sh": 60,
"ro": false
},
"关闭按钮2.png": {
"x": 246,
"y": 302,
"w": 60,
"h": 60,
"ox": 0,
"oy": 0,
"sw": 60,
"sh": 60,
"ro": false
},
"waitingRot.png": {
"x": 260,
"y": 226,
"w": 56,
"h": 56,
"ox": 0,
"oy": 0,
"sw": 56,
"sh": 56,
"ro": false
},
"comCloseBtn.png": {
"x": 271,
"y": 134,
"w": 48,
"h": 48,
"ox": 0,
"oy": 0,
"sw": 48,
"sh": 48,
"ro": false
}
}
"atlas": "common.sht"
},
{
"keys": "atmosphere.svga,crypeo.svga,guidecount.svga,jumppeo.svga,left.svga,light.svga,popstar.svga,right.svga,startbtn.svga,startpeople.svga",
"name": "svga"
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1678450122/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1678619538/resource/"
}
\ No newline at end of file
......@@ -4,11 +4,6 @@ import { GDispatcher } from "./Main";
import { getUrlParams } from "../module/web/webTools";
import { isFromShare, newUser } from 'duiba-utils';
let mergeData = {
user_type: newUser ? '0' : '1',
is_from_share: isFromShare ? '0' : '1',
}
//////////////星速台接口方法集成
/**
* web接口枚举,mock 文件名类似aaa/homeInfo.do
......@@ -79,7 +74,7 @@ export function sendWebNet(
headers?: any,
): Promise<dataOut> {
//处理下参数
parameter = { ...parameter, ...mergeData };
parameter = { ...parameter };
return new Promise((resolve, reject) => {
......@@ -123,11 +118,11 @@ export function sendWebNet(
//网络请求
ajax({
url: netName.replace("{projectId}", getProjectId()), //请求地址
url: netName, //请求地址
type: isGet ? 'GET' : "POST", //请求方式
data: parameter || {}, //请求参数
dataType: "json", // 返回值类型的设定,暂时只有json
async: true, //是否异步
dataType: "json",// 返回值类型的设定,暂时只有json
async: true,//是否异步
headers: headers,
success: function (response) {
//发现有些接口成功了,但是response为空
......@@ -154,7 +149,7 @@ export function sendWebNet(
);
},
error: function (status) {
if (!hideMsg) showToast("网络超时");
if (!hideMsg) showToast("网络开小差了, 请稍后再试");
callback && callback(false)
resolve({ success: false });
console.log("接口" + netName + ":网络超时");
......
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