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
c1f8dba3
Commit
c1f8dba3
authored
Sep 22, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
238b9b29
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
560 additions
and
117 deletions
+560
-117
tamllCat.interaction.json
...ect/src/canvas/game/mock/miniTb/tamllCat.interaction.json
+1
-1
tmallCat.getUserInfo.json
...ect/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
+5
-5
resCanvasList.js
project/src/canvas/game/resCanvasList.js
+14
-2
resLottieList.js
project/src/canvas/game/resLottieList.js
+5
-0
Ins.ts
project/src/canvas/game/src/Ins.ts
+6
-3
Main.ts
project/src/canvas/game/src/Main.ts
+6
-6
Cat.ts
project/src/canvas/game/src/cat/Cat.ts
+3
-1
LetterTexture.json
...s/game/src/lottieSrc/lottieTextureJson/LetterTexture.json
+46
-0
letter.ts
project/src/canvas/game/src/lottieSrc/lottieTs/letter.ts
+232
-0
SelectCatPanel.ts
...c/canvas/game/src/panels/selectcatpanel/SelectCatPanel.ts
+1
-1
MainScene.ts
project/src/canvas/game/src/scenes/MainScene.ts
+130
-61
StartScene.ts
project/src/canvas/game/src/scenes/StartScene.ts
+8
-2
MainSceneBtnUi.ts
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
+102
-34
pagecanvas.axml
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
+1
-1
No files found.
project/src/canvas/game/mock/miniTb/tamllCat.interaction.json
View file @
c1f8dba3
{
"success"
:
fals
e
,
"success"
:
tru
e
,
"message"
:
"请稍后重试"
,
"data"
:
"aaaa"
,
"code"
:
"000"
...
...
project/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
View file @
c1f8dba3
...
...
@@ -4,12 +4,12 @@
"data"
:
{
"catType"
:
1
,
"userNick"
:
"Edwise"
,
"energy"
:
"100"
,
"happyCoin"
:
"1000"
,
"experience"
:
"50"
,
"energy"
:
1000
,
"happyCoin"
:
1000
,
"experience"
:
50
,
"level"
:
"1"
,
"avatar"
:
"https://yun.duiba.com.cn/spark/assets/
b1992c528b36c2d26942e9c83941242e59481475
.png"
,
"sence"
:
1
,
"avatar"
:
"https://yun.duiba.com.cn/spark/assets/
a3ae99684afa9a1f8d94f4c95ee6f1ed81de9996
.png"
,
"sence"
:
3
,
"catName"
:
"喵喵喵"
}
}
\ No newline at end of file
project/src/canvas/game/resCanvasList.js
View file @
c1f8dba3
...
...
@@ -632,14 +632,26 @@ const resCanvasList = {
'0cc64b0c-3ccc-4d88-b697-bb402319cef7'
:
{
name
:
'ToastBg'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/ToastBg.81e208c0050ce46ac576ba881d02db07a02bffe2.png'
,
url
:
'
https:
//yun.duiba.com.cn/spark/assets/ToastBg.81e208c0050ce46ac576ba881d02db07a02bffe2.png'
,
uuid
:
'0cc64b0c-3ccc-4d88-b697-bb402319cef7'
},
'69009eb9-4593-4a43-a9d7-a6356ebd6d04'
:
{
name
:
'精力条对话框'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/精力条对话框.da8e059d18cf967026989e3c376b7364210c3d4e.png'
,
url
:
'
https:
//yun.duiba.com.cn/spark/assets/精力条对话框.da8e059d18cf967026989e3c376b7364210c3d4e.png'
,
uuid
:
'69009eb9-4593-4a43-a9d7-a6356ebd6d04'
},
'72345190-f95b-4152-bccf-393b8a5aa8d0'
:
{
name
:
'召回猫咪icon'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/召回猫咪icon.41d0b6bb23a7eccf0facb8918cfb679239b7f82f.png'
,
uuid
:
'72345190-f95b-4152-bccf-393b8a5aa8d0'
},
'3b12798d-d932-4f5b-a442-6e4877ba5c16'
:
{
name
:
'LetterTexture'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/LetterTexture.78192e79fa3b21a85b245038f23561eeb5141d4d.png'
,
uuid
:
'3b12798d-d932-4f5b-a442-6e4877ba5c16'
}
};
export
default
resCanvasList
;
project/src/canvas/game/resLottieList.js
View file @
c1f8dba3
...
...
@@ -3,6 +3,7 @@ const BlueCatTexture = require("./src/lottieSrc/lottieTextureJson/BlueCatTexture
const
OrengeCatTexture
=
require
(
"./src/lottieSrc/lottieTextureJson/OrengeCatTexture.json"
)
const
SanhuaCatTexture
=
require
(
"./src/lottieSrc/lottieTextureJson/SanhuaCatTexture.json"
)
const
XianluoCatTexture
=
require
(
"./src/lottieSrc/lottieTextureJson/XianluoCatTexture.json"
)
const
LetterTexture
=
require
(
"./src/lottieSrc/lottieTextureJson/LetterTexture.json"
)
const
resLottieList
=
{
"blueCat"
:{
imgUrl
:
resCanvasList
[
"a7dc39fa-5f6d-4e94-8979-81c4a4aa183f"
].
url
,
...
...
@@ -19,6 +20,10 @@ const resLottieList = {
"xianluoCat"
:{
imgUrl
:
resCanvasList
[
"de2d1dca-ed1c-4fe0-93ef-684f4b96c87e"
].
url
,
json
:
XianluoCatTexture
},
"letter"
:{
imgUrl
:
resCanvasList
[
"3b12798d-d932-4f5b-a442-6e4877ba5c16"
].
url
,
json
:
LetterTexture
}
}
export
default
resLottieList
;
\ No newline at end of file
project/src/canvas/game/src/Ins.ts
View file @
c1f8dba3
...
...
@@ -7,13 +7,16 @@ export class Ins {
public
static
stageW
:
number
;
public
static
stageH
:
number
;
/**猫咪是否出寝了 */
public
static
catIsOut
:
boolean
;
public
static
userInfo
:
{
"catName"
:
string
,
//猫咪姓名
"catType"
:
string
,
//猫咪类型
"userNick"
:
string
,
//用户昵称
"energy"
:
string
,
//精力值
"happyCoin"
:
string
,
//欢乐币
"experience"
:
string
,
//经验值
"energy"
:
number
,
//精力值
"happyCoin"
:
number
,
//欢乐币
"experience"
:
number
,
//经验值
"level"
:
string
,
//等级
"avatar"
:
string
,
//头像
"sence"
:
number
,
//场景
...
...
project/src/canvas/game/src/Main.ts
View file @
c1f8dba3
...
...
@@ -114,12 +114,12 @@ export class Main {
sendTbNet
(
TbNetName
.
getActivityBaseInfoById
,
{},
(
s
,
res
)
=>
{
console
.
log
(
'getActivityBaseInfoById success,res'
,
s
,
res
)
})
console
.
log
(
'准备打开弹窗'
)
setTimeout
(()
=>
{
sendTbNet
(
TbNetName
.
showModal
,
{
name
:
'ruleModal'
},
(
s
,
res
)
=>
{
console
.
log
(
'showModal ruleModal, success,res'
,
s
,
res
)
})
},
3000
);
//
console.log('准备打开弹窗')
//
setTimeout(() => {
//
sendTbNet(TbNetName.showModal, {name:'ruleModal'}, (s, res) => {
//
console.log('showModal ruleModal, success,res',s,res)
//
})
//
}, 3000);
// console.log('准备切换到兑换页面')
// setTimeout(() => {
// sendTbNet(TbNetName.navigateToPage, {name:'pageshop'}, (s, res) => {
...
...
project/src/canvas/game/src/cat/Cat.ts
View file @
c1f8dba3
...
...
@@ -150,6 +150,7 @@ export class Cat extends Module {
console
.
log
(
actType
);
sendTbNet
(
TbNetName
.
interaction
,
{},
(
s
,
r
)
=>
{
if
(
s
)
{
FYGE
.
GDispatcher
.
dispatchEvent
(
MSG
.
UPDATE_USERINFO
);
that
.
actRunning
=
true
;
switch
(
actType
)
{
case
CAT_ACTTYPEP
.
SLEEP
:
...
...
@@ -160,7 +161,8 @@ export class Cat extends Module {
}
}
else
{
FYGE
.
GDispatcher
.
dispatchEvent
(
"23"
,
r
.
message
)
// FYGE.GDispatcher.dispatchEvent("23",r.message)
showToast
(
r
.
message
)
}
})
...
...
project/src/canvas/game/src/lottieSrc/lottieTextureJson/LetterTexture.json
0 → 100644
View file @
c1f8dba3
{
"1085e1ca-a5a5-4e1c-9917-fb27efa359f7.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
299
,
"h"
:
175
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
299
,
"sh"
:
175
,
"ro"
:
false
},
"eafa36c0-16e3-4112-b56e-a492a4899a5f.png"
:
{
"x"
:
2
,
"y"
:
179
,
"w"
:
298
,
"h"
:
243
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
298
,
"sh"
:
243
,
"ro"
:
true
},
"6612ca2f-948b-49a3-982f-250e4cd9c635.png"
:
{
"x"
:
247
,
"y"
:
179
,
"w"
:
249
,
"h"
:
215
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
249
,
"sh"
:
215
,
"ro"
:
false
},
"798dbdf0-d769-4d22-baaf-b811eb29db30.png"
:
{
"x"
:
2
,
"y"
:
479
,
"w"
:
187
,
"h"
:
24
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
187
,
"sh"
:
24
,
"ro"
:
false
}
}
\ No newline at end of file
project/src/canvas/game/src/lottieSrc/lottieTs/letter.ts
0 → 100644
View file @
c1f8dba3
export
const
letter
=
{
"v"
:
"5.6.10"
,
"fr"
:
30
,
"ip"
:
0
,
"op"
:
17
,
"w"
:
750
,
"h"
:
1624
,
"nm"
:
"底"
,
"layers"
:
[
{
"ind"
:
1
,
"ty"
:
2
,
"nm"
:
"点击信封打开看看"
,
"refId"
:
"798dbdf0-d769-4d22-baaf-b811eb29db30"
,
"ks"
:
{
"o"
:
{
"a"
:
1
,
"k"
:
[
{
"t"
:
0
,
"s"
:
[
100
]
},
{
"t"
:
7
,
"s"
:
[
100
]
},
{
"t"
:
8
,
"s"
:
[
0
]
},
{
"t"
:
15
,
"s"
:
[
0
]
},
{
"t"
:
16
,
"s"
:
[
100
]
}
]
},
"r"
:
{
"a"
:
0
,
"k"
:
0
},
"p"
:
{
"a"
:
0
,
"k"
:
[
383.5
,
1003
,
0
]
},
"a"
:
{
"a"
:
0
,
"k"
:
[
93.5
,
12
,
0
]
},
"s"
:
{
"a"
:
0
,
"k"
:
[
100
,
100
,
100
]
}
},
"ip"
:
0
,
"op"
:
600
},
{
"ind"
:
3
,
"ty"
:
2
,
"nm"
:
"上"
,
"refId"
:
"1085e1ca-a5a5-4e1c-9917-fb27efa359f7"
,
"ks"
:
{
"o"
:
{
"a"
:
0
,
"k"
:
100
},
"r"
:
{
"a"
:
0
,
"k"
:
0
},
"p"
:
{
"a"
:
0
,
"k"
:
[
388.5
,
887.5
,
0
]
},
"a"
:
{
"a"
:
0
,
"k"
:
[
149.5
,
87.5
,
0
]
},
"s"
:
{
"a"
:
0
,
"k"
:
[
100
,
100
,
100
]
}
},
"ip"
:
0
,
"op"
:
600
},
{
"ind"
:
4
,
"ty"
:
2
,
"nm"
:
"字条"
,
"refId"
:
"6612ca2f-948b-49a3-982f-250e4cd9c635"
,
"ks"
:
{
"o"
:
{
"a"
:
0
,
"k"
:
100
},
"r"
:
{
"a"
:
0
,
"k"
:
0
},
"p"
:
{
"a"
:
1
,
"k"
:
[
{
"t"
:
0
,
"s"
:
[
388.5
,
866.5
,
0
]
},
{
"t"
:
8
,
"s"
:
[
388.5
,
859.5
,
0
]
},
{
"t"
:
16
,
"s"
:
[
388.5
,
866.5
,
0
]
}
]
},
"a"
:
{
"a"
:
0
,
"k"
:
[
124.5
,
107.5
,
0
]
},
"s"
:
{
"a"
:
0
,
"k"
:
[
100
,
100
,
100
]
}
},
"ip"
:
0
,
"op"
:
600
},
{
"ind"
:
5
,
"ty"
:
2
,
"nm"
:
"下"
,
"refId"
:
"eafa36c0-16e3-4112-b56e-a492a4899a5f"
,
"ks"
:
{
"o"
:
{
"a"
:
0
,
"k"
:
100
},
"r"
:
{
"a"
:
0
,
"k"
:
0
},
"p"
:
{
"a"
:
0
,
"k"
:
[
390
,
835.5
,
0
]
},
"a"
:
{
"a"
:
0
,
"k"
:
[
149
,
121.5
,
0
]
},
"s"
:
{
"a"
:
0
,
"k"
:
[
100
,
100
,
100
]
}
},
"ip"
:
0
,
"op"
:
600
}
],
"markers"
:
[]
}
\ No newline at end of file
project/src/canvas/game/src/panels/selectcatpanel/SelectCatPanel.ts
View file @
c1f8dba3
...
...
@@ -19,7 +19,7 @@ export class SelectCatPanel extends Panel {
var
bg
=
Ins
.
initSprite
(
"db53267d-4141-4d3e-afda-9b523c89be3e"
);
that
.
addChild
(
bg
);
that
.
x
=
(
Ins
.
stageW
-
bg
.
width
)
>>
1
;
that
.
y
=
Ins
.
stageH
<
1624
?
(
Ins
.
stageH
-
bg
.
height
+
300
)
>>
1
:
(
Ins
.
stageH
-
bg
.
height
)
>>
1
;
that
.
y
=
(
Ins
.
stageH
-
bg
.
height
)
>>
1
;
that
.
selectSureBtn
=
Ins
.
initSprite
(
"628fc38b-7dc0-4c69-aac1-279d60c8f1ed"
,
185
,
804
);
that
.
addChild
(
that
.
selectSureBtn
);
...
...
project/src/canvas/game/src/scenes/MainScene.ts
View file @
c1f8dba3
This diff is collapsed.
Click to expand it.
project/src/canvas/game/src/scenes/StartScene.ts
View file @
c1f8dba3
...
...
@@ -5,7 +5,7 @@ import Root from "./Root";
import
resCanvasList
from
"../../../game/resCanvasList"
import
{
MainScene
}
from
"./MainScene"
;
import
{
Ins
}
from
"../Ins"
;
import
{
showPanel
,
showToast
}
from
"../../module/ctrls"
;
import
{
changeScene
,
showPanel
,
showToast
}
from
"../../module/ctrls"
;
import
{
SelectCatPanel
}
from
"../panels/selectcatpanel/SelectCatPanel"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
export
class
StartScene
extends
Scene
{
...
...
@@ -20,7 +20,13 @@ export class StartScene extends Scene {
if
(
s
){
if
(
r
.
data
){
Ins
.
userInfo
=
r
.
data
;
this
.
addChild
(
new
MainScene
());
/**判断猫咪是否出寝,只在用户进入游戏时判断,后面要根据接口改写,现在先做测试 */
if
(
r
.
data
.
happyCoin
>
2000
){
Ins
.
catIsOut
=
true
;
}
else
{
Ins
.
catIsOut
=
false
;
}
changeScene
(
MainScene
)
}
else
{
showPanel
(
SelectCatPanel
);
...
...
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
View file @
c1f8dba3
This diff is collapsed.
Click to expand it.
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
View file @
c1f8dba3
...
...
@@ -4,4 +4,4 @@
</canvas>
</view>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
\ No newline at end of file
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
\ No newline at end of file
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