|
|
@@ -11,39 +11,40 @@
|
|
|
<div class="text1">勋章展示</div>
|
|
|
<div class="text2">10级以上(包含10级)将会获得勋章奖励,最高等级Lv99</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <swiper
|
|
|
- :initialSlide="prevIndex"
|
|
|
- :options="swiperOption"
|
|
|
- slidesPerView="auto"
|
|
|
- :spaceBetween="16"
|
|
|
- class="box-swiper"
|
|
|
- >
|
|
|
- <template v-for="(item, index) in medals" :key="index">
|
|
|
- <swiper-slide
|
|
|
- class="box"
|
|
|
- :style="{
|
|
|
- background: `linear-gradient(180deg, ${item.startColor} 0%, ${item.endColor} 100%)`
|
|
|
- }"
|
|
|
- v-if="!item.hide"
|
|
|
- >
|
|
|
- <van-image
|
|
|
- class="box-bg-img"
|
|
|
- :src="require('../../assets/diwen-gongyong-png.png')"
|
|
|
- width="88"
|
|
|
- height="100"
|
|
|
- />
|
|
|
-
|
|
|
- <div class="box-content">
|
|
|
- <div class="box-bg">
|
|
|
- <van-image width="40" height="40" :src="item.icon" />
|
|
|
- <span class="text1" :style="{ color: item.color }">**</span>
|
|
|
+ <template v-if="showSwiper">
|
|
|
+ <swiper
|
|
|
+ :initialSlide="prevIndex"
|
|
|
+ :options="swiperOption"
|
|
|
+ slidesPerView="auto"
|
|
|
+ :spaceBetween="16"
|
|
|
+ class="box-swiper"
|
|
|
+ >
|
|
|
+ <template v-for="(item, index) in medals" :key="index">
|
|
|
+ <swiper-slide
|
|
|
+ class="box"
|
|
|
+ :style="{
|
|
|
+ background: `linear-gradient(180deg, ${item.startColor} 0%, ${item.endColor} 100%)`
|
|
|
+ }"
|
|
|
+ v-if="!item.hide"
|
|
|
+ >
|
|
|
+ <van-image
|
|
|
+ class="box-bg-img"
|
|
|
+ :src="require('../../assets/diwen-gongyong-png.png')"
|
|
|
+ width="88"
|
|
|
+ height="100"
|
|
|
+ />
|
|
|
+
|
|
|
+ <div class="box-content">
|
|
|
+ <div class="box-bg">
|
|
|
+ <van-image width="40" height="40" :src="item.icon" />
|
|
|
+ <span class="text1" :style="{ color: item.color }">**</span>
|
|
|
+ </div>
|
|
|
+ <div class="box-text" :style="{ color: item.color }">Lv{{ item.start }}-{{ item.end }}</div>
|
|
|
</div>
|
|
|
- <div class="box-text" :style="{ color: item.color }">Lv{{ item.start }}-{{ item.end }}</div>
|
|
|
- </div>
|
|
|
- </swiper-slide>
|
|
|
- </template>
|
|
|
- </swiper>
|
|
|
+ </swiper-slide>
|
|
|
+ </template>
|
|
|
+ </swiper>
|
|
|
+ </template>
|
|
|
|
|
|
<div class="table-title">原力级别详情</div>
|
|
|
|
|
|
@@ -80,7 +81,6 @@ export default {
|
|
|
swiperOption: {
|
|
|
on: {
|
|
|
init: swiper => {
|
|
|
- console.log('28222');
|
|
|
console.log(swiper);
|
|
|
}
|
|
|
}
|
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
prevIndex() {
|
|
|
- return this.levelInfo.level ? Math.ceil(this.levelInfo.level / 10) : 0;
|
|
|
+ return this.levelInfo.level ? Math.floor(this.levelInfo.level / 10) - 1 : 0;
|
|
|
}
|
|
|
},
|
|
|
mixins: [level],
|