作者 李洪娟

Merge branch 'master' of http://114.215.101.231:8099/dingling/A6079080424317 into lihongjuan

@@ -56,54 +56,63 @@ @@ -56,54 +56,63 @@
56 .swiper_item { 56 .swiper_item {
57 /*padding: 0.28rem 0.25rem;*/ 57 /*padding: 0.28rem 0.25rem;*/
58 } 58 }
  59 + .warp{
  60 + width: 100%;
  61 + height: 100%;
  62 + }
  63 + svg{
  64 + width: 100%;
  65 + height: 100%;
  66 + }
59 </style> 67 </style>
60 </head> 68 </head>
61 <body> 69 <body>
62 <div id="loadStart"></div> 70 <div id="loadStart"></div>
63 -<div id="app" v-cloak>  
64 - <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">  
65 - <!--<div class="nurse_text">{{name}}</div>-->  
66 - </div>  
67 - <div class="examination_box">  
68 - <div class="examination_swiper">  
69 - <div class="swiper-container">  
70 - <div class="swiper-wrapper">  
71 - <div class="swiper-slide" v-for="(item,index) in navs">  
72 - <span v-text="item" :class="{'examination_active':index==ind}"  
73 - @click="changeSwiper(index)"></span>  
74 - </div>  
75 - </div>  
76 - </div>  
77 - </div>  
78 - <div class="examination_content_swiper">  
79 - <div class="swiper-container ">  
80 - <div class="swiper-wrapper">  
81 - <div class="swiper-slide" v-for="(item,index) in goods">  
82 - <div class="swiper_list">  
83 - <div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>  
84 - <div class="swiper_item" v-else @click="openDoc(i.good_id)"  
85 - v-for="(i,iindex) in item.goods">  
86 - <div class="swiper_item_img"><img :src="i.img" alt=""></div>  
87 - <div class="swiper_item_right">  
88 - <div class="swiper_item_title">{{i.post_title}}</div>  
89 - <div class="swiper_item_content">{{i.other_title}}</div>  
90 - <div class="swiper_item_type">  
91 - <div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">  
92 - <div class="icon_img"><img :src="j.url" alt=""></div>  
93 - <span>{{j.text}}</span>  
94 - </div>  
95 - </div>  
96 - <div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span  
97 - class="old_price">¥{{i.price?i.price:0}}</span>  
98 - </div>  
99 - </div>  
100 - </div>  
101 - </div>  
102 - </div>  
103 - </div>  
104 - </div>  
105 - </div>  
106 - </div> 71 +<div id="app" class="warp" >
  72 + {{JSON.stringify(banner)}}
  73 + <!--<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">-->
  74 + <!--&lt;!&ndash;<div class="nurse_text">{{name}}</div>&ndash;&gt;-->
  75 + <!--</div>-->
  76 + <!--<div class="examination_box">-->
  77 + <!--<div class="examination_swiper">-->
  78 + <!--<div class="swiper-container">-->
  79 + <!--<div class="swiper-wrapper">-->
  80 + <!--<div class="swiper-slide" v-for="(item,index) in navs">-->
  81 + <!--<span v-text="item" :class="{'examination_active':index==ind}"-->
  82 + <!--@click="changeSwiper(index)"></span>-->
  83 + <!--</div>-->
  84 + <!--</div>-->
  85 + <!--</div>-->
  86 + <!--</div>-->
  87 + <!--<div class="examination_content_swiper">-->
  88 + <!--<div class="swiper-container ">-->
  89 + <!--<div class="swiper-wrapper">-->
  90 + <!--<div class="swiper-slide" v-for="(item,index) in goods">-->
  91 + <!--<div class="swiper_list">-->
  92 + <!--<div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>-->
  93 + <!--<div class="swiper_item" v-else @click="openDoc(i.good_id)"-->
  94 + <!--v-for="(i,iindex) in item.goods">-->
  95 + <!--<div class="swiper_item_img"><img :src="i.img" alt=""></div>-->
  96 + <!--<div class="swiper_item_right">-->
  97 + <!--<div class="swiper_item_title">{{i.post_title}}</div>-->
  98 + <!--<div class="swiper_item_content">{{i.other_title}}</div>-->
  99 + <!--<div class="swiper_item_type">-->
  100 + <!--<div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">-->
  101 + <!--<div class="icon_img"><img :src="j.url" alt=""></div>-->
  102 + <!--<span>{{j.text}}</span>-->
  103 + <!--</div>-->
  104 + <!--</div>-->
  105 + <!--<div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span-->
  106 + <!--class="old_price">¥{{i.price?i.price:0}}</span>-->
  107 + <!--</div>-->
  108 + <!--</div>-->
  109 + <!--</div>-->
  110 + <!--</div>-->
  111 + <!--</div>-->
  112 + <!--</div>-->
  113 + <!--</div>-->
  114 + <!--</div>-->
  115 + <!--</div>-->
107 </div> 116 </div>
108 </body> 117 </body>
109 </html> 118 </html>
@@ -118,6 +127,7 @@ @@ -118,6 +127,7 @@
118 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 127 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
119 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 128 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
120 <script> 129 <script>
  130 + alert(1);
121 var app = new Vue({ 131 var app = new Vue({
122 el: '#app', 132 el: '#app',
123 data: { 133 data: {
@@ -142,24 +152,24 @@ @@ -142,24 +152,24 @@
142 // alert(app.id) 152 // alert(app.id)
143 app.getCatInfo3(); 153 app.getCatInfo3();
144 // //导航轮播 154 // //导航轮播
145 - // app.mySwiper = new Swiper('.examination_swiper .swiper-container', {  
146 - // slidesPerView: 'auto',  
147 - // slideToClickedSlide: true,  
148 - // observer: true,  
149 - // observeParents: true,  
150 - // freeMode: true  
151 - // });  
152 - // //内容轮播  
153 - // app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {  
154 - // observer: true,  
155 - // observeParents: true,  
156 - // autoHeight: true,  
157 - // onTransitionEnd: function (swiper) {  
158 - // app.ind = swiper.activeIndex;  
159 - // app.mySwiper.slideTo(swiper.activeIndex, 500)  
160 - // // alert(swiper.activeIndex);  
161 - // }  
162 - // }); 155 + app.mySwiper = new Swiper('.examination_swiper .swiper-container', {
  156 + slidesPerView: 'auto',
  157 + slideToClickedSlide: true,
  158 + observer: true,
  159 + observeParents: true,
  160 + freeMode: true
  161 + });
  162 + //内容轮播
  163 + app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
  164 + observer: true,
  165 + observeParents: true,
  166 + autoHeight: true,
  167 + onTransitionEnd: function (swiper) {
  168 + app.ind = swiper.activeIndex;
  169 + app.mySwiper.slideTo(swiper.activeIndex, 500)
  170 + // alert(swiper.activeIndex);
  171 + }
  172 + });
163 } 173 }
164 }, 174 },
165 methods: { 175 methods: {
@@ -183,19 +193,21 @@ @@ -183,19 +193,21 @@
183 }; 193 };
184 var header = { 194 var header = {
185 "XX-Device-Type": getDevice(), 195 "XX-Device-Type": getDevice(),
186 - 'XX-Token': 1 196 + 'XX-Token': getToken()
187 }; 197 };
188 getRequest('post', 'portal/Goods/getCatInfo3', post, header).then(function (res) { 198 getRequest('post', 'portal/Goods/getCatInfo3', post, header).then(function (res) {
189 - // alert(JSON.stringify(res)); 199 +
190 if (res.data.code == 1) { 200 if (res.data.code == 1) {
191 app.banner = res.data.data.img; 201 app.banner = res.data.data.img;
192 app.name = res.data.data.name; 202 app.name = res.data.data.name;
193 app.goods = res.data.data.goods; 203 app.goods = res.data.data.goods;
194 var nav = []; 204 var nav = [];
195 - for (var i in app.goods) { 205 + for(var i=0;i<app.goods.length;i++){
196 nav.push(app.goods[i].name) 206 nav.push(app.goods[i].name)
197 } 207 }
  208 +
198 app.navs = nav; 209 app.navs = nav;
  210 +
199 loadEnd() 211 loadEnd()
200 } else { 212 } else {
201 toastMsg(res.data.msg) 213 toastMsg(res.data.msg)