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
a37e1adb
Commit
a37e1adb
authored
Dec 11, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
1afefc08
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
166 additions
and
89 deletions
+166
-89
prizeModal.axml
taobao_mini/client/_components/prizeModal/prizeModal.axml
+2
-2
api.js
taobao_mini/client/api.js
+5
-0
app.js
taobao_mini/client/app.js
+3
-3
base.acss
taobao_mini/client/base_acss/base.acss
+6
-6
your.acss
taobao_mini/client/components/comgetcardpanel/your.acss
+1
-10
comgetgivingcardpanel.js
...components/comgetgivingcardpanel/comgetgivingcardpanel.js
+1
-0
comgivingcardpanel.js
...lient/components/comgivingcardpanel/comgivingcardpanel.js
+4
-2
comhelpprizepanel.js
.../client/components/comhelpprizepanel/comhelpprizepanel.js
+1
-0
comjoinmemberpanel.js
...lient/components/comjoinmemberpanel/comjoinmemberpanel.js
+1
-0
commycardpanel.js
...o_mini/client/components/commycardpanel/commycardpanel.js
+1
-2
comprizepanel.axml
...o_mini/client/components/comprizepanel/comprizepanel.axml
+1
-1
comrulepanel.axml
taobao_mini/client/components/comrulepanel/comrulepanel.axml
+2
-2
your.acss
taobao_mini/client/components/comrulepanel/your.acss
+2
-0
comsorrypanel.js
taobao_mini/client/components/comsorrypanel/comsorrypanel.js
+1
-1
comtaskpanel.axml
taobao_mini/client/components/comtaskpanel/comtaskpanel.axml
+7
-6
comtaskpanel.js
taobao_mini/client/components/comtaskpanel/comtaskpanel.js
+31
-13
your.acss
taobao_mini/client/components/comtaskpanel/your.acss
+2
-0
panel.acss
taobao_mini/client/myComponents/panel/panel.acss
+2
-2
collectGoods.js
taobao_mini/client/pages/collectGoods/collectGoods.js
+1
-1
myprize.js
taobao_mini/client/pages/myprize/myprize.js
+1
-1
orderDepositGoods.js
..._mini/client/pages/orderDepositGoods/orderDepositGoods.js
+1
-1
orderGoods.js
taobao_mini/client/pages/orderGoods/orderGoods.js
+1
-1
pageindexpage.acss
taobao_mini/client/pages/pageindexpage/pageindexpage.acss
+12
-1
pageindexpage.axml
taobao_mini/client/pages/pageindexpage/pageindexpage.axml
+5
-4
pageindexpage.js
taobao_mini/client/pages/pageindexpage/pageindexpage.js
+48
-30
your.acss
taobao_mini/client/pages/pageindexpage/your.acss
+11
-0
request.js
taobao_mini/client/tbcc-sdk/lib/request.js
+13
-0
No files found.
taobao_mini/client/_components/prizeModal/prizeModal.axml
View file @
a37e1adb
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
</block>
</block>
<!-- 已领取 -->
<!-- 已领取 -->
<block a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.SUCCESS}}">
<block a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.SUCCESS}}">
<!-- 实物
查看物流
-->
<!-- 实物
已领取
-->
<image a:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}"
onTap="handleView" data-item="{{item}}" src="{{task.image.logisticsBth
}}" />
<image a:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}"
src="{{task.image.hasGetBtn
}}" />
<!-- 优惠券去使用 -->
<!-- 优惠券去使用 -->
<image a:else onTap="handleTouse" data-item="{{item}}" src="{{task.image.useBtn}}" />
<image a:else onTap="handleTouse" data-item="{{item}}" src="{{task.image.useBtn}}" />
</block>
</block>
...
...
taobao_mini/client/api.js
View file @
a37e1adb
...
@@ -148,6 +148,11 @@ const apiList = {
...
@@ -148,6 +148,11 @@ const apiList = {
method
:
'get'
,
method
:
'get'
,
isShowLoading
:
false
isShowLoading
:
false
},
},
doCompleteTask
:
{
handle
:
'doCompleteTask'
,
method
:
'get'
,
isShowLoading
:
false
},
/**获取用户信息 */
/**获取用户信息 */
getUserInfo
:
{
getUserInfo
:
{
handle
:
'getUserInfo'
,
handle
:
'getUserInfo'
,
...
...
taobao_mini/client/app.js
View file @
a37e1adb
...
@@ -8,13 +8,13 @@ cloud.init({
...
@@ -8,13 +8,13 @@ cloud.init({
App
({
App
({
env
,
env
,
requestType
:
'
yapi'
,
// yapi
,cloud: 云函数
requestType
:
'
cloud'
,
// cloud
,cloud: 云函数
// requestType: 'local', // yapi,cloud: 云函数
// requestType: 'local', // yapi,cloud: 云函数
cloudName
:
'collectCard'
,
// 主云函数项目名 tmallCat
cloudName
:
'collectCard'
,
// 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud
,
cloud
,
tbcc
,
tbcc
,
sellerId
:
"
628189716
"
,
sellerId
:
"
2207623078795
"
,
onLaunch
(
options
)
{
onLaunch
(
options
)
{
this
.
handleQuery
(
options
.
query
||
{});
this
.
handleQuery
(
options
.
query
||
{});
var
pages
=
getCurrentPages
()
var
pages
=
getCurrentPages
()
...
@@ -32,7 +32,7 @@ App({
...
@@ -32,7 +32,7 @@ App({
const
{
activityId
}
=
query
;
const
{
activityId
}
=
query
;
// this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然
// this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然
// this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷1
// this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷1
this
.
activityId
=
activityId
||
'5f
8d47218e6a0888fc426fad
'
;
//小婷2
this
.
activityId
=
activityId
||
'5f
d03fd63075d9784dbcd7ac
'
;
//小婷2
}
}
});
});
taobao_mini/client/base_acss/base.acss
View file @
a37e1adb
taobao_mini/client/components/comgetcardpanel/your.acss
View file @
a37e1adb
...
@@ -5,16 +5,7 @@
...
@@ -5,16 +5,7 @@
}
}
.mycardpanel .mycardbody .mycardcontent{
.mycardpanel .mycardbody .mycardcontent{
overflow-y:scroll;
overflow-y:scroll;
}
z-index:10;
#canvas{
position:fixed;
top:0;
left:0;
bottom:0;
margin:auto;
width:750rpx;
height:1624rpx;
pointer-events: none;
}
}
.getcardpanel {
.getcardpanel {
height: 1094rpx !important;
height: 1094rpx !important;
...
...
taobao_mini/client/components/comgetgivingcardpanel/comgetgivingcardpanel.js
View file @
a37e1adb
...
@@ -10,6 +10,7 @@ Component({
...
@@ -10,6 +10,7 @@ Component({
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
},
},
onTapGetGivingCardAlsoBtn
(
e
){
onTapGetGivingCardAlsoBtn
(
e
){
//埋点
BuriedClick
(
BuriedType
.
GIVING_CARD_PRIZE_BTN
)
BuriedClick
(
BuriedType
.
GIVING_CARD_PRIZE_BTN
)
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
}
}
...
...
taobao_mini/client/components/comgivingcardpanel/comgivingcardpanel.js
View file @
a37e1adb
...
@@ -13,6 +13,7 @@ Component({
...
@@ -13,6 +13,7 @@ Component({
hiddenPanelEvent
(
e
){
hiddenPanelEvent
(
e
){
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
},
},
//从卡片库中找到对应的图片根据type
async
setCardUrl
(){
async
setCardUrl
(){
const
{
activityId
}
=
getApp
();
const
{
activityId
}
=
getApp
();
let
MyCardsInfo
=
await
API
.
getMyCardsInfo
({
activityId
}).
catch
(
res
=>
{
let
MyCardsInfo
=
await
API
.
getMyCardsInfo
({
activityId
}).
catch
(
res
=>
{
...
@@ -28,6 +29,7 @@ Component({
...
@@ -28,6 +29,7 @@ Component({
}
}
}
}
},
},
//点击获取好友赠送的卡片
async
onTapGetGivingCardBtn
(
e
){
async
onTapGetGivingCardBtn
(
e
){
events
.
emit
(
"doDisibleAll"
,
true
)
events
.
emit
(
"doDisibleAll"
,
true
)
const
{
activityId
}
=
getApp
();
const
{
activityId
}
=
getApp
();
...
@@ -37,11 +39,11 @@ Component({
...
@@ -37,11 +39,11 @@ Component({
inviteId
:
DataCenter
.
givingCardData
.
cardId
inviteId
:
DataCenter
.
givingCardData
.
cardId
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
if
(
res
&&
res
.
code
==
"430008"
){
if
(
res
&&
res
.
code
==
"430008"
){
//
非店铺会员
//
不能领取自己的卡片
DataCenter
.
joinmemberpanelText
=
"不能领取自己的卡牌哦~"
DataCenter
.
joinmemberpanelText
=
"不能领取自己的卡牌哦~"
this
.
showPanel
(
"joinmemberpanel"
);
this
.
showPanel
(
"joinmemberpanel"
);
}
else
if
(
res
&&
res
.
code
==
"430011"
){
}
else
if
(
res
&&
res
.
code
==
"430011"
){
//
只有新会员才能助力哦
//
卡片已被领取
DataCenter
.
sorryMsgText
=
"手速太慢啦
\n
该卡牌已被其他好友截胡领走啦..."
DataCenter
.
sorryMsgText
=
"手速太慢啦
\n
该卡牌已被其他好友截胡领走啦..."
this
.
showPanel
(
"sorrypanel"
);
this
.
showPanel
(
"sorrypanel"
);
}
else
{
}
else
{
...
...
taobao_mini/client/components/comhelpprizepanel/comhelpprizepanel.js
View file @
a37e1adb
...
@@ -10,6 +10,7 @@ Component({
...
@@ -10,6 +10,7 @@ Component({
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
},
},
onTapHelpPrizeAlsoJoinBtn
(
e
){
onTapHelpPrizeAlsoJoinBtn
(
e
){
//埋点
BuriedClick
(
BuriedType
.
HELP_PRIZE_BTN
)
BuriedClick
(
BuriedType
.
HELP_PRIZE_BTN
)
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
}
}
...
...
taobao_mini/client/components/comjoinmemberpanel/comjoinmemberpanel.js
View file @
a37e1adb
...
@@ -10,6 +10,7 @@ Component({
...
@@ -10,6 +10,7 @@ Component({
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
},
},
onTapJoinMemberBtn
(
e
){
onTapJoinMemberBtn
(
e
){
//跳转加入会员地址
my
.
navigateTo
({
my
.
navigateTo
({
url
:
DataCenter
.
vipInfo
.
url
url
:
DataCenter
.
vipInfo
.
url
});
});
...
...
taobao_mini/client/components/commycardpanel/commycardpanel.js
View file @
a37e1adb
...
@@ -9,18 +9,17 @@ Component({
...
@@ -9,18 +9,17 @@ Component({
hiddenPanelEvent
(
e
){
hiddenPanelEvent
(
e
){
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
},
},
//点击赠送卡片按钮
onTapMcGivingBtn
(
e
){
onTapMcGivingBtn
(
e
){
DataCenter
.
cardType
=
e
.
target
.
dataset
.
value
;
DataCenter
.
cardType
=
e
.
target
.
dataset
.
value
;
this
.
props
.
onGivingCard
()
this
.
props
.
onGivingCard
()
}
}
},
},
didMount
(
props
)
{
didMount
(
props
)
{
console
.
log
(
"this.props.CollectCardInfo"
,
this
.
props
.
CollectCardInfo
)
let
{
let
{
giftCardStatus
,
giftCardStatus
,
taskOpenStatus
taskOpenStatus
}
=
this
.
props
.
CollectCardInfo
.
data
;
}
=
this
.
props
.
CollectCardInfo
.
data
;
console
.
log
(
"giftCardStatus"
,
giftCardStatus
)
this
.
setData
({
this
.
setData
({
resList
:
resList
,
resList
:
resList
,
MyCardsInfo
:
DataCenter
.
MyCardsInfo
,
MyCardsInfo
:
DataCenter
.
MyCardsInfo
,
...
...
taobao_mini/client/components/comprizepanel/comprizepanel.axml
View file @
a37e1adb
...
@@ -5,6 +5,6 @@
...
@@ -5,6 +5,6 @@
<text class="gong_xi_huo_de_yi_xia_jiang_li ">恭喜获得以下奖励</text>
<text class="gong_xi_huo_de_yi_xia_jiang_li ">恭喜获得以下奖励</text>
<text class="jiang_pin_yi_fa_fang_ke_zai_jiang_pin_zhong_cha_kan95 ">奖品已发放,可在【奖品】中查看</text>
<text class="jiang_pin_yi_fa_fang_ke_zai_jiang_pin_zhong_cha_kan95 ">奖品已发放,可在【奖品】中查看</text>
</view>
</view>
<image class="prizeimg " src={{
resList['944dc7c0-cd64-4901-a9aa-e85f3d8e97a8'].url
}} />
<image class="prizeimg " src={{
drawLotteryPrizeData.image
}} />
<image class="prizeclosebtn " onTap="hiddenPanelEvent" data-value="prizepanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
<image class="prizeclosebtn " onTap="hiddenPanelEvent" data-value="prizepanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/comrulepanel/comrulepanel.axml
View file @
a37e1adb
<view class="rulepanel">
<view class="rulepanel">
<image class="dim1131 " src={{resList['603034bb-2c7d-42c4-9be4-60aea30e0820'].url}} />
<image class="dim1131 " src={{resList['603034bb-2c7d-42c4-9be4-60aea30e0820'].url}} />
<view class="ruletext ">
<view class="ruletext "
style="width: 432rpx;height: 565rpx;" scroll-y="{{true}}"
>
{{rule}}
<view style="min-height: calc(100% + 1px);">{{rule}}</view>
</view>
</view>
<image class="ruleclosebtn " onTap="hiddenPanelEvent" data-value="rulepanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
<image class="ruleclosebtn " onTap="hiddenPanelEvent" data-value="rulepanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
</view>
</view>
taobao_mini/client/components/comrulepanel/your.acss
View file @
a37e1adb
.ruletext{
.ruletext{
-webkit-overflow-scrolling: touch;
overflow-y:scroll;
overflow-y:scroll;
z-index:10;
}
}
\ No newline at end of file
taobao_mini/client/components/comsorrypanel/comsorrypanel.js
View file @
a37e1adb
...
@@ -15,7 +15,7 @@ Component({
...
@@ -15,7 +15,7 @@ Component({
didMount
(
props
)
{
didMount
(
props
)
{
this
.
setData
({
this
.
setData
({
resList
:
resList
,
resList
:
resList
,
sorryMsgText
:
DataCenter
.
sorryMsgText
sorryMsgText
:
DataCenter
.
sorryMsgText
//错误文案
});
});
},
},
...
...
taobao_mini/client/components/comtaskpanel/comtaskpanel.axml
View file @
a37e1adb
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
<!-- 去关注 -->
<!-- 去关注 -->
<image class="tasknonetofocusbtn "
<image class="tasknonetofocusbtn "
onTap="onTapTaskNoneToFocusbtn"
onTap="onTapTaskNoneToFocusbtn"
data-value={{item.taskType}}
a:elif={{(item.taskType==="follow")}}
a:elif={{(item.taskType==="follow")}}
src={{resList['ba2793d6-94cd-4fe1-ae3d-11278e0a66f8'].url}} />
src={{resList['ba2793d6-94cd-4fe1-ae3d-11278e0a66f8'].url}} />
<!-- 去浏览 -->
<!-- 去浏览 -->
...
@@ -38,7 +39,7 @@
...
@@ -38,7 +39,7 @@
</view>
</view>
<!-- 待领取 -->
<!-- 待领取 -->
<image a:if={{(item.status=="2")}} class="taskreadybtn " onTap="onTapTaskReadyBtn" data-value=
item.taskType
src={{resList['00c28c88-7e7c-4c9b-a708-f0254dab619a'].url}} />
<image a:if={{(item.status=="2")}} class="taskreadybtn " onTap="onTapTaskReadyBtn" data-value=
{{item.taskType}}
src={{resList['00c28c88-7e7c-4c9b-a708-f0254dab619a'].url}} />
<view a:if={{(item.status=="3")}}>
<view a:if={{(item.status=="3")}}>
<!-- 已完成 -->
<!-- 已完成 -->
...
...
taobao_mini/client/components/comtaskpanel/comtaskpanel.js
View file @
a37e1adb
...
@@ -7,8 +7,6 @@ const { tbcc } = app;
...
@@ -7,8 +7,6 @@ const { tbcc } = app;
import
API
from
'../../api'
;
import
API
from
'../../api'
;
import
events
from
'../../events'
;
import
events
from
'../../events'
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
,
favorShop
}
=
tbcc
.
tb
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
,
favorShop
}
=
tbcc
.
tb
;
Component
({
Component
({
props
:
{},
props
:
{},
data
:
{
data
:
{
...
@@ -49,7 +47,7 @@ Component({
...
@@ -49,7 +47,7 @@ Component({
text
:
"每邀请一位,翻牌次数"
,
text
:
"每邀请一位,翻牌次数"
,
},
},
//跳转页面
//跳转页面
jumpLink
:{
browseGoods
:{
icon
:
"//yun.duiba.com.cn/spark/assets/cd21972ddfd45755dddd76ff2990755dd03cfadb.png"
,
icon
:
"//yun.duiba.com.cn/spark/assets/cd21972ddfd45755dddd76ff2990755dd03cfadb.png"
,
text
:
"翻牌次数"
,
text
:
"翻牌次数"
,
},
},
...
@@ -60,23 +58,27 @@ Component({
...
@@ -60,23 +58,27 @@ Component({
this
.
props
.
onTapHiddenPanelEvent
(
e
);
this
.
props
.
onTapHiddenPanelEvent
(
e
);
events
.
emit
(
"updateIndex"
);
events
.
emit
(
"updateIndex"
);
},
},
//领取奖励
async
onTapTaskReadyBtn
(
e
){
async
onTapTaskReadyBtn
(
e
){
//获取活动基础信息
const
{
activityId
}
=
getApp
();
const
{
activityId
}
=
getApp
();
//获取活动基础信息
let
taskType
=
e
.
target
.
dataset
.
value
;
let
taskType
=
e
.
target
.
dataset
.
value
;
let
receiveTaskRewards
=
await
API
.
receiveTaskRewards
({
activityId
,
taskType
}).
catch
(
res
=>
{
let
receiveTaskRewards
=
await
API
.
receiveTaskRewards
({
activityId
,
taskType
,
rewardsKey
:
"gameTimes"
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
if
(
receiveTaskRewards
&&
receiveTaskRewards
.
success
){
if
(
receiveTaskRewards
&&
receiveTaskRewards
.
success
){
commonToast
(
`任务完成,翻牌次数+
${
receiveTaskRewards
.
data
.
rewards
}
`
);
commonToast
(
`任务完成,翻牌次数+
${
receiveTaskRewards
.
data
.
rewards
}
`
);
await
this
.
updateData
()
}
}
},
},
async
onTapTaskNoneToFocusbtn
(){
//关注店铺
const
favorStatus
=
await
favorShop
(
sellerId
).
catch
(
err
=>
{
async
onTapTaskNoneToFocusbtn
(
e
){
const
{
activityId
}
=
getApp
();
console
.
log
(
"app.sellerId"
,
app
.
sellerId
)
const
favorStatus
=
await
favorShop
(
app
.
sellerId
).
catch
(
err
=>
{
console
.
log
(
'关注店铺失败'
,
err
);
console
.
log
(
'关注店铺失败'
,
err
);
});
});
if
(
favorStatus
){
if
(
favorStatus
){
const
{
activityId
}
=
getApp
();
let
taskType
=
e
.
target
.
dataset
.
value
;
let
taskType
=
e
.
target
.
dataset
.
value
;
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
...
@@ -87,71 +89,87 @@ Component({
...
@@ -87,71 +89,87 @@ Component({
}
}
}
}
},
},
//其他去完成按钮
onTapTaskNoneGotoBtn
(
e
){
onTapTaskNoneGotoBtn
(
e
){
let
taskType
=
e
.
target
.
dataset
.
value
.
taskType
;
let
taskType
=
e
.
target
.
dataset
.
value
.
taskType
;
if
(
taskType
==
"invites"
){
if
(
taskType
==
"invites"
){
//邀请
this
.
inviteTask
()
this
.
inviteTask
()
}
else
if
(
taskType
==
"groupChat"
){
}
else
if
(
taskType
==
"groupChat"
){
//加群
this
.
groupChatTask
(
taskType
,
e
.
target
.
dataset
.
value
.
url
)
this
.
groupChatTask
(
taskType
,
e
.
target
.
dataset
.
value
.
url
)
}
else
if
(
taskType
==
"member"
){
}
else
if
(
taskType
==
"member"
){
//加入会员
this
.
memberTask
(
taskType
,
e
.
target
.
dataset
.
value
.
url
)
this
.
memberTask
(
taskType
,
e
.
target
.
dataset
.
value
.
url
)
}
else
if
(
taskType
==
"jumpLink"
){
}
else
if
(
taskType
==
"browseGoods"
){
//浏览页面
this
.
jumpLinkTask
(
taskType
,
e
.
target
.
dataset
.
value
.
url
)
this
.
jumpLinkTask
(
taskType
,
e
.
target
.
dataset
.
value
.
url
)
}
else
if
(
taskType
==
"collectGoods"
){
}
else
if
(
taskType
==
"collectGoods"
){
//收藏商品
BuriedClick
(
BuriedType
.
COLLECT_GOODS_BTN
)
BuriedClick
(
BuriedType
.
COLLECT_GOODS_BTN
)
my
.
navigateTo
({
my
.
navigateTo
({
url
:
"/pages/collectGoods/collectGoods?itemIds="
+
e
.
target
.
dataset
.
value
.
itemIds
url
:
"/pages/collectGoods/collectGoods?itemIds="
+
e
.
target
.
dataset
.
value
.
itemIds
});
});
}
else
if
(
taskType
==
"orderGoods"
){
}
else
if
(
taskType
==
"orderGoods"
){
//下单商品
//埋点
BuriedClick
(
BuriedType
.
ORDER_GOODS_BTN
)
BuriedClick
(
BuriedType
.
ORDER_GOODS_BTN
)
my
.
navigateTo
({
my
.
navigateTo
({
url
:
"/pages/orderGoods/orderGoods?itemIds="
+
e
.
target
.
dataset
.
value
.
itemIds
url
:
"/pages/orderGoods/orderGoods?itemIds="
+
e
.
target
.
dataset
.
value
.
itemIds
});
});
}
else
if
(
taskType
==
"orderDepositGoods"
){
}
else
if
(
taskType
==
"orderDepositGoods"
){
//下单定金
my
.
navigateTo
({
my
.
navigateTo
({
url
:
"/pages/orderDepositGoods/orderDepositGoods?itemIds="
+
e
.
target
.
dataset
.
value
.
itemIds
url
:
"/pages/orderDepositGoods/orderDepositGoods?itemIds="
+
e
.
target
.
dataset
.
value
.
itemIds
});
});
}
}
},
},
//加群任务
async
groupChatTask
(
taskType
,
url
){
async
groupChatTask
(
taskType
,
url
){
const
{
activityId
}
=
getApp
();
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
await
this
.
updateData
()
await
this
.
updateData
()
if
(
doCompleteTask
&&
doCompleteTask
.
success
){
if
(
doCompleteTask
&&
doCompleteTask
.
success
){
my
.
navigateTo
({
my
.
navigateTo
({
url
:
url
url
});
});
}
}
},
},
//跳转任务
async
jumpLinkTask
(
taskType
,
url
){
async
jumpLinkTask
(
taskType
,
url
){
const
{
activityId
}
=
getApp
();
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
await
this
.
updateData
()
await
this
.
updateData
()
if
(
doCompleteTask
&&
doCompleteTask
.
success
){
if
(
doCompleteTask
&&
doCompleteTask
.
success
){
my
.
navigateTo
({
my
.
navigateTo
({
url
:
url
url
});
});
}
}
},
},
//加入会员
async
memberTask
(
taskType
,
url
){
async
memberTask
(
taskType
,
url
){
const
{
activityId
}
=
getApp
();
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
let
doCompleteTask
=
await
API
.
doCompleteTask
({
activityId
,
taskType
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
await
this
.
updateData
()
await
this
.
updateData
()
if
(
doCompleteTask
&&
doCompleteTask
.
success
){
if
(
doCompleteTask
&&
doCompleteTask
.
success
){
my
.
navigateTo
({
my
.
navigateTo
({
url
:
url
url
});
});
}
}
},
},
//邀请会员
inviteTask
(){
inviteTask
(){
this
.
props
.
onInviteTask
()
this
.
props
.
onInviteTask
()
},
},
//更新任务列表
async
updateData
(){
async
updateData
(){
const
{
activityId
}
=
getApp
();
const
{
activityId
}
=
getApp
();
//获取中奖轮播
let
TaskList
=
await
API
.
getTaskList
({
activityId
}).
catch
(
res
=>
{
let
TaskList
=
await
API
.
getTaskList
({
activityId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
...
...
taobao_mini/client/components/comtaskpanel/your.acss
View file @
a37e1adb
...
@@ -20,4 +20,6 @@
...
@@ -20,4 +20,6 @@
}
}
.taskpanel .taskbody{
.taskpanel .taskbody{
overflow-y:scroll;
overflow-y:scroll;
height: 678rpx!important;
z-index:10;
}
}
\ No newline at end of file
taobao_mini/client/myComponents/panel/panel.acss
View file @
a37e1adb
.win_bg {
.win_bg {
position:
fixed
;
position:
absolute
;
top: 0;
top: 0;
left: 0;
left: 0;
width: 100%;
width: 100%;
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
background: rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.5);
}
}
.win_bg > * {
.win_bg > * {
position:
fixed
;
position:
absolute
;
top: 0;
top: 0;
bottom: 0;
bottom: 0;
left: 0;
left: 0;
...
...
taobao_mini/client/pages/collectGoods/collectGoods.js
View file @
a37e1adb
...
@@ -57,7 +57,7 @@ Page({
...
@@ -57,7 +57,7 @@ Page({
res
&&
commonToast
(
res
)
res
&&
commonToast
(
res
)
})
||
{}
})
||
{}
if
(
success
)
{
if
(
success
)
{
this
.
setData
({
goodsList
:
data
||
[]
})
this
.
setData
({
goodsList
:
data
.
list
||
[]
})
}
}
},
},
//任务完成 616444374083
//任务完成 616444374083
...
...
taobao_mini/client/pages/myprize/myprize.js
View file @
a37e1adb
...
@@ -20,7 +20,7 @@ Page({
...
@@ -20,7 +20,7 @@ Page({
copyIcon
:
'//yun.duiba.com.cn/spark/assets/7ac9b1ca4bdea23b5f8b69b46e373900d56562e2.png'
,
//复制
copyIcon
:
'//yun.duiba.com.cn/spark/assets/7ac9b1ca4bdea23b5f8b69b46e373900d56562e2.png'
,
//复制
addressBth
:
'//yun.duiba.com.cn/spark/assets/a1f0d3f252236a599d0dc37d04f9abf1167b0afd.png'
,
//填写地址(实物奖品)
addressBth
:
'//yun.duiba.com.cn/spark/assets/a1f0d3f252236a599d0dc37d04f9abf1167b0afd.png'
,
//填写地址(实物奖品)
getBth
:
'//yun.duiba.com.cn/spark/assets/f710c4170feac9e38992c7b79df8b20dffa151d6.png'
,
//立即领取(除实物奖品外)
getBth
:
'//yun.duiba.com.cn/spark/assets/f710c4170feac9e38992c7b79df8b20dffa151d6.png'
,
//立即领取(除实物奖品外)
logisticsBth
:
'//yun.duiba.com.cn/spark/assets/743acdfa0d596a0d2d04b989e84b756a587a8235
.png'
,
//查看物流
hasGetBtn
:
'//yun.duiba.com.cn/spark/assets/54b4d0638d4da4a438a5fee5cbf826f4cb832883
.png'
,
//查看物流
useBtn
:
'//yun.duiba.com.cn/spark/assets/1f00b5a8dd5a24529eb3e11227b0d661e7bc5cf9.png'
,
//去使用(除实物奖品外)
useBtn
:
'//yun.duiba.com.cn/spark/assets/1f00b5a8dd5a24529eb3e11227b0d661e7bc5cf9.png'
,
//去使用(除实物奖品外)
getAgainBtn
:
' //yun.duiba.com.cn/aurora/assets/7730b53739e8b0e4a723088ee0dc2cf7d8a71874.png'
,
//重新领取
getAgainBtn
:
' //yun.duiba.com.cn/aurora/assets/7730b53739e8b0e4a723088ee0dc2cf7d8a71874.png'
,
//重新领取
invalidBtn
:
'//yun.duiba.com.cn/spark/assets/cfc0a1ecb5f5fc1465058861102430a708d75f34.png'
,
//已失效
invalidBtn
:
'//yun.duiba.com.cn/spark/assets/cfc0a1ecb5f5fc1465058861102430a708d75f34.png'
,
//已失效
...
...
taobao_mini/client/pages/orderDepositGoods/orderDepositGoods.js
View file @
a37e1adb
...
@@ -58,7 +58,7 @@ Page({
...
@@ -58,7 +58,7 @@ Page({
res
&&
commonToast
(
res
)
res
&&
commonToast
(
res
)
})
||
{}
})
||
{}
if
(
success
)
{
if
(
success
)
{
this
.
setData
({
goodsList
:
data
||
[]
})
this
.
setData
({
goodsList
:
data
.
list
||
[]
})
}
}
},
},
});
});
taobao_mini/client/pages/orderGoods/orderGoods.js
View file @
a37e1adb
...
@@ -58,7 +58,7 @@ Page({
...
@@ -58,7 +58,7 @@ Page({
res
&&
commonToast
(
res
)
res
&&
commonToast
(
res
)
})
||
{}
})
||
{}
if
(
success
)
{
if
(
success
)
{
this
.
setData
({
goodsList
:
data
||
[]
})
this
.
setData
({
goodsList
:
data
.
list
||
[]
})
}
}
},
},
});
});
taobao_mini/client/pages/pageindexpage/pageindexpage.acss
View file @
a37e1adb
...
@@ -5,7 +5,18 @@
...
@@ -5,7 +5,18 @@
/* 程序样式 */
/* 程序样式 */
@import './your.acss';
@import './your.acss';
.testSC{
/* position:fixed;
top:0;
left:0;
bottom:0;
right:0;
margin:auto;
width: 300rpx;
height: 300rpx;
overflow-y:scroll;
z-index:10; */
}
/* 以下是编辑器导出样式,可从编辑器直接覆盖 */
/* 以下是编辑器导出样式,可从编辑器直接覆盖 */
.indexpage {
.indexpage {
top: -2rpx;
top: -2rpx;
...
...
taobao_mini/client/pages/pageindexpage/pageindexpage.axml
View file @
a37e1adb
<view class="indexpage ">
<view class="indexpage "
disableScroll={{false}}
>
<view class="indexcontent ">
<view class="indexcontent ">
<view class="indexbgcontent ">
<view class="indexbgcontent ">
<image class="indexbg " src={{resList['9a441973-a87c-4723-a797-1d18622ba791'].url}} />
<image class="indexbg " src={{resList['9a441973-a87c-4723-a797-1d18622ba791'].url}} />
...
@@ -20,16 +20,16 @@
...
@@ -20,16 +20,16 @@
>
>
<image a:if={{item.status == 3}} class="unlockover " src={{resList['26336845-54c5-4a6f-a97e-f3f13d3fef27'].url}} />
<image a:if={{item.status == 3}} class="unlockover " src={{resList['26336845-54c5-4a6f-a97e-f3f13d3fef27'].url}} />
<view a:if={{item.status == 2}} class="unlockready "
<view a:if={{item.status == 2}} class="unlockready "
onTap="onTapUnlockPrizesItem" data-value={{item.needCard
Type
s}}
onTap="onTapUnlockPrizesItem" data-value={{item.needCards}}
>
>
<image class="unlockreadyicon " src={{resList['a2bdbf64-229d-46a1-89df-43b3537ab255'].url}} />
<image class="unlockreadyicon " src={{resList['a2bdbf64-229d-46a1-89df-43b3537ab255'].url}} />
<image class="unlockreadynumbg " src={{resList['cbed0e02-fb26-4b19-a121-8b7d24310652'].url}} />
<image class="unlockreadynumbg " src={{resList['cbed0e02-fb26-4b19-a121-8b7d24310652'].url}} />
<view class="unlockreadynum fontVerticalCenter">{{item.needCard
Type
s}}</view>
<view class="unlockreadynum fontVerticalCenter">{{item.needCards}}</view>
</view>
</view>
<view a:if={{item.status == 1}} class="unlocknone ">
<view a:if={{item.status == 1}} class="unlocknone ">
<image class="unlocknoneicon " src={{resList['ba1b637e-d3e6-444d-b065-f1793f1ed520'].url}} />
<image class="unlocknoneicon " src={{resList['ba1b637e-d3e6-444d-b065-f1793f1ed520'].url}} />
<image class="unlocknonenumbg " src={{resList['111beab6-495a-49ab-9802-757ef04da86a'].url}} />
<image class="unlocknonenumbg " src={{resList['111beab6-495a-49ab-9802-757ef04da86a'].url}} />
<view class="unlocknonenum fontVerticalCenter">{{item.needCard
Type
s}}</view>
<view class="unlocknonenum fontVerticalCenter">{{item.needCards}}</view>
</view>
</view>
<image a:if={{item.status == 3||item.status == 2}} class="unlocknextget " src={{resList['416ab4f7-4021-4a1c-be41-a48b6cfa8a3d'].url}} />
<image a:if={{item.status == 3||item.status == 2}} class="unlocknextget " src={{resList['416ab4f7-4021-4a1c-be41-a48b6cfa8a3d'].url}} />
<image a:if={{item.status == 1}} class="unlocknextnone " src={{resList['9bf3875b-78f1-4dd0-b04d-5f565b6e20b8'].url}} />
<image a:if={{item.status == 1}} class="unlocknextnone " src={{resList['9bf3875b-78f1-4dd0-b04d-5f565b6e20b8'].url}} />
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
</view>
</view>
<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 " onTap="onTapIndexRecordBtn" src={{resList['5a6679e0-89f7-4582-a89b-116a35e9750a'].url}} />
<image class="indexrecordbtn " onTap="onTapIndexRecordBtn" src={{resList['5a6679e0-89f7-4582-a89b-116a35e9750a'].url}} />
<image class="loadImg" a:for={{assets}} src={{item}} />
</view>
</view>
<panel
<panel
showWinLists={{showWinLists}}
showWinLists={{showWinLists}}
...
...
taobao_mini/client/pages/pageindexpage/pageindexpage.js
View file @
a37e1adb
...
@@ -16,7 +16,7 @@ let time1,time2
...
@@ -16,7 +16,7 @@ let time1,time2
let
disableEvent
;
let
disableEvent
;
let
updateIndexEvent
;
let
updateIndexEvent
;
//读取云存储资源
async
function
loadCloud
(
url
,
onLoad
,
onError
)
{
async
function
loadCloud
(
url
,
onLoad
,
onError
)
{
if
(
url
.
indexOf
(
"cloud://"
)
==
0
)
{
if
(
url
.
indexOf
(
"cloud://"
)
==
0
)
{
//@ts-ignore
//@ts-ignore
...
@@ -59,12 +59,21 @@ Page({
...
@@ -59,12 +59,21 @@ Page({
this
.
cardId
=
query
.
cardId
;
this
.
cardId
=
query
.
cardId
;
this
.
cardType
=
query
.
cardType
;
this
.
cardType
=
query
.
cardType
;
DataCenter
.
doDisibleAll
=
this
.
doDisibleAll
;
DataCenter
.
doDisibleAll
=
this
.
doDisibleAll
;
//缓存全局资源
let
assets
=
[]
for
(
let
item
in
resList
){
assets
.
push
(
resList
[
item
].
url
)
}
this
.
setData
({
this
.
setData
({
resList
:
resList
,
resList
:
resList
,
assets
:
assets
,
showPanel
:
this
.
showPanel
showPanel
:
this
.
showPanel
});
});
// //初始化首页信息
// //初始化首页信息
this
.
getAuth
();
this
.
getAuth
();
//禁用点击事件
if
(
disableEvent
){
if
(
disableEvent
){
events
.
removeListener
(
"doDisibleAll"
,
disableEvent
)
events
.
removeListener
(
"doDisibleAll"
,
disableEvent
)
}
}
...
@@ -74,14 +83,13 @@ Page({
...
@@ -74,14 +83,13 @@ Page({
})
})
})
})
//全局更新首页
if
(
updateIndexEvent
){
if
(
updateIndexEvent
){
events
.
removeListener
(
"updateIndex"
,
updateIndexEvent
)
events
.
removeListener
(
"updateIndex"
,
updateIndexEvent
)
}
}
events
.
on
(
"updateIndex"
,
updateIndexEvent
=
(
state
)
=>
{
events
.
on
(
"updateIndex"
,
updateIndexEvent
=
(
state
)
=>
{
this
.
updateData
()
this
.
updateData
()
})
})
},
},
/**
/**
* 获取用户授权信息
* 获取用户授权信息
...
@@ -102,6 +110,7 @@ Page({
...
@@ -102,6 +110,7 @@ Page({
* 登录接口
* 登录接口
*/
*/
async
login
()
{
async
login
()
{
my
.
showLoading
();
const
{
nickName
,
avatar
,
activityId
}
=
app
;
const
{
nickName
,
avatar
,
activityId
}
=
app
;
let
inviteId
=
this
.
inviteId
||
this
.
cardId
;
let
inviteId
=
this
.
inviteId
||
this
.
cardId
;
let
isFollow
=
await
checkShopFavoredStatus
(
app
.
sellerId
).
catch
(
err
=>
{
let
isFollow
=
await
checkShopFavoredStatus
(
app
.
sellerId
).
catch
(
err
=>
{
...
@@ -117,16 +126,22 @@ Page({
...
@@ -117,16 +126,22 @@ Page({
const
{
openId
}
=
data
;
const
{
openId
}
=
data
;
app
.
openId
=
openId
;
app
.
openId
=
openId
;
this
.
getIndex
();
this
.
getIndex
();
}
else
{
my
.
hideLoading
();
}
}
},
},
//canvas就绪
onCanvasReady
()
{
onCanvasReady
()
{
my
.
createCanvas
({
my
.
createCanvas
({
id
:
'canvas'
,
id
:
'canvas'
,
success
:
(
canvas
)
=>
{
success
:
(
canvas
)
=>
{
let
dpi
=
my
.
getSystemInfoSync
().
pixelRatio
/
(
750
/
my
.
getSystemInfoSync
().
windowWidth
)
console
.
log
(
"手机基础信息"
,
my
.
getSystemInfoSync
(),
my
.
getSystemInfoSync
().
windowWidth
*
my
.
getSystemInfoSync
().
windowHeight
,
750
/
my
.
getSystemInfoSync
().
windowWidth
*
my
.
getSystemInfoSync
().
windowHeight
)
loadCloud
(
"cloud://4028B2AAA0799F6D94C6A0398B238DE3//开卡效果.json"
,
(
data
)
=>
{
loadCloud
(
"cloud://4028B2AAA0799F6D94C6A0398B238DE3//开卡效果.json"
,
(
data
)
=>
{
lottie
.
setup
(
canvas
);
lottie
.
setup
(
canvas
);
let
context
=
canvas
.
getContext
(
'2d'
)
canvas
.
width
=
750
*
dpi
;
canvas
.
height
=
1624
*
dpi
;
let
context
=
canvas
.
getContext
(
'2d'
);
this
.
ani
=
lottie
.
loadAnimation
({
this
.
ani
=
lottie
.
loadAnimation
({
loop
:
false
,
autoplay
:
false
,
loop
:
false
,
autoplay
:
false
,
animationData
:
data
,
animationData
:
data
,
...
@@ -136,6 +151,7 @@ Page({
...
@@ -136,6 +151,7 @@ Page({
},
},
});
});
},
},
//执行助力
async
indexDoHelp
(){
async
indexDoHelp
(){
//如果是首页弹出助力弹窗
//如果是首页弹出助力弹窗
if
(
this
.
inviteId
)
{
if
(
this
.
inviteId
)
{
...
@@ -171,17 +187,16 @@ Page({
...
@@ -171,17 +187,16 @@ Page({
}
}
events
.
emit
(
"doDisibleAll"
,
false
)
events
.
emit
(
"doDisibleAll"
,
false
)
}
else
{
}
else
{
//commonToast('首页助力类型,这是邀请人页面')
//commonToast('首页助力类型,这是邀请人页面')
}
}
},
},
//页面如果邀请行为则弹出助力弹出
isHelp
(){
isHelp
(){
if
(
this
.
inviteId
)
{
if
(
this
.
inviteId
)
{
this
.
showPanel
(
"helppanel"
)
this
.
showPanel
(
"helppanel"
)
}
else
{
//commonToast('首页助力类型,这是邀请人页面')
}
}
},
},
//页面如果包含赠卡行为则弹出赠卡弹窗
isGivingCard
(){
isGivingCard
(){
if
(
this
.
cardId
&&
this
.
cardType
)
{
if
(
this
.
cardId
&&
this
.
cardType
)
{
DataCenter
.
givingCardData
=
{
DataCenter
.
givingCardData
=
{
...
@@ -189,16 +204,15 @@ Page({
...
@@ -189,16 +204,15 @@ Page({
cardType
:
this
.
cardType
cardType
:
this
.
cardType
}
}
this
.
showPanel
(
"givingcardpanel"
)
this
.
showPanel
(
"givingcardpanel"
)
}
else
{
//commonToast('首页助力类型,这是邀请人页面')
}
}
},
},
//跳转我的奖品
onTapIndexRecordBtn
(){
onTapIndexRecordBtn
(){
my
.
navigateTo
({
my
.
navigateTo
({
url
:
"/pages/myprize/myprize"
url
:
"/pages/myprize/myprize"
});
});
},
},
//是否结束
//
活动
是否结束
isEnd
(){
isEnd
(){
if
(
Date
.
now
()
>
DataCenter
.
BaseInfo
.
endTime
){
if
(
Date
.
now
()
>
DataCenter
.
BaseInfo
.
endTime
){
commonToast
(
"活动已结束"
);
commonToast
(
"活动已结束"
);
...
@@ -207,7 +221,7 @@ Page({
...
@@ -207,7 +221,7 @@ Page({
return
false
;
return
false
;
}
}
},
},
//是否未开始
//
活动
是否未开始
isNotBegin
(){
isNotBegin
(){
if
(
Date
.
now
()
<
DataCenter
.
BaseInfo
.
startTime
){
if
(
Date
.
now
()
<
DataCenter
.
BaseInfo
.
startTime
){
commonToast
(
"活动未开始"
);
commonToast
(
"活动未开始"
);
...
@@ -216,8 +230,8 @@ Page({
...
@@ -216,8 +230,8 @@ Page({
return
false
;
return
false
;
}
}
},
},
//更新首页
async
updateData
(){
async
updateData
(){
my
.
showLoading
();
events
.
emit
(
"doDisibleAll"
,
true
)
events
.
emit
(
"doDisibleAll"
,
true
)
const
{
activityId
}
=
getApp
();
const
{
activityId
}
=
getApp
();
//获取活动基础信息
//获取活动基础信息
...
@@ -228,7 +242,6 @@ Page({
...
@@ -228,7 +242,6 @@ Page({
let
{
rule
}
=
BaseInfo
.
data
;
let
{
rule
}
=
BaseInfo
.
data
;
DataCenter
.
rule
=
rule
;
DataCenter
.
rule
=
rule
;
DataCenter
.
BaseInfo
=
BaseInfo
.
data
;
DataCenter
.
BaseInfo
=
BaseInfo
.
data
;
//获取首页基础信息
//获取首页基础信息
let
CollectCardInfo
=
await
API
.
getCollectCardInfo
({
activityId
}).
catch
(
res
=>
{
let
CollectCardInfo
=
await
API
.
getCollectCardInfo
({
activityId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
...
@@ -240,7 +253,6 @@ Page({
...
@@ -240,7 +253,6 @@ Page({
})
||
{};
})
||
{};
DataCenter
.
vipInfo
=
vipInfo
.
data
;
DataCenter
.
vipInfo
=
vipInfo
.
data
;
events
.
emit
(
"doDisibleAll"
,
false
)
events
.
emit
(
"doDisibleAll"
,
false
)
my
.
hideLoading
();
let
{
let
{
joinedTimesPrizeList
,
joinedTimesPrizeList
,
collectedCardTypePrizeList
,
collectedCardTypePrizeList
,
...
@@ -253,7 +265,6 @@ Page({
...
@@ -253,7 +265,6 @@ Page({
}
=
CollectCardInfo
.
data
;
}
=
CollectCardInfo
.
data
;
DataCenter
.
CollectCardInfo
=
CollectCardInfo
.
data
;
DataCenter
.
CollectCardInfo
=
CollectCardInfo
.
data
;
this
.
setData
({
this
.
setData
({
BaseInfo
,
BaseInfo
,
CollectCardInfo
,
CollectCardInfo
,
...
@@ -266,7 +277,6 @@ Page({
...
@@ -266,7 +277,6 @@ Page({
giftCardStatus
,
giftCardStatus
,
taskOpenStatus
taskOpenStatus
})
})
this
.
setCarouselList
()
this
.
setCarouselList
()
},
},
/**
/**
...
@@ -283,36 +293,36 @@ Page({
...
@@ -283,36 +293,36 @@ Page({
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
DataCenter
.
ShareInfo
=
ShareInfo
.
data
;
DataCenter
.
ShareInfo
=
ShareInfo
.
data
;
events
.
emit
(
"doDisibleAll"
,
false
)
events
.
emit
(
"doDisibleAll"
,
false
)
my
.
hideLoading
();
if
(
DataCenter
.
ShareInfo
&&
DataCenter
.
ShareInfo
.
rewards
>
0
){
if
(
DataCenter
.
ShareInfo
&&
DataCenter
.
ShareInfo
.
rewards
>
0
){
this
.
showPanel
(
"invitesuccesspanel"
)
this
.
showPanel
(
"invitesuccesspanel"
)
}
}
},
},
//需要卡牌种类的数量
//需要卡牌种类的数量
onTapUnlockPrizesItem
(
e
){
onTapUnlockPrizesItem
(
e
){
let
needCard
Type
s
=
e
.
target
.
dataset
.
value
;
let
needCards
=
e
.
target
.
dataset
.
value
;
this
.
drawLotteryPrize
(
7
,
needCard
Type
s
)
this
.
drawLotteryPrize
(
7
,
needCards
)
},
},
//需要的抽卡次数
//需要的抽卡次数
onTapIndexDrawItem
(
e
){
onTapIndexDrawItem
(
e
){
let
needTimes
=
e
.
target
.
dataset
.
value
;
let
needTimes
=
e
.
target
.
dataset
.
value
;
this
.
drawLotteryPrize
(
8
,
needTimes
)
this
.
drawLotteryPrize
(
8
,
needTimes
)
},
},
//点击开卡弹窗下的【立即开盒】
doBoxDraw
(){
doBoxDraw
(){
let
{
let
{
joinedTimesPrizeList
,
joinedTimesPrizeList
,
collectedCardTypePrizeList
,
collectedCardTypePrizeList
,
}
=
DataCenter
.
CollectCardInfo
;
}
=
DataCenter
.
CollectCardInfo
;
//先查找种类奖池
//先查找
抽卡
种类奖池
for
(
let
item
of
collectedCardTypePrizeList
.
reverse
()){
for
(
let
item
of
collectedCardTypePrizeList
.
reverse
()){
if
(
item
.
status
==
2
){
if
(
item
.
status
==
2
){
this
.
drawLotteryPrize
(
7
,
item
.
needCard
Type
s
)
this
.
drawLotteryPrize
(
7
,
item
.
needCards
)
return
false
;
return
false
;
}
}
}
}
//再查找次数解锁奖池
//再查找
抽卡
次数解锁奖池
for
(
let
item
of
joinedTimesPrizeList
.
reverse
()){
for
(
let
item
of
joinedTimesPrizeList
.
reverse
()){
if
(
item
.
status
==
2
){
if
(
item
.
status
==
2
){
this
.
drawLotteryPrize
(
8
,
item
.
needTimes
)
this
.
drawLotteryPrize
(
8
,
item
.
needTimes
)
...
@@ -320,6 +330,7 @@ Page({
...
@@ -320,6 +330,7 @@ Page({
}
}
}
}
},
},
//邀请唤起分享面板
inviteTask
(){
inviteTask
(){
BuriedClick
(
BuriedType
.
INVITE_BTN
)
BuriedClick
(
BuriedType
.
INVITE_BTN
)
DataCenter
.
shareType
=
"invite"
;
DataCenter
.
shareType
=
"invite"
;
...
@@ -330,6 +341,7 @@ Page({
...
@@ -330,6 +341,7 @@ Page({
}
}
my
.
showSharePanel
();
my
.
showSharePanel
();
},
},
//赠卡唤起分享面板
givingCard
(){
givingCard
(){
//如果活动结束或者为开始就中断点击事件
//如果活动结束或者为开始就中断点击事件
if
(
this
.
isNotBegin
()
||
this
.
isEnd
()){
if
(
this
.
isNotBegin
()
||
this
.
isEnd
()){
...
@@ -344,6 +356,7 @@ Page({
...
@@ -344,6 +356,7 @@ Page({
}
}
my
.
showSharePanel
();
my
.
showSharePanel
();
},
},
//阶梯奖励抽奖
async
drawLotteryPrize
(
prizeDataType
,
need
){
async
drawLotteryPrize
(
prizeDataType
,
need
){
//如果活动结束或者为开始就中断点击事件
//如果活动结束或者为开始就中断点击事件
if
(
this
.
isNotBegin
()
||
this
.
isEnd
()){
if
(
this
.
isNotBegin
()
||
this
.
isEnd
()){
...
@@ -363,7 +376,6 @@ Page({
...
@@ -363,7 +376,6 @@ Page({
})
||
{};
})
||
{};
DataCenter
.
drawLotteryPrizeData
=
drawLotteryPrizeData
.
data
;
DataCenter
.
drawLotteryPrizeData
=
drawLotteryPrizeData
.
data
;
if
(
drawLotteryPrizeData
&&
drawLotteryPrizeData
.
data
){
if
(
drawLotteryPrizeData
&&
drawLotteryPrizeData
.
data
){
let
{
type
}
=
drawLotteryPrizeData
.
data
;
let
{
type
}
=
drawLotteryPrizeData
.
data
;
if
(
type
==
5
){
if
(
type
==
5
){
...
@@ -495,10 +507,15 @@ Page({
...
@@ -495,10 +507,15 @@ Page({
if
(
doJoin
&&
doJoin
.
success
){
if
(
doJoin
&&
doJoin
.
success
){
DataCenter
.
doJoinData
=
doJoin
;
DataCenter
.
doJoinData
=
doJoin
;
if
(
doJoin
.
data
.
type
==
5
){
this
.
showPanel
(
"noneprizepanel"
)
}
else
{
//打开开卡弹窗前先播放动画
this
.
ani
&&
this
.
ani
.
goToAndStop
(
0
);
this
.
ani
&&
this
.
ani
.
goToAndStop
(
0
);
this
.
ani
&&
this
.
ani
.
play
();
this
.
ani
&&
this
.
ani
.
play
();
this
.
showPanel
(
"getcardpanel"
);
this
.
showPanel
(
"getcardpanel"
);
}
}
}
events
.
emit
(
"updateIndex"
);
events
.
emit
(
"updateIndex"
);
events
.
emit
(
"doDisibleAll"
,
false
)
events
.
emit
(
"doDisibleAll"
,
false
)
},
},
...
@@ -544,11 +561,12 @@ Page({
...
@@ -544,11 +561,12 @@ Page({
...
rest
...
rest
}
=
SHARE_CONFIG
;
}
=
SHARE_CONFIG
;
if
(
app
.
openId
&&
DataCenter
.
shareType
==
"invite"
)
{
if
(
app
.
openId
&&
DataCenter
.
shareType
==
"invite"
)
{
//如果是分享行为
path
+=
'?inviteId='
+
app
.
openId
;
path
+=
'?inviteId='
+
app
.
openId
;
}
else
if
(
app
.
openId
&&
DataCenter
.
shareType
==
"givingCard"
)
{
}
else
if
(
app
.
openId
&&
DataCenter
.
shareType
==
"givingCard"
)
{
//如果是赠卡行为
path
+=
'?cardId='
+
app
.
openId
+
'&cardType='
+
DataCenter
.
cardType
;
path
+=
'?cardId='
+
app
.
openId
+
'&cardType='
+
DataCenter
.
cardType
;
}
}
console
.
log
(
'path'
,
path
)
return
{
return
{
...
rest
,
...
rest
,
title
:
DataCenter
.
shareData
.
shareTitle
,
title
:
DataCenter
.
shareData
.
shareTitle
,
...
...
taobao_mini/client/pages/pageindexpage/your.acss
View file @
a37e1adb
...
@@ -6,6 +6,11 @@
...
@@ -6,6 +6,11 @@
position: relative !important;
position: relative !important;
display: inline-block !important;
display: inline-block !important;
}
}
.loadImg{
opacity:0;
width:0rpx;
height:0rpx;
}
#canvas{
#canvas{
position:fixed;
position:fixed;
top:0;
top:0;
...
@@ -26,6 +31,12 @@
...
@@ -26,6 +31,12 @@
transition: 0.5s;
transition: 0.5s;
}
}
.indexpage .indexcontent .indextips .indextipstext {
width: 500rpx!important;
left: -76rpx !important;
text-align: center!important;
}
.indexpage .indexcontent .indexpropbody .indexpropavatar{
.indexpage .indexcontent .indexpropbody .indexpropavatar{
border-radius:50%
border-radius:50%
}
}
...
...
taobao_mini/client/tbcc-sdk/lib/request.js
View file @
a37e1adb
...
@@ -30,6 +30,12 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -30,6 +30,12 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
const
requestAms
=
()
=>
{
const
requestAms
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
"请求参数详情"
,{
url
:
AMS_URL
+
_cloudName
+
'.'
+
handle
,
method
,
data
:
params
,
dataType
:
'json'
})
my
.
request
({
my
.
request
({
url
:
AMS_URL
+
_cloudName
+
'.'
+
handle
,
url
:
AMS_URL
+
_cloudName
+
'.'
+
handle
,
method
,
method
,
...
@@ -84,6 +90,13 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -84,6 +90,13 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
const
requestCloud
=
()
=>
{
const
requestCloud
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
"请求参数详情"
,{
_cloudName
,
params
,
handle
})
cloud
.
function
.
invoke
(
_cloudName
,
params
,
handle
).
then
(
res
=>
{
cloud
.
function
.
invoke
(
_cloudName
,
params
,
handle
).
then
(
res
=>
{
console
.
log
(
'request Cloud callback=>'
,
handle
,
res
,
JSON
.
stringify
(
res
));
console
.
log
(
'request Cloud callback=>'
,
handle
,
res
,
JSON
.
stringify
(
res
));
// console.log('requestCloud', handle, params, res);
// console.log('requestCloud', handle, params, res);
...
...
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