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
dc03e799
Commit
dc03e799
authored
Sep 29, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
complete video task and video rewards
parent
2446377f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
77 deletions
+100
-77
commonModalT2.acss
...o_mini/client/components/commonModalT2/commonModalT2.acss
+21
-6
commonModalT2.axml
...o_mini/client/components/commonModalT2/commonModalT2.axml
+13
-9
commonModalT2.js
taobao_mini/client/components/commonModalT2/commonModalT2.js
+23
-18
homePage.axml
taobao_mini/client/pages/homePage/homePage.axml
+1
-1
homePage.js
taobao_mini/client/pages/homePage/homePage.js
+42
-43
No files found.
taobao_mini/client/components/commonModalT2/commonModalT2.acss
View file @
dc03e799
...
@@ -18,10 +18,10 @@
...
@@ -18,10 +18,10 @@
.jiang_li_dan_chuang {
.jiang_li_dan_chuang {
width: 500rpx;
width: 500rpx;
height:
523
rpx;
height:
668
rpx;
opacity: 1;
opacity: 1;
left: 125rpx;
left: 125rpx;
top: calc(50% -
261
rpx);
top: calc(50% -
334
rpx);
position: absolute;
position: absolute;
}
}
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
height: 88rpx;
height: 88rpx;
opacity: 1;
opacity: 1;
left: 31rpx;
left: 31rpx;
bottom: 3
6
rpx;
bottom: 3
0
rpx;
position: absolute;
position: absolute;
}
}
.ji_xu_guan_kan {
.ji_xu_guan_kan {
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
height: 88rpx;
height: 88rpx;
opacity: 1;
opacity: 1;
left: 262rpx;
left: 262rpx;
bottom: 3
6
rpx;
bottom: 3
0
rpx;
position: absolute;
position: absolute;
}
}
.kan_shi_pin_jiang_li {
.kan_shi_pin_jiang_li {
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
line-height: 56rpx;
line-height: 56rpx;
opacity: 1;
opacity: 1;
left: 0;
left: 0;
top:
10
0rpx;
top:
7
0rpx;
position: absolute;
position: absolute;
display: inline-block;
display: inline-block;
font-size: 50rpx;
font-size: 50rpx;
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
line-height: 32rpx;
line-height: 32rpx;
opacity: 1;
opacity: 1;
left: 0;
left: 0;
top:
23
0rpx;
top:
15
0rpx;
text-align: center;
text-align: center;
position: absolute;
position: absolute;
font-size: 32rpx;
font-size: 32rpx;
...
@@ -99,3 +99,18 @@
...
@@ -99,3 +99,18 @@
top: -50rpx;
top: -50rpx;
position: absolute;
position: absolute;
}
}
.commonT2-modal_rewards {
width: 240rpx;
height: 240rpx;
top: 222rpx;
left: 130rpx;
position: absolute;
z-index: 5;
}
.commonT2-modal_rewards_image {
width: 100%;
height: 100%;
}
taobao_mini/client/components/commonModalT2/commonModalT2.axml
View file @
dc03e799
...
@@ -3,21 +3,25 @@
...
@@ -3,21 +3,25 @@
<view class="jiang_li_dan_chuang">
<view class="jiang_li_dan_chuang">
<image class="dan_chuang_bei_jing2" src="{{resList['7203516e-8791-4974-955e-c8a044e16c80'].url}}"/>
<image class="dan_chuang_bei_jing2" src="//yun.duiba.com.cn/spark/assets/弹窗背景.55cabcd27f981e4a20db75b0b9b34069ca196b3a.png"/>
<image class="qu_chou_jiang" src="{{resList['b71e74b5-16ad-4260-a382-8cf200e9e5a7'].url}}" />
<image class="ji_xu_guan_kan" src="{{resList['8da146cc-69cd-41fa-bed3-e7194ce037aa'].url}}" />
<image onTap="onModalOne" class="qu_chou_jiang" src="{{btnImg1}}" />
<image onTap="onModalTwo" class="ji_xu_guan_kan" src="{{btnImg2}}" />
<text class="kan_shi_pin_jiang_li">{{title}}</text>
<text class="kan_shi_pin_jiang_li">{{title}}</text>
<view class="flex_content">
<view class="flex_content">
<view class="huo_de_ya_dun_bi">
<view class="huo_de_ya_dun_bi"
style="top: {{ rewardsImg ? '150rpx' : '270rpx'}}"
>
<text decode="{{true}}">{{
detail
}}</text>
<text decode="{{true}}">{{
content
}}</text>
</view>
</view>
<view class="tu_ceng40" a:if="{{}}">
<image class="flex_content_image" src="{{}}" />
<text>+{{coins}}</text>
</view>
</view>
</view>
<view a:if="{{rewardsImg}}" class="commonT2-modal_rewards">
<image class="commonT2-modal_rewards_image" src="{{rewardsImg}}" mode="aspectFill" />
</view>
<image
<image
class="an_niu_guan_bi_dan_chuang_kao_bei23" onTap="onModalClose"
class="an_niu_guan_bi_dan_chuang_kao_bei23" onTap="onModalClose"
src="{{resList['4abc8bb6-5779-49ad-84b4-b4ade4f51fcb'].url}}"
src="{{resList['4abc8bb6-5779-49ad-84b4-b4ade4f51fcb'].url}}"
...
...
taobao_mini/client/components/commonModalT2/commonModalT2.js
View file @
dc03e799
...
@@ -4,36 +4,37 @@ Component({
...
@@ -4,36 +4,37 @@ Component({
data
:
{
data
:
{
resList
:
resList
,
resList
:
resList
,
title
:
''
,
title
:
''
,
detail
:
''
,
content
:
''
,
hasYDCoin
:
false
,
coins
:
0
,
coins
:
0
btnImg1
:
''
,
btnImg2
:
''
,
rewardsImg
:
''
},
},
props
:
{
props
:
{
title
:
''
,
title
:
''
,
detail
:
''
,
content
:
''
,
hasYDCoin
:
false
,
coins
:
0
coins
:
0
},
},
didMount
()
{
didMount
()
{
this
.
setData
({
this
.
setData
({
title
:
this
.
props
.
data
.
title
,
title
:
this
.
props
.
data
.
title
,
detail
:
this
.
props
.
data
.
detail
,
content
:
this
.
props
.
data
.
content
,
hasYDCoin
:
this
.
props
.
data
.
hasYDCoin
btnImg1
:
this
.
props
.
data
.
btnImg1
,
btnImg2
:
this
.
props
.
data
.
btnImg2
,
rewardsImg
:
this
.
props
.
data
.
rewardsImg
})
})
},
},
didUpdate
(
prevProps
,
prevData
)
{
didUpdate
(
prevProps
,
prevData
)
{
if
(
this
.
props
.
data
.
title
!==
prevData
.
data
.
title
||
this
.
props
.
data
.
detail
!==
prevData
.
data
.
detail
)
{
if
(
this
.
props
.
data
.
title
!==
prevData
.
title
||
this
.
props
.
data
.
content
!==
prevData
.
content
)
{
this
.
setData
({
this
.
setData
({
title
:
this
.
props
.
data
.
title
,
title
:
this
.
props
.
data
.
title
,
detail
:
this
.
props
.
data
.
detail
content
:
this
.
props
.
data
.
content
,
})
btnImg1
:
this
.
props
.
data
.
btnImg1
,
}
btnImg2
:
this
.
props
.
data
.
btnImg2
,
if
(
this
.
props
.
data
.
hasYDCoin
!==
prevData
.
data
.
hasYDCoin
)
{
rewardsImg
:
this
.
props
.
data
.
rewardsImg
this
.
setData
({
hasYDCoin
:
this
.
props
.
data
.
hasYDCoin
})
})
}
}
},
},
...
@@ -43,9 +44,13 @@ Component({
...
@@ -43,9 +44,13 @@ Component({
const
{
onModalClose
}
=
this
.
props
;
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
onModalClose
&&
onModalClose
();
},
},
onModalConfirm
()
{
onModalOne
()
{
const
{
onModalConfirm
}
=
this
.
props
;
const
{
onModalOne
}
=
this
.
props
;
onModalConfirm
&&
onModalClose
();
onModalOne
&&
onModalOne
();
}
},
onModalTwo
()
{
const
{
onModalTwo
}
=
this
.
props
;
onModalTwo
&&
onModalTwo
();
},
}
}
});
});
\ No newline at end of file
taobao_mini/client/pages/homePage/homePage.axml
View file @
dc03e799
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
<!-- 弹窗部分 -->
<!-- 弹窗部分 -->
<common-modal-t1 a:if="{{commonModalVisibleT1}}" data="{{commonModalDataT1}}" onModalClose="closeCommonModalT1" onModalConfirm="confirmCommonModalT1" />
<common-modal-t1 a:if="{{commonModalVisibleT1}}" data="{{commonModalDataT1}}" onModalClose="closeCommonModalT1" onModalConfirm="confirmCommonModalT1" />
<common-modal-t2 a:if="{{commonModalVisibleT2}}" data="{{commonModalDataT2}}" onModalClose="closeCommonModalT2" onModal
Confirm="confirmCommonModalT2"
/>
<common-modal-t2 a:if="{{commonModalVisibleT2}}" data="{{commonModalDataT2}}" onModalClose="closeCommonModalT2" onModal
One="onModalT2One" onModalTwo="onModalT2Two"
/>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal" text="{{rule}}"></rule-modal>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal" text="{{rule}}"></rule-modal>
<rewards-modal a:if="{{rewardsModalVisible}}" onModalClose="closeRewardsModal"></rewards-modal>
<rewards-modal a:if="{{rewardsModalVisible}}" onModalClose="closeRewardsModal"></rewards-modal>
...
...
taobao_mini/client/pages/homePage/homePage.js
View file @
dc03e799
...
@@ -80,7 +80,8 @@ Page({
...
@@ -80,7 +80,8 @@ Page({
gameType
:
0
,
gameType
:
0
,
commonModalConfirmT1
:
null
,
commonModalConfirmT1
:
null
,
commonModalVisibleT1
:
false
,
commonModalVisibleT1
:
false
,
commonModalConfirmT2
:
null
,
onModalT2One
:
null
,
onModalT2Two
:
null
,
commonModalVisibleT2
:
false
,
commonModalVisibleT2
:
false
,
ruleModalVisible
:
false
,
ruleModalVisible
:
false
,
rewardsModalVisible
:
false
,
rewardsModalVisible
:
false
,
...
@@ -173,26 +174,27 @@ Page({
...
@@ -173,26 +174,27 @@ Page({
}
}
})
})
.
catch
(
res
=>
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
.
catch
(
res
=>
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
this
.
checkDohelp
();
this
.
checkDohelp
();
},
},
checkDohelp
(){
if
(
this
.
inviteId
)
{
// 助力
//是分享落地页,可以助力
checkDohelp
(){
//todo 需要判断是不是会员
if
(
this
.
inviteId
)
{
commonToast
(
'准备5秒后给邀请者助力~'
);
//是分享落地页,可以助力
setTimeout
(()
=>
{
//todo 需要判断是不是会员
API
.
doHelp
({
activityId
:
app
.
activityId
,
inviteId
:
this
.
inviteId
}).
then
(
res
=>
{
commonToast
(
'准备5秒后给邀请者助力~'
);
commonToast
(
'助力成功~'
);
setTimeout
(()
=>
{
}).
catch
(
err
=>
{
API
.
doHelp
({
activityId
:
app
.
activityId
,
inviteId
:
this
.
inviteId
}).
then
(
res
=>
{
commonToast
(
JSON
.
stringify
(
err
));
commonToast
(
'助力成功~'
);
});
}).
catch
(
err
=>
{
},
5000
);
commonToast
(
JSON
.
stringify
(
err
));
}
else
{
});
commonToast
(
'不是分享落地页,不需要走助力~'
)
},
5000
);
}
}
else
{
},
commonToast
(
'不是分享落地页,不需要走助力~'
)
}
},
// 新用户/被邀请的 逻辑
// 新用户/被邀请的 逻辑
...
@@ -260,9 +262,6 @@ Page({
...
@@ -260,9 +262,6 @@ Page({
// 页面显示
// 页面显示
onShow
()
{
onShow
()
{
if
(
this
.
userLogin
)
this
.
getGameInfo
()
if
(
this
.
userLogin
)
this
.
getGameInfo
()
if
(
this
.
isNewUser
&&
this
.
inviteId
&&
this
.
isVip
)
{
}
},
},
// 获取 游戏门票 抽奖次数 今日是否首次登陆
// 获取 游戏门票 抽奖次数 今日是否首次登陆
...
@@ -403,7 +402,8 @@ Page({
...
@@ -403,7 +402,8 @@ Page({
videoHideFunc
()
{
videoHideFunc
()
{
console
.
log
(
'videoHideFunc'
)
console
.
log
(
'videoHideFunc'
)
this
.
setData
({
videoShow
:
false
})
this
.
setData
({
videoShow
:
false
})
if
(
this
.
videoSrcArr
[
this
.
data
.
videoActiveIndex
].
timeStamp
>=
15
)
{
if
(
this
.
videoSrcArr
[
this
.
data
.
videoActiveIndex
].
timeStamp
>=
15
&&
!
this
.
videoSrcArr
[
this
.
data
.
videoActiveIndex
].
completed
)
{
this
.
videoSrcArr
[
this
.
data
.
videoActiveIndex
].
completed
=
true
this
.
getWatchRewards
()
this
.
getWatchRewards
()
}
}
},
},
...
@@ -418,16 +418,17 @@ Page({
...
@@ -418,16 +418,17 @@ Page({
title
:
'看视频奖励'
,
title
:
'看视频奖励'
,
content
:
`抽奖次数+
${
data
.
lotteryTimes
}
`
,
content
:
`抽奖次数+
${
data
.
lotteryTimes
}
`
,
confirmCallback1
:
()
=>
{
confirmCallback1
:
()
=>
{
navigateToOutside
(
app
.
vipUrl
)
this
.
gotoTurnTable
(
)
},
},
confirmCallback2
:
()
=>
{
confirmCallback2
:
()
=>
{
navigateToOutside
(
app
.
vipUrl
)
this
.
closeCommonModalT2
(
)
},
},
btnImg1
:
'//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png'
,
btnImg1
:
'//yun.duiba.com.cn/spark/assets/3d33327ff5974c06f1be66942b315339f310fac9.png'
,
btnImg2
:
'//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png'
,
btnImg2
:
'//yun.duiba.com.cn/spark/assets/b64ab7dbde250c686b9cc8346509ea6fc23e2a99.png'
,
rewardsImg
:
''
})
})
}
else
{
}
else
{
commonToast
(
'网络开小差啦'
)
}
}
})
})
},
},
...
@@ -442,9 +443,7 @@ Page({
...
@@ -442,9 +443,7 @@ Page({
// video - onLoading
// video - onLoading
onLoading
(
e
)
{
console
.
log
(
e
)
},
onLoading
(
e
)
{
console
.
log
(
e
)
},
gotoMyPrizePage
()
{
gotoMyPrizePage
()
{
my
.
navigateTo
({
url
:
'../myprize/myprize'
})
},
my
.
navigateTo
({
url
:
'../myprize/myprize'
})
},
// 跳转到天猫页面
// 跳转到天猫页面
goTmallPage
()
{
navigateToOutside
(
REDIRECT_URL
[
'tmall'
]);
},
goTmallPage
()
{
navigateToOutside
(
REDIRECT_URL
[
'tmall'
]);
},
...
@@ -476,21 +475,21 @@ Page({
...
@@ -476,21 +475,21 @@ Page({
})
})
},
},
// 显示通用弹层
// 显示通用弹层
showCommonMoadalT2
({
showCommonMoadalT2
(
obj
)
{
title
=
'test- title'
,
let
{
title
,
content
,
confirmCallback1
,
confirmCallback2
,
btnImg1
,
btnImg2
,
rewardsImg
}
=
obj
content
=
'test- content'
,
confirmCallback
,
btnImg
=
'//yun.duiba.com.cn/spark/assets/32d8536184c3539c0d9655d03c1b60f3d5e1f60a.png'
})
{
this
.
setData
({
this
.
setData
({
commonModalVisibleT2
:
true
,
commonModalVisibleT2
:
true
,
commonModalDataT2
:
{
title
,
content
,
btnImg
},
commonModalDataT2
:
{
title
,
content
,
btnImg1
,
btnImg2
,
rewardsImg
},
confirmCommonModalT2
:
()
=>
{
onModalT2One
:
()
=>
{
confirmCallback1
()
},
confirmCallback
()
onModalT2Two
:
()
=>
{
confirmCallback2
()
}
this
.
closeCommonModalT2
()
}
})
})
},
},
onModalT2One
()
{
this
.
data
.
onModalT2One
()
},
onModalT2Two
()
{
this
.
data
.
onModalT2Two
()
},
confirmCommonModalT1
()
{
this
.
data
.
confirmCommonModalT1
()
},
// 弹窗控制 - 关闭
// 弹窗控制 - 关闭
closeRuleModal
()
{
this
.
setData
({
ruleModalVisible
:
false
})
},
closeRuleModal
()
{
this
.
setData
({
ruleModalVisible
:
false
})
},
closeRewardsModal
()
{
this
.
setData
({
rewardsModalVisible
:
false
})
},
closeRewardsModal
()
{
this
.
setData
({
rewardsModalVisible
:
false
})
},
...
...
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