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
e46cfe63
Commit
e46cfe63
authored
Oct 14, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
8386dcc6
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
310 additions
and
138 deletions
+310
-138
comattion_dan_chuang.js
...t/components/comattion_dan_chuang/comattion_dan_chuang.js
+1
-1
compai_xing_bang.axml
.../client/components/compai_xing_bang/compai_xing_bang.axml
+1
-1
compai_xing_bang.js
...ni/client/components/compai_xing_bang/compai_xing_bang.js
+6
-3
comsui_pian_dan_chuang.js
...mponents/comsui_pian_dan_chuang/comsui_pian_dan_chuang.js
+1
-1
comxin_ren_li_bao.js
.../client/components/comxin_ren_li_bao/comxin_ren_li_bao.js
+6
-0
prizeModal.acss
taobao_mini/client/components/prizeModal/prizeModal.acss
+10
-3
myprize.js
taobao_mini/client/pages/myprize/myprize.js
+62
-66
output.js
taobao_mini/client/pages/pagecanvas/output.js
+6
-6
pageshou_ye.axml
taobao_mini/client/pages/pageshou_ye/pageshou_ye.axml
+4
-4
pageshou_ye.js
taobao_mini/client/pages/pageshou_ye/pageshou_ye.js
+213
-53
No files found.
taobao_mini/client/components/comattion_dan_chuang/comattion_dan_chuang.js
View file @
e46cfe63
...
...
@@ -33,7 +33,7 @@ Component({
if
(
attionfrom
==
"gift"
){
tit
=
"获得抽取年度人气锦鲤大奖的机会
\n
快去抽奖吧"
;
}
else
if
(
attionfrom
==
"prize"
){
tit
=
prizename
+
"新品一双"
;
tit
=
"获得了"
+
prizename
;
}
let
subtit
=
[];
...
...
taobao_mini/client/components/compai_xing_bang/compai_xing_bang.axml
View file @
e46cfe63
...
...
@@ -9,7 +9,7 @@
<label class="dui_you_ren_shu">队友人数</label>
</view>
<view class="wo_de_pai_ming">
<label class="urank{{myData.rank<4?' top3':''}}">{{myData.rank<4?'TOP'+myData.rank:''+myData.rank}}</label>
<label class="urank{{myData.rank<4?' top3':''}}">{{myData.rank<4
&&myData.rank>0
?'TOP'+myData.rank:''+myData.rank}}</label>
<label class="uname">{{myData.userNick}}</label>
<label class="uscore">{{myData.count}}</label>
</view>
...
...
taobao_mini/client/components/compai_xing_bang/compai_xing_bang.js
View file @
e46cfe63
...
...
@@ -10,9 +10,9 @@ Component({
resList
:
resList
,
rankdata
:
[],
myData
:
{
rank
:
"
--
"
,
userNick
:
"
用户x
"
,
count
:
0
rank
:
"
"
,
userNick
:
""
,
count
:
" "
},
pageidx
:
0
,
getpage
:
false
...
...
@@ -73,6 +73,9 @@ Component({
if
(
list
.
length
<
pagesize
)
{
getpage
=
true
;
}
if
(
myRank
.
rank
>
300
){
myRank
.
rank
=
"300+"
}
myRank
.
userNick
=
this
.
changenameShow
(
myRank
.
userNick
);
if
(
!
myRank
.
count
)
myRank
.
count
=
0
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
...
...
taobao_mini/client/components/comsui_pian_dan_chuang/comsui_pian_dan_chuang.js
View file @
e46cfe63
...
...
@@ -56,7 +56,7 @@ Component({
let
tit
=
"你获得了xx碎片"
;
let
subtit
=
""
;
if
(
btntype
==
1
)
{
tit
=
"你获得了"
+
shoesName
+
"碎片"
;
tit
=
"你获得了"
+
shoesName
+
"
系列
碎片"
;
if
(
nearchashare
&&
nearchaprize
.
length
>
0
&&
nearchashare
<=
3
){
subtit
=
"再召唤"
+
nearchashare
+
"位好友就能获得"
+
nearchaprize
;
}
...
...
taobao_mini/client/components/comxin_ren_li_bao/comxin_ren_li_bao.js
View file @
e46cfe63
...
...
@@ -16,6 +16,12 @@ Component({
*/
onOpenGift
(){
const
{
onOpenGift
}
=
this
.
props
;
my
.
setStorageSync
({
key
:
'tbjkactnewgift'
,
data
:
{
click
:
"1"
}
});
onOpenGift
&&
onOpenGift
();
}
},
...
...
taobao_mini/client/components/prizeModal/prizeModal.acss
View file @
e46cfe63
...
...
@@ -19,7 +19,10 @@
.my-prize-page .my-prize-label {
width: 210rpx;
height: 37rpx;
margin: 40rpx auto;
/* position: absolute; */
/* top:140rpx; */
/* left:270rpx; */
margin: 140rpx auto 50rpx;
background: url('//yun.duiba.com.cn/aurora/assets/f0df2ef677f00130a80cdf125c3456febf18c265.png') no-repeat;
background-size: 100% 100%;
}
...
...
@@ -27,12 +30,16 @@
.my-prize-page .my-prize-list {
width: 100%;
height: auto;
}
.my-prize-page .my-prize-empty {
width: 750rpx;
text-align: center;
color: #fff;
margin-top: 60rpx;
/* position: absolute; */
/* top:350rpx; */
margin-top: 150rpx;
letter-spacing: 1rpx;
}
...
...
@@ -84,7 +91,7 @@
.my-prize-page .my-prize-item .prize-status {
width: 150rpx;
height: 4
1
rpx;
height: 4
0
rpx;
}
.prize-status>image {
...
...
taobao_mini/client/pages/myprize/myprize.js
View file @
e46cfe63
...
...
@@ -33,8 +33,8 @@ Page({
copyIcon
:
'//yun.dui88.com/duiba-components-c-myprizemyprize_copy_code.png'
,
//复制
},
btnStyle
:
{
// 按钮自定义样式
width
:
'15
4
rpx'
,
height
:
'4
9
rpx'
,
width
:
'15
0
rpx'
,
height
:
'4
0
rpx'
,
}
}
},
...
...
@@ -146,18 +146,18 @@ Page({
}
flag
=
true
;
const
{
item
:
{
strategyCode
,
code
,
channel
}
}
=
e
.
target
.
dataset
;
this
.
cloudTBIssue
({
strategyCode
,
code
,
channel
})
//
const { activityId } = app;
//
console.log(item, '领取权益')
// const { success, data, message } = await API.receiveEnamePrize({ activityId, _
id: item._id }).catch(res => {
//
this.getMyPrize('noLoading')
//
commonToast(res && res.message)
//
}) || {};
//
if (success && data) {
//
commonToast('领取成功')
//
this.getMyPrize()
//
}
//
const { item: { strategyCode, code, channel } } = e.target.dataset;
//
this.cloudTBIssue({ strategyCode, code, channel })
const
{
activityId
}
=
app
;
console
.
log
(
item
,
'领取权益'
)
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
activityId
,
id
:
item
.
_id
}).
catch
(
res
=>
{
this
.
getMyPrize
(
'noLoading'
)
commonToast
(
res
&&
res
.
message
)
})
||
{};
if
(
success
&&
data
)
{
commonToast
(
'领取成功'
)
this
.
getMyPrize
()
}
...
...
@@ -169,57 +169,53 @@ Page({
},
// 领取实物前询问
async
handleGetEntity
(
e
)
{
const
text
=
'zzzxxx'
commonToast
(
'请前去钉钉领取,钉钉号为:'
+
text
+
'。钉钉号已经复制成功。'
,
3000
);
setClipboard
({
text
:
`
${
text
}
`
})
// if (flag) {
// return
// }
// // my.showLoading();
// flag = true;
// const { activityId } = app;
// const { item } = e.target.dataset;
// const userAddress = await getUserAddress({ joinTag: " " }).catch((data) => {
// flag = false
// console.log('getUserAddress出错了,错误信息是', data);
// })
// // my.hideLoading();
// if (!userAddress) return
// // commonToast(' getUserAddress =>'+JSON.stringify( userAddress))
// const { name, telNumber, provinceName, cityName, cityCode, countyName, detailInfo, streetName } = userAddress || {};
// const params = {
// activityId,
// area: countyName,
// addressdetail: detailInfo,
// name,
// phone: telNumber,
// detailInfo,
// cityCode,
// cityName,
// city: cityName,
// province: provinceName,
// provinceName,
// countyName,
// streetName,
// _id: item._id
// }
if
(
flag
)
{
return
}
// my.showLoading();
flag
=
true
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
userAddress
=
await
getUserAddress
({
joinTag
:
""
}).
catch
((
data
)
=>
{
flag
=
false
console
.
log
(
'getUserAddress出错了,错误信息是'
,
data
);
})
// my.hideLoading();
if
(
!
userAddress
)
return
// commonToast(' getUserAddress =>'+JSON.stringify( userAddress))
const
{
name
,
telNumber
,
provinceName
,
cityName
,
cityCode
,
countyName
,
detailInfo
,
streetName
}
=
userAddress
||
{};
const
params
=
{
activityId
,
area
:
countyName
,
addressDetail
:
detailInfo
,
name
,
phone
:
telNumber
,
detailInfo
,
cityCode
,
cityName
,
city
:
cityName
,
province
:
provinceName
,
provinceName
,
countyName
,
streetName
,
id
:
item
.
_id
}
//
my.confirm({
//
title: '提示',
//
content: '确认使用该收货地址:' + name + telNumber + userAddress.duibaAddress.address,
//
confirmButtonText: '确定',
//
cancelButtonText: '取消',
//
success: (result) => {
//
console.log(result)
//
const { confirm } = result;
my
.
confirm
({
title
:
'提示'
,
content
:
'确认使用该收货地址:'
+
name
+
telNumber
+
userAddress
.
duibaAddress
.
address
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
success
:
(
result
)
=>
{
console
.
log
(
result
)
const
{
confirm
}
=
result
;
//
if (confirm) {
//
this.receiveObjectPrize(params);
//
}
//
},
//
});
//
flag = false
if
(
confirm
)
{
this
.
receiveObjectPrize
(
params
);
}
},
});
flag
=
false
},
// 领取实物
async
receiveObjectPrize
(
params
)
{
...
...
@@ -260,11 +256,11 @@ Page({
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
item
,
'领取积分'
)
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
activityId
,
_id
:
item
.
_id
})
||
{};
const
{
success
,
data
}
=
await
API
.
receiveEnamePrize
({
activityId
,
id
:
item
.
_id
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
)
})
||
{};
if
(
success
&&
data
)
{
commonToast
(
'领取成功'
)
}
else
{
commonToast
(
message
)
}
flag
=
false
this
.
getMyPrize
()
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
e46cfe63
...
...
@@ -1791,12 +1791,12 @@ var StartScene = (function (_super) {
return
__generator
(
this
,
function
(
_a
)
{
this
.
whiteani
=
new
FYGE
.
Lottie
(
whitedia_1
.
whitedia
);
this
.
addChild
(
this
.
whiteani
);
itxt
=
new
FYGE
.
TextField
();
itxt
.
size
=
66
;
itxt
.
text
=
"测试动画"
;
itxt
.
fillColor
=
"red"
;
this
.
addChild
(
itxt
);
itxt
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
resetani
,
this
);
//
itxt = new FYGE.TextField();
//
itxt.size = 66;
//
itxt.text = "测试动画";
//
itxt.fillColor = "red";
//
this.addChild(itxt);
//
itxt.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.resetani, this);
return
[
2
];
});
});
...
...
taobao_mini/client/pages/pageshou_ye/pageshou_ye.axml
View file @
e46cfe63
...
...
@@ -63,7 +63,7 @@
</view>
<view class="pic7{{selected==2&&!cardCountList[7]||cardCountList[7]==0?' blackWhiteFilter':''}}">
<image class="picimg7" src={{resList[selshoesname+7].url}} />
<view class="picredot7" a:if="{{selected==2&&cardCountList[7]&&cardCountList[7]>
0
}}">
<view class="picredot7" a:if="{{selected==2&&cardCountList[7]&&cardCountList[7]>
1
}}">
<image class="picredotimg7" src={{resList['9b49cfcd-9ce8-4fe2-bfc0-17532b0ff35b'].url}} />
<label class="picredotnum7">{{cardCountList[7]}}</label>
</view>
...
...
@@ -87,7 +87,7 @@
<view class="ptnode">
<image class="showallimg ptimgani" a:if="{{ptimg_v}}" src={{ptimgbig}} />
</view>
<view class="finapt" a:if="{{selected!=2||
isduihuan
}}">
<view class="finapt" a:if="{{selected!=2||
(isduihuan&&!ptimg_v)
}}">
<image class="finaptdi" src={{resList['56d322ae-bfcb-4d03-b5bc-81603cb2fe5b'].url}} />
<image class="finaptimg" src={{ptimgbig}} />
</view>
...
...
@@ -197,8 +197,8 @@
<label class="prizenumstxt4" a:if="{{inviteAwardList[3].type==1}}">{{inviteAwardList[3].rewards+""}}次</label>
</view>
</view>
<image class="hui_yuan_zhuan_qu" onTap="registerVip" src={{
resList['d1159e9d-900f-45cf-874f-f7efec6ad918'].url
}} />
<image class="shuang_shi_yi_zhuan_qu" onTap="registerD11" src={{
resList['e9a0ad73-6fe7-40bd-98cc-9a985bc413e7'].url
}} />
<image class="hui_yuan_zhuan_qu" onTap="registerVip" src={{
sourceImg1
}} />
<image class="shuang_shi_yi_zhuan_qu" onTap="registerD11" src={{
sourceImg2
}} />
</view>
</view>
</view>
...
...
taobao_mini/client/pages/pageshou_ye/pageshou_ye.js
View file @
e46cfe63
...
...
@@ -28,7 +28,7 @@ Page({
choose_v
:
false
,
//choose
showdia
:
false
,
//有无弹窗层
canscroll
:
false
,
//可否滑动
btnready
:
false
,
//按钮可否点击
//活动基本信息
rule
:
""
,
startTime
:
0
,
...
...
@@ -36,6 +36,8 @@ Page({
awardReceiveExpiredTime
:
1
,
source1
:
""
,
source2
:
""
,
sourceImg1
:
""
,
sourceImg2
:
""
,
shoesList
:
[],
selectShoesList
:
[
""
,
""
,
""
,
""
,
""
...
...
@@ -56,7 +58,7 @@ Page({
ptimgbig
:
""
,
//选中的鞋子big
//两个全局按钮点击,除我的奖品和活动规则外,1活动已结束,2请先打开新手礼盒
actover
:
tru
e
,
//活动是否已经结束
actover
:
fals
e
,
//活动是否已经结束
opengift
:
false
,
//是否领取新人奖励,对应接口hasTakeFirstPrize
nickname
:
"张三"
,
...
...
@@ -92,7 +94,7 @@ Page({
//选鞋阶段,单选不可取消
nselid
:
1
,
//默认选中1,,,,psd顺序,1-机甲,2-减震,3-二次元,4-山海,5--
暂无,定山海
nselid
:
1
,
//默认选中1,,,,psd顺序,1-机甲,2-减震,3-二次元,4-山海,5--
天乘
//弹窗序列
dialogsData
:
[
...
...
@@ -194,13 +196,17 @@ Page({
//第一个弹窗
checkOpenAttion
()
{
let
needattion
=
this
.
data
.
needattion
;
console
.
log
(
"第一个弹窗===>"
,
needattion
);
if
(
needattion
)
{
let
dialogsData
=
this
.
data
.
dialogsData
;
this
.
changeBtnReady
(
true
);
if
(
dialogsData
.
length
>
0
&&
needattion
)
{
this
.
setData
({
needattion
:
false
});
this
.
openDialogSx
();
}
else
{
}
},
firstShow
(
e
)
{
// console.log("firstshow", Document);
...
...
@@ -299,6 +305,12 @@ Page({
const
{
nickName
,
avatar
}
=
app
;
const
{
success
,
data
}
=
await
API
.
login
({
userNick
:
nickName
,
avatar
:
avatar
,
isFollow
:
false
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
if
(
res
&&
res
.
code
==
"220003"
){
this
.
setData
({
actover
:
true
});
this
.
init
();
}
})
||
{};
if
(
success
)
{
...
...
@@ -311,11 +323,11 @@ Page({
*/
async
init
()
{
// console.log("获取基本信息");
//获取vip信息
await
this
.
checkIsVip
();
this
.
getactivityData
();
console
.
log
(
"from=====>init"
);
this
.
getUserCardInfo
();
//获取vip信息
await
this
.
checkIsVip
();
},
/**
* 获取基本信息
...
...
@@ -326,22 +338,24 @@ Page({
})
||
{};
const
{
success
,
data
}
=
activityInfo
;
if
(
success
)
{
const
{
rule
,
startTime
,
endTime
,
awardReceiveExpiredTime
,
source1
,
source2
,
shoesList
}
=
data
;
const
{
rule
,
startTime
,
endTime
,
awardReceiveExpiredTime
,
source1
,
source2
,
shoesList
,
sourceImg1
,
sourceImg2
}
=
data
;
let
datenow
=
Date
.
now
();
let
actover
=
false
;
if
(
datenow
>=
endTime
)
{
//活动未结束
actover
=
true
;
}
//
let actover = false;
//
if (datenow >= endTime) {//活动未结束
//
actover = true;
//
}
this
.
setData
({
rule
:
rule
,
startTime
:
startTime
,
endTime
:
endTime
,
actover
:
actover
,
//
actover: actover,
awardReceiveExpiredTime
:
awardReceiveExpiredTime
,
source1
:
source1
,
source2
:
source2
,
shoesList
:
shoesList
})
shoesList
:
shoesList
,
sourceImg1
:
sourceImg1
,
sourceImg2
:
sourceImg2
});
}
},
/**
...
...
@@ -350,7 +364,8 @@ Page({
async
getUserCardInfo
()
{
//进来提示助力
let
lselected
=
this
.
data
.
selected
;
if
(
lselected
==
0
&&
app
.
inviteId
&&
app
.
shoestype
)
{
//进来,提示助力弹窗
let
actover
=
this
.
data
.
actover
;
if
(
!
actover
&&
lselected
==
0
&&
app
.
inviteId
&&
app
.
shoestype
)
{
//进来,提示助力弹窗
let
myid
=
app
.
openId
;
let
inid
=
app
.
inviteId
;
if
(
myid
!=
inid
)
{
...
...
@@ -392,10 +407,7 @@ Page({
}
else
{
//todo,实际的选鞋
}
if
(
selected
==
2
)
{
this
.
getDrawTimes
();
this
.
getInviteAwardsList
();
}
if
(
!
shoesType
)
{
if
(
this
.
data
.
shoesType
)
{
shoesType
=
this
.
data
.
shoesType
;
...
...
@@ -454,9 +466,15 @@ Page({
opengift
:
hasTakeFirstPrize
,
selshoesname
:
selshoesname
});
this
.
checkGiftType
();
this
.
checkOpenNgift
();
if
(
selected
==
2
)
{
this
.
getDrawTimes
();
this
.
getInviteAwardsList
();
}
else
{
this
.
checkGiftType
();
}
// this.checkOpenInfo1();
}
else
{
if
(
this
.
data
.
selected
==
0
)
{
...
...
@@ -472,6 +490,7 @@ Page({
}
//selected==1
if
(
this
.
data
.
selected
==
1
)
{
my
.
clearStorageSync
();
this
.
getPickShoesList
();
}
},
...
...
@@ -583,9 +602,18 @@ Page({
let
collectedCount
=
this
.
data
.
collectedCount
;
let
opengift
=
this
.
data
.
opengift
;
let
selected
=
this
.
data
.
selected
;
console
.
log
(
"新人弹窗===》"
,
opengift
,
selected
);
if
(
!
opengift
&&
selected
==
2
)
{
//新人
// this.openGift();
//判断有无点过会员按钮
let
res1
=
my
.
getStorageSync
({
key
:
'tbjkactnewgift'
});
if
(
res1
&&
res1
.
data
)
{
this
.
addDialogsData
({},
"xinshouprize"
);
}
else
{
this
.
addDialogsData
({},
"xinshou"
);
}
}
else
{
// this.setData({
// opengift: true
...
...
@@ -597,6 +625,10 @@ Page({
* 打开礼盒
*/
async
onOpenGift
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
let
giftype
=
this
.
data
.
giftype
;
console
.
log
(
"打开礼盒"
,
giftype
);
...
...
@@ -613,7 +645,7 @@ Page({
this
.
setData
({
attionfrom
:
"gift"
,
prizebtntype
:
2
,
prizeimg
:
resList
[
"shanhai
big"
].
url
prizeimg
:
resList
[
this
.
data
.
selshoesname
+
"
big"
].
url
});
this
.
openAttion
();
}
...
...
@@ -624,17 +656,22 @@ Page({
async
getOpenNgift
()
{
// console.log("领取新人礼===========》?");
//领取新人礼
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
if
(
this
.
data
.
isVip
)
{
}
else
{
commonToast
(
'1秒成为会员,即可参与游戏哦'
,
2000
);
let
vipLink
=
this
.
data
.
vipLink
;
setTimeout
(()
=>
{
navigateToOutside
(
vipLink
)
},
1000
)
this
.
openGift
();
// commonToast('1秒成为会员,即可参与游戏哦', 2000);
// let vipLink = this.data.vipLink;
// setTimeout(() => {
// navigateToOutside(vipLink)
// }, 1000)
return
;
}
this
.
changeBtnReady
(
false
);
let
firstprize
=
await
API
.
takeFirstPrize
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
...
...
@@ -655,6 +692,7 @@ Page({
this
.
closeGift
();
this
.
openSp
();
}
this
.
changeBtnReady
(
true
);
},
/**
* 进来新老会员区分
...
...
@@ -693,6 +731,11 @@ Page({
* 助力
*/
async
doHelp
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
this
.
changeBtnReady
(
false
);
if
(
!
app
.
inviteId
)
return
;
commonToast
(
'正在发起助力~'
)
const
{
...
...
@@ -708,6 +751,7 @@ Page({
if
(
success
)
{
commonToast
(
'助力成功~'
);
}
this
.
changeBtnReady
(
true
);
},
/**
* 获取鞋子已选列表
...
...
@@ -745,6 +789,10 @@ Page({
},
//规则弹窗
openRule
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
this
.
setData
({
rule_v
:
true
,
});
...
...
@@ -758,6 +806,10 @@ Page({
},
//排行弹窗
openRank
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
this
.
setData
({
rank_v
:
true
,
});
...
...
@@ -823,6 +875,10 @@ Page({
},
//choose
openChoose
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
this
.
setData
({
choose_v
:
true
});
...
...
@@ -847,12 +903,21 @@ Page({
//prize
openPrize
()
{
// console.log("跳转奖品===todo");
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
my
.
navigateTo
({
url
:
'/pages/myprize/myprize'
});
},
//选鞋阶段
selectShoes1
(
e
)
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
// console.log("选鞋===》",e.currentTarget);
let
dataset
=
e
.
currentTarget
.
dataset
;
if
(
dataset
)
{
...
...
@@ -870,6 +935,10 @@ Page({
},
//集碎片
async
collectSp
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
let
cancontinue
=
this
.
checkClickBtn
();
if
(
!
cancontinue
)
{
return
false
;
...
...
@@ -892,6 +961,7 @@ Page({
this
.
openInfo
();
return
;
}
this
.
changeBtnReady
(
false
);
let
docardata
=
await
API
.
doCardDraw
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
...
...
@@ -929,6 +999,7 @@ Page({
this
.
openSp
();
},
500
);
}
this
.
changeBtnReady
(
true
);
},
/**
* 再抽一次
...
...
@@ -958,6 +1029,10 @@ Page({
},
//收集完碎片,兑奖
async
getSprize
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
// console.log("兑奖点击");
let
cancontinue
=
this
.
checkClickBtn
();
if
(
!
cancontinue
)
{
...
...
@@ -967,33 +1042,48 @@ Page({
// console.log("兑换过了");
return
;
}
this
.
changeBtnReady
(
false
);
// console.log("收集碎片完毕,去兑奖");
//
let collectPrize = await API.takeCollectedPrize().catch(res => {
//
commonToast(res && res.message);
//
}) || {};
let
collectPrize
=
{
success
:
true
,
data
:
{
"name"
:
"山海"
,
"type"
:
3
,
"image"
:
"//yun.duiba.com.cn/spark/assets/原图二次元.a0ae5554ff69d2bd72fe3ad759da2fe6c914f280.jpg"
}
}
let
collectPrize
=
await
API
.
takeCollectedPrize
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
//
let collectPrize = {
//
success: true,
//
data: {
//
"name": "山海",
//
"type": 3,
//
"image": "//yun.duiba.com.cn/spark/assets/原图二次元.a0ae5554ff69d2bd72fe3ad759da2fe6c914f280.jpg"
//
}
//
}
// console.log("兑换结果", collectPrize);
const
{
success
,
data
}
=
collectPrize
;
this
.
showPrizePage
(
success
,
data
,
"duihuan"
);
if
(
success
)
{
// this.setData({
// isduihuan: true
// });
}
this
.
changeBtnReady
(
true
);
},
/**
* 锦鲤大奖抽奖
*/
async
onOpenJlGift
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
this
.
changeBtnReady
(
false
);
let
glPrizeData
=
await
API
.
takeRankPrize
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
// console.log("抽奖结果", glPrizeData);
const
{
success
,
data
}
=
glPrizeData
;
this
.
showPrizePage
(
success
,
data
);
this
.
changeBtnReady
(
true
);
this
.
setData
({
canTakeRankPrize
:
false
});
},
/**
* 中奖结果弹窗
...
...
@@ -1017,32 +1107,59 @@ Page({
infotopshow
:
false
,
infotit
:
"很遗憾
\n
大奖与你擦肩而过啦"
})
if
(
atype
==
"prize"
)
{
this
.
openInfo
();
}
else
{
this
.
playPrizeAni
(
this
.
openInfo
.
bind
(
this
));
}
}
else
{
if
(
atype
==
"prize"
)
{
this
.
openAttion
();
}
else
{
//动效
this
.
setData
({
whitept_v
:
true
,
ptimg_v
:
true
,
ptimg_ani
:
true
});
setTimeout
(()
=>
{
this
.
openAttion
();
},
800
);
this
.
playPrizeAni
(
this
.
openAttion
.
bind
(
this
));
}
}
}
else
{
//失败进谢谢参与
console
.
log
(
"谢谢参与"
)
this
.
setData
({
infobtntype
:
1
,
infotopshow
:
false
,
infotit
:
"很遗憾
\n
奖品发完啦 下次要赶早哦~"
})
});
if
(
atype
==
"prize"
)
{
this
.
openInfo
();
}
else
{
this
.
playPrizeAni
(
this
.
openInfo
.
bind
(
this
));
}
// setTimeout(() => {
// this.openInfo();
// this.setData({
// isduihuan: true
// });
// })
}
},
//兑奖动效
playPrizeAni
(
call
)
{
this
.
setData
({
whitept_v
:
true
,
ptimg_v
:
true
,
ptimg_ani
:
true
});
setTimeout
(()
=>
{
call
&
call
();
this
.
setData
({
isduihuan
:
true
});
},
800
);
},
//邀请好友
shareAct
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
let
cancontinue
=
this
.
checkClickBtn
();
if
(
!
cancontinue
)
{
return
false
;
...
...
@@ -1057,6 +1174,10 @@ Page({
},
//邀请奖励
async
getSarePrize
(
e
)
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
// console.log("获取邀请好友奖励", e);
let
dataset
=
e
.
currentTarget
.
dataset
;
if
(
dataset
)
{
...
...
@@ -1073,6 +1194,7 @@ Page({
return
false
;
}
console
.
log
(
"发起请求=======》"
);
this
.
changeBtnReady
(
false
);
let
invitePrize
=
await
API
.
takeInvitePrize
({
type
:
pidx
}).
catch
(
res
=>
{
...
...
@@ -1107,18 +1229,29 @@ Page({
}
this
.
changeBtnReady
(
true
);
}
}
},
//会员专区
registerVip
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
// console.log("会员专区");
this
.
addStat
(
"banner1"
);
let
url
=
this
.
data
.
source1
;
navigateToOutside
(
url
);
},
//双十一会场链接
registerD11
()
{
let
btnready
=
this
.
checkbtnReady
();
if
(
!
btnready
)
{
return
;
}
// console.log("双十一专区");
this
.
addStat
(
"banner2"
);
let
url
=
this
.
data
.
source2
;
navigateToOutside
(
url
);
},
...
...
@@ -1204,5 +1337,32 @@ Page({
dialogsData
:
dialogsData
});
}
},
//埋点
addStat
(
type
)
{
try
{
API
.
addStat
({
type
:
type
}).
catch
(
res
=>
{
});
}
catch
(
e
)
{
}
},
//修改按钮点击
changeBtnReady
(
_v
)
{
this
.
setData
({
btnready
:
_v
});
},
//按钮可否点击
checkbtnReady
()
{
let
btnready
=
this
.
data
.
btnready
;
if
(
btnready
)
{
return
true
;
}
else
{
return
false
;
}
}
});
\ 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