Commit 340edf99 authored by wildfirecode13's avatar wildfirecode13

u

parent db56bcca
{ {
"dependencies": { "dependencies": {
"@spark/monitor-sdk": "^1.1.3" "@spark/monitor-sdk": "^1.1.3",
"@spark/utils": "^2.0.48"
} }
} }
import { watchPageVisibility } from "@spark/utils";
import { hideWaiting, showPanel, showWaiting } from "../../module/ctrls"; import { hideWaiting, showPanel, showWaiting } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers";
import { Scene } from "../../module/views/Scene"; import { Scene } from "../../module/views/Scene";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
import { isMember } from "../isMember"; import { isMember } from "../isMember";
...@@ -9,16 +11,24 @@ import { timesNotEnoughPanel } from "../panels/timesNotEnough"; ...@@ -9,16 +11,24 @@ import { timesNotEnoughPanel } from "../panels/timesNotEnough";
import { getWebData, sendLog, sendWebNet } from "../WebNet"; import { getWebData, sendLog, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName"; import { WebNetName } from "../WebNetName";
import { BoxGroup } from "./BoxGroup"; import { BoxGroup } from "./BoxGroup";
import { createPrizeTxt } from "./createPrizeTxt";
import { initNonmemberMask } from "./initNonmemberMask"; import { initNonmemberMask } from "./initNonmemberMask";
import { ScrollItem } from "./ScrollItem"; import { ScrollItem } from "./ScrollItem";
watchPageVisibility((visible) => {
console.log('页面visible', visible);
if (visible) {
sendWebNet(WebNetName.index).then(res => {
layers.stage.dispatchEvent('updateIndexData')
})
}
});
let boxGroup: BoxGroup; let boxGroup: BoxGroup;
let boxArea; let boxArea;
let hand; let hand;
let shareButton; let shareButton;
let indexData,scrollList; let indexData, scrollList;
export class IndexScene extends Scene { export class IndexScene extends Scene {
get groupNames() { return ["index"] } get groupNames() { return ["index"] }
...@@ -28,22 +38,22 @@ export class IndexScene extends Scene { ...@@ -28,22 +38,22 @@ export class IndexScene extends Scene {
super(); super();
} }
initUi(){ initUi() {
super.initUi(); super.initUi();
if( !isMember()){ if (!isMember()) {
initNonmemberMask(); initNonmemberMask();
} }
const svgaLayer = new FYGE.Sprite(); const svgaLayer = new FYGE.Sprite();
this.addChildAt(svgaLayer,1); this.addChildAt(svgaLayer, 1);
const svga = new FYGE.MovieClip(RES.getRes('首页元素循环上-输出.svga')); const svga = new FYGE.MovieClip(RES.getRes('首页元素循环上-输出.svga'));
svga.y=45; svga.y = 45;
svgaLayer.addChild(svga); svgaLayer.addChild(svga);
const svga2 = new FYGE.MovieClip(RES.getRes('首页元素循环下-输出.svga')); const svga2 = new FYGE.MovieClip(RES.getRes('首页元素循环下-输出.svga'));
svgaLayer.addChild(svga2); svgaLayer.addChild(svga2);
svga2.y=1320; svga2.y = 1320;
sendLog("exposure",9); sendLog("exposure", 9);
} }
start() { start() {
...@@ -61,7 +71,7 @@ export class IndexScene extends Scene { ...@@ -61,7 +71,7 @@ export class IndexScene extends Scene {
const index_timestips = getObject(this, 'index_timestips'); const index_timestips = getObject(this, 'index_timestips');
index_timestips.position.set(127, 1131); index_timestips.position.set(127, 1131);
const list = new FYGE.ScrollList(ScrollItem, 131 + 20, 131, 620, 154, false); const list = new FYGE.ScrollList(ScrollItem, 131 + 20, 131, 620, 154, false);
scrollList=list; scrollList = list;
list.position.set(80, 1240 + 30); list.position.set(80, 1240 + 30);
this.addChild(list); this.addChild(list);
hand = getObject(this, 'index_sharehand'); hand = getObject(this, 'index_sharehand');
...@@ -75,11 +85,11 @@ export class IndexScene extends Scene { ...@@ -75,11 +85,11 @@ export class IndexScene extends Scene {
boxGroup.addEventListener("stopIndexEnterFrame", this.removeEvent, this); boxGroup.addEventListener("stopIndexEnterFrame", this.removeEvent, this);
shareButton = getObject(this, 'index_sharetips'); shareButton = getObject(this, 'index_sharetips');
shareButton.addEventListener(FYGE.MouseEvent.CLICK, () => { shareButton.addEventListener(FYGE.MouseEvent.CLICK, () => {
sendLog("click",9); sendLog("click", 9);
this.handleShare(); this.handleShare();
},this); }, this);
this.stage.addEventListener('updateIndexData',this.getIndex,this); this.stage.addEventListener('updateIndexData', this.getIndex, this);
} }
initContainer() { initContainer() {
...@@ -102,12 +112,12 @@ export class IndexScene extends Scene { ...@@ -102,12 +112,12 @@ export class IndexScene extends Scene {
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
getObject(this,'index_record').addEventListener(FYGE.MouseEvent.CLICK, ()=>{ getObject(this, 'index_record').addEventListener(FYGE.MouseEvent.CLICK, () => {
location.href='f34481928.html' location.href = 'f34481928.html'
}, this); }, this);
this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this); this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
this.addEventListener("restartEnterFrame", this.onRestartFrame, this); this.addEventListener("restartEnterFrame", this.onRestartFrame, this);
const rulePop = getObject(this,'index_rule'); const rulePop = getObject(this, 'index_rule');
rulePop && rulePop.addEventListener(FYGE.MouseEvent.CLICK, this.toRule, this); rulePop && rulePop.addEventListener(FYGE.MouseEvent.CLICK, this.toRule, this);
} }
...@@ -116,15 +126,15 @@ export class IndexScene extends Scene { ...@@ -116,15 +126,15 @@ export class IndexScene extends Scene {
} }
onRestartFrame() { onRestartFrame() {
if(boxGroup && boxGroup.indexsvga && boxGroup.indexsvga.parent) if (boxGroup && boxGroup.indexsvga && boxGroup.indexsvga.parent)
boxGroup.removeChild(boxGroup.indexsvga); boxGroup.removeChild(boxGroup.indexsvga);
if(!this.hasEventListener(FYGE.Event.ENTER_FRAME)) if (!this.hasEventListener(FYGE.Event.ENTER_FRAME))
this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this); this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
} }
toRule() { toRule() {
showWaiting(); showWaiting();
sendWebNet(WebNetName.projectRule).then(()=>{ sendWebNet(WebNetName.projectRule).then(() => {
hideWaiting(); hideWaiting();
showPanel(RulePanel); showPanel(RulePanel);
}) })
...@@ -149,9 +159,9 @@ export class IndexScene extends Scene { ...@@ -149,9 +159,9 @@ export class IndexScene extends Scene {
getIndex = async () => { getIndex = async () => {
const result = await getWebData(WebNetName.index); const result = await getWebData(WebNetName.index);
const needCredits = getObject(this, 'index_costtips'); const needCredits = getObject(this, 'index_costtips');
if( !isMember()){ if (!isMember()) {
getObject(this,'index_sharetips').visible=false; getObject(this, 'index_sharetips').visible = false;
getObject(this,'index_sharehand').visible=false; getObject(this, 'index_sharehand').visible = false;
// scrollList.visible=false; // scrollList.visible=false;
// createPrizeTxt(this); // createPrizeTxt(this);
needCredits.text = `${result.data.needCredits}` + "积分/次"; needCredits.text = `${result.data.needCredits}` + "积分/次";
...@@ -192,7 +202,7 @@ export class IndexScene extends Scene { ...@@ -192,7 +202,7 @@ export class IndexScene extends Scene {
hand.visible = false; hand.visible = false;
} else { } else {
reDegree.text = '0'; reDegree.text = '0';
needCredits.text = '今日次数已用完';needCredits.size=24; needCredits.text = '今日次数已用完'; needCredits.size = 24;
// needCredits.text = `${result.data.needCredits}` + "积分/次"; // needCredits.text = `${result.data.needCredits}` + "积分/次";
getBoxButton.visible = true; getBoxButton.visible = true;
shareButton.visible = false; shareButton.visible = false;
......
...@@ -5,14 +5,14 @@ import { memberGuidePanel } from "../panels/memberGuide"; ...@@ -5,14 +5,14 @@ import { memberGuidePanel } from "../panels/memberGuide";
export const initNonmemberMask = () =>{ export const initNonmemberMask = () =>{
const mask = new FYGE.Shape(); const mask = new FYGE.Shape();
mask.beginFill(0, 1); mask.beginFill(0, 1);
mask.drawRect(0, 0, 750, 1624-300-50-20); mask.drawRect(0, 280, 750, 1624-300-50-20-280);
mask.endFill(); mask.endFill();
mask.alpha = 0.0; mask.alpha = 0.0;
layers.topLayer.addChild(mask); layers.sceneLayer.addChild(mask);
mask.addEventListener(FYGE.MouseEvent.CLICK, () => { mask.addEventListener(FYGE.MouseEvent.CLICK, () => {
mask.mouseEnable=false; // mask.mouseEnable=false;
showPanel(memberGuidePanel,()=>{ showPanel(memberGuidePanel,()=>{
mask.mouseEnable=true; // mask.mouseEnable=true;
}); });
},this) },this)
} }
\ No newline at end of file
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
# yarn lockfile v1 # yarn lockfile v1
"@babel/runtime@^7.12.5":
version "7.15.3"
resolved "http://npm.dui88.com:80/@babel%2fruntime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b"
integrity sha1-LhwogMoRjlsvmYgyK9inZWoyUCs=
dependencies:
regenerator-runtime "^0.13.4"
"@sentry/browser@5.30.0": "@sentry/browser@5.30.0":
version "5.30.0" version "5.30.0"
resolved "http://npm.dui88.com:80/@sentry%2fbrowser/-/browser-5.30.0.tgz#c28f49d551db3172080caef9f18791a7fd39e3b3" resolved "http://npm.dui88.com:80/@sentry%2fbrowser/-/browser-5.30.0.tgz#c28f49d551db3172080caef9f18791a7fd39e3b3"
...@@ -77,6 +84,24 @@ ...@@ -77,6 +84,24 @@
"@sentry/types" "6.11.0" "@sentry/types" "6.11.0"
tslib "^1.9.3" tslib "^1.9.3"
"@spark/api-base@^2.0.30", "@spark/api-base@^2.0.7", "@spark/api-base@^2.0.9":
version "2.0.30"
resolved "http://npm.dui88.com:80/@spark%2fapi-base/-/api-base-2.0.30.tgz#08ce13031be554fc3de737912ac5dad1aee0c4ab"
integrity sha512-VSCx6Rg4Zn7CJxnyEEC2e6dvgypm2d4vufXtbOgli2xMcS7bUf+3rKB11RnB52ukXFD9J3bTww5gIj2Ymj4B/Q==
dependencies:
"@spark/common-helpers" "^1.0.19"
"@spark/utils" "^2.0.3"
"@spark/common-helpers@^1.0.1", "@spark/common-helpers@^1.0.19":
version "1.0.21"
resolved "http://npm.dui88.com:80/@spark%2fcommon-helpers/-/common-helpers-1.0.21.tgz#e4a60a9efbd5c76717ee3ac03504c2068a6eee35"
integrity sha512-1TKpt40iX0G4/yA89ju+KU340GwEiJgNSEHPCYO/Wgwi6seHbHlcVHgBD6TiKoNTIuAG+3xPhioS18zszjbbNg==
dependencies:
"@babel/runtime" "^7.12.5"
"@spark/api-base" "^2.0.7"
"@spark/projectx" "^2.0.10"
duiba-utils "^1.0.6"
"@spark/monitor-sdk@^1.1.3": "@spark/monitor-sdk@^1.1.3":
version "1.1.3" version "1.1.3"
resolved "http://npm.dui88.com:80/@spark%2fmonitor-sdk/-/monitor-sdk-1.1.3.tgz#88c6f1c4b8c7aacc2945d72a9612dd3f147d25f5" resolved "http://npm.dui88.com:80/@spark%2fmonitor-sdk/-/monitor-sdk-1.1.3.tgz#88c6f1c4b8c7aacc2945d72a9612dd3f147d25f5"
...@@ -88,6 +113,26 @@ ...@@ -88,6 +113,26 @@
inquirer "^8.1.0" inquirer "^8.1.0"
ora "^5.4.0" ora "^5.4.0"
"@spark/projectx@^2.0.10":
version "2.0.13"
resolved "http://npm.dui88.com:80/@spark%2fprojectx/-/projectx-2.0.13.tgz#a87cb7642a9a5e93e5aee752f04eb5f5814972eb"
integrity sha512-ow8ATHzlq7SXVJveP4LdLpF+k2eGwKpKrDTr2scfp+LMtlxbLQIXZL/D7RQVwTwJnk7zIYw6gKlpaTKmdXqfmg==
dependencies:
"@spark/api-base" "^2.0.9"
"@spark/common-helpers" "^1.0.1"
"@spark/utils" "^2.0.19"
"@spark/utils@^2.0.19", "@spark/utils@^2.0.3", "@spark/utils@^2.0.48":
version "2.0.48"
resolved "http://npm.dui88.com:80/@spark%2futils/-/utils-2.0.48.tgz#84dba3adaf5dcf5d6f5b677b34a49c4acd7b97ad"
integrity sha512-MFirVh4Q+ZQCSTDkxTkRWDWQqbEHTbU9gbTh+DLqCwSfVDwZd2jxQ/2tN/836WnBfj47yzcBsbu2aPy6gxyr5g==
dependencies:
"@spark/api-base" "^2.0.30"
crypto-js "^4.0.0"
howler "^2.2.1"
html-observer "^1.0.4"
html-shot "^1.0.13"
ansi-escapes@^4.2.1: ansi-escapes@^4.2.1:
version "4.3.2" version "4.3.2"
resolved "http://npm.dui88.com:80/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" resolved "http://npm.dui88.com:80/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
...@@ -181,6 +226,11 @@ commander@^7.2.0: ...@@ -181,6 +226,11 @@ commander@^7.2.0:
resolved "http://npm.dui88.com:80/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" resolved "http://npm.dui88.com:80/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc= integrity sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc=
crypto-js@^4.0.0:
version "4.1.1"
resolved "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
integrity sha1-nkhbzwNSEEG9hYRHhrg/t2GXNs8=
defaults@^1.0.3: defaults@^1.0.3:
version "1.0.3" version "1.0.3"
resolved "http://npm.dui88.com:80/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" resolved "http://npm.dui88.com:80/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
...@@ -188,6 +238,11 @@ defaults@^1.0.3: ...@@ -188,6 +238,11 @@ defaults@^1.0.3:
dependencies: dependencies:
clone "^1.0.2" clone "^1.0.2"
duiba-utils@^1.0.6:
version "1.0.11"
resolved "http://npm.dui88.com:80/duiba-utils/-/duiba-utils-1.0.11.tgz#deead33f0c86bbe0063131b70ff0592da7bcb9dd"
integrity sha512-mEKFgn+ZpaIwMFmZHiCZXJpPTPkoCZSEKKfubjJ+8edti0GbGnfrbZKvHveLu5HbvwpXCNA6xXPQDJcE12VqbA==
emoji-regex@^8.0.0: emoji-regex@^8.0.0:
version "8.0.0" version "8.0.0"
resolved "http://npm.dui88.com:80/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" resolved "http://npm.dui88.com:80/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
...@@ -219,6 +274,23 @@ has-flag@^4.0.0: ...@@ -219,6 +274,23 @@ has-flag@^4.0.0:
resolved "http://npm.dui88.com:80/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" resolved "http://npm.dui88.com:80/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s= integrity sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=
howler@^2.2.1:
version "2.2.3"
resolved "http://npm.dui88.com:80/howler/-/howler-2.2.3.tgz#a2eff9b08b586798e7a2ee17a602a90df28715da"
integrity sha1-ou/5sItYZ5jnou4XpgKpDfKHFdo=
html-observer@^1.0.4:
version "1.0.5"
resolved "http://npm.dui88.com:80/html-observer/-/html-observer-1.0.5.tgz#8fda1f005e6fdaa2da638d5d646b6f3a977a0701"
integrity sha512-mAEB5Pu/AxJl0cRrK2HB37h7U98FHy7vungNJSFvczNjx6Rd81YUkDLT6aAGLaX37+ulDwwLqJmY1r01A22aQQ==
dependencies:
tslib "^2.3.0"
html-shot@^1.0.13:
version "1.0.20"
resolved "http://npm.dui88.com:80/html-shot/-/html-shot-1.0.20.tgz#1dd61b32c6b36ce95bd6b66da5a4c37c26fa4fcd"
integrity sha512-9XJsD7GaUFP6VuThQY2rae+PxLO7ZWUdyfEDnzq2iACB4r5W4BrLNMmfKRefen1hHsd39rdOUzJ9p8Wo1zpuHQ==
iconv-lite@^0.4.24: iconv-lite@^0.4.24:
version "0.4.24" version "0.4.24"
resolved "http://npm.dui88.com:80/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" resolved "http://npm.dui88.com:80/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
...@@ -349,6 +421,11 @@ readable-stream@^3.4.0: ...@@ -349,6 +421,11 @@ readable-stream@^3.4.0:
string_decoder "^1.1.1" string_decoder "^1.1.1"
util-deprecate "^1.0.1" util-deprecate "^1.0.1"
regenerator-runtime@^0.13.4:
version "0.13.9"
resolved "http://npm.dui88.com:80/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
integrity sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I=
restore-cursor@^3.1.0: restore-cursor@^3.1.0:
version "3.1.0" version "3.1.0"
resolved "http://npm.dui88.com:80/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" resolved "http://npm.dui88.com:80/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
...@@ -431,6 +508,11 @@ tslib@^1.9.3: ...@@ -431,6 +508,11 @@ tslib@^1.9.3:
resolved "http://npm.dui88.com:80/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "http://npm.dui88.com:80/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA= integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=
tslib@^2.3.0:
version "2.3.1"
resolved "http://npm.dui88.com:80/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha1-6KM1rdXOrlGqJh0ypJAVjvBC7wE=
tslib@~2.1.0: tslib@~2.1.0:
version "2.1.0" version "2.1.0"
resolved "http://npm.dui88.com:80/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" resolved "http://npm.dui88.com:80/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
......
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