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
fe59ad8e
Commit
fe59ad8e
authored
Oct 16, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进度条修改
parent
d2900717
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
30 deletions
+77
-30
pageshou_ye.js
taobao_mini/client/pages/pageshou_ye/pageshou_ye.js
+77
-30
No files found.
taobao_mini/client/pages/pageshou_ye/pageshou_ye.js
View file @
fe59ad8e
...
...
@@ -54,7 +54,7 @@ Page({
nearchaprize
:
""
,
//再召唤xx好友得奖励x
isVip
:
false
,
vipLink
:
""
,
clickVip
:
""
,
clickVip
:
""
,
giftype
:
3
,
//1-新手礼盒,2-惊喜礼盒,3-锦鲤礼盒,0-都不显示
ptimgbig
:
""
,
//选中的鞋子big
...
...
@@ -270,14 +270,14 @@ Page({
console
.
log
(
"onshow=========>"
);
let
clickVip
=
this
.
data
.
clickVip
;
if
(
clickVip
==
"xinshou"
)
{
if
(
clickVip
==
"xinshou"
)
{
this
.
checkBackNgift
();
}
else
if
(
clickVip
==
"zhuli"
)
{
this
.
check
IsVip
();
}
else
if
(
clickVip
==
"zhuli"
)
{
this
.
check
BackZhuli
();
}
this
.
setData
({
clickVip
:
""
});
this
.
setData
({
clickVip
:
""
});
// 页面显示
},
onHide
()
{
...
...
@@ -285,14 +285,23 @@ Page({
// 页面隐藏
},
//onshow给新手
async
checkBackNgift
(){
async
checkBackNgift
()
{
await
this
.
checkIsVip
();
let
isvip
=
this
.
data
.
isVip
;
if
(
isvip
)
{
if
(
isvip
)
{
this
.
closeGift
();
this
.
getOpenNgift
();
}
},
//onshow助力
async
checkBackZhuli
()
{
this
.
checkIsVip
();
let
isvip
=
this
.
data
.
isVip
;
if
(
isvip
)
{
this
.
closeSp
();
this
.
doHelp
();
}
},
/**
* startAni
*/
...
...
@@ -347,12 +356,12 @@ Page({
async
init
()
{
// console.log("获取基本信息");
//获取vip信息
this
.
getUserCardInfo
();
this
.
getactivityData
();
console
.
log
(
"from=====>init"
);
},
/**
* 获取基本信息
...
...
@@ -365,10 +374,10 @@ Page({
if
(
success
)
{
const
{
rule
,
startTime
,
endTime
,
awardReceiveExpiredTime
,
source1
,
source2
,
shoesList
,
sourceImg1
,
sourceImg2
}
=
data
;
const
serverTime
=
await
getServerTime
().
catch
(()
=>
{})
const
serverTime
=
await
getServerTime
().
catch
(()
=>
{
})
// let datenow = Date.now();
let
actover
=
false
;
if
(
serverTime
&&
serverTime
>
endTime
)
{
//活动未结束
if
(
serverTime
&&
serverTime
>
endTime
)
{
//活动未结束
actover
=
true
;
}
this
.
setData
({
...
...
@@ -414,7 +423,7 @@ Page({
})
||
{};
const
{
success
,
data
}
=
userinfo
;
if
(
success
)
{
console
.
log
(
"我的信息"
,
userinfo
);
let
{
shoesName
,
cardCountList
,
collectedCount
,
canTakeRankPrize
,
shoesType
,
inviteResult
,
hasTakeCollectedPrize
,
hasTakeFirstPrize
}
=
data
;
let
selected
=
2
;
...
...
@@ -495,7 +504,7 @@ Page({
opengift
:
hasTakeFirstPrize
,
selshoesname
:
selshoesname
});
if
(
lselected
==
0
)
{
if
(
lselected
==
0
)
{
await
this
.
checkIsVip
();
}
...
...
@@ -591,24 +600,62 @@ Page({
// console.log("邀请奖励", shareaward);
const
{
success
,
data
}
=
shareaward
;
if
(
success
)
{
const
{
list
,
inviteCount
}
=
data
;
//
let
{
list
,
inviteCount
}
=
data
;
// list[0].times = 5;
// list[1].times = 7;
// list[2].times = 30;
// list[3].times = 36;
// //
// inviteCount = 6;
let
nearchashare
=
0
;
let
nearchaprize
=
""
;
let
prostartx
=
-
438
;
let
proendx
=
0
;
let
levelpro
=
0
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
idata
=
list
[
i
];
let
itimes
=
idata
.
times
;
if
(
itimes
>
inviteCount
&&
nearchashare
==
0
)
{
//最近差多少
if
(
itimes
>=
inviteCount
&&
nearchashare
==
0
)
{
//最近差多少
nearchashare
=
itimes
-
inviteCount
;
let
itype
=
Number
(
idata
.
type
);
nearchaprize
=
[
"抽碎片次数"
,
"随机稀有碎片"
,
"未收录碎片"
][
itype
-
1
];
if
(
i
==
0
)
{
prostartx
=
-
438
;
proendx
=
-
410
;
levelpro
=
inviteCount
/
itimes
;
}
else
if
(
i
==
1
)
{
prostartx
=
-
410
;
proendx
=
nearchashare
>
0
?
-
300
:
-
275
;
levelpro
=
nearchashare
>
0
?
inviteCount
/
(
itimes
-
1
):
1
;
}
else
if
(
i
==
2
){
prostartx
=
-
275
;
proendx
=
nearchashare
>
0
?
-
165
:
-
138
;
levelpro
=
nearchashare
>
0
?
inviteCount
/
(
itimes
-
1
):
1
;
}
else
if
(
i
==
3
){
prostartx
=
-
138
;
proendx
=
nearchashare
>
0
?
-
28
:
0
;
levelpro
=
nearchashare
>
0
?
inviteCount
/
(
itimes
-
1
):
1
;
}
if
(
nearchashare
!=
0
)
{
let
itype
=
Number
(
idata
.
type
);
nearchaprize
=
[
"抽碎片次数"
,
"随机稀有碎片"
,
"未收录碎片"
][
itype
-
1
];
}
break
;
}
}
let
sharepro
=
inviteCount
/
list
[
list
.
length
-
1
].
times
;
// console.log("代码暂存233====》",sharepro,inviteCount,list[list.length-1].times);
if
(
sharepro
>
1
)
sharepro
=
1
;
let
sharepropos
=
438
*
(
sharepro
-
1
)
+
'rpx 0rpx'
;
let
sharepropos
=
'-438rpx 0rpx'
;
if
(
inviteCount
>=
list
[
list
.
length
-
1
].
times
){
sharepropos
=
'0rpx orpx'
;
}
else
{
sharepropos
=
(
proendx
-
prostartx
)
*
levelpro
+
prostartx
+
'rpx 0rpx'
;
}
// let sharepro = inviteCount / list[list.length - 1].times;
// // console.log("代码暂存233====》",sharepro,inviteCount,list[list.length-1].times);
// if (sharepro > 1) sharepro = 1;
// let sharepropos = 438 * (sharepro - 1) + 'rpx 0rpx';
let
nearchatxt
=
""
;
if
(
nearchashare
>
0
)
{
...
...
@@ -643,7 +690,7 @@ Page({
// if (res1 && res1.data) {
// this.addDialogsData({}, "xinshouprize");
// } else {
this
.
addDialogsData
({},
"xinshou"
);
this
.
addDialogsData
({},
"xinshou"
);
// }
}
else
{
// this.setData({
...
...
@@ -699,7 +746,7 @@ Page({
let
vipLink
=
this
.
data
.
vipLink
;
setTimeout
(()
=>
{
this
.
setData
({
clickVip
:
"xinshou"
clickVip
:
"xinshou"
});
navigateToOutside
(
vipLink
)
},
1000
)
...
...
@@ -758,7 +805,7 @@ Page({
let
vipLink
=
this
.
data
.
vipLink
;
setTimeout
(()
=>
{
this
.
setData
({
clickVip
:
"zhuli"
clickVip
:
"zhuli"
});
navigateToOutside
(
vipLink
);
},
1000
)
...
...
@@ -1116,10 +1163,10 @@ Page({
})
||
{};
// console.log("抽奖结果", glPrizeData);
const
{
success
,
data
}
=
glPrizeData
;
if
(
success
)
{
if
(
success
)
{
this
.
showPrizePage
(
success
,
data
);
}
this
.
changeBtnReady
(
true
);
this
.
setData
({
canTakeRankPrize
:
false
...
...
@@ -1309,7 +1356,7 @@ Page({
if
(
app
.
openId
)
{
path
=
'/pages/pageshou_ye/pageshou_ye'
+
'?openId='
+
app
.
openId
+
"&shoestype="
+
this
.
data
.
shoesType
;
}
console
.
log
(
'path'
,
path
)
return
{
...
...
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