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