...
|
...
|
@@ -56,54 +56,63 @@ |
|
|
.swiper_item {
|
|
|
/*padding: 0.28rem 0.25rem;*/
|
|
|
}
|
|
|
.warp{
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
svg{
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div id="loadStart"></div>
|
|
|
<div id="app" v-cloak>
|
|
|
<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
|
|
|
<!--<div class="nurse_text">{{name}}</div>-->
|
|
|
</div>
|
|
|
<div class="examination_box">
|
|
|
<div class="examination_swiper">
|
|
|
<div class="swiper-container">
|
|
|
<div class="swiper-wrapper">
|
|
|
<div class="swiper-slide" v-for="(item,index) in navs">
|
|
|
<span v-text="item" :class="{'examination_active':index==ind}"
|
|
|
@click="changeSwiper(index)"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="examination_content_swiper">
|
|
|
<div class="swiper-container ">
|
|
|
<div class="swiper-wrapper">
|
|
|
<div class="swiper-slide" v-for="(item,index) in goods">
|
|
|
<div class="swiper_list">
|
|
|
<div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>
|
|
|
<div class="swiper_item" v-else @click="openDoc(i.good_id)"
|
|
|
v-for="(i,iindex) in item.goods">
|
|
|
<div class="swiper_item_img"><img :src="i.img" alt=""></div>
|
|
|
<div class="swiper_item_right">
|
|
|
<div class="swiper_item_title">{{i.post_title}}</div>
|
|
|
<div class="swiper_item_content">{{i.other_title}}</div>
|
|
|
<div class="swiper_item_type">
|
|
|
<div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">
|
|
|
<div class="icon_img"><img :src="j.url" alt=""></div>
|
|
|
<span>{{j.text}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span
|
|
|
class="old_price">¥{{i.price?i.price:0}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="app" class="warp" >
|
|
|
{{JSON.stringify(banner)}}
|
|
|
<!--<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">-->
|
|
|
<!--<!–<div class="nurse_text">{{name}}</div>–>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="examination_box">-->
|
|
|
<!--<div class="examination_swiper">-->
|
|
|
<!--<div class="swiper-container">-->
|
|
|
<!--<div class="swiper-wrapper">-->
|
|
|
<!--<div class="swiper-slide" v-for="(item,index) in navs">-->
|
|
|
<!--<span v-text="item" :class="{'examination_active':index==ind}"-->
|
|
|
<!--@click="changeSwiper(index)"></span>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="examination_content_swiper">-->
|
|
|
<!--<div class="swiper-container ">-->
|
|
|
<!--<div class="swiper-wrapper">-->
|
|
|
<!--<div class="swiper-slide" v-for="(item,index) in goods">-->
|
|
|
<!--<div class="swiper_list">-->
|
|
|
<!--<div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>-->
|
|
|
<!--<div class="swiper_item" v-else @click="openDoc(i.good_id)"-->
|
|
|
<!--v-for="(i,iindex) in item.goods">-->
|
|
|
<!--<div class="swiper_item_img"><img :src="i.img" alt=""></div>-->
|
|
|
<!--<div class="swiper_item_right">-->
|
|
|
<!--<div class="swiper_item_title">{{i.post_title}}</div>-->
|
|
|
<!--<div class="swiper_item_content">{{i.other_title}}</div>-->
|
|
|
<!--<div class="swiper_item_type">-->
|
|
|
<!--<div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">-->
|
|
|
<!--<div class="icon_img"><img :src="j.url" alt=""></div>-->
|
|
|
<!--<span>{{j.text}}</span>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span-->
|
|
|
<!--class="old_price">¥{{i.price?i.price:0}}</span>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
</div>
|
|
|
</body>
|
|
|
</html>
|
...
|
...
|
@@ -118,6 +127,7 @@ |
|
|
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
|
|
|
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
|
|
|
<script>
|
|
|
alert(1);
|
|
|
var app = new Vue({
|
|
|
el: '#app',
|
|
|
data: {
|
...
|
...
|
@@ -142,24 +152,24 @@ |
|
|
// alert(app.id)
|
|
|
app.getCatInfo3();
|
|
|
// //导航轮播
|
|
|
// app.mySwiper = new Swiper('.examination_swiper .swiper-container', {
|
|
|
// slidesPerView: 'auto',
|
|
|
// slideToClickedSlide: true,
|
|
|
// observer: true,
|
|
|
// observeParents: true,
|
|
|
// freeMode: true
|
|
|
// });
|
|
|
// //内容轮播
|
|
|
// app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
|
|
|
// observer: true,
|
|
|
// observeParents: true,
|
|
|
// autoHeight: true,
|
|
|
// onTransitionEnd: function (swiper) {
|
|
|
// app.ind = swiper.activeIndex;
|
|
|
// app.mySwiper.slideTo(swiper.activeIndex, 500)
|
|
|
// // alert(swiper.activeIndex);
|
|
|
// }
|
|
|
// });
|
|
|
app.mySwiper = new Swiper('.examination_swiper .swiper-container', {
|
|
|
slidesPerView: 'auto',
|
|
|
slideToClickedSlide: true,
|
|
|
observer: true,
|
|
|
observeParents: true,
|
|
|
freeMode: true
|
|
|
});
|
|
|
//内容轮播
|
|
|
app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
|
|
|
observer: true,
|
|
|
observeParents: true,
|
|
|
autoHeight: true,
|
|
|
onTransitionEnd: function (swiper) {
|
|
|
app.ind = swiper.activeIndex;
|
|
|
app.mySwiper.slideTo(swiper.activeIndex, 500)
|
|
|
// alert(swiper.activeIndex);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
...
|
...
|
@@ -183,19 +193,21 @@ |
|
|
};
|
|
|
var header = {
|
|
|
"XX-Device-Type": getDevice(),
|
|
|
'XX-Token': 1
|
|
|
'XX-Token': getToken()
|
|
|
};
|
|
|
getRequest('post', 'portal/Goods/getCatInfo3', post, header).then(function (res) {
|
|
|
// alert(JSON.stringify(res));
|
|
|
|
|
|
if (res.data.code == 1) {
|
|
|
app.banner = res.data.data.img;
|
|
|
app.name = res.data.data.name;
|
|
|
app.goods = res.data.data.goods;
|
|
|
var nav = [];
|
|
|
for (var i in app.goods) {
|
|
|
for(var i=0;i<app.goods.length;i++){
|
|
|
nav.push(app.goods[i].name)
|
|
|
}
|
|
|
|
|
|
app.navs = nav;
|
|
|
|
|
|
loadEnd()
|
|
|
} else {
|
|
|
toastMsg(res.data.msg)
|
...
|
...
|
|