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
ade201d4
Commit
ade201d4
authored
Dec 05, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加我的奖品兑换商品新适配,添加游戏部分场景引导以及三文鱼精力,三文鱼精力尚未完成
parent
b05082d1
Changes
20
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
9698 additions
and
535 deletions
+9698
-535
tmallCat.getSence.json
project/src/canvas/game/mock/miniTb/tmallCat.getSence.json
+2
-2
tmallCat.getUserInfo.json
...ect/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
+1
-1
RES.ts
project/src/canvas/game/module/RES.ts
+4
-4
Module.ts
project/src/canvas/game/module/views/Module.ts
+1
-1
package-lock.json
project/src/canvas/game/package-lock.json
+9175
-341
package.json
project/src/canvas/game/package.json
+3
-6
resCanvasList.js
project/src/canvas/game/resCanvasList.js
+127
-74
InitLottie.ts
project/src/canvas/game/src/InitLottie.ts
+1
-1
Fish.ts
project/src/canvas/game/src/cat/Fish.ts
+18
-0
Salmon.ts
project/src/canvas/game/src/cat/Salmon.ts
+72
-0
MainScene.ts
project/src/canvas/game/src/scenes/MainScene.ts
+188
-69
MainSceneBtnUi.ts
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
+30
-23
prizeModal.acss
taobao_mini/client/components/prizeModal/prizeModal.acss
+6
-3
prizeModal.axml
taobao_mini/client/components/prizeModal/prizeModal.axml
+1
-1
shopModal.axml
taobao_mini/client/components/shopModal/shopModal.axml
+1
-1
myprize.js
taobao_mini/client/pages/myprize/myprize.js
+1
-1
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+8
-2
pageshop.acss
taobao_mini/client/pages/pageshop/pageshop.acss
+7
-5
resList.js
taobao_mini/client/resconfig/resList.js
+12
-0
yarn.lock
taobao_mini/mocks/yarn.lock
+40
-0
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.getSence.json
View file @
ade201d4
...
...
@@ -5,10 +5,10 @@
"sence"
:
2
,
"senceTips"
:[
"测试"
,
"测试"
],
"senceGuide"
:{
"1"
:
fals
e
,
"1"
:
tru
e
,
"2"
:
false
,
"3"
:
false
,
"4"
:
tru
e
"4"
:
fals
e
}
}
...
...
project/src/canvas/game/mock/miniTb/tmallCat.getUserInfo.json
View file @
ade201d4
...
...
@@ -5,7 +5,7 @@
"catType"
:
4
,
"userNick"
:
"Edwise"
,
"energy"
:
1000
,
"happyCoin"
:
1000
,
"happyCoin"
:
1000
000
,
"experience"
:
1000
,
"level"
:
"1"
,
"avatar"
:
"http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk*HOFxSPCNGOHgyX8R-MGIyPCZzPk8uOmHuvkxYOHQT&width=80&height=80&type=sns"
,
...
...
project/src/canvas/game/module/RES.ts
View file @
ade201d4
...
...
@@ -131,7 +131,7 @@ export namespace RES {
let
p
:
Promise
<
any
>
=
new
Promise
((
resolve
,
reject
)
=>
{
loadResList
((
s
)
=>
{
if
(
s
)
{
resolve
()
resolve
(
1
)
}
else
{
reject
();
}
...
...
@@ -149,7 +149,7 @@ export namespace RES {
//已经加载完成的直接返回
if
(
groupsCompleteHash
[
name
])
{
return
new
Promise
((
resolve
)
=>
{
resolve
()
resolve
(
1
)
})
}
//如果是正在加载中的,返回正在加载中的promise
...
...
@@ -163,7 +163,7 @@ export namespace RES {
if
(
!
arr
||
!
arr
.
length
)
{
groupsCompleteHash
[
name
]
=
true
;
return
new
Promise
((
resolve
)
=>
{
resolve
()
resolve
(
1
)
})
}
// 建一个promise
...
...
@@ -173,7 +173,7 @@ export namespace RES {
delete
groupsPromiseHash
[
name
];
if
(
s
)
{
groupsCompleteHash
[
name
]
=
true
;
resolve
()
resolve
(
1
)
}
else
{
reject
();
}
...
...
project/src/canvas/game/module/views/Module.ts
View file @
ade201d4
...
...
@@ -40,7 +40,7 @@ export class Module extends FYGE.Container {
}
Promise
.
all
(
arr
).
then
(
resolve
,
reject
)
}
else
{
resolve
()
resolve
(
1
)
}
})
}
...
...
project/src/canvas/game/package-lock.json
View file @
ade201d4
This diff is collapsed.
Click to expand it.
project/src/canvas/game/package.json
View file @
ade201d4
...
...
@@ -15,18 +15,15 @@
"mock-webpack-plugin"
:
"^2.0.0"
,
"path"
:
"^0.12.7"
,
"progress"
:
"^2.0.0"
,
"psd"
:
"^0.0.4"
,
"ts-loader"
:
"^4.0.0"
,
"tslint"
:
"^5.9.1"
,
"typescript"
:
"^4.0.2"
,
"uglifyjs-webpack-plugin"
:
"^1.1.2"
,
"webpack"
:
"^4.1.0"
,
"webpack-cli"
:
"^3.1.1"
,
"webpack-dev-server"
:
"^3.1.0"
,
"webpack-merge"
:
"^4.1.2"
,
"uglifyjs-webpack-plugin"
:
"^2.1.2"
,
"psd"
:
"^3.2.0"
},
"dependencies"
:
{
"tans_lottie"
:
"^1.0.4"
"webpack-merge"
:
"^4.1.2"
},
"scripts"
:
{
"psd"
:
"node scripts/psdH.js && node scripts/flushRes"
,
...
...
project/src/canvas/game/resCanvasList.js
View file @
ade201d4
...
...
@@ -89,54 +89,6 @@ const resCanvasList = {
uuid
:
'4399e878-934c-41e6-bada-a886ebedb7fe'
,
url
:
'https://yun.duiba.com.cn/spark/assets/493b635d7b64444eee99431feb65e630e86344aa.png'
},
'aa17cfa9-f1db-47eb-9eeb-f5947b7f47a8'
:
{
name
:
'梳毛icon'
,
ext
:
'.png'
,
uuid
:
'aa17cfa9-f1db-47eb-9eeb-f5947b7f47a8'
,
url
:
'https://yun.duiba.com.cn/spark/assets/615ae52ccf5e888d50002e1861e143ae53deb5c3.png'
},
'0b44efa9-1e8a-4c43-a2a5-93852d88918c'
:
{
name
:
'撸猫icon'
,
ext
:
'.png'
,
uuid
:
'0b44efa9-1e8a-4c43-a2a5-93852d88918c'
,
url
:
'https://yun.duiba.com.cn/spark/assets/430c639158ab024403221ea027e33cf023ffc362.png'
},
'b7ec0f16-ea48-4e41-8def-7cc660fa93d7'
:
{
name
:
'摸头杀icon'
,
ext
:
'.png'
,
uuid
:
'b7ec0f16-ea48-4e41-8def-7cc660fa93d7'
,
url
:
'https://yun.duiba.com.cn/spark/assets/b8b3c5dacb6ff84465a5310081f776d41eef04a4.png'
},
'922deced-62d2-4995-9dd6-82bc7913f362'
:
{
name
:
'玩耍icon'
,
ext
:
'.png'
,
uuid
:
'922deced-62d2-4995-9dd6-82bc7913f362'
,
url
:
'https://yun.duiba.com.cn/spark/assets/a3ae99684afa9a1f8d94f4c95ee6f1ed81de9996.png'
},
'55f703cd-f0d2-4ec1-9430-6193c1cbc1cb'
:
{
name
:
'返回icon'
,
ext
:
'.png'
,
uuid
:
'55f703cd-f0d2-4ec1-9430-6193c1cbc1cb'
,
url
:
'https://yun.duiba.com.cn/spark/assets/2a914b62b4f3144b1d8aa6c67e4bd03221b2d8ff.png'
},
'e8b083c7-307a-4446-9bc9-99f75c3573e5'
:
{
name
:
'奖品icon'
,
ext
:
'.png'
,
uuid
:
'e8b083c7-307a-4446-9bc9-99f75c3573e5'
,
url
:
'https://yun.duiba.com.cn/spark/assets/43567fa8a14c4dbf30e5c143c07817ef1336f0e7.png'
},
'e636bd22-361f-442a-8684-ccfe1141485a'
:
{
name
:
'攻略icon'
,
ext
:
'.png'
,
uuid
:
'e636bd22-361f-442a-8684-ccfe1141485a'
,
url
:
'https://yun.duiba.com.cn/spark/assets/05d5ad2bfa2fc3a42912749e87f74d48ec2e72dc.png'
},
'cdb8e186-9872-442e-b71e-bba0a9ce5846'
:
{
name
:
'补充精力icon'
,
ext
:
'.png'
,
uuid
:
'cdb8e186-9872-442e-b71e-bba0a9ce5846'
,
url
:
'https://yun.duiba.com.cn/spark/assets/290759639ce4ccb9520fa627232e5e898f30a9f7.png'
},
'af4b699e-5152-4571-8c54-1c06eabf19e9'
:
{
name
:
'底8'
,
ext
:
'.png'
,
...
...
@@ -575,12 +527,6 @@ const resCanvasList = {
url
:
'https://yun.duiba.com.cn/spark/assets/tl.6c3c11ef0983554d3736494a1366a3ad054dfd18.png'
,
uuid
:
'56b0a49b-81c3-42cd-9297-c7dcf86d32fd'
},
'1f8b040d-2fbc-4ff8-92f9-159773364fae'
:
{
name
:
'tlBtn'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/tlBtn.5f8c6fdab68ae41afa33b702a5125fd1d9150a40.png'
,
uuid
:
'1f8b040d-2fbc-4ff8-92f9-159773364fae'
},
'db53267d-4141-4d3e-afda-9b523c89be3e'
:
{
name
:
'选择猫咪背景'
,
ext
:
'.png'
,
...
...
@@ -641,12 +587,6 @@ const resCanvasList = {
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'
,
...
...
@@ -659,12 +599,6 @@ const resCanvasList = {
url
:
'https://yun.duiba.com.cn/spark/assets/catTalkDialog.6fa85b0929d7d8e0d42d0d30587cdbdc33059a8f.png'
,
uuid
:
'624e8c63-963f-4b20-9802-b0fb006fbf93'
},
'8b0d746a-524e-4dc5-984a-2da2f7f6f862'
:
{
name
:
'avatarBg'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/avatarBg.ab4622741c93fb3b2a08f0f8f01c8c4b31ae5cb0.png'
,
uuid
:
'8b0d746a-524e-4dc5-984a-2da2f7f6f862'
},
'60d6bb5e-5af1-459d-8a0f-ac7a3edcb703'
:
{
name
:
'exLoadingBg'
,
ext
:
'.png'
,
...
...
@@ -683,12 +617,6 @@ const resCanvasList = {
url
:
'https://yun.duiba.com.cn/spark/assets/shapGoBtn.78caf5d5af696b5510dd675e626089a320a5c3f1.png'
,
uuid
:
'3e9351dd-787d-4dca-bbf3-793d129c6332'
},
'dba58651-57a3-4b75-9447-0e4d498dd8cd'
:
{
name
:
'shapGoBtn1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/shapGoBtn1.d4d2cbdd9ab87642e34600c20ca627c9a377ffb7.png'
,
uuid
:
'dba58651-57a3-4b75-9447-0e4d498dd8cd'
},
'5ae12c38-05d8-4105-9101-765e7f32525e'
:
{
name
:
'classRoomGuide1'
,
...
...
@@ -840,6 +768,131 @@ const resCanvasList = {
url
:
'https://yun.duiba.com.cn/spark/assets/playGroundGuide2Final.32c9c4f1494cd3b06d56b70dd1653af996a88834.png'
,
uuid
:
'7f326499-0adb-40ff-9a99-7de524460652'
},
'b314a190-ea03-4998-bde4-d37adb3acfab'
:
{
name
:
'补充精力icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/7f51b1a1ec0686f5f95764654e1bc321f49980f4.png'
,
uuid
:
'b314a190-ea03-4998-bde4-d37adb3acfab'
},
'56e05ead-d8ba-4f66-9118-bab53d764a35'
:
{
name
:
'返回icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/5687eb7952e1536b4627641e06996d6046550e2c.png'
,
uuid
:
'56e05ead-d8ba-4f66-9118-bab53d764a35'
},
'd57470bd-a80a-412d-92a3-13dfbfc37f6a'
:
{
name
:
'攻略icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/3e062fcab98f01c4b655fa9187d7d8039d05f846.png'
,
uuid
:
'd57470bd-a80a-412d-92a3-13dfbfc37f6a'
},
'8baf6a30-0463-4946-9cfd-705caf09ab68'
:
{
name
:
'进入欢乐商城按钮'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/6797840f5b16b5acff27b1a1e5dd8f9528b4ba2a.png'
,
uuid
:
'8baf6a30-0463-4946-9cfd-705caf09ab68'
},
'fc0e0990-755b-418e-a4a4-cd603b3acf09'
:
{
name
:
'奖品icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/ea909638d53b1f348f188c3b80495c15c0061b1f.png'
,
uuid
:
'fc0e0990-755b-418e-a4a4-cd603b3acf09'
},
'96345871-b3f3-4e06-89f5-98e91be4d19c'
:
{
name
:
'梳毛icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/de34e7c293286b26e92bcd559e8dcfd015c1319f.png'
,
uuid
:
'96345871-b3f3-4e06-89f5-98e91be4d19c'
},
'cbe75eb0-5ab8-48ea-ac2e-fb0cfb3bf5d1'
:
{
name
:
'摸头杀icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/4117c70b6fd0fdaf01ee7bdd54b303f13f6d131a.png'
,
uuid
:
'cbe75eb0-5ab8-48ea-ac2e-fb0cfb3bf5d1'
},
'838a3c18-06f1-4894-8780-445caceb3ea0'
:
{
name
:
'头像组底'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/636e16a36ea64633ea284973d9311d4d23865227.png'
,
uuid
:
'838a3c18-06f1-4894-8780-445caceb3ea0'
},
'9ab0fbc3-678c-4959-9981-d2f1cbcdbc19'
:
{
name
:
'撸猫icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/f73ffff202c0df37d7d19e6383804d1008c2cf51.png'
,
uuid
:
'9ab0fbc3-678c-4959-9981-d2f1cbcdbc19'
},
'bccd5f19-7aec-428b-82fd-66d7e7a6033e'
:
{
name
:
'玩耍icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/acdd90cf2eba86f0b9bb43ce923ed20726c370bc.png'
,
uuid
:
'bccd5f19-7aec-428b-82fd-66d7e7a6033e'
},
'8933876d-d39e-49d8-9df9-985b598620ae'
:
{
name
:
'召回猫咪icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/9a3fa0c0f251ad1ab432d659d1fd42feb475f1fd.png'
,
uuid
:
'8933876d-d39e-49d8-9df9-985b598620ae'
},
'5fe3d0ec-043f-4337-bcbe-e191fe933e92'
:
{
name
:
'不在操场icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/20690c16469f7f466e78d29c6ef6fee423be0842.png'
,
uuid
:
'5fe3d0ec-043f-4337-bcbe-e191fe933e92'
},
'c246aaf3-84bc-4f26-ae81-f2311d25be7b'
:
{
name
:
'不在教室icon'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/6d79f5d910695c2ccd5cd7e55e1a63c796430c4a.png'
,
uuid
:
'c246aaf3-84bc-4f26-ae81-f2311d25be7b'
},
'9bcdaf47-3bb5-4603-90d4-464705e955db'
:
{
name
:
'毛线球icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/6af5b365f4dc7be8939a188d341757575276ab31.png'
,
uuid
:
'9bcdaf47-3bb5-4603-90d4-464705e955db'
},
'00c79619-95df-4980-883c-102f1011919d'
:
{
name
:
'台历icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/b13d28c54440500392a5c0d17ea31cd97867ed03.png'
,
uuid
:
'00c79619-95df-4980-883c-102f1011919d'
},
'0dc71764-0d52-41e2-baa2-53a787db892b'
:
{
name
:
'在操场icon1'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/946ffcc6c838a85c07045bb58a16f758c4be2848.png'
,
uuid
:
'0dc71764-0d52-41e2-baa2-53a787db892b'
},
'b8959848-40a2-48b6-a0f0-b2311e9e9ec2'
:
{
name
:
'在教室icon'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/07ea04ba7f816ae0c62a896f3be431463d82a542.png'
,
uuid
:
'b8959848-40a2-48b6-a0f0-b2311e9e9ec2'
},
'25abb1fa-58a8-4fed-a962-ab7fb7eed528'
:
{
name
:
'外出提示语'
,
ext
:
'.png'
,
url
:
'https://yun.duiba.com.cn/spark/assets/dd5159c7232f9026dcfbe6d6f33ea90b0c8d088d.png'
,
uuid
:
'25abb1fa-58a8-4fed-a962-ab7fb7eed528'
},
'985cb328-3ded-4170-b812-08f6cf23fc86'
:
{
name
:
'三文鱼气泡'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/1962fa9189afeaa108cd8bcbcacae7e74e2d4682.png'
,
uuid
:
'985cb328-3ded-4170-b812-08f6cf23fc86'
},
'c5bfe80d-1728-40d5-af69-8fe6374a2c45'
:
{
name
:
'三文鱼'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/6ade6253c708a4ca0fe01240ee5844f623b14fa6.png'
,
uuid
:
'c5bfe80d-1728-40d5-af69-8fe6374a2c45'
},
'1f8172eb-4663-4499-9fff-1d736998df7d'
:
{
name
:
'鱼鱼icon'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/ce378b211b805755ba785f6bcc7b043ef827fdc8.png'
,
uuid
:
'1f8172eb-4663-4499-9fff-1d736998df7d'
}
};
export
default
resCanvasList
;
project/src/canvas/game/src/InitLottie.ts
View file @
ade201d4
...
...
@@ -12,7 +12,7 @@ export namespace InitLottie {
let
p
:
Promise
<
any
>
=
new
Promise
((
resolve
,
reject
)
=>
{
8
initLottie
((
s
)
=>
{
if
(
s
)
{
resolve
()
resolve
(
1
)
}
else
{
reject
();
}
...
...
project/src/canvas/game/src/cat/Fish.ts
0 → 100644
View file @
ade201d4
import
{
Module
}
from
"../../module/views/Module"
;
import
{
Ins
}
from
"../Ins"
;
export
class
Fish
extends
Module
{
public
constructor
(){
super
();
}
/**欢乐币鱼的图片 */
private
fishImg
:
FYGE
.
Sprite
;
initUi
(){
this
.
fishImg
=
Ins
.
initSprite
(
"1f8172eb-4663-4499-9fff-1d736998df7d"
);
this
.
addChild
(
this
.
fishImg
);
this
.
fishImg
.
x
=
-
this
.
fishImg
.
width
*
0.5
;
this
.
fishImg
.
y
=
-
this
.
fishImg
.
height
*
0.5
;
}
}
\ No newline at end of file
project/src/canvas/game/src/cat/Salmon.ts
0 → 100644
View file @
ade201d4
import
{
Module
}
from
"../../module/views/Module"
;
import
{
Ins
}
from
"../Ins"
;
/**三文鱼类,当小猫自然恢复精力时获得的三文鱼 */
export
class
Salmon
extends
Module
{
public
constructor
(
value
){
super
();
this
.
salmonCnt
=
value
;
}
/**三文鱼泡泡 */
private
salmonBubble
:
FYGE
.
Sprite
;
/**三文鱼增加精力数量文本 */
private
cntLabel
:
FYGE
.
TextField
;
/**三文鱼图片 */
private
salmonImg
:
FYGE
.
Sprite
;
/**这条三文鱼所拥有的精力值 */
private
salmonCnt
:
number
=
0
;
initUi
(){
var
that
=
this
;
that
.
salmonBubble
=
Ins
.
initSprite
(
"985cb328-3ded-4170-b812-08f6cf23fc86"
);
that
.
addChild
(
that
.
salmonBubble
);
that
.
salmonBubble
.
x
=
-
that
.
salmonBubble
.
width
*
0.5
;
that
.
salmonBubble
.
y
=
-
that
.
salmonBubble
.
height
*
0.5
;
that
.
salmonImg
=
Ins
.
initSprite
(
"c5bfe80d-1728-40d5-af69-8fe6374a2c45"
);
that
.
addChild
(
that
.
salmonImg
);
that
.
salmonImg
.
x
=
-
that
.
salmonImg
.
width
*
0.5
;
that
.
salmonImg
.
y
=
-
that
.
salmonImg
.
height
*
0.7
;
that
.
cntLabel
=
Ins
.
initLabel
({
size
:
24
,
color
:
"#612b0e"
})
// that.cntLabel.fillColor = "white"
that
.
addChild
(
that
.
cntLabel
);
that
.
cntLabel
.
y
=
10
;
that
.
setCnt
(
this
.
salmonCnt
);
that
.
mouseEnable
=
true
;
that
.
addEvent
();
}
/**添加事件 */
addEvent
(){
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
getEnegry
,
this
);
}
/**删除事件 */
removeEvents
(){
this
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
getEnegry
,
this
);
}
/**收取精力 */
getEnegry
(){
var
that
=
this
;
console
.
log
(
"收取精力值:"
,
that
.
salmonCnt
);
that
.
mouseEnable
=
false
;
}
setCnt
(
value
){
this
.
salmonCnt
=
value
;
this
.
updateCntLabel
();
}
plusCnt
(){
this
.
salmonCnt
++
;
this
.
updateCntLabel
();
}
updateCntLabel
(){
this
.
cntLabel
.
text
=
`+
${
this
.
salmonCnt
}
`
this
.
cntLabel
.
x
=
-
this
.
cntLabel
.
textWidth
*
0.5
;
}
}
\ No newline at end of file
project/src/canvas/game/src/scenes/MainScene.ts
View file @
ade201d4
This diff is collapsed.
Click to expand it.
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
View file @
ade201d4
...
...
@@ -87,21 +87,24 @@ export class MainSceneBtnUi extends Module {
that
.
bottomBtnGroup
.
mouseEnable
=
that
.
bottomBtnGroup
.
mouseChildren
=
true
;
that
.
addChild
(
that
.
bottomBtnGroup
);
that
.
strategyBtn
=
Ins
.
initButton
(
"
e636bd22-361f-442a-8684-ccfe1141485
a"
,
579
,
112
);
that
.
strategyBtn
=
Ins
.
initButton
(
"
d57470bd-a80a-412d-92a3-13dfbfc37f6
a"
,
579
,
112
);
that
.
topBtnGroup
.
addChild
(
that
.
strategyBtn
);
that
.
prizeBtn
=
Ins
.
initButton
(
"
e8b083c7-307a-4446-9bc9-99f75c3573e5
"
,
579
,
237
);
that
.
prizeBtn
=
Ins
.
initButton
(
"
fc0e0990-755b-418e-a4a4-cd603b3acf09
"
,
579
,
237
);
that
.
topBtnGroup
.
addChild
(
that
.
prizeBtn
);
that
.
energyBtn
=
Ins
.
initButton
(
"
cdb8e186-9872-442e-b71e-bba0a9ce5846
"
,
542
,
-
7
);
that
.
energyBtn
=
Ins
.
initButton
(
"
b314a190-ea03-4998-bde4-d37adb3acfab
"
,
542
,
-
7
);
that
.
bottomBtnGroup
.
addChild
(
that
.
energyBtn
);
that
.
initActBtn
();
that
.
initCatInfoGroup
();
that
.
initFishPointGroup
();
that
.
shapGoBtn
=
Ins
.
init
Button
(
"dba58651-57a3-4b75-9447-0e4d498dd8cd
"
)
that
.
shapGoBtn
=
Ins
.
init
Sprite
(
"8baf6a30-0463-4946-9cfd-705caf09ab68
"
)
that
.
shapGoBtn
.
position
.
set
((
Ins
.
stageW
-
that
.
shapGoBtn
.
width
)
>>
1
,
126
);
that
.
shapGoBtn
.
anchorX
=
that
.
shapGoBtn
.
width
*
0.5
;
that
.
shapGoBtn
.
anchorY
=
that
.
shapGoBtn
.
height
*
0.5
;
that
.
bottomBtnGroup
.
addChild
(
that
.
shapGoBtn
);
FYGE
.
Tween
.
get
(
that
.
shapGoBtn
,{
loop
:
true
}).
to
({
scaleX
:
0.9
,
scaleY
:
0.9
},
300
).
to
({
scaleX
:
1
,
scaleY
:
1
},
300
)
that
.
updateUserInfo
();
that
.
start
();
that
.
callF
&&
that
.
callF
();
...
...
@@ -110,28 +113,30 @@ export class MainSceneBtnUi extends Module {
/**初始化猫猫信息 */
initCatInfoGroup
()
{
var
that
=
this
;
that
.
catInfoGroup
=
Ins
.
initSprite
(
"8
b0d746a-524e-4dc5-984a-2da2f7f6f862
"
,
69
),
that
.
catInfoGroup
=
Ins
.
initSprite
(
"8
38a3c18-06f1-4894-8780-445caceb3ea0
"
,
69
),
that
.
topBtnGroup
.
addChild
(
that
.
catInfoGroup
);
that
.
catAvatar
=
new
FYGE
.
Sprite
();
that
.
catInfoGroup
.
addChild
(
that
.
catAvatar
);
that
.
catAvatar
.
x
=
16
;
that
.
catAvatar
.
y
=
16
;
var
mask
=
new
FYGE
.
Shape
();
mask
.
beginFill
(
6
,
0.2
);
mask
.
drawCircle
(
0
,
0
,
2
4
)
mask
.
beginFill
(
6
66
,
0.4
);
mask
.
drawCircle
(
0
,
0
,
2
8
)
mask
.
endFill
();
mask
.
position
.
set
(
33
,
33
)
mask
.
position
.
set
(
44
,
44
)
that
.
catInfoGroup
.
addChild
(
mask
);
that
.
catAvatar
.
mask
=
mask
;
that
.
catNameLabel
=
Ins
.
initLabel
({
color
:
"black"
,
size
:
24
,
text
:
"喵喵喵"
,
x
:
6
6
,
y
:
(
167
-
145
)
})
that
.
catNameLabel
=
Ins
.
initLabel
({
color
:
"black"
,
size
:
24
,
text
:
"喵喵喵"
,
x
:
8
6
,
y
:
(
167
-
145
)
})
that
.
catInfoGroup
.
addChild
(
that
.
catNameLabel
);
that
.
catLevelLabel
=
Ins
.
initLabel
({
color
:
"black"
,
size
:
24
,
text
:
"Lv.1"
,
x
:
(
212
-
19
)
,
y
:
(
167
-
145
)
})
that
.
catLevelLabel
=
Ins
.
initLabel
({
color
:
"black"
,
size
:
24
,
text
:
"Lv.1"
,
x
:
230
,
y
:
(
167
-
145
)
})
that
.
catInfoGroup
.
addChild
(
that
.
catLevelLabel
);
that
.
catExperienceBg
=
Ins
.
initSprite
(
"c647044e-5cc9-4701-8b98-53451ae49b40"
,
6
6
,
52
);
that
.
catExperienceBg
=
Ins
.
initSprite
(
"c647044e-5cc9-4701-8b98-53451ae49b40"
,
8
6
,
52
);
// that.catExperienceBg.width = 89;
that
.
catInfoGroup
.
addChild
(
that
.
catExperienceBg
);
that
.
catExperience
=
Ins
.
initSprite
(
"8d5533a1-1d88-489f-bf6b-70b27c3e694b"
);
...
...
@@ -148,8 +153,8 @@ export class MainSceneBtnUi extends Module {
that
.
catExperienceBg
.
addChild
(
mask
);
that
.
catExperience
.
mask
=
mask
;
that
.
experience
=
Ins
.
initLabel
({
size
:
16
});
that
.
experience
.
position
.
set
(
1
44
,
55
)
that
.
experience
=
Ins
.
initLabel
({
size
:
20
});
that
.
experience
.
position
.
set
(
1
74
,
53
)
that
.
experience
.
textWidth
=
110
;
that
.
experience
.
bold
=
true
;
that
.
experience
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
...
...
@@ -164,24 +169,26 @@ export class MainSceneBtnUi extends Module {
that
.
fishPointGroup
=
Ins
.
initSprite
(
"f0810375-c8f1-4939-9b11-1cbde6840e2a"
,
465
);
that
.
topBtnGroup
.
addChild
(
that
.
fishPointGroup
);
that
.
fishPointLabel
=
Ins
.
initLabel
({
color
:
"black"
,
size
:
24
,
text
:
"111111"
,
x
:
99
,
y
:
24
})
that
.
fishPointLabel
=
Ins
.
initLabel
({
color
:
"black"
,
size
:
24
,
text
:
"111111"
,
x
:
56
,
y
:
24
})
that
.
fishPointGroup
.
addChild
(
that
.
fishPointLabel
);
that
.
fishPointLabel
.
textWidth
=
166
;
that
.
fishPointLabel
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
}
/**初始化互动按钮 */
initActBtn
()
{
var
that
=
this
;
that
.
combingBtn
=
Ins
.
initButton
(
"
aa17cfa9-f1db-47eb-9eeb-f5947b7f47a8
"
,
69
);
that
.
combingBtn
=
Ins
.
initButton
(
"
96345871-b3f3-4e06-89f5-98e91be4d19c
"
,
69
);
that
.
bottomBtnGroup
.
addChild
(
that
.
combingBtn
);
that
.
catBtn
=
Ins
.
initButton
(
"
0b44efa9-1e8a-4c43-a2a5-93852d88918c
"
,
214
);
that
.
catBtn
=
Ins
.
initButton
(
"
9ab0fbc3-678c-4959-9981-d2f1cbcdbc19
"
,
214
);
that
.
bottomBtnGroup
.
addChild
(
that
.
catBtn
);
that
.
returnBtn
=
Ins
.
initButton
(
"5
5f703cd-f0d2-4ec1-9430-6193c1cbc1cb
"
,
69
);
that
.
returnBtn
=
Ins
.
initButton
(
"5
6e05ead-d8ba-4f66-9118-bab53d764a35
"
,
69
);
that
.
bottomBtnGroup
.
addChild
(
that
.
returnBtn
);
that
.
touchHeadBtn
=
Ins
.
initButton
(
"
b7ec0f16-ea48-4e41-8def-7cc660fa93d7
"
,
214
);
that
.
touchHeadBtn
=
Ins
.
initButton
(
"
cbe75eb0-5ab8-48ea-ac2e-fb0cfb3bf5d1
"
,
214
);
that
.
bottomBtnGroup
.
addChild
(
that
.
touchHeadBtn
);
that
.
playBtn
=
Ins
.
initButton
(
"
922deced-62d2-4995-9dd6-82bc7913f362
"
,
214
);
that
.
playBtn
=
Ins
.
initButton
(
"
bccd5f19-7aec-428b-82fd-66d7e7a6033e
"
,
214
);
that
.
bottomBtnGroup
.
addChild
(
that
.
playBtn
);
that
.
catRecall
=
Ins
.
initButton
(
"
72345190-f95b-4152-bccf-393b8a5aa8d0
"
,
69
)
that
.
catRecall
=
Ins
.
initButton
(
"
8933876d-d39e-49d8-9df9-985b598620ae
"
,
69
)
that
.
bottomBtnGroup
.
addChild
(
that
.
catRecall
);
that
.
hideAllActBtn
();
that
.
changeBtnByUiType
(
that
.
uiType
)
...
...
@@ -192,9 +199,9 @@ export class MainSceneBtnUi extends Module {
var
that
=
this
;
const
{
catName
,
happyCoin
,
level
,
avatar
,
experience
,
experienceMax
}
=
Ins
.
userInfo
;
that
.
catAvatar
.
texture
=
FYGE
.
Texture
.
fromUrl
(
avatar
);
that
.
catAvatar
.
width
=
5
2
;
that
.
catAvatar
.
height
=
5
2
;
that
.
catAvatar
.
x
=
that
.
catAvatar
.
y
=
6
;
that
.
catAvatar
.
width
=
5
6
;
that
.
catAvatar
.
height
=
5
6
;
that
.
catAvatar
.
x
=
that
.
catAvatar
.
y
=
1
6
;
that
.
catNameLabel
.
text
=
catName
;
that
.
catLevelLabel
.
text
=
"Lv."
+
level
;
that
.
fishPointLabel
.
text
=
""
+
happyCoin
;
...
...
taobao_mini/client/components/prizeModal/prizeModal.acss
View file @
ade201d4
.my-prize-page {
width:
100vw
;
height: 1
00vh
;
width:
750rpx
;
height: 1
624rpx
;
opacity: 1;
position: absolute;
top: 0;
left: 0;
/* margin-left: -375rpx;
margin-top: -812rpx; */
overflow: hidden;
/* background: url('') no-repeat center top/cover; */
}
...
...
@@ -25,6 +27,7 @@
}
.my-prize-page .my-prize-list {
margin-top: 300rpx;
width: 100%;
height: auto;
}
...
...
@@ -32,7 +35,7 @@
.my-prize-page .my-prize-empty {
text-align: center;
color: #fff;
margin-top: 30rpx;
margin-top: 3
3
0rpx;
}
.my-prize-page .my-prize-item {
...
...
taobao_mini/client/components/prizeModal/prizeModal.axml
View file @
ade201d4
<view class="my-prize-page" style="{{{'background':`url(${task.image.bg}) no-repeat center top/cover`}}}">
<view class="my-prize-wrap">
<
view class="my-prize-label"></view
>
<
!-- <view class="my-prize-label"></view> --
>
<view class="my-prize-list" a:if="{{myPrizeList && myPrizeList.length > 0}}">
<view class="my-prize-item" a:for="{{myPrizeList}}">
<image class="my-prize-avatar" src="{{item.image}}"/>
...
...
taobao_mini/client/components/shopModal/shopModal.axml
View file @
ade201d4
<view class="shop">
<view class="shop-page" style="{{{'background':`url(${resList['
da6bc001-768a-4b1c-95af-a9a8853ef6f9
'].url}) no-repeat center top/cover`}}}">
<view class="shop-page" style="{{{'background':`url(${resList['
e2616129-e292-4333-b107-98c102328165
'].url}) no-repeat center top/cover`}}}">
<label class="shop_gold">{{happyCoin}}</label>
<image a:if={{false}} class="shop_backbtn" src={{resList['bdab9777-8a4d-4659-ba23-66aaddb7fa5b'].url}} />
<view class="shop-wrap">
...
...
taobao_mini/client/pages/myprize/myprize.js
View file @
ade201d4
...
...
@@ -28,7 +28,7 @@ Page({
endTime
:
null
,
//到期时间
task
:
{
image
:
{
bg
:
'//yun.duiba.com.cn/
aurora/assets/8fa7cea57cc7071bcc1cbada32f5bfaeb2203981.jp
g'
,
//背景图
bg
:
'//yun.duiba.com.cn/
spark/assets/f9cd677a5db27e38172b7c63ba6677f6f60d516d.pn
g'
,
//背景图
copyIcon
:
'//yun.duiba.com.cn/aurora/assets/721e5319d26a4edbb0282558fb87d9bda1de4887.png'
,
//复制
addressBth
:
'//yun.duiba.com.cn/aurora/assets/7ff6342492c2ce1a94ccfce39c88983b296b35fb.png'
,
//填写地址(实物奖品)
getBth
:
'//yun.duiba.com.cn/aurora/assets/0725f0f5569ad12d37853ad5c40d163fbe247abf.png'
,
//立即领取(除实物奖品外)
...
...
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
ade201d4
...
...
@@ -79,6 +79,7 @@ Page({
if
(
query
)
app
.
inviteId
=
query
.
openId
;
console
.
log
(
'onload=>query'
,
query
);
// my.showToast({
// content: "query " + JSON.stringify(query),
// duration: 5000
...
...
@@ -100,7 +101,12 @@ Page({
console
.
log
(
'on ready'
)
//授权和登录先搞
// await this.getAuth();
await
this
.
getAuth
();
setTimeout
(()
=>
{
my
.
navigateTo
({
url
:
`/pages/myprize/myprize`
});
},
1000
)
// this.initCanvas();
my
.
__onMessage__
=
(
e
)
=>
{
this
.
onMessage
(
e
)
...
...
taobao_mini/client/pages/pageshop/pageshop.acss
View file @
ade201d4
.shop-page {
width:
100vw
;
height: 1
00vh
;
width:
750rpx
;
height: 1
624rpx
;
opacity: 1;
position: absolute;
top: 0;
left: 0;
/* margin-top: -812rpx;
margin-left: -375rpx; */
overflow: hidden;
/* background: url('') no-repeat center top/cover; */
}
...
...
@@ -13,7 +15,7 @@
width: 100%;
position: absolute;
bottom: 0;
top:
25
4rpx;
top:
46
4rpx;
padding-left: 54rpx;
right:0;
overflow-x: auto;
...
...
@@ -133,8 +135,8 @@
.shop .shop_gold {
opacity: 1;
left: 3
48
rpx;
top:
140
rpx;
left: 3
70
rpx;
top:
326
rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 23.47394rpx;
...
...
taobao_mini/client/resconfig/resList.js
View file @
ade201d4
...
...
@@ -580,6 +580,18 @@ const resList = {
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/lodingFake.1897ec11d95b52aecae8a6771a1d8b838583ab7b.png'
,
uuid
:
'2ef3e6b8-e635-4007-ba62-36df45e096c1'
},
'e2616129-e292-4333-b107-98c102328165'
:
{
name
:
'商城背景2'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/46152f0833de1e28ee15cb919a9b3135c567d9bc.png'
,
uuid
:
'e2616129-e292-4333-b107-98c102328165'
},
'83ce073c-c2df-4146-bc4f-529b57f7ae2f'
:
{
name
:
'我的奖品背景1'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/f9cd677a5db27e38172b7c63ba6677f6f60d516d.png'
,
uuid
:
'83ce073c-c2df-4146-bc4f-529b57f7ae2f'
}
};
export
default
resList
;
taobao_mini/mocks/yarn.lock
0 → 100644
View file @
ade201d4
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
dom-walk@^0.1.0:
version "0.1.2"
resolved "http://npm.dui88.com:80/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84"
integrity sha1-DFSL7wSPTR8qlySQAiNgYNqj/YQ=
game-cli@^1.1.3:
version "1.1.3"
resolved "http://npm.dui88.com:80/game-cli/-/game-cli-1.1.3.tgz#8c2d11b24c53a75364aa8bd47b19e010f1d5dab2"
integrity sha1-jC0RskxTp1NkqovUexngEPHV2rI=
dependencies:
readline-sync "^1.4.3"
global@^4.4.0:
version "4.4.0"
resolved "http://npm.dui88.com:80/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406"
integrity sha1-PnsQUXkAajI+1xqvyj6cV6XMZAY=
dependencies:
min-document "^2.19.0"
process "^0.11.10"
min-document@^2.19.0:
version "2.19.0"
resolved "http://npm.dui88.com:80/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=
dependencies:
dom-walk "^0.1.0"
process@^0.11.10:
version "0.11.10"
resolved "http://npm.dui88.com:80/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
readline-sync@^1.4.3:
version "1.4.10"
resolved "http://npm.dui88.com:80/readline-sync/-/readline-sync-1.4.10.tgz"
integrity sha1-Qd9/u0tjEtZzARWUFFcFv1bYhzs=
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