Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
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
new-sing
h5-base
Commits
a17e39b8
Commit
a17e39b8
authored
Jun 26, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
626
parent
248d829e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
35 deletions
+61
-35
starRank.vue
src/components/star/starRank.vue
+61
-35
No files found.
src/components/star/starRank.vue
View file @
a17e39b8
...
...
@@ -18,7 +18,7 @@
<span
class=
"line"
></span>
还没有星星记录哦~
<span
class=
"line"
></span>
</div>
<div
class=
"secTitle"
v-if=
"starNum!=0&&starInfo.code!=500"
>
<div
class=
"secTitle"
v-if=
"starNum!=0&&starInfo.code!=500"
>
<div
:class=
"
{item:true}" @click="tabChange(1)">
<span
v-if=
"tabIndex==1"
class=
"activity"
>
<img
:src=
"starPage.star_img_title"
alt
>
星星活动
...
...
@@ -43,12 +43,23 @@
:touchable=
"true"
:initial-swipe=
"tabIndex-1"
class=
"scroll"
@
change=
"swipeChange"
>
<van-swipe-item>
<scroll
:style=
"
{maxHeight: height +'px'}" v-if="starNum!=0
&&
tabIndex==1" ref="scrollItem" :data="starList" :bounce="false">
ref=
"swipeRef"
@
change=
"swipeChange"
>
<van-swipe-item
@
click=
"swipeItemClick"
>
<scroll
:style=
"
{maxHeight: height +'px'}"
v-if="starNum!=0
&&
tabIndex==1"
ref="scrollItem"
:data="starList"
:bounce="false"
>
<div
class=
"container"
>
<div
class=
"stageBox"
v-if=
"starInfo.code!=2001"
>
<div
class=
"result"
v-if=
"starInfo.code!=2003&&starInfo.code!=2004&&starInfo.activity_result.result!=15&&starInfo.activity_result.result!=16"
>
<div
class=
"result"
v-if=
"starInfo.code!=2003&&starInfo.code!=2004&&starInfo.activity_result.result!=15&&starInfo.activity_result.result!=16"
>
<div
class=
"float"
>
结果公示
</div>
<div
v-if=
"starInfo.activity_result.result==11"
>
<h2>
恭喜两个阶段全勤挑战成功
</h2>
...
...
@@ -59,7 +70,9 @@
<img
:src=
"starPage.star_prize2"
alt
>
</div>
</div>
<div
v-if=
"starInfo.activity_result.result==12||starInfo.activity_result.result==13"
>
<div
v-if=
"starInfo.activity_result.result==12||starInfo.activity_result.result==13"
>
<h2>
恭喜第一阶段全勤挑战成功
</h2>
<p>
赠送 猜猜我是谁系列双语洞洞书(4册)
</p>
<div
class=
"imgbox"
>
...
...
@@ -73,7 +86,7 @@
<img
:src=
"starPage.star_prize2"
alt
>
</div>
</div>
<div
class=
"addr"
@
click=
"goAddr"
v-if=
"!addressObj"
>
<div
class=
"addr"
@
click=
"goAddr
($event)
"
v-if=
"!addressObj"
>
点击这里,快去填写收货地址吧
<i
class=
"iconfont icon-youjiantou"
></i>
</div>
...
...
@@ -111,7 +124,7 @@
<span
class=
"add"
>
{{
starInfo
.
user_category_integral_last_ten
}}
/20
</span>
<img
:src=
"starPage.star_inner"
alt
>
</div>
<div
class=
"tip"
@
click=
"goDetail(1
)"
>
<div
class=
"tip"
v-on:click=
"goDetail(1,$event
)"
>
查看明细
<i
class=
"iconfont icon-youjiantou"
></i>
</div>
...
...
@@ -126,7 +139,7 @@
<span
class=
"add"
>
{{
starInfo
.
user_category_integral_last_twenty
}}
/40
</span>
<img
:src=
"starPage.star_inner"
alt
>
</div>
<div
class=
"tip"
@
click=
"goDetail(2)"
>
<div
class=
"tip"
@
click=
"goDetail(2
,$event
)"
>
查看明细
<i
class=
"iconfont icon-youjiantou"
></i>
</div>
...
...
@@ -198,6 +211,7 @@ export default {
name
:
"starRank"
,
data
()
{
return
{
isClick
:
true
,
height
:
0
,
pullup
:
true
,
rankBg
:
rankBg
,
...
...
@@ -218,9 +232,13 @@ export default {
},
components
:
{},
methods
:
{
swipeItemClick
(
e
)
{
console
.
log
(
"swipeItemClick"
,
e
);
this
.
isClick
=
true
;
},
swipeChange
(
index
)
{
console
.
log
(
222
)
this
.
tabIndex
=
index
+
1
;
this
.
isClick
=
false
;
},
goResult
()
{
this
.
$router
.
push
({
...
...
@@ -228,34 +246,38 @@ export default {
query
:
{
starInfo
:
this
.
starInfo
}
});
},
goAddr
()
{
if
(
this
.
addressObj
)
{
this
.
$router
.
push
({
name
:
"activityAddr"
});
}
else
{
this
.
$router
.
push
({
name
:
"addressEdit"
});
goAddr
(
e
)
{
if
(
this
.
isClick
)
{
if
(
this
.
addressObj
)
{
this
.
$router
.
push
({
name
:
"activityAddr"
});
}
else
{
this
.
$router
.
push
({
name
:
"addressEdit"
});
}
}
},
goDetail
(
index
)
{
console
.
log
(
243
)
let
obj
=
{};
obj
.
index
=
index
;
if
(
index
==
1
)
{
obj
.
start_at
=
this
.
starInfo
.
start_at
;
obj
.
first_over_at
=
this
.
starInfo
.
first_over_at
;
obj
.
user_category_integral_last_ten
=
this
.
starInfo
.
user_category_integral_last_ten
;
}
else
{
obj
.
start_at
=
this
.
starInfo
.
start_at
;
obj
.
second_over_at
=
this
.
starInfo
.
second_over_at
;
obj
.
user_category_integral_last_twenty
=
this
.
starInfo
.
user_category_integral_last_twenty
;
goDetail
(
index
,
e
)
{
console
.
log
(
"goDetail"
,
e
);
if
(
this
.
isClick
)
{
let
obj
=
{};
obj
.
index
=
index
;
if
(
index
==
1
)
{
obj
.
start_at
=
this
.
starInfo
.
start_at
;
obj
.
first_over_at
=
this
.
starInfo
.
first_over_at
;
obj
.
user_category_integral_last_ten
=
this
.
starInfo
.
user_category_integral_last_ten
;
}
else
{
obj
.
start_at
=
this
.
starInfo
.
start_at
;
obj
.
second_over_at
=
this
.
starInfo
.
second_over_at
;
obj
.
user_category_integral_last_twenty
=
this
.
starInfo
.
user_category_integral_last_twenty
;
}
this
.
$router
.
push
({
name
:
"starDetail"
,
query
:
{
starInfo
:
obj
}
});
}
this
.
$router
.
push
({
name
:
"starDetail"
,
query
:
{
starInfo
:
obj
}
});
},
onReachBottom
()
{
if
(
!
this
.
finished
&&
this
.
loading
)
{
...
...
@@ -343,6 +365,10 @@ export default {
},
tabChange
(
index
)
{
console
.
log
(
index
);
if
(
this
.
$refs
.
swipeRef
){
console
.
log
(
this
.
$refs
.
swipeRef
)
}
this
.
tabIndex
=
index
;
// if(index==2){
// setTimeout(() => {
...
...
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