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
afca77eb
Commit
afca77eb
authored
Sep 24, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tianmaoxiaoyuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into tianmaoxiaoyuan
parents
607d52f2
c96ba9aa
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
508 additions
and
176 deletions
+508
-176
tmallCat.recallCat.json
project/src/canvas/game/mock/miniTb/tmallCat.recallCat.json
+10
-0
tmallCat.recallInfo.json
project/src/canvas/game/mock/miniTb/tmallCat.recallInfo.json
+8
-0
Ins.ts
project/src/canvas/game/src/Ins.ts
+1
-1
Cat.ts
project/src/canvas/game/src/cat/Cat.ts
+5
-4
MainScene.ts
project/src/canvas/game/src/scenes/MainScene.ts
+1
-1
MainSceneBtnUi.ts
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
+1
-1
comcatrule.jsx
project/src/components/comcatrule/comcatrule.jsx
+25
-0
comcatrule.less
project/src/components/comcatrule/comcatrule.less
+47
-0
api.js
taobao_mini/client/api.js
+85
-62
app.json
taobao_mini/client/app.json
+1
-0
comcatbackbed.acss
...o_mini/client/components/comcatbackbed/comcatbackbed.acss
+17
-13
comcatbackbed.axml
...o_mini/client/components/comcatbackbed/comcatbackbed.axml
+13
-12
comcatbackbed.js
taobao_mini/client/components/comcatbackbed/comcatbackbed.js
+77
-9
comcatrule.acss
taobao_mini/client/components/comcatrule/comcatrule.acss
+47
-0
comcatrule.axml
taobao_mini/client/components/comcatrule/comcatrule.axml
+8
-0
comcatrule.js
taobao_mini/client/components/comcatrule/comcatrule.js
+19
-0
comcatrule.json
taobao_mini/client/components/comcatrule/comcatrule.json
+4
-0
comrecallcat.acss
taobao_mini/client/components/comrecallcat/comrecallcat.acss
+1
-1
comrecallcat.axml
taobao_mini/client/components/comrecallcat/comrecallcat.axml
+2
-2
comrecallcat.js
taobao_mini/client/components/comrecallcat/comrecallcat.js
+67
-51
comselectcat.axml
taobao_mini/client/components/comselectcat/comselectcat.axml
+9
-9
comselectcat.js
taobao_mini/client/components/comselectcat/comselectcat.js
+1
-1
pagecanvas.axml
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
+3
-3
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+31
-4
pagecanvas.json
taobao_mini/client/pages/pagecanvas/pagecanvas.json
+6
-2
resList.js
taobao_mini/client/resconfig/resList.js
+19
-0
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.recallCat.json
0 → 100644
View file @
afca77eb
{
"success"
:
true
,
"data"
:
{
"value"
:
100
,
"type"
:
4
,
"backType"
:
1
,
"desc"
:
"恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜"
,
"tips"
:
[]
}
}
\ No newline at end of file
project/src/canvas/game/mock/miniTb/tmallCat.recallInfo.json
0 → 100644
View file @
afca77eb
{
"success"
:
true
,
"data"
:
{
"value"
:
"500"
,
"backTime"
:
"1989897768"
,
"serverTime"
:
"188888776"
}
}
\ No newline at end of file
project/src/canvas/game/src/Ins.ts
View file @
afca77eb
...
...
@@ -17,7 +17,7 @@ export class Ins {
public
static
userInfo
:
{
"catName"
:
string
,
//猫咪姓名
"catType"
:
string
,
//猫咪类型
"catType"
:
number
,
//猫咪类型
"userNick"
:
string
,
//用户昵称
"energy"
:
number
,
//精力值
"happyCoin"
:
number
,
//欢乐币
...
...
project/src/canvas/game/src/cat/Cat.ts
View file @
afca77eb
...
...
@@ -29,6 +29,7 @@ import { sendTbNet, TbNetName } from "../TaoBaoNet";
import
{
showToast
}
from
"../../module/ctrls"
;
export
class
Cat
extends
Module
{
/**1:蓝猫,2:橘猫,3:三花,4:暹罗 */
constructor
(
data
?:
any
)
{
super
(
data
);
this
.
catType
=
data
.
type
;
...
...
@@ -63,7 +64,7 @@ export class Cat extends Module {
/**初始化猫咪Lottie数据组 */
initCatLottieArr
()
{
this
.
catLottieArr
=
{
"blue"
:
{
1
:
{
sleep
:
lanmao01shuijiao
,
talk
:
lanmao02shuohua
,
clear
:
lanmao03shumao
,
...
...
@@ -71,7 +72,7 @@ export class Cat extends Module {
play
:
lanmao05wanqiu
,
touch
:
lanmao06motou
},
"orenge"
:
{
2
:
{
sleep
:
jumao01
,
talk
:
jumaoshuohua
,
clear
:
jumaoshumao
,
...
...
@@ -79,7 +80,7 @@ export class Cat extends Module {
play
:
jumaowanshua
,
touch
:
jumaomotoumao
},
"sanhua"
:
{
3
:
{
sleep
:
sanhua01shuijiao
,
talk
:
sanhua02shuohua2
,
clear
:
sanhua03shumao
,
...
...
@@ -87,7 +88,7 @@ export class Cat extends Module {
play
:
sanhua05wanqiu
,
touch
:
sanhua06motou
},
"xianluo"
:
{
4
:
{
sleep
:
xianluomao01
,
talk
:
xianluoshuohua
,
clear
:
xianluo03shumao
,
...
...
project/src/canvas/game/src/scenes/MainScene.ts
View file @
afca77eb
...
...
@@ -90,7 +90,7 @@ export class MainScene extends Scene {
/**初始化猫咪 */
initCat
()
{
var
that
=
this
;
that
.
cat
=
new
Cat
({
type
:
"orenge"
});
that
.
cat
=
new
Cat
({
type
:
Ins
.
userInfo
.
catType
});
that
.
addChild
(
that
.
cat
);
if
(
Ins
.
catIsOut
)
{
that
.
cat
.
visible
=
false
;
...
...
project/src/canvas/game/src/ui/MainSceneBtnUi.ts
View file @
afca77eb
...
...
@@ -242,7 +242,7 @@ export class MainSceneBtnUi extends Module {
/**召回猫咪事件 */
catRecallHandler
(){
console
.
log
(
"召回猫咪"
);
Ins
.
showModule
(
"recallcatModal"
,{
catType
:
Ins
.
userInfo
.
catType
})
}
/**补充精力 */
...
...
project/src/components/comcatrule/comcatrule.jsx
0 → 100644
View file @
afca77eb
'use strict'
;
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
import
'./comcatrule.less'
;
class
Comcatrule
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
this
.
state
||
{
resList
:
resList
};
}
render
()
{
return
(
<
div
className=
"catrule"
>
<
img
className=
"catrulebg"
src=
{
this
.
state
.
resList
[
'716ced79-de7f-40ca-ac98-46a5adf13db0'
].
url
}
/>
<
img
className=
"catrulep"
src=
{
this
.
state
.
resList
[
'617927a2-2dd6-456a-9d92-1f607a137dbc'
].
url
}
/>
<
span
className=
"catrulelabel"
>
游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则
</
span
>
<
img
className=
"catrulebtnclose"
src=
{
this
.
state
.
resList
[
'29e80fbb-98ed-40fb-a11b-e14b45fee158'
].
url
}
/>
</
div
>
);
}
}
export
default
Comcatrule
;
\ No newline at end of file
project/src/components/comcatrule/comcatrule.less
0 → 100644
View file @
afca77eb
.catrule {
width: 721px;
height: 559px;
opacity: 1;
left: 18px;
top: 392px;
position: absolute;
transform-origin: 0px 0px 0px;
display: block;
.catrulebg {
width: 721px;
height: 559px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.catrulep {
width: 13px;
height: 69px;
opacity: 1;
left: 667px;
top: 168px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.catrulelabel {
width: 574px;
height: 279px;
opacity: 1;
left: 76px;
top: 167px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(104, 91, 78, 1);
}
.catrulebtnclose {
width: 44px;
height: 44px;
opacity: 1;
display: block;
left: 624px;
top: 38px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
\ No newline at end of file
taobao_mini/client/api.js
View file @
afca77eb
const
app
=
getApp
();
const
{
tbcc
,
cloudName
,
cloud
,
requestType
}
=
app
;
const
{
tbcc
,
cloudName
,
cloud
,
requestType
}
=
app
;
const
{
utils
:
{
generateAPI
},
request
:
tbccRequest
,
capi
}
=
tbcc
;
const
{
utils
:
{
generateAPI
},
request
:
tbccRequest
,
capi
}
=
tbcc
;
const
request
=
tbccRequest
({
cloud
,
cloudName
,
requestType
cloud
,
cloudName
,
requestType
});
// api handle 列表
const
apiList
=
{
...
capi
,
receiveObjectPrize
:
{
handle
:
'receiveObjectPrize'
,
method
:
'get'
,
isShowLoading
:
false
},
getTaskList
:
{
handle
:
'getTaskList'
,
method
:
'get'
,
isShowLoading
:
false
},
receiveEnamePrize
:
{
handle
:
'receiveEnamePrize'
,
method
:
'get'
,
isShowLoading
:
false
},
getMyPrizeList
:
{
handle
:
'getMyPrizeList'
,
method
:
'get'
,
isShowLoading
:
false
},
getActivityBaseInfoById
:
{
handle
:
'getActivityBaseInfoById'
,
method
:
'get'
,
isShowLoading
:
false
},
getUserInfo
:
{
handle
:
'getUserInfo'
,
method
:
'get'
,
isShowLoading
:
false
},
login
:
{
handle
:
'login'
,
method
:
'get'
,
isShowLoading
:
false
},
adoptCat
:{
handle
:
'adoptCat'
,
method
:
'get'
,
isShowLoading
:
false
},
recallInfo
:{
handle
:
'recallInfo'
,
method
:
'get'
,
isShowLoading
:
false
},
exchangeGood
:{
handle
:
'exchangeGood'
,
method
:
'get'
,
isShowLoading
:
false
},
exchangeGoodList
:{
handle
:
'exchangeGoodList'
,
method
:
'get'
,
isShowLoading
:
false
}
...
capi
,
getTaskList
:
{
handle
:
'getTaskList'
,
method
:
'get'
,
isShowLoading
:
false
},
receiveObjectPrize
:
{
handle
:
'receiveObjectPrize'
,
method
:
'get'
,
isShowLoading
:
false
},
receiveEnamePrize
:
{
handle
:
'receiveEnamePrize'
,
method
:
'get'
,
isShowLoading
:
false
},
getMyPrizeList
:
{
handle
:
'getMyPrizeList'
,
method
:
'get'
,
isShowLoading
:
false
},
getActivityBaseInfoById
:
{
handle
:
'getActivityBaseInfoById'
,
method
:
'get'
,
isShowLoading
:
false
},
/**获取用户信息 */
getUserInfo
:
{
handle
:
'getUserInfo'
,
method
:
'get'
,
isShowLoading
:
false
},
/**登录 */
login
:
{
handle
:
'login'
,
method
:
'get'
,
isShowLoading
:
false
},
/**领养猫,提交猫咪信息 */
adoptCat
:
{
handle
:
'adoptCat'
,
method
:
'get'
,
isShowLoading
:
false
},
/**召回信息 */
recallInfo
:
{
handle
:
'recallInfo'
,
method
:
'get'
,
isShowLoading
:
false
},
/**召回猫 */
recallCat
:
{
handle
:
'recallCat'
,
method
:
'get'
,
isShowLoading
:
false
},
/**兑换奖品 */
exchangeGood
:
{
handle
:
'exchangeGood'
,
method
:
'get'
,
isShowLoading
:
false
},
/**获取兑换奖品列表 */
exchangeGoodList
:
{
handle
:
'exchangeGoodList'
,
method
:
'get'
,
isShowLoading
:
false
}
};
// 生成API
const
API
=
generateAPI
(
apiList
,
request
);
export
default
API
;
export
default
API
;
\ No newline at end of file
taobao_mini/client/app.json
View file @
afca77eb
{
"pages"
:
[
"pages/pagecanvas/pagecanvas"
,
"pages/pageshop/pageshop"
,
"pages/index/index"
,
"pages/pageshop/pageshop"
,
"pages/myprize/myprize"
...
...
taobao_mini/client/components/comcatbackbed/comcatbackbed.acss
View file @
afca77eb
.catbackbed {
.catbackbed
1
{
width: 750rpx;
height: 1093rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
top:265rpx;
transform-origin: 50% 50% 0rpx;
}
.catbackbed .catbackbed {
.catbackbed
1
.catbackbed {
width: 750rpx;
height: 1093rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.catbackbed .catbackbed .catbackbedbgaccident {
.catbackbed
1
.catbackbed .catbackbedbgaccident {
width: 750rpx;
height: 1093rpx;
opacity: 1;
...
...
@@ -20,7 +21,7 @@
transform-origin: 0rpx 0rpx 0rpx;
display: block;
}
.catbackbed .catbackbed .catbackbedbgsurprise {
.catbackbed
1
.catbackbed .catbackbedbgsurprise {
width: 750rpx;
height: 1093rpx;
opacity: 1;
...
...
@@ -28,7 +29,7 @@
transform-origin: 0rpx 0rpx 0rpx;
display: block;
}
.catbackbed .catbackbed .catbackbedbgunluck {
.catbackbed
1
.catbackbed .catbackbedbgunluck {
width: 584rpx;
height: 715rpx;
opacity: 1;
...
...
@@ -38,7 +39,7 @@
top: 196rpx;
left: 84rpx;
}
.catbackbed .catbackbed .catbackbedok {
.catbackbed
1
.catbackbed .catbackbedok {
width: 351rpx;
height: 105rpx;
opacity: 1;
...
...
@@ -47,18 +48,21 @@
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.catbackbed .catbackbed .catbackbedtip2 {
width:
275
rpx;
.catbackbed
1
.catbackbed .catbackbedtip2 {
width:
750
rpx;
height: 32rpx;
opacity: 1;
left:
238
rpx;
left:
0
rpx;
top: 706rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 32rpx;
color: #685b4e;
text-align: center;
font-weight: bold
}
.catbackbed .catbackbed .catbackbedtip {
.catbackbed
1
.catbackbed .catbackbedtip {
width: 447rpx;
height: 111rpx;
opacity: 1;
...
...
@@ -69,7 +73,7 @@
font-size: 28rpx;
color: #685b4e;
}
.catbackbed .catbackbed .catbackbedclose {
.catbackbed
1
.catbackbed .catbackbedclose {
width: 44rpx;
height: 44rpx;
opacity: 1;
...
...
@@ -79,7 +83,7 @@
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.catbackbed .catbackbed .catbackbedcatimg {
.catbackbed
1
.catbackbed .catbackbedcatimg {
width: 494rpx;
height: 262rpx;
opacity: 1;
...
...
taobao_mini/client/components/comcatbackbed/comcatbackbed.axml
View file @
afca77eb
<view class="catbackbed">
<view class="catbackbed
1 modal-animate-zoom-in
">
<view class="catbackbed">
<image class="catbackbedbgaccident" src={{resList['98a3f684-846b-479c-91ac-75b588e2b51b'].url}} />
<image class="catbackbedbgsurprise" src={{resList['98a3f684-846b-479c-91ac-75b588e2b51b'].url}} />
<image class="catbackbedbgunluck" src={{resList['3fa827d6-e333-4b56-a5d9-5f3ae2089127'].url}} />
<image class="catbackbedok" src={{resList['b701826c-63c5-4490-a380-52f273dad9af'].url}} />
<
span class="catbackbedtip2">获得+10000欢乐币</span
>
<
span
class="catbackbedtip">
文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案不要超过50字
</
span
>
<image class="catbackbedclose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
<image class="catbackbedcatimg" src=
{{resList['51c97f4c-1f39-48cf-8865-c1c2fec500d8'].url}}
/>
<image class="catbackbedbgaccident"
a:if="{{backType==2}}"
src={{resList['98a3f684-846b-479c-91ac-75b588e2b51b'].url}} />
<image class="catbackbedbgsurprise"
a:if="{{backType==1}}"
src={{resList['98a3f684-846b-479c-91ac-75b588e2b51b'].url}} />
<image class="catbackbedbgunluck"
a:if="{{backType==3}}"
src={{resList['3fa827d6-e333-4b56-a5d9-5f3ae2089127'].url}} />
<image class="catbackbedok"
onTap="onModalClose"
src={{resList['b701826c-63c5-4490-a380-52f273dad9af'].url}} />
<
label class="catbackbedtip2"><text>{{getTypeText}}</text> <text style="color:{{getColor}}">{{getText}}</text> </label
>
<
label
class="catbackbedtip">
{{desc}}
</
label
>
<image class="catbackbedclose"
onTap="onModalClose"
src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
<image class="catbackbedcatimg" src=
"{{catImg}}"
/>
</view>
</view>
\ No newline at end of file
</view>
\ No newline at end of file
taobao_mini/client/components/comcatbackbed/comcatbackbed.js
View file @
afca77eb
...
...
@@ -2,14 +2,82 @@
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{},
data
:
{},
methods
:
{},
onInit
(
props
)
{
this
.
setData
(
this
.
data
||
{
resList
:
resList
});
}
props
:
{
catImgArr
:
{
//回归猫的图片,1:惊喜欢乐币,2:意外精力值,3:倒霉
'1'
:
[
"36279db8-3376-4710-bb1f-89e69130e6dd"
,
"6dc7422e-d6bf-4b03-9fd3-637b71e5e88e"
,
"5c01ebd0-dac7-4ff9-89a5-054ea7214f62"
,
"e7156f22-22f6-45f5-8002-898c142ba6ae"
],
'2'
:
[
"51c97f4c-1f39-48cf-8865-c1c2fec500d8"
,
"0a80398a-972a-4ea2-a9d1-604fe54a9d62"
,
"32f6f1ff-1ad7-4296-a922-d9073b31a921"
,
"377e50f3-cbec-45a5-9bcd-d4923b9873a6"
],
'3'
:
[
"e143c361-01b3-488f-b213-7a97040e245b"
,
"a1a5d4a5-8039-4a6f-a620-8fb465eec68f"
,
"61869bae-f55f-46e3-be58-23ed6485b18e"
,
"cfc54c6d-4233-478a-ae00-ef42d58718c1"
],
},
//从召回猫接口中拿到的信息
recallCatInfo
:
null
,
mydata
:
null
,
//mydata.catType 猫的类型
},
data
:
{
resList
:
resList
,
backType
:
0
,
//回归类型,1:惊喜欢乐币,2:意外精力值,3:倒霉
value
:
0
,
//对应的具体值
prizeType
:
0
,
//奖品类型 4:精力,6:欢乐币
catImg
:
''
,
desc
:
'恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜恭喜'
,
//描述
getText
:
'+100欢乐币'
,
//获取或减少收益文本
getColor
:
'red'
,
//获取或减少收益文本颜色
getTypeText
:
'获得'
,
//获取或减少收益类型文本
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
,
onUpdateUserInfo
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
onUpdateUserInfo
&&
onUpdateUserInfo
();
},
},
didMount
()
{
console
.
log
(
this
.
props
.
catImgArr
)
const
{
value
,
type
,
backType
,
desc
}
=
this
.
props
.
recallCatInfo
;
let
getText
=
''
;
let
getTextColor
=
''
;
let
getTypeText
=
''
;
if
(
type
==
4
)
{
getText
=
'精力值'
;
}
else
if
(
type
==
6
)
{
getText
=
'欢乐币'
}
switch
(
backType
)
{
case
1
:
getText
=
'+'
+
value
+
getText
;
getTextColor
=
'red'
;
getTypeText
=
'获得'
break
;
case
2
:
getText
=
'+'
+
value
+
getText
;
getTextColor
=
'red'
;
getTypeText
=
'意外获得'
;
break
;
case
3
:
getText
=
'-'
+
value
+
getText
;
getTextColor
=
'black'
;
getTypeText
=
'损失'
;
break
;
}
console
.
log
(
"mm"
+
this
.
props
.
mydata
.
catType
-
1
)
console
.
log
(
this
.
props
.
catImgArr
[
''
+
backType
][
this
.
props
.
mydata
.
catType
-
1
]);
this
.
setData
({
catImg
:
resList
[
this
.
props
.
catImgArr
[
backType
][
this
.
props
.
mydata
.
catType
-
1
]].
url
,
getText
:
getText
,
getColor
:
getTextColor
,
getTypeText
:
getTypeText
,
backType
:
backType
})
},
});
\ No newline at end of file
taobao_mini/client/components/comcatrule/comcatrule.acss
0 → 100644
View file @
afca77eb
.catrule {
width: 721rpx;
height: 559rpx;
opacity: 1;
left: 18rpx;
top: 392rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
display: block;
}
.catrule .catrulebg {
width: 721rpx;
height: 559rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.catrule .catrulep {
width: 13rpx;
height: 69rpx;
opacity: 1;
left: 667rpx;
top: 168rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.catrule .catrulelabel {
width: 574rpx;
height: 279rpx;
opacity: 1;
left: 76rpx;
top: 167rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 24rpx;
color: #685b4e;
}
.catrule .catrulebtnclose {
width: 44rpx;
height: 44rpx;
opacity: 1;
display: block;
left: 624rpx;
top: 38rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
taobao_mini/client/components/comcatrule/comcatrule.axml
0 → 100644
View file @
afca77eb
<view class="catrule">
<image class="catrulebg" src={{resList['716ced79-de7f-40ca-ac98-46a5adf13db0'].url}} />
<image class="catrulep" src={{resList['617927a2-2dd6-456a-9d92-1f607a137dbc'].url}} />
<label class="catrulelabel">
游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则游戏规则
</label>
<image class="catrulebtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
</view>
\ No newline at end of file
taobao_mini/client/components/comcatrule/comcatrule.js
0 → 100644
View file @
afca77eb
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{},
data
:
{
resList
:
resList
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
},
},
});
\ No newline at end of file
taobao_mini/client/components/comcatrule/comcatrule.json
0 → 100644
View file @
afca77eb
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
taobao_mini/client/components/comrecallcat/comrecallcat.acss
View file @
afca77eb
...
...
@@ -5,7 +5,7 @@
left: 18rpx;
top: 500rpx;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
.recallcat .recallcatbg {
width: 721rpx;
...
...
taobao_mini/client/components/comrecallcat/comrecallcat.axml
View file @
afca77eb
<view class="recallcat">
<view class="recallcat
modal-animate-zoom-in
">
<image class="recallcatbg" src={{resList['40cac443-7998-4c2a-8f9c-38121b2385e3'].url}} />
<label class="recallcatbacklabel">{{timeText}}</label>
<label class="recallcathappycoin">{{happyCoinCnt}}</label>
<view class="recallbtngroup">
<image class="recallbtncancel" onTap="onModalClose" src={{resList['6957d9f3-9aa4-4ed6-9b83-57cc68f16512'].url}} />
<image class="recallbtngo" src={{resList['6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'].url}} />
<image class="recallbtngo"
onTap="onRecallCat"
src={{resList['6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'].url}} />
</view>
<image class="recallbtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
</view>
taobao_mini/client/components/comrecallcat/comrecallcat.js
View file @
afca77eb
...
...
@@ -3,63 +3,79 @@
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{},
data
:
{
resList
:
resList
,
timeText
:
''
,
happyCoinCnt
:
''
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
props
:
{},
data
:
{
resList
:
resList
,
timeText
:
''
,
happyCoinCnt
:
''
},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
console
.
log
(
'onModalClose'
)
},
/**根据时间戳获取日期-月-日 */
getDateDayMonthByTime
(
time
)
{
let
date
=
new
Date
(
time
);
let
year
=
date
.
getFullYear
();
let
month
=
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
();
let
hours
=
date
.
getHours
();
let
minutes
=
date
.
getMinutes
();;
let
seconds
=
date
.
getSeconds
();
if
(
hours
<=
0
)
{
if
(
minutes
<=
0
)
{
// if (seconds <= 0) {
date
=
0
+
'小时'
+
0
+
'分'
;
// } else {
// date = seconds + "秒"
// }
/**根据时间戳获取日期-月-日 */
getDateDayMonthByTime
(
time
)
{
let
date
=
new
Date
(
time
);
let
year
=
date
.
getFullYear
();
let
month
=
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
();
let
hours
=
date
.
getHours
();
let
minutes
=
date
.
getMinutes
();;
let
seconds
=
date
.
getSeconds
();
if
(
hours
<=
0
)
{
if
(
minutes
<=
0
)
{
// if (seconds <= 0) {
date
=
0
+
'小时'
+
0
+
'分'
;
// } else {
// date = seconds + "秒"
// }
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
console
.
log
(
hours
);
}
else
{
date
=
hours
+
'小时'
+
minutes
+
'分'
;
}
console
.
log
(
hours
);
return
date
;
}
},
return
date
;
},
/**召回猫,打开召回猫的奖励弹窗 */
async
onRecallCat
()
{
const
recallCat
=
await
API
.
recallCat
();
if
(
recallCat
&&
recallCat
.
success
)
{
this
.
onModalClose
();
const
{
onRecallCat
}
=
this
.
props
;
onRecallCat
&&
onRecallCat
(
recallCat
.
data
);
}
else
{
my
.
showToast
(
recallCat
?
recallCat
.
message
:
null
)
}
async
didMount
()
{
const
recall
=
await
API
.
recallInfo
();
console
.
log
(
recall
);
if
(
recall
&&
recall
.
success
)
{
var
text
=
"猫咪预计"
+
this
.
getDateDayMonthByTime
(
recall
.
data
.
backTime
-
recall
.
data
.
serverTime
)
+
"后回寝"
;
this
.
setData
({
timeText
:
text
,
happyCoinCnt
:
recall
.
data
.
value
+
''
})
}
else
{
my
.
showToast
(
recall
?
recall
.
message
:
null
)
}
},
async
didMount
()
{
const
recall
=
await
API
.
recallInfo
();
console
.
log
(
recall
);
if
(
recall
&&
recall
.
success
)
{
var
text
=
"猫咪预计"
+
this
.
getDateDayMonthByTime
(
recall
.
data
.
backTime
-
recall
.
data
.
serverTime
)
+
"后回寝"
;
this
.
setData
({
timeText
:
text
,
happyCoinCnt
:
recall
.
data
.
value
+
''
})
}
else
{
my
.
showToast
(
recall
?
recall
.
message
:
null
)
}
}
}
});
\ No newline at end of file
taobao_mini/client/components/comselectcat/comselectcat.axml
View file @
afca77eb
...
...
@@ -6,23 +6,23 @@
<label class="bluename">1</label>
<image class="bluesure" a:if="{{curSelect==1}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatsh" id="cat_
2
" onTap="changeSelectCat">
<view class="selectcatsh" id="cat_
3
" onTap="changeSelectCat">
<image class="shbg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="shimg" src={{resList['fe52ffae-fadd-40f3-97b5-d3d56fd04781'].url}} />
<label class="shname">
2
</label>
<image class="shsure" a:if="{{curSelect==
2
}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
<label class="shname">
3
</label>
<image class="shsure" a:if="{{curSelect==
3
}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatxl" id="cat_
3
" onTap="changeSelectCat">
<view class="selectcatxl" id="cat_
4
" onTap="changeSelectCat">
<image class="xlbg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="xlimg" src={{resList['193f6955-d754-4b9f-80ca-b9b9a72e8a8b'].url}} />
<label class="xlname">
3
</label>
<image class="xlsure" a:if="{{curSelect==
3
}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
<label class="xlname">
4
</label>
<image class="xlsure" a:if="{{curSelect==
4
}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatorge" id="cat_
4
" onTap="changeSelectCat">
<view class="selectcatorge" id="cat_
2
" onTap="changeSelectCat">
<image class="orgebg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="orgeimg" src={{resList['e28e5250-c740-4e4f-a855-c415c557e77e'].url}} />
<label class="orgename">
4
</label>
<image class="orgesure" a:if="{{curSelect==
4
}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
<label class="orgename">
2
</label>
<image class="orgesure" a:if="{{curSelect==
2
}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<image class="selectcattrue btn" onTap="selectSure" src={{resList['628fc38b-7dc0-4c69-aac1-279d60c8f1ed'].url}} />
</view>
\ No newline at end of file
taobao_mini/client/components/comselectcat/comselectcat.js
View file @
afca77eb
...
...
@@ -7,7 +7,7 @@ Component({
},
data
:
{
resList
:
resList
,
curSelect
:
1
//1:蓝猫,2:
三花,3:暹罗,4:橘猫
curSelect
:
1
//1:蓝猫,2:
橘猫,3:三花,4:暹罗
},
methods
:
{
onModalClose
()
{
...
...
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
View file @
afca77eb
...
...
@@ -9,8 +9,8 @@
<message-modal a:if="{{messageModalVisible}}" mydata="{{messageModalData}}" onModalClose="closeMessageModal"></message-modal>
<view class="popcontainer" a:if="{{selectcatModalVisible}}"><selectcat-modal onModalClose="closeSelectcatModal" onSelectCat="selectCat"></selectcat-modal></view>
<view class="popcontainer" a:if="{{catnameModalVisible}}" ><catname-modal selectType="{{catType}}" onModalClose="closeCatnameModal" onSelectCatOk="selectCatOk" /></view>
<view class="popcontainer" a:if="{{recallcatModalVisible}}"><recallcat-modal onModalClose="closeRecallcatModal"></recallcat-modal></view>
<view class="popcontainer" a:if="{{recallcatModalVisible}}"><recallcat-modal
onRecallCat="recallCat"
onModalClose="closeRecallcatModal"></recallcat-modal></view>
<view class="popcontainer" a:if="{{getcatModalVisible}}"><getcat-modal catName="{{catName}}" onPostSelectCat="postSelectCat" onModalClose="closeGetcatModal"></getcat-modal></view>
<view class="popcontainer" a:if="{{catbackbedModalVisible}}"><catbackbed-modal mydata="{{getcatModalData}}" recallCatInfo="{{recallCatInfo}}" onUpdateUserInfo="updateUserInfo" onModalClose="closeCatbackModal"></catbackbed-modal></view>
<task-modal a:if="{{taskModalVisible}}" onModalClose="closeTaskModal"></task-modal>
\ No newline at end of file
<view class="popcontainer" a:if="{{catruleModalVisible}}"><catrule-modal onModalClose="closeCatruleModal"></catrule-modal></view>
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
afca77eb
...
...
@@ -28,7 +28,9 @@ Page({
data
:
{
catType
:
1
,
catName
:
''
,
taskModalVisible
:
0
,
taskModalVisible
:
0
,
recallCatInfo
:{},
taskModalVisible
:
false
,
messageModalVisible
:
false
,
messageModalData
:
{},
ruleModalVisible
:
false
,
...
...
@@ -37,7 +39,10 @@ Page({
selectcatModalVisible
:
false
,
catnameModalVisible
:
false
,
recallcatModalVisible
:
false
,
getcatModalVisible
:
false
getcatModalVisible
:
false
,
getcatModalData
:
{},
catbackbedModalVisible
:
false
,
catruleModalVisible
:
true
},
onLoad
(
props
)
{
...
...
@@ -59,7 +64,7 @@ Page({
var
that
=
this
;
// setTimeout(() => {
// var parameter = {
// name: "
select
catModal"
// name: "
recall
catModal"
// }
// var data = {
// netName: "mine.showModal",
...
...
@@ -68,7 +73,7 @@ Page({
// that.onMessage({
// data: data
// })
// },
10
00)
// },
5
00)
//授权和登录先搞
this
.
getAuth
();
my
.
__onMessage__
=
(
e
)
=>
{
...
...
@@ -282,6 +287,11 @@ Page({
this
.
init
();
}
},
/**刷新用户信息 */
updateUserInfo
(){
console
.
log
(
"通知canvas刷新用户信息"
)
this
.
main
&&
this
.
main
.
dispatchGlobalEvent
(
"UPDATE_USERINFO"
)
},
/**选择猫咪,打开取名弹窗 */
selectCat
(
type
)
{
// this.catType = type;
...
...
@@ -302,6 +312,13 @@ Page({
postSelectCat
(
r
)
{
this
.
main
.
dispatchGlobalEvent
(
"selectEnd"
,
r
);
},
/**召回猫 */
recallCat
(
r
){
this
.
setData
({
recallCatInfo
:
r
,
catbackbedModalVisible
:
true
})
},
closeLevelupModal
()
{
this
.
setData
({
levelupModalVisible
:
false
...
...
@@ -343,5 +360,15 @@ Page({
this
.
setData
({
getcatModalVisible
:
false
})
},
closeCatbackModal
()
{
this
.
setData
({
catbackbedModalVisible
:
false
})
},
closeCatruleModal
(){
this
.
setData
({
catruleModalVisible
:
false
})
}
});
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/pagecanvas.json
View file @
afca77eb
...
...
@@ -7,6 +7,10 @@
"selectcat-modal"
:
"/components/comselectcat/comselectcat"
,
"catname-modal"
:
"/components/comcatname/comcatname"
,
"recallcat-modal"
:
"/components/comrecallcat/comrecallcat"
,
"getcat-modal"
:
"/components/comgetcat/comgetcat"
"getcat-modal"
:
"/components/comgetcat/comgetcat"
,
"catbackbed-modal"
:
"/components/comcatbackbed/comcatbackbed"
,
"catrule-modal"
:
"/components/comcatrule/comcatrule"
}
}
\ No newline at end of file
}
taobao_mini/client/resconfig/resList.js
View file @
afca77eb
...
...
@@ -458,6 +458,25 @@ const resList = {
url
:
'//yun.duiba.com.cn/spark/assets/xlSleep.85ef68b7d875a9cb70d30cfe809abbbc8c6ca8ad.png'
,
uuid
:
'cfc54c6d-4233-478a-ae00-ef42d58718c1'
},
'b701826c-63c5-4490-a380-52f273dad9af'
:
{
name
:
'按钮44'
,
ext
:
'.png'
,
uuid
:
'b701826c-63c5-4490-a380-52f273dad9af'
,
url
:
'//yun.duiba.com.cn/spark/assets/5193855f40ff72dea9f48022083a6a35240b6dc6.png'
},
'716ced79-de7f-40ca-ac98-46a5adf13db0'
:
{
name
:
'catruleBg'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/catruleBg.8b265a49b5fef7d4020ba60884868be6d772b72d.png'
,
uuid
:
'716ced79-de7f-40ca-ac98-46a5adf13db0'
},
'617927a2-2dd6-456a-9d92-1f607a137dbc'
:
{
name
:
'进度条'
,
ext
:
'.png'
,
uuid
:
'617927a2-2dd6-456a-9d92-1f607a137dbc'
,
url
:
'//yun.duiba.com.cn/spark/assets/a67137c922a0d539215aed739676aa7636e3c4d8.png'
},
};
export
default
resList
;
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