Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
51378a10
Commit
51378a10
authored
Oct 12, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hy code
parent
ff7ae849
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
155 additions
and
74 deletions
+155
-74
output.js
project/src/canvas/game/output.js
+24
-7
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+24
-7
copyJs.js
project/src/canvas/game/scripts/copyJs.js
+2
-2
Root.ts
project/src/canvas/game/src/chuansongdai/Root.ts
+11
-8
goodsContainer.ts
...t/src/canvas/game/src/chuansongdai/game/goodsContainer.ts
+14
-5
homePage.axml
taobao_mini/client/pages/homePage/homePage.axml
+1
-1
output.js
taobao_mini/client/pages/pagecanvas/output.js
+43
-14
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+30
-24
turnTablePage.js
taobao_mini/client/pages/turnTablePage/turnTablePage.js
+5
-5
No files found.
project/src/canvas/game/output.js
View file @
51378a10
...
...
@@ -2517,7 +2517,7 @@ var Root = (function (_super) {
this
.
addChild
(
leftCsd
);
this
.
goodsContainer
=
new
goodsContainer_1
.
default
(
this
);
this
.
addChild
(
this
.
goodsContainer
);
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
4
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
2
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
.
mouseEnable
=
true
;
this
.
backBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
this
.
addChild
(
this
.
backBtn
);
...
...
@@ -2558,6 +2558,9 @@ var Root = (function (_super) {
switch
(
_a
.
label
)
{
case
0
:
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
this
.
removeChild
(
this
.
scoreBoard
);
this
.
scoreBoard
=
null
;
this
.
goodsContainer
.
stopGoods
();
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getUserInfo
,
{})];
case
1
:
userInfoRes
=
_a
.
sent
();
...
...
@@ -2568,9 +2571,7 @@ var Root = (function (_super) {
}
else
{
Main_1
.
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
);
this
.
time
=
60
;
this
.
scoreBoard
.
scoreRight
=
0
;
this
.
scoreBoard
.
scoreRight
=
0
;
this
.
goodsContainer
.
createGoodsContainer
();
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
this
.
userInfo
);
}
return
[
2
];
...
...
@@ -2596,7 +2597,6 @@ var Root = (function (_super) {
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'backToPage'
);
});
return
[
2
];
}
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
if
(
!
(
this
.
userInfo
.
win
&&
this
.
scoreBoard
.
scoreLeft
))
return
[
3
,
2
];
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getPrizeInfo
)];
case
1
:
...
...
@@ -2609,10 +2609,12 @@ var Root = (function (_super) {
else
{
ctrls_1
.
showPanel
(
SuccessNoAwardPanel_1
.
SuccessNoAwardPanel
,
prize
);
}
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
return
[
3
,
3
];
case
2
:
console
.
log
(
'user fail --- CSD-GAME over data:'
);
ctrls_1
.
showPanel
(
FailedPanel_1
.
FailedPanel
);
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
_a
.
label
=
3
;
case
3
:
return
[
2
];
}
...
...
@@ -2973,7 +2975,6 @@ var GoodsContainer = (function (_super) {
return
num
;
};
_this
.
_root
=
root
;
_this
.
goodsDeepIndex
=
1000
;
_this
.
goodsTextures
=
[
{
texture
:
resCanvasList_1
.
default
[
'd1379fca-f21e-40f0-b0f0-06c188d4b4dc'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
92
,
height
:
220
,
aX
:
-
4
,
lot
:
'light'
},
{
texture
:
resCanvasList_1
.
default
[
'0bd734c1-9c1a-428e-8a9c-cef373baed9d'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
102
,
height
:
224
,
aX
:
-
2
,
lot
:
'light'
},
...
...
@@ -3033,6 +3034,9 @@ var GoodsContainer = (function (_super) {
this
.
lineContainer
.
mask
=
maskRect
;
this
.
addChild
(
this
.
lineContainer
);
this
.
startLine
();
this
.
createGoodsContainer
();
};
GoodsContainer
.
prototype
.
createGoodsContainer
=
function
()
{
this
.
goodsContainer
=
new
FYGE
.
Container
();
this
.
goodsContainer
.
width
=
750
;
this
.
goodsContainer
.
height
=
988
;
...
...
@@ -3090,6 +3094,14 @@ var GoodsContainer = (function (_super) {
clearInterval
(
this
.
createGoodTimeOut
);
this
.
createGoodTimeOut
=
null
;
};
GoodsContainer
.
prototype
.
stopGoods
=
function
()
{
clearInterval
(
this
.
createGoodTimeOut
);
this
.
createGoodTimeOut
=
null
;
this
.
intoGoods
=
[];
this
.
goodsArr
=
[];
this
.
removeChild
(
this
.
goodsContainer
);
this
.
goodsContainer
=
null
;
};
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
var
_this
=
this
;
this
.
createGoodTimeOut
=
setInterval
(
function
()
{
...
...
@@ -15985,7 +15997,8 @@ var XxlScene = (function (_super) {
that
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
that
.
mouseDown
,
that
);
that
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
that
.
mouseUp
,
that
);
that
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
that
.
updateFrame
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"MatchCompelete"
,
this
.
gameStart
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"MatchCompelete"
,
that
.
gameStart
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
that
.
backToPage
,
that
);
};
XxlScene
.
prototype
.
gameStart
=
function
()
{
this
.
rightUserContainer
.
visible
=
true
;
...
...
@@ -16049,6 +16062,9 @@ var XxlScene = (function (_super) {
});
});
};
XxlScene
.
prototype
.
backToPage
=
function
()
{
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'backToPage'
);
});
};
XxlScene
.
prototype
.
updateFrame
=
function
()
{
if
(
!
this
.
isGameStart
)
{
return
;
...
...
@@ -16106,6 +16122,7 @@ var XxlScene = (function (_super) {
that
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
that
.
mouseDown
,
that
);
that
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
that
.
mouseUp
,
that
);
Main_1
.
GDispatcher
.
removeEventListener
(
"gameReset"
,
this
.
reset
);
Main_1
.
GDispatcher
.
removeEventListener
(
"outCallBackToPage"
,
that
.
backToPage
);
};
return
XxlScene
;
}(
Scene_1
.
Scene
));
...
...
project/src/canvas/game/output.js.map
View file @
51378a10
This source diff could not be displayed because it is too large. You can
view the blob
instead.
project/src/canvas/game/released/output.js
View file @
51378a10
...
...
@@ -2519,7 +2519,7 @@ var Root = (function (_super) {
this
.
addChild
(
leftCsd
);
this
.
goodsContainer
=
new
goodsContainer_1
.
default
(
this
);
this
.
addChild
(
this
.
goodsContainer
);
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
4
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
2
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
.
mouseEnable
=
true
;
this
.
backBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
this
.
addChild
(
this
.
backBtn
);
...
...
@@ -2560,6 +2560,9 @@ var Root = (function (_super) {
switch
(
_a
.
label
)
{
case
0
:
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
this
.
removeChild
(
this
.
scoreBoard
);
this
.
scoreBoard
=
null
;
this
.
goodsContainer
.
stopGoods
();
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getUserInfo
,
{})];
case
1
:
userInfoRes
=
_a
.
sent
();
...
...
@@ -2570,9 +2573,7 @@ var Root = (function (_super) {
}
else
{
Main_1
.
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
);
this
.
time
=
60
;
this
.
scoreBoard
.
scoreRight
=
0
;
this
.
scoreBoard
.
scoreRight
=
0
;
this
.
goodsContainer
.
createGoodsContainer
();
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
this
.
userInfo
);
}
return
[
2
];
...
...
@@ -2598,7 +2599,6 @@ var Root = (function (_super) {
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'backToPage'
);
});
return
[
2
];
}
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
if
(
!
(
this
.
userInfo
.
win
&&
this
.
scoreBoard
.
scoreLeft
))
return
[
3
,
2
];
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getPrizeInfo
)];
case
1
:
...
...
@@ -2611,10 +2611,12 @@ var Root = (function (_super) {
else
{
ctrls_1
.
showPanel
(
SuccessNoAwardPanel_1
.
SuccessNoAwardPanel
,
prize
);
}
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
return
[
3
,
3
];
case
2
:
console
.
log
(
'user fail --- CSD-GAME over data:'
);
ctrls_1
.
showPanel
(
FailedPanel_1
.
FailedPanel
);
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
_a
.
label
=
3
;
case
3
:
return
[
2
];
}
...
...
@@ -2975,7 +2977,6 @@ var GoodsContainer = (function (_super) {
return
num
;
};
_this
.
_root
=
root
;
_this
.
goodsDeepIndex
=
1000
;
_this
.
goodsTextures
=
[
{
texture
:
resCanvasList_1
.
default
[
'd1379fca-f21e-40f0-b0f0-06c188d4b4dc'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
92
,
height
:
220
,
aX
:
-
4
,
lot
:
'light'
},
{
texture
:
resCanvasList_1
.
default
[
'0bd734c1-9c1a-428e-8a9c-cef373baed9d'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
102
,
height
:
224
,
aX
:
-
2
,
lot
:
'light'
},
...
...
@@ -3035,6 +3036,9 @@ var GoodsContainer = (function (_super) {
this
.
lineContainer
.
mask
=
maskRect
;
this
.
addChild
(
this
.
lineContainer
);
this
.
startLine
();
this
.
createGoodsContainer
();
};
GoodsContainer
.
prototype
.
createGoodsContainer
=
function
()
{
this
.
goodsContainer
=
new
FYGE
.
Container
();
this
.
goodsContainer
.
width
=
750
;
this
.
goodsContainer
.
height
=
988
;
...
...
@@ -3092,6 +3096,14 @@ var GoodsContainer = (function (_super) {
clearInterval
(
this
.
createGoodTimeOut
);
this
.
createGoodTimeOut
=
null
;
};
GoodsContainer
.
prototype
.
stopGoods
=
function
()
{
clearInterval
(
this
.
createGoodTimeOut
);
this
.
createGoodTimeOut
=
null
;
this
.
intoGoods
=
[];
this
.
goodsArr
=
[];
this
.
removeChild
(
this
.
goodsContainer
);
this
.
goodsContainer
=
null
;
};
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
var
_this
=
this
;
this
.
createGoodTimeOut
=
setInterval
(
function
()
{
...
...
@@ -15987,7 +15999,8 @@ var XxlScene = (function (_super) {
that
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
that
.
mouseDown
,
that
);
that
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
that
.
mouseUp
,
that
);
that
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
that
.
updateFrame
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"MatchCompelete"
,
this
.
gameStart
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"MatchCompelete"
,
that
.
gameStart
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
that
.
backToPage
,
that
);
};
XxlScene
.
prototype
.
gameStart
=
function
()
{
this
.
rightUserContainer
.
visible
=
true
;
...
...
@@ -16051,6 +16064,9 @@ var XxlScene = (function (_super) {
});
});
};
XxlScene
.
prototype
.
backToPage
=
function
()
{
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'backToPage'
);
});
};
XxlScene
.
prototype
.
updateFrame
=
function
()
{
if
(
!
this
.
isGameStart
)
{
return
;
...
...
@@ -16108,6 +16124,7 @@ var XxlScene = (function (_super) {
that
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
that
.
mouseDown
,
that
);
that
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
that
.
mouseUp
,
that
);
Main_1
.
GDispatcher
.
removeEventListener
(
"gameReset"
,
this
.
reset
);
Main_1
.
GDispatcher
.
removeEventListener
(
"outCallBackToPage"
,
that
.
backToPage
);
};
return
XxlScene
;
}(
Scene_1
.
Scene
));
...
...
project/src/canvas/game/scripts/copyJs.js
View file @
51378a10
...
...
@@ -6,8 +6,8 @@ var fs = require("fs");
// fs.readFileSync("./output.js")
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var
endPath
=
"C:/Users/Duiba/Desktop/work/雅顿/new/new_taobao/taobao_mini/client/pages/pagecanvas/"
//
var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/'
//
var endPath = "C:/Users/Duiba/Desktop/work/雅顿/new/new_taobao/taobao_mini/client/pages/pagecanvas/"
var
endPath
=
'/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/'
var
version
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
...
...
project/src/canvas/game/src/chuansongdai/Root.ts
View file @
51378a10
...
...
@@ -79,7 +79,7 @@ export default class Root extends FYGE.Container {
// -- 返回
this
.
backBtn
=
Tools
.
getSprite
(
resCanvasList
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
4
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
)
this
.
backBtn
=
Tools
.
getSprite
(
resCanvasList
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
2
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
)
this
.
backBtn
.
mouseEnable
=
true
this
.
backBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
()
=>
{
this
.
gameOver
(
'back'
)
},
this
)
this
.
addChild
(
this
.
backBtn
)
...
...
@@ -127,6 +127,10 @@ export default class Root extends FYGE.Container {
// 取消监听再来一局
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
)
this
.
removeChild
(
this
.
scoreBoard
)
this
.
scoreBoard
=
null
this
.
goodsContainer
.
stopGoods
()
const
userInfoRes
=
await
sendTbNet
(
TbNetName
.
getUserInfo
,
{})
this
.
userInfo
=
userInfoRes
.
data
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
)
...
...
@@ -137,9 +141,7 @@ export default class Root extends FYGE.Container {
// 否则 执行正常开始逻辑
}
else
{
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
)
this
.
time
=
60
this
.
scoreBoard
.
scoreRight
=
0
this
.
scoreBoard
.
scoreRight
=
0
this
.
goodsContainer
.
createGoodsContainer
()
showPanel
(
MatchingPanel
,
this
.
userInfo
)
}
...
...
@@ -163,10 +165,6 @@ export default class Root extends FYGE.Container {
}
// 正常结束 - 由子组件调用
// 监听再来一局
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
)
if
(
this
.
userInfo
.
win
&&
this
.
scoreBoard
.
scoreLeft
)
{
//胜利
const
prizeInfo
=
await
sendTbNet
(
TbNetName
.
getPrizeInfo
)
...
...
@@ -177,11 +175,16 @@ export default class Root extends FYGE.Container {
}
else
{
showPanel
(
SuccessNoAwardPanel
,
prize
)
}
// 监听再来一局
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
)
}
else
{
//失败
console
.
log
(
'user fail --- CSD-GAME over data:'
)
showPanel
(
FailedPanel
)
// 监听再来一局
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
)
}
// GDispatcher.dispatchEvent('gameOver-csd', {score: score})
}
...
...
project/src/canvas/game/src/chuansongdai/game/goodsContainer.ts
View file @
51378a10
...
...
@@ -29,8 +29,6 @@ export default class GoodsContainer extends FYGE.Container {
goodsTextures
;
// 产生掉落物 的 interval函数
createGoodTimeOut
=
null
// 掉落物 深度总数
goodsDeepIndex
;
// 进入可被滑动的 掉落物
intoGoods
=
[];
...
...
@@ -40,7 +38,6 @@ export default class GoodsContainer extends FYGE.Container {
constructor
(
root
)
{
super
()
this
.
_root
=
root
this
.
goodsDeepIndex
=
1000
this
.
goodsTextures
=
[
{
texture
:
resCanvasList
[
'd1379fca-f21e-40f0-b0f0-06c188d4b4dc'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
92
,
height
:
220
,
aX
:
-
4
,
lot
:
'light'
},
{
texture
:
resCanvasList
[
'0bd734c1-9c1a-428e-8a9c-cef373baed9d'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
102
,
height
:
224
,
aX
:
-
2
,
lot
:
'light'
},
...
...
@@ -110,6 +107,10 @@ export default class GoodsContainer extends FYGE.Container {
this
.
addChild
(
this
.
lineContainer
)
this
.
startLine
()
this
.
createGoodsContainer
()
}
createGoodsContainer
()
{
this
.
goodsContainer
=
new
FYGE
.
Container
()
this
.
goodsContainer
.
width
=
750
this
.
goodsContainer
.
height
=
988
...
...
@@ -176,7 +177,16 @@ export default class GoodsContainer extends FYGE.Container {
this
.
createLineTimeOut
=
null
clearInterval
(
this
.
createGoodTimeOut
)
this
.
createGoodTimeOut
=
null
}
stopGoods
()
{
clearInterval
(
this
.
createGoodTimeOut
)
this
.
createGoodTimeOut
=
null
this
.
intoGoods
=
[]
this
.
goodsArr
=
[]
this
.
removeChild
(
this
.
goodsContainer
)
this
.
goodsContainer
=
null
}
// 掉落物开始掉落
...
...
@@ -185,7 +195,6 @@ export default class GoodsContainer extends FYGE.Container {
let
g
=
this
.
createGoods
()
this
.
goodsArr
.
unshift
(
g
)
this
.
goodsContainer
.
addChildAt
(
g
,
-
1
)
// g.zIndex = --this.goodsDeepIndex
},
1000
)
}
...
...
taobao_mini/client/pages/homePage/homePage.axml
View file @
51378a10
...
...
@@ -121,7 +121,7 @@
<pagecanvas
class="homepage_pagecanvas"
onBackPage="backToPage"
gameType="{{
gameType
}}"
gameType="{{
gameType
}}"
onAnimationLoadOver="onAnimationLoadOver"
>
</pagecanvas>
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
51378a10
...
...
@@ -2519,7 +2519,7 @@ var Root = (function (_super) {
this
.
addChild
(
leftCsd
);
this
.
goodsContainer
=
new
goodsContainer_1
.
default
(
this
);
this
.
addChild
(
this
.
goodsContainer
);
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
4
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
2
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
.
mouseEnable
=
true
;
this
.
backBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
this
.
addChild
(
this
.
backBtn
);
...
...
@@ -2560,6 +2560,9 @@ var Root = (function (_super) {
switch
(
_a
.
label
)
{
case
0
:
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
this
.
removeChild
(
this
.
scoreBoard
);
this
.
scoreBoard
=
null
;
this
.
goodsContainer
.
stopGoods
();
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getUserInfo
,
{})];
case
1
:
userInfoRes
=
_a
.
sent
();
...
...
@@ -2570,9 +2573,7 @@ var Root = (function (_super) {
}
else
{
Main_1
.
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
);
this
.
time
=
60
;
this
.
scoreBoard
.
scoreRight
=
0
;
this
.
scoreBoard
.
scoreRight
=
0
;
this
.
goodsContainer
.
createGoodsContainer
();
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
this
.
userInfo
);
}
return
[
2
];
...
...
@@ -2598,7 +2599,6 @@ var Root = (function (_super) {
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'backToPage'
);
});
return
[
2
];
}
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
if
(
!
(
this
.
userInfo
.
win
&&
this
.
scoreBoard
.
scoreLeft
))
return
[
3
,
2
];
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getPrizeInfo
)];
case
1
:
...
...
@@ -2611,10 +2611,12 @@ var Root = (function (_super) {
else
{
ctrls_1
.
showPanel
(
SuccessNoAwardPanel_1
.
SuccessNoAwardPanel
,
prize
);
}
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
return
[
3
,
3
];
case
2
:
console
.
log
(
'user fail --- CSD-GAME over data:'
);
ctrls_1
.
showPanel
(
FailedPanel_1
.
FailedPanel
);
Main_1
.
GDispatcher
.
addEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
_a
.
label
=
3
;
case
3
:
return
[
2
];
}
...
...
@@ -2975,7 +2977,6 @@ var GoodsContainer = (function (_super) {
return
num
;
};
_this
.
_root
=
root
;
_this
.
goodsDeepIndex
=
1000
;
_this
.
goodsTextures
=
[
{
texture
:
resCanvasList_1
.
default
[
'd1379fca-f21e-40f0-b0f0-06c188d4b4dc'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
92
,
height
:
220
,
aX
:
-
4
,
lot
:
'light'
},
{
texture
:
resCanvasList_1
.
default
[
'0bd734c1-9c1a-428e-8a9c-cef373baed9d'
].
url
,
score
:
3
,
dir
:
'left'
,
wrong
:
-
2
,
width
:
102
,
height
:
224
,
aX
:
-
2
,
lot
:
'light'
},
...
...
@@ -3035,6 +3036,9 @@ var GoodsContainer = (function (_super) {
this
.
lineContainer
.
mask
=
maskRect
;
this
.
addChild
(
this
.
lineContainer
);
this
.
startLine
();
this
.
createGoodsContainer
();
};
GoodsContainer
.
prototype
.
createGoodsContainer
=
function
()
{
this
.
goodsContainer
=
new
FYGE
.
Container
();
this
.
goodsContainer
.
width
=
750
;
this
.
goodsContainer
.
height
=
988
;
...
...
@@ -3092,6 +3096,14 @@ var GoodsContainer = (function (_super) {
clearInterval
(
this
.
createGoodTimeOut
);
this
.
createGoodTimeOut
=
null
;
};
GoodsContainer
.
prototype
.
stopGoods
=
function
()
{
clearInterval
(
this
.
createGoodTimeOut
);
this
.
createGoodTimeOut
=
null
;
this
.
intoGoods
=
[];
this
.
goodsArr
=
[];
this
.
removeChild
(
this
.
goodsContainer
);
this
.
goodsContainer
=
null
;
};
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
var
_this
=
this
;
this
.
createGoodTimeOut
=
setInterval
(
function
()
{
...
...
@@ -15102,11 +15114,11 @@ exports.Star = Star;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
config
=
void
0
;
exports
.
config
=
{
time
:
12
,
time
:
12
0
,
first
:
1000
,
second
:
2000
,
third
:
3000
,
score
:
[
10
00
,
10
,
10
,
10
,
10
],
score
:
[
10
,
10
,
10
,
10
,
10
],
difficulty
:
3
,
circleRes
:
[
'2a747211-0210-4215-86a2-a6955b37c45b'
,
'7d1ec658-9371-4d52-b4d7-e75d04037daf'
,
'6a1345f6-969c-4969-8bfb-f4de637df34d'
,
'2e12a9ec-46be-487f-a9cd-550dd0af3746'
,
'b022fbdd-8607-435a-a205-19fc3b5123eb'
]
};
...
...
@@ -15216,7 +15228,8 @@ var XxlScene = (function (_super) {
_this
.
isGameStart
=
false
;
_this
.
isGameEnd
=
false
;
_this
.
robot
=
null
;
_this
.
robotScore
=
0
;
_this
.
robotScore
=
0
.;
_this
.
rlevel
=
0
;
_this
.
hexIndices
=
[
[
3
],
[
9
,
10
],
...
...
@@ -15282,7 +15295,7 @@ var XxlScene = (function (_super) {
this
.
addChild
(
this
.
bg
);
this
.
x
=
(
Ins_1
.
Ins
.
stageW
-
750
)
>>
1
;
this
.
y
=
(
Ins_1
.
Ins
.
stageH
-
1624
)
>>
1
;
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
4
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
=
Tools_1
.
Tools
.
getSprite
(
resCanvasList_1
.
default
[
'334aff33-1a9e-4277-aafe-3d9f22eab3d5'
].
url
,
0
,
2
0
+
1624
/
2
-
this
.
stage
.
viewRect
.
height
/
2
);
this
.
backBtn
.
mouseEnable
=
true
;
this
.
backBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'backToPage'
);
});
...
...
@@ -15679,10 +15692,12 @@ var XxlScene = (function (_super) {
if
(
this
.
robotScore
==
userGetScore
)
{
return
;
}
if
(
this
.
level
<
2
&&
userGetScore
>=
1000
&&
userGetScore
<
2000
)
{
if
(
this
.
rlevel
<
2
&&
userGetScore
>=
1000
&&
userGetScore
<
2000
)
{
this
.
rlevel
=
2
;
this
.
rlevelText
.
text
=
"第"
+
2
+
"关"
;
}
else
if
(
this
.
level
<
3
&&
userGetScore
>=
2000
&&
userGetScore
<
3000
)
{
else
if
(
this
.
rlevel
<
3
&&
userGetScore
>=
2000
&&
userGetScore
<
3000
)
{
this
.
rlevel
=
3
;
this
.
rlevelText
.
text
=
"第"
+
3
+
"关"
;
}
else
if
(
userGetScore
>=
3000
)
{
...
...
@@ -15984,7 +15999,8 @@ var XxlScene = (function (_super) {
that
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
that
.
mouseDown
,
that
);
that
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
that
.
mouseUp
,
that
);
that
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
that
.
updateFrame
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"MatchCompelete"
,
this
.
gameStart
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"MatchCompelete"
,
that
.
gameStart
,
that
);
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
that
.
backToPage
,
that
);
};
XxlScene
.
prototype
.
gameStart
=
function
()
{
this
.
rightUserContainer
.
visible
=
true
;
...
...
@@ -16001,19 +16017,25 @@ var XxlScene = (function (_super) {
switch
(
_a
.
label
)
{
case
0
:
this
.
selectItems
.
splice
(
0
);
this
.
refresh
();
this
.
isGameEnd
=
false
;
this
.
isGameStart
=
false
;
this
.
userScore
=
0
;
this
.
robotScore
=
0
;
this
.
rightUserContainer
.
visible
=
false
;
this
.
lscore
.
text
=
"0"
;
this
.
rscore
.
text
=
"0"
;
this
.
llevelText
.
text
=
"第1关"
;
this
.
rlevelText
.
text
=
"第1关"
;
this
.
level
=
0
;
this
.
rlevel
=
0
;
this
.
rect
.
x
=
this
.
rectX
;
this
.
star1
.
dark
();
this
.
star2
.
dark
();
this
.
star3
.
dark
();
this
.
timeNum
=
XxlConfig_1
.
config
.
time
;
this
.
time
.
text
=
this
.
timeNum
+
""
;
this
.
difficulty
=
XxlConfig_1
.
config
.
difficulty
;
this
.
refresh
();
if
(
XxlConfig_1
.
config
.
time
>=
100
)
{
this
.
time
.
textWidth
=
80
;
}
...
...
@@ -16023,6 +16045,7 @@ var XxlScene = (function (_super) {
else
{
this
.
time
.
textWidth
=
50
;
}
this
.
time
.
x
=
Ins_1
.
Ins
.
stageW
/
2
-
this
.
time
.
textWidth
/
2
-
15
;
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getUserInfo
,
{})];
case
1
:
userInfoRes
=
_a
.
sent
();
...
...
@@ -16033,12 +16056,17 @@ var XxlScene = (function (_super) {
else
{
this
.
robot
=
new
Robot_1
.
Robot
(
!
this
.
userInfo
.
win
);
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
this
.
userInfo
);
this
.
ravatar
.
texture
=
FYGE
.
Sprite
.
fromUrl
(
this
.
userInfo
.
fakeUserImgUrl
).
texture
;
this
.
rnickname
.
text
=
this
.
userInfo
.
fakeUserName
;
}
return
[
2
];
}
});
});
};
XxlScene
.
prototype
.
backToPage
=
function
()
{
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'backToPage'
);
});
};
XxlScene
.
prototype
.
updateFrame
=
function
()
{
if
(
!
this
.
isGameStart
)
{
return
;
...
...
@@ -16096,6 +16124,7 @@ var XxlScene = (function (_super) {
that
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
that
.
mouseDown
,
that
);
that
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
that
.
mouseUp
,
that
);
Main_1
.
GDispatcher
.
removeEventListener
(
"gameReset"
,
this
.
reset
);
Main_1
.
GDispatcher
.
removeEventListener
(
"outCallBackToPage"
,
that
.
backToPage
);
};
return
XxlScene
;
}(
Scene_1
.
Scene
));
...
...
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
51378a10
...
...
@@ -17,29 +17,30 @@ const checkSystem = async () => {
Component
({
data
:
{
// 当前正在进行的游戏
gameType
:
0
,
// 规则弹窗
ruleModalVisible
:
false
,
// 消息弹窗
messageMadalData
:
{},
messageMadalVisble
:
false
,
back
:
false
back
:
false
,
commonModalVisibleT1
:
false
,
},
isWin
:
false
,
commonModalVisibleT1
:
false
,
gamePrize
:
null
,
gameData
:
null
,
gameStartTime
:
0
,
gameType
:
0
,
didMount
()
{
this
.
setData
({
gameType
:
this
.
props
.
gameType
})
this
.
gameStartTime
=
0
this
.
gameType
=
this
.
props
.
gameType
// this.getFakeAvatar()
},
didUpdate
(
prevProps
,
prevData
)
{
console
.
warn
(
'gameType'
,
this
.
props
.
gameType
)
if
(
this
.
props
.
gameType
!=
=
prevProp
s
.
gameType
)
{
this
.
setData
({
gameType
:
this
.
props
.
gameType
})
if
(
this
.
props
.
gameType
!=
thi
s
.
gameType
)
{
this
.
gameType
=
this
.
props
.
gameType
// 存储本地 用户玩游戏的信息
if
(
this
.
props
.
gameType
==
1
)
{
// 切换游戏场景
...
...
@@ -141,8 +142,8 @@ Component({
this
.
props
.
onBackPage
()
this
.
gameData
=
null
this
.
gamePrize
=
null
this
.
gameType
=
0
this
.
gameStartTime
=
0
this
.
setData
({
gameType
:
0
})
},
// 查看奖品 - 返回而已 没差
...
...
@@ -151,7 +152,8 @@ Component({
this
.
props
.
onBackPage
(
'openMyPrize'
)
this
.
gameData
=
null
this
.
gamePrize
=
null
this
.
setData
({
gameType
:
0
})
this
.
gameType
=
0
this
.
gameStartTime
=
0
},
// 游戏开始 获取用户信息
...
...
@@ -186,14 +188,14 @@ Component({
}
// 请求后端 开始游戏
API
.
doJoin
({
activityId
:
app
.
activityId
,
type
:
this
.
data
.
gameType
=
==
1
?
'slide'
:
'timeline'
})
API
.
doJoin
({
activityId
:
app
.
activityId
,
type
:
this
.
gameType
==
1
?
'slide'
:
'timeline'
})
.
then
(
res
=>
{
this
.
gameStartTime
+=
1
const
{
data
,
success
}
=
res
console
.
log
(
'%c-----开始游戏
\
n'
+
'-----yd.doJoin
\
n'
,
ConsoleStyle
,
data
)
if
(
success
)
{
// 计算胜负
let
win
=
this
.
countWinRange
(
this
.
data
.
gameType
)
let
win
=
this
.
countWinRange
(
this
.
gameType
)
this
.
isWin
=
win
let
fname
=
this
.
getFakeUserName
()
let
favatar
=
this
.
getFakeAvatar
()
...
...
@@ -220,12 +222,12 @@ Component({
},
saveStorage
()
{
if
(
this
.
data
.
gameType
==
1
)
{
if
(
this
.
gameType
==
1
)
{
my
.
setStorage
({
key
:
`YD11_firstInGameCsd_
${
app
.
activityId
}
_
${
app
.
openId
}
`
,
data
:
1
});
}
else
if
(
this
.
data
.
gameType
==
2
)
{
}
else
if
(
this
.
gameType
==
2
)
{
my
.
setStorage
({
key
:
`YD11_firstInGameXxl_
${
app
.
activityId
}
_
${
app
.
openId
}
`
,
data
:
1
...
...
@@ -234,12 +236,12 @@ Component({
},
checkFirstInFromStorage
()
{
if
(
this
.
data
.
gameType
==
1
)
{
if
(
this
.
gameType
==
1
)
{
let
resCsd
=
my
.
getStorageSync
({
key
:
`YD11_firstInGameCsd_
${
app
.
activityId
}
_
${
app
.
openId
}
`
})
console
.
warn
(
'resCsd'
,
resCsd
)
if
(
resCsd
.
data
&&
resCsd
.
data
==
1
)
return
false
else
return
true
}
else
if
(
this
.
data
.
gameType
==
2
)
{
}
else
if
(
this
.
gameType
==
2
)
{
let
resXxl
=
my
.
getStorageSync
({
key
:
`YD11_firstInGameXxl_
${
app
.
activityId
}
_
${
app
.
openId
}
`
})
console
.
warn
(
'resXxl'
,
resXxl
)
if
(
resXxl
.
data
&&
resXxl
.
data
==
1
)
return
false
...
...
@@ -253,7 +255,7 @@ Component({
this
.
getGameOverPrize_test
()
return
API
.
gameOver
({
activityId
:
app
.
activityId
,
type
:
this
.
data
.
gameType
=
==
1
?
'slide'
:
'timeline'
,
isWin
:
this
.
isWin
})
API
.
gameOver
({
activityId
:
app
.
activityId
,
type
:
this
.
gameType
==
1
?
'slide'
:
'timeline'
,
isWin
:
this
.
isWin
})
.
then
(
res
=>
{
const
{
data
,
success
}
=
res
console
.
log
(
'%c-----游戏结束 获取开奖
\
n'
+
'-----yd.gameOver
\
n'
,
ConsoleStyle
,
data
)
...
...
@@ -296,10 +298,10 @@ Component({
console
.
log
(
'csdWinRate: '
,
parseInt
(
app
.
csdWinRate
))
let
num
=
Math
.
floor
(
Math
.
random
()
*
(
100
-
1
)
+
1
)
console
.
log
(
'num: '
,
num
)
if
(
type
==
=
1
)
{
if
(
type
==
1
)
{
if
(
num
<=
parseInt
(
app
.
csdWinRate
))
win
=
true
else
win
=
false
}
else
if
(
type
==
=
2
)
{
}
else
if
(
type
==
2
)
{
if
(
num
<=
parseInt
(
app
.
xxlWinRate
))
win
=
true
else
win
=
false
}
...
...
@@ -371,21 +373,24 @@ Component({
})
},
confirmCommonModalT1
()
{
this
.
data
.
confirmCommonModalT1
()
},
// 通用弹层 - 关闭 - T1
closeCommonModalT1
()
{
this
.
setData
({
commonModalVisibleT1
:
false
});
this
.
back
()
console
.
log
(
'%ccloseCommonModal function inside'
,
ConsoleStyle
)
this
.
postMessage
(
'mine.outCallBackToPage'
)
this
.
setData
({
commonModalVisibleT1
:
false
})
},
gameStartInfo_test
(){
// console.log('%c------------gameStartTime: ', ConsoleStyle, this.gameStartTime)
// 游戏重新开始 获取游戏次数
let
gt
=
true
if
(
this
.
gameStartTime
!==
0
)
{
// 设置没有次数
gt
=
false
// 设置有次数
gt
=
true
//
//
设置有次数
//
gt = true
}
// 没有游戏次数
...
...
@@ -395,13 +400,14 @@ Component({
title
:
'门票不足'
,
content
:
'门票消耗完了!
\
n快去做任务吧~'
,
confirmCallback
:
()
=>
{
console
.
log
(
'%ccloseCommonModal agument function'
,
ConsoleStyle
)
this
.
closeCommonModalT1
()
},
btnImg
:
'//yun.duiba.com.cn/spark/assets/好的按钮.948e42751245099e12fef8ad2617d746f6370863.png'
})
return
}
let
win
=
this
.
countWinRange
(
this
.
data
.
gameType
)
let
win
=
this
.
countWinRange
(
this
.
gameType
)
this
.
isWin
=
win
let
fname
=
this
.
getFakeUserName
()
let
favatar
=
this
.
getFakeAvatar
()
...
...
@@ -411,7 +417,7 @@ Component({
fakeUserImgUrl
:
favatar
,
userName
:
app
.
nickName
,
userImgUrl
:
app
.
avatar
,
isNewUser
:
this
.
data
.
gameType
=
==
1
?
app
.
isNewUser_csd
:
app
.
isNewUser_xxl
isNewUser
:
this
.
gameType
==
1
?
app
.
isNewUser_csd
:
app
.
isNewUser_xxl
}
console
.
log
(
'%cgameData:'
,
ConsoleStyle
,
this
.
gameData
)
this
.
postMessage
(
'mine.getUserInfo'
,
{
data
:
this
.
gameData
})
...
...
taobao_mini/client/pages/turnTablePage/turnTablePage.js
View file @
51378a10
...
...
@@ -18,11 +18,11 @@ Page({
prizesModalVisible
:
false
,
missionModalVisible
:
false
,
prizeInfo
:
`一等奖:清空购物车大奖,上限5000元,每日1个名额
;
二等奖:时空焕活透亮润泽胶囊精华液约30粒(VC胶囊)
,共8件;
三等奖:时空焕活胶囊精华液约30粒(金胶)
,共8件;
四等奖:时空焕活透亮润泽胶囊精华液约7粒(VC胶囊7粒)
,共1724份;
五等奖:面额为1100-150的雅顿店铺优惠券
,共14000份;
`
,
prizeInfo
:
`一等奖:清空购物车大奖,上限5000元,每日1个名额
二等奖:时空焕活透亮润泽胶囊精华液约30粒(VC胶囊)
三等奖:时空焕活胶囊精华液约30粒(金胶)
四等奖:时空焕活透亮润泽胶囊精华液约7粒(VC胶囊7粒)
五等奖:面额为1100-150的雅顿店铺优惠券`
,
prizeInfoTitle
:
'奖品介绍'
,
...
...
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