|
@@ -17,7 +17,7 @@
|
|
|
</template>
|
|
|
<!-- <img class="full-btn" @click="full=true" :src="`${$cdn}images/full-btn.png`" alt=""> -->
|
|
|
</div>
|
|
|
- <slide v-if="list.length>0" @activeItem="handleItem" :list='list' :idx='list.length>3 ? 2 : 0' class="sld"/>
|
|
|
+ <slide v-if="list.length>0" @activeItem="handleItem" :list='list' :idx='activeIdx' class="sld"/>
|
|
|
</div>
|
|
|
<div class="p-txt" :style="{height:380+'px'}">
|
|
|
<p>{{activeItem.name}}</p>
|
|
@@ -52,7 +52,7 @@
|
|
|
</template>
|
|
|
<img class="full-btn" @click="full=true" :src="`${$cdn}images/full-btn.png`" alt="">
|
|
|
</div>
|
|
|
- <slide v-if="list.length>0" @activeItem="handleItem" :list='list' :idx='list.length>3 ? 2 : 0' class="sld"/>
|
|
|
+ <slide v-if="list.length>0" @activeItem="handleItem" :list='list' :idx='activeIdx' class="sld"/>
|
|
|
</div>
|
|
|
<div class="p-txt" :style="{height:380+'px'}">
|
|
|
<p>{{activeItem.name}}</p>
|
|
@@ -87,6 +87,7 @@ export default {
|
|
|
full:false,
|
|
|
list:[],
|
|
|
activeItem:'',
|
|
|
+ activeIdx:'',
|
|
|
isMobile: browser.mobile
|
|
|
}
|
|
|
},
|
|
@@ -108,7 +109,7 @@ export default {
|
|
|
return arr
|
|
|
},
|
|
|
async getList(){
|
|
|
- let {block,typeId,zone,searchKey=""} = this.$route.query
|
|
|
+ let {block,typeId,zone,searchKey="",activeId} = this.$route.query
|
|
|
let res = await this.$http({
|
|
|
method:'post',
|
|
|
data:{
|
|
@@ -122,7 +123,13 @@ export default {
|
|
|
url:`/api/web/part/list`
|
|
|
})
|
|
|
this.list = res.data.list
|
|
|
- this.activeItem = this.list[this.list.length>3 ? 2 : 0]
|
|
|
+ this.list.forEach((item,i)=>{
|
|
|
+ if (item.id===activeId) {
|
|
|
+ this.activeIdx = i
|
|
|
+ this.activeItem = item
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.activeItem = this.list[this.list.length>3 ? 2 : 0]
|
|
|
},
|
|
|
}
|
|
|
}
|