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
Show 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({
...
@@ -54,7 +54,7 @@ Page({
nearchaprize
:
""
,
//再召唤xx好友得奖励x
nearchaprize
:
""
,
//再召唤xx好友得奖励x
isVip
:
false
,
isVip
:
false
,
vipLink
:
""
,
vipLink
:
""
,
clickVip
:
""
,
clickVip
:
""
,
giftype
:
3
,
//1-新手礼盒,2-惊喜礼盒,3-锦鲤礼盒,0-都不显示
giftype
:
3
,
//1-新手礼盒,2-惊喜礼盒,3-锦鲤礼盒,0-都不显示
ptimgbig
:
""
,
//选中的鞋子big
ptimgbig
:
""
,
//选中的鞋子big
...
@@ -270,13 +270,13 @@ Page({
...
@@ -270,13 +270,13 @@ Page({
console
.
log
(
"onshow=========>"
);
console
.
log
(
"onshow=========>"
);
let
clickVip
=
this
.
data
.
clickVip
;
let
clickVip
=
this
.
data
.
clickVip
;
if
(
clickVip
==
"xinshou"
)
{
if
(
clickVip
==
"xinshou"
)
{
this
.
checkBackNgift
();
this
.
checkBackNgift
();
}
else
if
(
clickVip
==
"zhuli"
)
{
}
else
if
(
clickVip
==
"zhuli"
)
{
this
.
check
IsVip
();
this
.
check
BackZhuli
();
}
}
this
.
setData
({
this
.
setData
({
clickVip
:
""
clickVip
:
""
});
});
// 页面显示
// 页面显示
},
},
...
@@ -285,14 +285,23 @@ Page({
...
@@ -285,14 +285,23 @@ Page({
// 页面隐藏
// 页面隐藏
},
},
//onshow给新手
//onshow给新手
async
checkBackNgift
(){
async
checkBackNgift
()
{
await
this
.
checkIsVip
();
await
this
.
checkIsVip
();
let
isvip
=
this
.
data
.
isVip
;
let
isvip
=
this
.
data
.
isVip
;
if
(
isvip
)
{
if
(
isvip
)
{
this
.
closeGift
();
this
.
closeGift
();
this
.
getOpenNgift
();
this
.
getOpenNgift
();
}
}
},
},
//onshow助力
async
checkBackZhuli
()
{
this
.
checkIsVip
();
let
isvip
=
this
.
data
.
isVip
;
if
(
isvip
)
{
this
.
closeSp
();
this
.
doHelp
();
}
},
/**
/**
* startAni
* startAni
*/
*/
...
@@ -365,10 +374,10 @@ Page({
...
@@ -365,10 +374,10 @@ Page({
if
(
success
)
{
if
(
success
)
{
const
{
rule
,
startTime
,
endTime
,
awardReceiveExpiredTime
,
source1
,
source2
,
shoesList
,
sourceImg1
,
sourceImg2
}
=
data
;
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 datenow = Date.now();
let
actover
=
false
;
let
actover
=
false
;
if
(
serverTime
&&
serverTime
>
endTime
)
{
//活动未结束
if
(
serverTime
&&
serverTime
>
endTime
)
{
//活动未结束
actover
=
true
;
actover
=
true
;
}
}
this
.
setData
({
this
.
setData
({
...
@@ -495,7 +504,7 @@ Page({
...
@@ -495,7 +504,7 @@ Page({
opengift
:
hasTakeFirstPrize
,
opengift
:
hasTakeFirstPrize
,
selshoesname
:
selshoesname
selshoesname
:
selshoesname
});
});
if
(
lselected
==
0
)
{
if
(
lselected
==
0
)
{
await
this
.
checkIsVip
();
await
this
.
checkIsVip
();
}
}
...
@@ -591,24 +600,62 @@ Page({
...
@@ -591,24 +600,62 @@ Page({
// console.log("邀请奖励", shareaward);
// console.log("邀请奖励", shareaward);
const
{
success
,
data
}
=
shareaward
;
const
{
success
,
data
}
=
shareaward
;
if
(
success
)
{
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
nearchashare
=
0
;
let
nearchaprize
=
""
;
let
nearchaprize
=
""
;
let
prostartx
=
-
438
;
let
proendx
=
0
;
let
levelpro
=
0
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
idata
=
list
[
i
];
let
idata
=
list
[
i
];
let
itimes
=
idata
.
times
;
let
itimes
=
idata
.
times
;
if
(
itimes
>
inviteCount
&&
nearchashare
==
0
)
{
//最近差多少
if
(
itimes
>=
inviteCount
&&
nearchashare
==
0
)
{
//最近差多少
nearchashare
=
itimes
-
inviteCount
;
nearchashare
=
itimes
-
inviteCount
;
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
);
let
itype
=
Number
(
idata
.
type
);
nearchaprize
=
[
"抽碎片次数"
,
"随机稀有碎片"
,
"未收录碎片"
][
itype
-
1
];
nearchaprize
=
[
"抽碎片次数"
,
"随机稀有碎片"
,
"未收录碎片"
][
itype
-
1
];
}
break
;
break
;
}
}
}
}
let
sharepro
=
inviteCount
/
list
[
list
.
length
-
1
].
times
;
let
sharepropos
=
'-438rpx 0rpx'
;
// console.log("代码暂存233====》",sharepro,inviteCount,list[list.length-1].times);
if
(
inviteCount
>=
list
[
list
.
length
-
1
].
times
){
if
(
sharepro
>
1
)
sharepro
=
1
;
sharepropos
=
'0rpx orpx'
;
let
sharepropos
=
438
*
(
sharepro
-
1
)
+
'rpx 0rpx'
;
}
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
=
""
;
let
nearchatxt
=
""
;
if
(
nearchashare
>
0
)
{
if
(
nearchashare
>
0
)
{
...
@@ -699,7 +746,7 @@ Page({
...
@@ -699,7 +746,7 @@ Page({
let
vipLink
=
this
.
data
.
vipLink
;
let
vipLink
=
this
.
data
.
vipLink
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setData
({
this
.
setData
({
clickVip
:
"xinshou"
clickVip
:
"xinshou"
});
});
navigateToOutside
(
vipLink
)
navigateToOutside
(
vipLink
)
},
1000
)
},
1000
)
...
@@ -758,7 +805,7 @@ Page({
...
@@ -758,7 +805,7 @@ Page({
let
vipLink
=
this
.
data
.
vipLink
;
let
vipLink
=
this
.
data
.
vipLink
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setData
({
this
.
setData
({
clickVip
:
"zhuli"
clickVip
:
"zhuli"
});
});
navigateToOutside
(
vipLink
);
navigateToOutside
(
vipLink
);
},
1000
)
},
1000
)
...
@@ -1116,7 +1163,7 @@ Page({
...
@@ -1116,7 +1163,7 @@ Page({
})
||
{};
})
||
{};
// console.log("抽奖结果", glPrizeData);
// console.log("抽奖结果", glPrizeData);
const
{
success
,
data
}
=
glPrizeData
;
const
{
success
,
data
}
=
glPrizeData
;
if
(
success
)
{
if
(
success
)
{
this
.
showPrizePage
(
success
,
data
);
this
.
showPrizePage
(
success
,
data
);
}
}
...
...
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