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
22d2ba41
Commit
22d2ba41
authored
Jun 26, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Plain Diff
626
parents
2b24a01e
0644cf0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
63 deletions
+58
-63
starRank.vue
src/components/star/starRank.vue
+58
-63
No files found.
src/components/star/starRank.vue
View file @
22d2ba41
...
@@ -37,18 +37,11 @@
...
@@ -37,18 +37,11 @@
<span
class=
"line"
></span>
<span
class=
"line"
></span>
</div>
</div>
</div>
</div>
<van-swipe
<swiper
class=
"scroll"
:options=
"swiperOption"
ref=
"mySwiper"
>
:loop=
"false"
<swiperSlide>
:show-indicators=
"false"
:touchable=
"true"
:initial-swipe=
"tabIndex-1"
:duration=
"1000"
class=
"scroll"
@
change=
"swipeChange"
>
<van-swipe-item
@
click=
"swipeItemClick"
>
<scroll
<scroll
:style=
"
{maxHeight: height +'px'}"
:style=
"
{maxHeight: height +'px'}"
v-if="starNum!=0
&&
tabIndex==1
"
v-if="starNum!=0"
ref="scrollItem"
ref="scrollItem"
:data="starList"
:data="starList"
:bounce="false">
:bounce="false">
...
@@ -56,8 +49,7 @@
...
@@ -56,8 +49,7 @@
<div
class=
"stageBox"
v-if=
"starInfo.code!=2001"
>
<div
class=
"stageBox"
v-if=
"starInfo.code!=2001"
>
<div
<div
class=
"result"
class=
"result"
v-if=
"starInfo.code!=2003&&starInfo.code!=2004&&starInfo.activity_result.result!=15&&starInfo.activity_result.result!=16"
v-if=
"starInfo.code!=2003&&starInfo.code!=2004&&starInfo.activity_result&&starInfo.activity_result.result!=15&&starInfo.activity_result.result!=16"
>
>
<div
class=
"float"
>
结果公示
</div>
<div
class=
"float"
>
结果公示
</div>
<div
v-if=
"starInfo.activity_result.result==11"
>
<div
v-if=
"starInfo.activity_result.result==11"
>
<h2>
恭喜两个阶段全勤挑战成功
</h2>
<h2>
恭喜两个阶段全勤挑战成功
</h2>
...
@@ -84,7 +76,7 @@
...
@@ -84,7 +76,7 @@
<img
:src=
"starPage.star_prize2"
alt
>
<img
:src=
"starPage.star_prize2"
alt
>
</div>
</div>
</div>
</div>
<div
class=
"addr"
@
click=
"goAddr(
$event
)"
v-if=
"!addressObj"
>
<div
class=
"addr"
@
click=
"goAddr()"
v-if=
"!addressObj"
>
点击这里,快去填写收货地址吧
点击这里,快去填写收货地址吧
<i
class=
"iconfont icon-youjiantou"
></i>
<i
class=
"iconfont icon-youjiantou"
></i>
</div>
</div>
...
@@ -100,9 +92,8 @@
...
@@ -100,9 +92,8 @@
>
注意:请于
{{
starInfo
.
start_twenty_five
}}
之前填写完您的收货地址,否则无法寄送礼品,过期不填视为放弃领取机会
</div>
>
注意:请于
{{
starInfo
.
start_twenty_five
}}
之前填写完您的收货地址,否则无法寄送礼品,过期不填视为放弃领取机会
</div>
</div>
</div>
<div
<div
v-if=
"starInfo.code!=2003&&(starInfo.activity_result.result==15||starInfo.activity_result.result==16)"
v-if=
"starInfo.code!=2003&&starInfo.activity_result&&(starInfo.activity_result.result==15||starInfo.activity_result.result==16)"
class=
"result fal"
class=
"result fal"
>
>
<div
class=
"float"
>
结果公示
</div>
<div
class=
"float"
>
结果公示
</div>
<div
v-if=
"starInfo.activity_result.result==15"
>
<div
v-if=
"starInfo.activity_result.result==15"
>
<div
class=
"fal_title"
>
很抱歉第一阶段全勤挑战失败
</div>
<div
class=
"fal_title"
>
很抱歉第一阶段全勤挑战失败
</div>
...
@@ -162,11 +153,11 @@
...
@@ -162,11 +153,11 @@
</div>
</div>
</div>
</div>
</scroll>
</scroll>
</
van-swipe-item
>
</
swiperSlide
>
<
van-swipe-item
>
<
swiperSlide
>
<scroll
<scroll
:style=
"
{maxHeight: height +'px'}"
:style=
"
{maxHeight: height +'px'}"
v-if="starNum!=0
&&
tabIndex==2
"
v-if="starNum!=0"
ref="scrollItem"
ref="scrollItem"
:data="starList"
:data="starList"
:pullup="pullup"
:pullup="pullup"
...
@@ -188,12 +179,14 @@
...
@@ -188,12 +179,14 @@
<div
v-if=
"finished"
class=
"none"
>
没有更多了~
</div>
<div
v-if=
"finished"
class=
"none"
>
没有更多了~
</div>
</div>
</div>
</scroll>
</scroll>
</
van-swipe-item
>
</
swiperSlide
>
</
van-swipe
>
</
swiper
>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
"swiper/dist/css/swiper.css"
;
import
{
swiper
,
swiperSlide
}
from
"vue-awesome-swiper"
;
import
rankBg
from
"../../assets/rankBg.png"
;
import
rankBg
from
"../../assets/rankBg.png"
;
import
{
starPage
}
from
"../../util/imgUrl"
;
import
{
starPage
}
from
"../../util/imgUrl"
;
import
{
import
{
...
@@ -208,8 +201,8 @@ Vue.use(Swipe).use(SwipeItem);
...
@@ -208,8 +201,8 @@ Vue.use(Swipe).use(SwipeItem);
export
default
{
export
default
{
name
:
"starRank"
,
name
:
"starRank"
,
data
()
{
data
()
{
let
that
=
this
;
return
{
return
{
isClick
:
true
,
height
:
0
,
height
:
0
,
pullup
:
true
,
pullup
:
true
,
rankBg
:
rankBg
,
rankBg
:
rankBg
,
...
@@ -225,19 +218,24 @@ export default {
...
@@ -225,19 +218,24 @@ export default {
addressObj
:
false
,
addressObj
:
false
,
starInfo
:
{
starInfo
:
{
code
:
""
code
:
""
},
swiperOption
:
{
on
:
{
slideChangeTransitionEnd
:
function
()
{
console
.
log
(
this
.
activeIndex
);
that
.
tabIndex
=
this
.
activeIndex
+
1
;
}
}
}
}
};
};
},
},
components
:
{},
components
:
{
swiper
,
swiperSlide
},
computed
:
{
swiper
()
{
return
this
.
$refs
.
mySwiper
.
swiper
;
}
},
methods
:
{
methods
:
{
swipeItemClick
(
e
)
{
console
.
log
(
"swipeItemClick"
,
e
);
this
.
isClick
=
true
;
},
swipeChange
(
index
)
{
this
.
tabIndex
=
index
+
1
;
this
.
isClick
=
false
;
},
goResult
()
{
goResult
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"starResult"
,
name
:
"starResult"
,
...
@@ -245,38 +243,33 @@ export default {
...
@@ -245,38 +243,33 @@ export default {
});
});
},
},
goAddr
(
e
)
{
goAddr
(
e
)
{
if
(
this
.
isClick
)
{
if
(
this
.
addressObj
)
{
if
(
this
.
addressObj
)
{
this
.
$router
.
push
({
name
:
"activityAddr"
});
}
else
{
this
.
$router
.
push
({
name
:
"addressEdit"
});
}
}
},
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
({
this
.
$router
.
push
({
name
:
"starDetail"
,
name
:
"activityAddr"
query
:
{
starInfo
:
obj
}
});
}
else
{
this
.
$router
.
push
({
name
:
"addressEdit"
});
});
}
}
},
},
goDetail
(
index
)
{
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
}
});
},
onReachBottom
()
{
onReachBottom
()
{
if
(
!
this
.
finished
&&
this
.
loading
)
{
if
(
!
this
.
finished
&&
this
.
loading
)
{
this
.
loading
=
false
;
this
.
loading
=
false
;
...
@@ -333,7 +326,6 @@ export default {
...
@@ -333,7 +326,6 @@ export default {
getComputedStyle
(
this
.
$refs
.
floatBox
).
height
.
replace
(
"px"
,
""
)
getComputedStyle
(
this
.
$refs
.
floatBox
).
height
.
replace
(
"px"
,
""
)
)
)
);
);
console
.
log
(
document
.
documentElement
.
clientHeight
);
let
top
=
let
top
=
(
document
.
documentElement
.
clientHeight
-
(
document
.
documentElement
.
clientHeight
-
Number
(
Number
(
...
@@ -362,9 +354,13 @@ export default {
...
@@ -362,9 +354,13 @@ export default {
});
});
},
},
tabChange
(
index
)
{
tabChange
(
index
)
{
console
.
log
(
index
);
this
.
tabIndex
=
index
;
this
.
tabIndex
=
index
;
// this.$refs.swipeRef.swipeTo(index+1)
if
(
index
==
1
)
{
this
.
swiper
.
slidePrev
();
}
else
if
(
index
==
2
)
{
this
.
swiper
.
slideNext
();
}
// if(index==2){
// if(index==2){
// setTimeout(() => {
// setTimeout(() => {
// this.$refs.scrollItem._initScroll()
// this.$refs.scrollItem._initScroll()
...
@@ -379,7 +375,6 @@ export default {
...
@@ -379,7 +375,6 @@ export default {
this
.
height
=
this
.
height
=
screen
.
height
-
screen
.
height
-
Number
(
getComputedStyle
(
this
.
$refs
.
floatBox
).
height
.
replace
(
"px"
,
""
));
Number
(
getComputedStyle
(
this
.
$refs
.
floatBox
).
height
.
replace
(
"px"
,
""
));
this
.
initPage
();
this
.
initPage
();
}
}
};
};
...
...
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