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
5100ac8e
Commit
5100ac8e
authored
Oct 01, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new code --04
parent
b973aeff
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
271 additions
and
34 deletions
+271
-34
resCanvasListCsd.js
project/src/canvas/game/resCanvasListCsd.js
+18
-0
Root.ts
project/src/canvas/game/src/chuansongdai/Root.ts
+24
-1
ScoreBoard.ts
project/src/canvas/game/src/chuansongdai/game/ScoreBoard.ts
+1
-1
app.js
taobao_mini/client/app.js
+2
-0
comMissionModal.axml
...ni/client/components/comMissionModal/comMissionModal.axml
+7
-7
comMissionModal.js
...mini/client/components/comMissionModal/comMissionModal.js
+10
-10
newUserModal.acss
taobao_mini/client/components/newUserModal/newUserModal.acss
+99
-0
newUserModal.axml
taobao_mini/client/components/newUserModal/newUserModal.axml
+18
-0
newUserModal.js
taobao_mini/client/components/newUserModal/newUserModal.js
+16
-0
newUserModal.json
taobao_mini/client/components/newUserModal/newUserModal.json
+3
-0
homePage.axml
taobao_mini/client/pages/homePage/homePage.axml
+1
-0
homePage.js
taobao_mini/client/pages/homePage/homePage.js
+42
-13
homePage.json
taobao_mini/client/pages/homePage/homePage.json
+2
-1
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+14
-0
resList.js
taobao_mini/client/resconfig/resList.js
+14
-1
No files found.
project/src/canvas/game/resCanvasListCsd.js
View file @
5100ac8e
...
@@ -124,6 +124,24 @@ const resCanvasListCsd = {
...
@@ -124,6 +124,24 @@ const resCanvasListCsd = {
ext
:
'.png'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/传送带左边传送带.9ecaa198fe5be733f7de4f917aac0d8a8474aa0b.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/传送带左边传送带.9ecaa198fe5be733f7de4f917aac0d8a8474aa0b.png'
,
uuid
:
'2137d3de-174f-42b1-8ebc-c5eb667ed250'
uuid
:
'2137d3de-174f-42b1-8ebc-c5eb667ed250'
},
'828f6676-7956-473a-a951-bc2f5f1ba8a3'
:
{
name
:
'csd引导1'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/csd引导1.d0aed3a62df5cbac7680a56fb8fd3403e76abe1f.png'
,
uuid
:
'828f6676-7956-473a-a951-bc2f5f1ba8a3'
},
'bc6aa86d-7cd8-4a11-9bd1-931040af3c6e'
:
{
name
:
'csd引导2'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/csd引导2.17f2a21407b5e055d93595f63c9c23d029828ab9.png'
,
uuid
:
'bc6aa86d-7cd8-4a11-9bd1-931040af3c6e'
},
'0668f8d0-6fb3-46f9-a5e4-952aef42f05c'
:
{
name
:
'csd引导3'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/csd引导3.3cb22a085628a6e43b4e13182c1a26c1ec4c259d.png'
,
uuid
:
'0668f8d0-6fb3-46f9-a5e4-952aef42f05c'
}
}
};
};
export
default
resCanvasListCsd
;
export
default
resCanvasListCsd
;
\ No newline at end of file
project/src/canvas/game/src/chuansongdai/Root.ts
View file @
5100ac8e
import
{
RES
}
from
"../../module/RES"
import
{
RES
}
from
"../../module/RES"
import
resCanvasList
from
'../../resCanvasList'
import
resCanvasList
from
'../../resCanvasList'
import
resCanvasListCsd
from
'../../resCanvasListCsd'
import
{
Ins
}
from
"../Ins"
;
import
{
GDispatcher
,
Main
}
from
'./../Main'
;
import
{
GDispatcher
,
Main
}
from
'./../Main'
;
import
ScoreBoard
from
'./game/ScoreBoard'
import
ScoreBoard
from
'./game/ScoreBoard'
import
{
changeScene
,
showPanel
}
from
"../../module/ctrls"
;
import
{
changeScene
,
showPanel
}
from
"../../module/ctrls"
;
...
@@ -34,6 +36,9 @@ export default class Root extends FYGE.Container {
...
@@ -34,6 +36,9 @@ export default class Root extends FYGE.Container {
touchXStart
:
number
touchXStart
:
number
touchYStart
:
number
touchYStart
:
number
//引导页
guideRes
=
[
"828f6676-7956-473a-a951-bc2f5f1ba8a3"
,
"bc6aa86d-7cd8-4a11-9bd1-931040af3c6e"
,
"0668f8d0-6fb3-46f9-a5e4-952aef42f05c"
]
time
:
number
=
0
// 游戏时间 倒计时 时长
time
:
number
=
0
// 游戏时间 倒计时 时长
...
@@ -70,7 +75,25 @@ export default class Root extends FYGE.Container {
...
@@ -70,7 +75,25 @@ export default class Root extends FYGE.Container {
const
userInfoRes
=
await
sendTbNet
(
TbNetName
.
getUserInfo
,
{})
const
userInfoRes
=
await
sendTbNet
(
TbNetName
.
getUserInfo
,
{})
this
.
userInfo
=
userInfoRes
.
data
this
.
userInfo
=
userInfoRes
.
data
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
)
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
)
showPanel
(
MatchingPanel
,
this
.
userInfo
)
if
(
this
.
userInfo
.
isNewUser
)
{
let
i
=
0
let
guide
=
Ins
.
initSprite
(
this
.
guideRes
[
i
])
guide
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
i
++
if
(
i
>
this
.
guideRes
.
length
-
1
)
{
guide
.
visible
=
false
setTimeout
(()
=>
{
showPanel
(
MatchingPanel
,
this
.
userInfo
)
},
200
)
}
else
{
guide
.
texture
=
Ins
.
getRes
(
this
.
guideRes
[
i
])
}
},
this
)
this
.
addChild
(
guide
)
}
else
{
showPanel
(
MatchingPanel
,
this
.
userInfo
)
}
// this.gameStart()
// this.gameStart()
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
)
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
)
...
...
project/src/canvas/game/src/chuansongdai/game/ScoreBoard.ts
View file @
5100ac8e
...
@@ -110,7 +110,7 @@ export default class Catecher extends FYGE.Container {
...
@@ -110,7 +110,7 @@ export default class Catecher extends FYGE.Container {
// 分数大于 3
// 分数大于 3
if
(
scoreNow
!==
0
&&
scoreNow
>
3
)
{
if
(
scoreNow
!==
0
&&
scoreNow
>
3
)
{
console
.
log
(
scoreNow
-
this
.
scoreLeft
)
//
console.log(scoreNow - this.scoreLeft)
// 随机 加 3分 或 1分
// 随机 加 3分 或 1分
if
(
scoreNow
-
this
.
scoreLeft
>=
3
)
{
if
(
scoreNow
-
this
.
scoreLeft
>=
3
)
{
if
(
scoreNow
-
this
.
scoreRight
<=
30
)
{
if
(
scoreNow
-
this
.
scoreRight
<=
30
)
{
...
...
taobao_mini/client/app.js
View file @
5100ac8e
...
@@ -11,6 +11,8 @@ App({
...
@@ -11,6 +11,8 @@ App({
cloudName
:
'yd'
,
// 主云函数项目名 base clientTemplate2C
cloudName
:
'yd'
,
// 主云函数项目名 base clientTemplate2C
cloud
,
cloud
,
tbcc
,
tbcc
,
// 用户 opneId
openId
:
''
,
// 店铺id
// 店铺id
sellerId
:
'1818112088'
,
sellerId
:
'1818112088'
,
// 加入会员页面
// 加入会员页面
...
...
taobao_mini/client/components/comMissionModal/comMissionModal.axml
View file @
5100ac8e
...
@@ -15,22 +15,22 @@
...
@@ -15,22 +15,22 @@
<view class="mission_content">
<view class="mission_content">
<view class="mission_title">{{item.taskNameActiv}}</view>
<view class="mission_title">{{item.taskNameActiv}}</view>
<view a:if="{{item.t
ype === 'moneyGoods'}}" class="
">每支付1笔定金乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
<view a:if="{{item.t
askType === 'moneyGoods'}}" class="mission_describe
">每支付1笔定金乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
<view a:if="{{item.t
ype === 'invites'}}" class="
">每邀请1名好友入会乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
<view a:if="{{item.t
askType === 'invites'}}" class="mission_describe
">每邀请1名好友入会乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
<view a:if="{{item.t
ype === 'orderGoods'}}" class="
">每完成1笔下单乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
<view a:if="{{item.t
askType === 'orderGoods'}}" class="mission_describe
">每完成1笔下单乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
<view a:if="{{item.t
ype === 'moneyGoods' && item.type !== 'invites' && item.t
ype !== 'orderGoods'}}"
<view a:if="{{item.t
askType !== 'moneyGoods' && item.taskType !== 'invites' && item.taskT
ype !== 'orderGoods'}}"
class="mission_describe">乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
class="mission_describe">乐园门票<text class="mission_describe_hightlight">+{{item.rewards}}</text></view>
</view>
</view>
<view class="mission_btn {{ item.status === 1 ? 'mission_btn_active' : '' }}"
<view class="mission_btn {{ item.status === 1 ? 'mission_btn_active' : '' }}"
data-type="{{item.taskType}}" data-status="{{item.status}}" data-itemIds="{{item.itemIds}}" data-info="{{item}}" onTap="doTaskByType">
data-t
askT
ype="{{item.taskType}}" data-status="{{item.status}}" data-itemIds="{{item.itemIds}}" data-info="{{item}}" onTap="doTaskByType">
<text a:if="{{item.status === 1}}" class="mission_btn_text">{{item.btnText}}</text>
<text a:if="{{item.status === 1}}" class="mission_btn_text">{{item.btnText}}</text>
<text a:if="{{item.status === 2}}" class="mission_btn_text">待领取</text>
<text a:if="{{item.status === 2}}" class="mission_btn_text">待领取</text>
<text a:if="{{item.status === 3}}" class="mission_btn_text">已完成</text>
<text a:if="{{item.status === 3}}" class="mission_btn_text">已完成</text>
<!-- 如果测试 这里 关注店铺 任务有bug
<!-- 如果测试 这里 关注店铺 任务有bug
<text a:if="{{item.status === 2 && item.type === 'follow'}}" class="mission_btn_text">待领取</text>
<text a:if="{{item.status === 2 && item.t
askT
ype === 'follow'}}" class="mission_btn_text">待领取</text>
<text a:if="{{item.status === 3 && item.type !== 'follow'}}" class="mission_btn_text">已完成</text>
<text a:if="{{item.status === 3 && item.t
askT
ype !== 'follow'}}" class="mission_btn_text">已完成</text>
-->
-->
<view a:if="{{item.taskType === 'invites'}}" class="mission_invite_tips">{{item.completeTimes}}个好友为你助力成功</view>
<view a:if="{{item.taskType === 'invites'}}" class="mission_invite_tips">{{item.completeTimes}}个好友为你助力成功</view>
...
...
taobao_mini/client/components/comMissionModal/comMissionModal.js
View file @
5100ac8e
...
@@ -108,7 +108,7 @@ Component({
...
@@ -108,7 +108,7 @@ Component({
doTaskByType
(
e
)
{
doTaskByType
(
e
)
{
let
ds
=
e
.
currentTarget
.
dataset
let
ds
=
e
.
currentTarget
.
dataset
if
(
ds
.
status
===
1
)
{
if
(
ds
.
status
===
1
)
{
switch
(
ds
.
type
)
{
switch
(
ds
.
t
askT
ype
)
{
case
"moneyGoods"
:
case
"moneyGoods"
:
this
.
gotoFrontOrderGoods
(
ds
.
itemIds
)
this
.
gotoFrontOrderGoods
(
ds
.
itemIds
)
break
;
break
;
...
@@ -119,7 +119,7 @@ Component({
...
@@ -119,7 +119,7 @@ Component({
this
.
gotoBrowseGoods
(
ds
.
itemIds
)
this
.
gotoBrowseGoods
(
ds
.
itemIds
)
break
;
break
;
case
"jumpLink"
:
case
"jumpLink"
:
this
.
gotoJumpLink
()
this
.
gotoJumpLink
(
ds
.
info
.
url
)
break
;
break
;
case
"orderGoods"
:
case
"orderGoods"
:
this
.
gotoOrderGoods
(
ds
.
itemIds
)
this
.
gotoOrderGoods
(
ds
.
itemIds
)
...
@@ -128,21 +128,21 @@ Component({
...
@@ -128,21 +128,21 @@ Component({
this
.
gotoFollow
()
this
.
gotoFollow
()
break
;
break
;
case
"member"
:
case
"member"
:
this
.
gotoMember
()
this
.
gotoMember
(
ds
.
info
.
url
)
break
;
break
;
default
:
default
:
break
;
break
;
}
}
}
else
if
(
ds
.
status
===
2
)
{
}
else
if
(
ds
.
status
===
2
)
{
// 如果测试 这里 关注店铺 任务有bug
// 如果测试 这里 关注店铺 任务有bug
// } else if (ds.status === 2 || (ds.status === 3 && ds.type === 'follow')) {
// } else if (ds.status === 2 || (ds.status === 3 && ds.t
askT
ype === 'follow')) {
API
.
receiveTaskRewards
({
activityId
:
app
.
activityId
,
taskType
:
ds
.
type
})
API
.
receiveTaskRewards
({
activityId
:
app
.
activityId
,
taskType
:
ds
.
t
askT
ype
})
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
success
,
message
,
data
}
=
res
const
{
success
,
message
,
data
}
=
res
if
(
!
success
)
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
)
}
if
(
!
success
)
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
)
}
else
{
else
{
console
.
log
(
'%c--------领取成功
\
n'
+
'-----yd.receiveTaskRewards
\
n'
,
ConsoleStyle
,
data
)
console
.
log
(
'%c--------领取成功
\
n'
+
'-----yd.receiveTaskRewards
\
n'
,
ConsoleStyle
,
data
)
if
(
ds
.
type
===
'invites'
)
{
if
(
ds
.
t
askT
ype
===
'invites'
)
{
commonToast
(
`已有
${
ds
.
info
.
todayCompleteTimes
}
位还有为你助力,获得次数,乐园门票+
${
Number
(
ds
.
info
.
todayCompleteTimes
)
*
Number
(
ds
.
info
.
rewards
)}
`
)
commonToast
(
`已有
${
ds
.
info
.
todayCompleteTimes
}
位还有为你助力,获得次数,乐园门票+
${
Number
(
ds
.
info
.
todayCompleteTimes
)
*
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
{
}
else
{
commonToast
(
'领取成功'
)
commonToast
(
'领取成功'
)
...
@@ -176,8 +176,8 @@ Component({
...
@@ -176,8 +176,8 @@ Component({
},
},
// 看直播
// 看直播
gotoJumpLink
()
{
gotoJumpLink
(
url
)
{
navigateToOutside
(
app
.
liveU
rl
)
navigateToOutside
(
u
rl
)
},
},
// 完成下单商品
// 完成下单商品
...
@@ -204,8 +204,8 @@ Component({
...
@@ -204,8 +204,8 @@ Component({
},
},
// 成为会员
// 成为会员
gotoMember
()
{
gotoMember
(
url
)
{
navigateToOutside
(
app
.
vipU
rl
)
navigateToOutside
(
u
rl
)
},
},
// 跳转商品详情页
// 跳转商品详情页
...
...
taobao_mini/client/components/newUserModal/newUserModal.acss
0 → 100644
View file @
5100ac8e
.newUser-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
}
.newUser-modal__shade {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.75);
}
.newUser-modal__container {
position: absolute;
width: 470rpx;
height: 524rpx;
background-size: 100% 100%;
left: calc(50% - 235rpx);
top: calc(50% - 262rpx);
}
.newUser-modal__container_bgimage {
width: 100%;
left: 0;
top: 0;
height: 100%;
position: absolute;
z-index: 0;
}
.newUser-modal__bd {
position: absolute;
top: 40rpx;
left: 40rpx;
right: 40rpx;
bottom: 40rpx;
overflow-x: hidden;
font-size: 24rpx;
color: #fff;
line-height: 1.5;
z-index: 10;
overflow: hidden;
}
.newUser-modal__bd_title {
color: #f26267;
font-size: 32rpx;
font-weight: bold;
text-align: center;
width: 100%;
margin-top: 44rpx;
line-height: 66rpx;
height: 66rpx;
}
.newUser-modal__bd_content {
width: 100%;
text-align: center;
color: #000;
margin-top: 210rpx;
font-size: 26rpx;
height: 40rpx;
line-height: 40rpx;
}
.newUser-modal__bd_know {
width: 280rpx;
height: 65rpx;
position: absolute;
bottom: 22rpx;
left: 95rpx;
z-index: 10;
}
.newUser-modal__bd_know_image {
width: 100%;
height: 100%;
}
.newUser-modal__close {
position: absolute;
right: -20rpx;
top: -40rpx;
height: 60rpx;
width: 60rpx;
background-size: 48rpx 48rpx;
z-index: 9;
}
.newUser-modal__close_image {
width: 60rpx;
height: 60rpx;
}
taobao_mini/client/components/newUserModal/newUserModal.axml
0 → 100644
View file @
5100ac8e
<view class="newUser-modal">
<view class="newUser-modal__shade modal-animate-fade-in" />
<view class="newUser-modal__container modal-animate-zoom-in">
<image class="newUser-modal__container_bgimage" src="{{resList['210f6fd2-04c8-4779-a9f1-a1d92bf7ba90'].url}}" mode="aspectFill" />
<view class="newUser-modal__close" onTap="onModalClose">
<image class="newUser-modal__close_image" src="//yun.duiba.com.cn/spark/assets/弹窗2关闭.478515dc464257d3f3e7c09b760b30e35d439a20.png" mode="aspectFill" />
</view>
<view class="newUser-modal__bd">
<view class="newUser-modal__bd_title">欢迎光临</view>
<view class="newUser-modal__bd_content">
<text>有机会获得清空购物车大奖哦</text>
</view>
</view>
<view class="newUser-modal__bd_know" onTap="onModalClose">
<image class="newUser-modal__bd_know_image" src="{{resList['392bf401-3882-4f55-95c5-c9265a229b32'].url}}" mode="aspectFill" />
</view>
</view>
</view>
taobao_mini/client/components/newUserModal/newUserModal.js
0 → 100644
View file @
5100ac8e
import
resList
from
'../../resconfig/resList'
Component
({
data
:
{
resList
:
resList
},
props
:
{},
didMount
()
{},
didUpdate
()
{},
methods
:
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
}
}
});
\ No newline at end of file
taobao_mini/client/components/newUserModal/newUserModal.json
0 → 100644
View file @
5100ac8e
{
"component"
:
true
}
taobao_mini/client/pages/homePage/homePage.axml
View file @
5100ac8e
...
@@ -124,6 +124,7 @@
...
@@ -124,6 +124,7 @@
<common-modal-t2 a:if="{{commonModalVisibleT2}}" data="{{commonModalDataT2}}" onModalClose="closeCommonModalT2" onModalOne="onModalT2One" onModalTwo="onModalT2Two"/>
<common-modal-t2 a:if="{{commonModalVisibleT2}}" data="{{commonModalDataT2}}" onModalClose="closeCommonModalT2" onModalOne="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>
<newuser-modal a:if="{{newUserModalVisible}}" onModalClose="closeNewUserModal"></newuser-modal>
<rewards-modal a:if="{{rewardsModalVisible}}" onModalClose="closeRewardsModal"></rewards-modal>
<rewards-modal a:if="{{rewardsModalVisible}}" onModalClose="closeRewardsModal"></rewards-modal>
<prizes-modal a:if="{{prizesModalVisible}}" onModalClose="closePrizesModal"></prizes-modal>
<prizes-modal a:if="{{prizesModalVisible}}" onModalClose="closePrizesModal"></prizes-modal>
<mission-modal a:if="{{missionModalVisible}}" onModalClose="closeMissionModal" onRefreshGameInfo="getGameInfo"></mission-modal>
<mission-modal a:if="{{missionModalVisible}}" onModalClose="closeMissionModal" onRefreshGameInfo="getGameInfo"></mission-modal>
taobao_mini/client/pages/homePage/homePage.js
View file @
5100ac8e
...
@@ -81,6 +81,7 @@ Page({
...
@@ -81,6 +81,7 @@ Page({
onModalT2Two
:
null
,
onModalT2Two
:
null
,
commonModalVisibleT2
:
false
,
commonModalVisibleT2
:
false
,
ruleModalVisible
:
false
,
ruleModalVisible
:
false
,
newUserModalVisible
:
false
,
rewardsModalVisible
:
false
,
rewardsModalVisible
:
false
,
prizesModalVisible
:
false
,
prizesModalVisible
:
false
,
missionModalVisible
:
false
,
missionModalVisible
:
false
,
...
@@ -136,6 +137,12 @@ Page({
...
@@ -136,6 +137,12 @@ Page({
app
.
openId
=
data
.
openId
app
.
openId
=
data
.
openId
this
.
isNewUser
=
data
.
isNewUser
this
.
isNewUser
=
data
.
isNewUser
// 首次进入 弹出活动规则
if
(
this
.
isNewUser
)
this
.
showNewUserModal
()
// 检测是否参与过 消消乐 和 传送带游戏
this
.
checkNewUserInGame
()
this
.
getGameInfo
()
this
.
getGameInfo
()
this
.
init
(
data
);
this
.
init
(
data
);
...
@@ -276,7 +283,7 @@ Page({
...
@@ -276,7 +283,7 @@ Page({
// 用户今日首次进入
// 用户今日首次进入
userFirstInToday
()
{
userFirstInToday
()
{
// 自动播放视频
// 自动播放视频
this
.
videoShowFunc
()
//
this.videoShowFunc()
},
},
// 分享
// 分享
...
@@ -288,10 +295,7 @@ Page({
...
@@ -288,10 +295,7 @@ Page({
},
},
// 页面加载完成
// 页面加载完成
onReady
()
{
onReady
()
{
this
.
videoCtx
=
my
.
createVideoContext
(
'videoCtx'
)
},
this
.
videoCtx
=
my
.
createVideoContext
(
'videoCtx'
)
this
.
videoCtx
.
play
()
},
// 页面显示
// 页面显示
onShow
()
{
if
(
this
.
userLogin
)
this
.
getGameInfo
()
},
onShow
()
{
if
(
this
.
userLogin
)
this
.
getGameInfo
()
},
...
@@ -310,9 +314,9 @@ Page({
...
@@ -310,9 +314,9 @@ Page({
drawNum
:
data
.
lotteryTimes
,
drawNum
:
data
.
lotteryTimes
,
// ticketNum: 1,
// ticketNum: 1,
// drawNum: 1,
// drawNum: 1,
todayFirstLogin
:
data
.
todayFirstLogin
//
todayFirstLogin: data.todayFirstLogin
})
})
if
(
this
.
data
.
todayFirstLogin
)
this
.
userFirstInToday
()
//
if (this.data.todayFirstLogin) this.userFirstInToday()
}
}
resolve
(
'complete'
)
resolve
(
'complete'
)
})
})
...
@@ -515,6 +519,7 @@ Page({
...
@@ -515,6 +519,7 @@ Page({
showPrizesModal
()
{
this
.
setData
({
prizesModalVisible
:
true
})
},
showPrizesModal
()
{
this
.
setData
({
prizesModalVisible
:
true
})
},
showMissionModal
()
{
this
.
setData
({
missionModalVisible
:
true
})
},
showMissionModal
()
{
this
.
setData
({
missionModalVisible
:
true
})
},
showNewUserModal
()
{
this
.
setData
({
newUserModalVisible
:
true
})
},
// 显示通用弹层
// 显示通用弹层
showCommonMoadalT1
({
showCommonMoadalT1
({
...
@@ -548,15 +553,30 @@ Page({
...
@@ -548,15 +553,30 @@ Page({
confirmCommonModalT1
()
{
this
.
data
.
confirmCommonModalT1
()
},
confirmCommonModalT1
()
{
this
.
data
.
confirmCommonModalT1
()
},
// 弹窗控制 - 关闭
// 弹窗控制 - 关闭
closeRuleModal
()
{
this
.
setData
({
ruleModalVisible
:
false
})
},
closeRuleModal
()
{
this
.
setData
({
ruleModalVisible
:
false
})
},
closeRewardsModal
()
{
this
.
setData
({
rewardsModalVisible
:
false
})
},
closeNewUserModal
()
{
this
.
setData
({
newUserModalVisible
:
false
})
},
closePrizesModal
()
{
this
.
setData
({
prizesModalVisible
:
false
})
},
closeRewardsModal
()
{
closeMissionModal
()
{
this
.
setData
({
missionModalVisible
:
false
})
},
this
.
setData
({
rewardsModalVisible
:
false
})
this
.
getGameInfo
()
},
closePrizesModal
()
{
this
.
setData
({
prizesModalVisible
:
false
})
this
.
getGameInfo
()
},
closeMissionModal
()
{
this
.
setData
({
missionModalVisible
:
false
})
this
.
getGameInfo
()
},
// 通用弹层 - 关闭 - T1
// 通用弹层 - 关闭 - T1
closeCommonModalT1
()
{
this
.
setData
({
commonModalVisibleT1
:
false
});
},
closeCommonModalT1
()
{
this
.
setData
({
commonModalVisibleT1
:
false
});
this
.
getGameInfo
()
},
// 通用弹层 - 关闭 - T2
// 通用弹层 - 关闭 - T2
closeCommonModalT2
()
{
this
.
setData
({
commonModalVisibleT2
:
false
});
},
closeCommonModalT2
()
{
this
.
setData
({
commonModalVisibleT2
:
false
});
this
.
getGameInfo
()
},
// 点击前 检查活动 开始结束时间
// 点击前 检查活动 开始结束时间
checkStartEndTime
()
{
checkStartEndTime
()
{
let
time
=
new
Date
()
let
time
=
new
Date
()
...
@@ -582,7 +602,16 @@ Page({
...
@@ -582,7 +602,16 @@ Page({
})
})
}
}
},
},
// 检测是否参与过 消消乐 和 传送带游戏
checkNewUserInGame
()
{
let
resXxl
=
my
.
getStorageSync
({
key
:
`YD11_firstInGameXxl_
${
app
.
activityId
}
_
${
app
.
openId
}
`
})
if
(
resXxl
.
data
&&
resXxl
.
data
===
1
)
app
.
isNewUser_xxl
=
true
else
app
.
isNewUser_xxl
=
false
let
resCsd
=
my
.
getStorageSync
({
key
:
`YD11_firstInGameCsd_
${
app
.
activityId
}
_
${
app
.
openId
}
`
})
if
(
resCsd
.
data
&&
resCsd
.
data
===
1
)
app
.
isNewUser_csd
=
true
else
app
.
isNewUser_csd
=
false
},
onUnload
()
{
onUnload
()
{
// 页面被关闭
// 页面被关闭
},
},
...
...
taobao_mini/client/pages/homePage/homePage.json
View file @
5100ac8e
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
"common-modal-t1"
:
"/components/commonModalT1/commonModalT1"
,
"common-modal-t1"
:
"/components/commonModalT1/commonModalT1"
,
"common-modal-t2"
:
"/components/commonModalT2/commonModalT2"
,
"common-modal-t2"
:
"/components/commonModalT2/commonModalT2"
,
"mission-modal"
:
"/components/comMissionModal/comMissionModal"
,
"mission-modal"
:
"/components/comMissionModal/comMissionModal"
,
"end-modal"
:
"/components/endModal/endModal"
"end-modal"
:
"/components/endModal/endModal"
,
"newuser-modal"
:
"/components/newUserModal/newUserModal"
}
}
}
}
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
5100ac8e
...
@@ -40,6 +40,20 @@ Component({
...
@@ -40,6 +40,20 @@ Component({
// 切换游戏场景
// 切换游戏场景
if
(
!
this
.
main
)
return
if
(
!
this
.
main
)
return
this
.
main
.
changeGameSence
(
this
.
props
.
gameType
)
this
.
main
.
changeGameSence
(
this
.
props
.
gameType
)
// 存储本地 用户玩游戏的信息
if
(
this
.
props
.
gameType
===
1
)
{
my
.
setStorage
({
key
:
`YD11_firstInGameCsd_
${
app
.
activityId
}
_
${
app
.
openId
}
`
,
data
:
1
});
app
.
isNewUser_csd
=
true
}
else
if
(
this
.
props
.
gameType
===
2
)
{
my
.
setStorage
({
key
:
`YD11_firstInGameCsd_
${
app
.
activityId
}
_
${
app
.
openId
}
`
,
data
:
1
});
app
.
isNewUser_xxl
=
true
}
}
}
},
},
...
...
taobao_mini/client/resconfig/resList.js
View file @
5100ac8e
...
@@ -634,6 +634,19 @@ const resList = {
...
@@ -634,6 +634,19 @@ const resList = {
ext
:
'.png'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/视频暂停按钮.b02345a3f9a24464df94a1f8bd4bcfe4182ad40c.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/视频暂停按钮.b02345a3f9a24464df94a1f8bd4bcfe4182ad40c.png'
,
uuid
:
'1a37baca-db9c-4e06-8bd3-e8bd78c72b1d'
uuid
:
'1a37baca-db9c-4e06-8bd3-e8bd78c72b1d'
}
},
'392bf401-3882-4f55-95c5-c9265a229b32'
:
{
name
:
'首次进入按钮m'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/首次进入按钮m.f01c1112f10f030d421cf0a7018f12256c6f98cd.png'
,
uuid
:
'392bf401-3882-4f55-95c5-c9265a229b32'
},
'210f6fd2-04c8-4779-a9f1-a1d92bf7ba90'
:
{
name
:
'首次进入弹窗背景m'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/首次进入弹窗背景m.3713e5c54c1efbccc1452fb070ea13d590ab26dd.png'
,
uuid
:
'210f6fd2-04c8-4779-a9f1-a1d92bf7ba90'
},
};
};
export
default
resList
;
export
default
resList
;
\ 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