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
c12fe143
Commit
c12fe143
authored
Dec 04, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
d9c0e1a9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
77 deletions
+71
-77
comgetcardpanel.axml
...ni/client/components/comgetcardpanel/comgetcardpanel.axml
+2
-2
comgetcardpanel.js
...mini/client/components/comgetcardpanel/comgetcardpanel.js
+31
-45
your.acss
taobao_mini/client/components/comgetcardpanel/your.acss
+2
-1
pageindexpage.axml
taobao_mini/client/pages/pageindexpage/pageindexpage.axml
+2
-1
pageindexpage.js
taobao_mini/client/pages/pageindexpage/pageindexpage.js
+24
-27
your.acss
taobao_mini/client/pages/pageindexpage/your.acss
+10
-1
No files found.
taobao_mini/client/components/comgetcardpanel/comgetcardpanel.axml
View file @
c12fe143
<view class="getcardpanel ">
<view class="getcardpanel ">
<view class={{show?"p_show":"p_hide"}}>
<view class={{show
CardBody
?"p_show":"p_hide"}}>
<image class="getcardcontinuebtn " a:if={{doJoinData.drawLotteryStatus==1}} onTap="hiddenPanelEvent" data-value="getcardpanel" src={{resList['48d28917-741f-45d4-bcc9-322f29bcf5d8'].url}} />
<image class="getcardcontinuebtn " a:if={{doJoinData.drawLotteryStatus==1}} onTap="hiddenPanelEvent" data-value="getcardpanel" src={{resList['48d28917-741f-45d4-bcc9-322f29bcf5d8'].url}} />
<image class="getcardopenboxbtn " a:if={{doJoinData.drawLotteryStatus==2}} src={{resList['65d0f064-2527-4aef-8563-858eaf7ccf1e'].url}} />
<image class="getcardopenboxbtn " a:if={{doJoinData.drawLotteryStatus==2}} src={{resList['65d0f064-2527-4aef-8563-858eaf7ccf1e'].url}} />
<image class="dim51 " src={{resList['8c31274b-1016-4b8c-b413-9fc98174e118'].url}} />
<image class="dim51 " src={{resList['8c31274b-1016-4b8c-b413-9fc98174e118'].url}} />
...
@@ -15,5 +15,5 @@
...
@@ -15,5 +15,5 @@
</view>
</view>
</view>
</view>
<canvas id="canvas" type="2d" onReady="onCanvasReady"></canvas>
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/comgetcardpanel/comgetcardpanel.js
View file @
c12fe143
...
@@ -42,59 +42,45 @@ Component({
...
@@ -42,59 +42,45 @@ Component({
hiddenPanelEvent
(
e
){
hiddenPanelEvent
(
e
){
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
},
},
onCanvasReady
()
{
// onCanvasReady() {
try
{
// my.createCanvas({
my
.
alert
({
// id: 'canvas',
title
:
""
,
// success: (canvas) => {
content
:
"11"
// my.alert({
});
// title:"",
if
(
!
my
.
createCanvas
){
// content:"22"
my
.
alert
({
// });
title
:
""
,
// lottie.setup(canvas);
content
:
"33"
// let context = canvas.getContext('2d')
});
// let ani = lottie.loadAnimation({
}
// loop: false, autoplay: true,
this
.
canvas
=
my
.
createCanvas
({
// animationData: DataCenter.lottieData,
id
:
'canvas'
,
// rendererSettings: {context: context},
success
:
(
canvas
)
=>
{
// })
my
.
alert
({
// ani.onComplete=()=>{
title
:
""
,
// this.setData({
content
:
"22"
// show:true
});
// })
lottie
.
setup
(
canvas
);
// }
const
context
=
canvas
.
getContext
(
'2d'
)
// },
let
ani
=
lottie
.
loadAnimation
({
// });
loop
:
true
,
autoplay
:
true
,
// },
animationData
:
DataCenter
.
lottieData
,
rendererSettings
:
{
context
:
context
},
})
ani
.
onComplete
=
()
=>
{
// this.setData({
// show:true
// })
}
},
});
my
.
alert
({
title
:
""
,
content
:
JSON
.
stringify
(
this
.
canvas
)
});
}
catch
(
e
){
my
.
alert
({
title
:
""
,
content
:
JSON
.
stringify
(
e
)
});
}
},
},
},
didMount
(
props
)
{
didMount
(
props
)
{
console
.
log
(
DataCenter
.
doJoinData
)
console
.
log
(
DataCenter
.
doJoinData
)
this
.
setData
({
this
.
setData
({
resList
:
resList
,
resList
:
resList
,
showCardBody
:
false
,
doJoinData
:
DataCenter
.
doJoinData
?
DataCenter
.
doJoinData
.
data
:{}
doJoinData
:
DataCenter
.
doJoinData
?
DataCenter
.
doJoinData
.
data
:{}
});
});
setTimeout
(()
=>
{
this
.
setData
({
showCardBody
:
true
})
},
1500
)
// setTimeout(()=>{
// setTimeout(()=>{
// this.onCanvasReady()
// this.onCanvasReady()
// },2000)
// },2000)
...
...
taobao_mini/client/components/comgetcardpanel/your.acss
View file @
c12fe143
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
}
}
.p_show{
.p_show{
opacity:1;
opacity:1;
transition: 0.5s all;
}
}
.p_hide{
.p_hide{
opacity:
1
;
opacity:
0
;
}
}
\ No newline at end of file
taobao_mini/client/pages/pageindexpage/pageindexpage.axml
View file @
c12fe143
...
@@ -82,5 +82,6 @@
...
@@ -82,5 +82,6 @@
<image class="indexrulebtn " onTap="showPanelEvent" data-value="{{'rulepanel'}}" src={{resList['abc5f112-fa04-42fa-bfec-f633567807c8'].url}} />
<image class="indexrulebtn " onTap="showPanelEvent" data-value="{{'rulepanel'}}" src={{resList['abc5f112-fa04-42fa-bfec-f633567807c8'].url}} />
<image class="indexrecordbtn " src={{resList['5a6679e0-89f7-4582-a89b-116a35e9750a'].url}} />
<image class="indexrecordbtn " src={{resList['5a6679e0-89f7-4582-a89b-116a35e9750a'].url}} />
</view>
</view>
<panel showWinLists="{{showWinLists}}" CollectCardInfo={{CollectCardInfo}} onOpenTaskPanel="openTaskPanel" onTapHiddenPanelEvent="hiddenPanelEvent"/>
<panel showWinLists={{showWinLists}} CollectCardInfo={{CollectCardInfo}} onOpenTaskPanel="openTaskPanel" onTapHiddenPanelEvent="hiddenPanelEvent"/>
<canvas id="canvas" type="2d" onReady="onCanvasReady"></canvas>
</view>
</view>
\ No newline at end of file
taobao_mini/client/pages/pageindexpage/pageindexpage.js
View file @
c12fe143
...
@@ -45,38 +45,37 @@ Page({
...
@@ -45,38 +45,37 @@ Page({
data
:
{
data
:
{
showWinLists
:[],
showWinLists
:[],
opacityState
:
"opacityShow"
,
opacityState
:
"opacityShow"
,
showCardBody
:
false
},
},
onLoad
(
props
)
{
onLoad
(
props
)
{
this
.
setData
({
this
.
setData
({
resList
:
resList
,
resList
:
resList
,
showPanel
:
this
.
showPanel
showPanel
:
this
.
showPanel
});
});
loadCloud
(
"cloud://4028B2AAA0799F6D94C6A0398B238DE3//开卡效果.json"
,
(
data
)
=>
{
DataCenter
.
lottieData
=
data
},
()
=>
{})
//初始化首页信息
//初始化首页信息
this
.
getIndex
()
this
.
getIndex
()
},
},
// onCanvasReady() {
onCanvasReady
()
{
// my.createCanvas({
my
.
createCanvas
({
// id: 'canvas',
id
:
'canvas'
,
// success: (canvas) => {
success
:
(
canvas
)
=>
{
// lottie.setup(canvas);
loadCloud
(
"cloud://4028B2AAA0799F6D94C6A0398B238DE3//开卡效果.json"
,
(
data
)
=>
{
// const context = canvas.getContext('2d')
lottie
.
setup
(
canvas
);
// const { cloud } = getApp();
let
context
=
canvas
.
getContext
(
'2d'
)
// loadCloud("cloud://4028B2AAA0799F6D94C6A0398B238DE3//开卡效果.json", (data)=>{
this
.
ani
=
lottie
.
loadAnimation
({
// let ani = lottie.loadAnimation({
loop
:
false
,
autoplay
:
false
,
// loop: true, autoplay: true,
animationData
:
data
,
// animationData: data,
rendererSettings
:
{
context
:
context
},
// rendererSettings: { context: context, },
})
// })
// this.ani.onComplete=()=>{
// }, ()=>{})
// this.setData({
// }
// showCardBody:true
// });
// })
// },
// }
},
()
=>
{})
},
});
},
/**
/**
* 获取主接口
* 获取主接口
*/
*/
...
@@ -108,7 +107,6 @@ Page({
...
@@ -108,7 +107,6 @@ Page({
DataCenter
.
CollectCardInfo
=
CollectCardInfo
.
data
;
DataCenter
.
CollectCardInfo
=
CollectCardInfo
.
data
;
this
.
setData
({
this
.
setData
({
BaseInfo
,
BaseInfo
,
CollectCardInfo
,
CollectCardInfo
,
...
@@ -163,7 +161,6 @@ Page({
...
@@ -163,7 +161,6 @@ Page({
let
CarouselList
=
await
API
.
getAwardsCarouselList
({
activityId
}).
catch
(
res
=>
{
let
CarouselList
=
await
API
.
getAwardsCarouselList
({
activityId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
let
{
list
}
=
CarouselList
.
data
;
let
{
list
}
=
CarouselList
.
data
;
this
.
setData
({
this
.
setData
({
CarouselListNow
:
list
[
0
]
CarouselListNow
:
list
[
0
]
...
@@ -228,7 +225,6 @@ Page({
...
@@ -228,7 +225,6 @@ Page({
this
.
showPanel
(
"taskpanel"
)
this
.
showPanel
(
"taskpanel"
)
}
}
},
},
/**
/**
* 点击打开弹窗
* 点击打开弹窗
*/
*/
...
@@ -239,7 +235,6 @@ Page({
...
@@ -239,7 +235,6 @@ Page({
//立即翻拍
//立即翻拍
async
doJoin
(){
async
doJoin
(){
//抽卡
//抽卡
this
.
showPanel
(
"getcardpanel"
);
const
{
activityId
}
=
getApp
();
const
{
activityId
}
=
getApp
();
let
doJoin
=
await
API
.
doJoin
({
activityId
}).
catch
(
res
=>
{
let
doJoin
=
await
API
.
doJoin
({
activityId
}).
catch
(
res
=>
{
if
(
res
&&
res
.
code
==
"310003"
){
if
(
res
&&
res
.
code
==
"310003"
){
...
@@ -255,6 +250,8 @@ Page({
...
@@ -255,6 +250,8 @@ Page({
if
(
doJoin
&&
doJoin
.
success
){
if
(
doJoin
&&
doJoin
.
success
){
DataCenter
.
doJoinData
=
doJoin
;
DataCenter
.
doJoinData
=
doJoin
;
this
.
ani
&&
this
.
ani
.
goToAndStop
(
0
);
this
.
ani
&&
this
.
ani
.
play
();
this
.
showPanel
(
"getcardpanel"
);
this
.
showPanel
(
"getcardpanel"
);
}
}
},
},
...
...
taobao_mini/client/pages/pageindexpage/your.acss
View file @
c12fe143
...
@@ -6,7 +6,16 @@
...
@@ -6,7 +6,16 @@
position: relative !important;
position: relative !important;
display: inline-block !important;
display: inline-block !important;
}
}
#canvas{
position:fixed;
top:0;
left:0;
bottom:0;
margin:auto;
width:750rpx;
height:1624rpx;
pointer-events: none;
}
.opacityShow{
.opacityShow{
opacity:1;
opacity:1;
transition: 0.5s;
transition: 0.5s;
...
...
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