Commit 644c074c authored by guoyou's avatar guoyou

友情链接bug修复

parent 5d6a7ec3
This diff is collapsed.
...@@ -3,22 +3,21 @@ ...@@ -3,22 +3,21 @@
<div class="foot-content"> <div class="foot-content">
<div class="footer"> <div class="footer">
<div> <div>
<p class="links-title"> <p class="links-title" v-if="linkShow">
<span>LINK</span> <span>LINK</span>
<span>友情链接</span> <span>友情链接</span>
</p> </p>
<!-- <ul class="link-list">
<li v-for="(item,index) in list" :key="index"> <div class="my-outbox">
<a :href="item.linkUrl" :title="item.brief">{{ item.name }}</a> <div class="my-inbox" ref="box">
</li> <div class="my-list" v-for="(item,index) in list" :key="index">
</ul> --> <a class="my-uname" :href='item.linkUrl' @mouseenter="enter(index)" @mouseleave="leave()">{{item.name}}</a>
<vue-seamless-scroll :data="list" :class-option="optionLeft" class="seamless-warp2" style="width:864px;"> </div>
<ul class="item" style="overflow: hidden;"> <div class="my-list" v-for="(item,index) in list" :key="(index+1)*100">
<li v-for="(item,index) in list" :key="index"> <a class="my-uname" :href='item.linkUrl' @mouseenter="enter(index)" @mouseleave="leave()">{{item.name}}</a>
<a target="_blank" style="color:#fff" :href="item.linkUrl" v-text="item.name"></a> </div>
</li> </div>
</ul> </div>
</vue-seamless-scroll>
</div> </div>
</div> </div>
</div> </div>
...@@ -45,67 +44,74 @@ ...@@ -45,67 +44,74 @@
<script> <script>
import axios from '../plugins/axios' import axios from '../plugins/axios'
import Swiper from 'swiper'
import 'swiper/dist/css/swiper.min.css'
export default { export default {
transition: 'bounce',
name: 'footerModal',
props: [],
data() { data() {
return { return {
list: [], list: [],
listShow: false, start: true,
newsList: [ linkShow:true
{
title: '11111111111'
},
{
title: '2222222'
}
]
}
},
computed: {
optionLeft() {
return {
direction: 2,
limitMoveNum: 6
}
} }
}, },
created() { created() {
this.getAll() axios.get('/api/uccn/app/unauth/friend_link/list').then(data => {
this.list = data.data.data
if (this.list.length < 5) this.start = false
if(this.list.length == 0) this.linkShow = false
})
}, },
methods: { mounted: function() {
async getAll() { var that = this
let { var target = this.$refs.box
data: { data } var initLeft = 0
} = await axios.get('/api/uccn/app/unauth/friend_link/list') let demo = setInterval(function() {
if (that.start) {
if (data.length == 0) { initLeft++
this.listShow = false if (initLeft >= target.offsetWidth / 2) {
} else { initLeft = 0
this.listShow = true }
target.style = 'transform: translateX(-' + initLeft + 'px)'
} }
this.list = data }, 16)
},
methods: {
enter() {
this.start = false
},
leave() {
this.start = true
} }
} }
} }
</script> </script>
<style> <style>
.seamless-warp2 { .my-outbox {
overflow: hidden; width: 800px;
height: 25px;
width: 870px;
display: inline-block; display: inline-block;
margin-left:80px; color: #fff;
overflow: hidden;
height: 35px;
position: relative;
left: 40px;
} }
.seamless-warp2 ul.item { .my-inbox {
/* width: 580px; */ white-space: nowrap;
position: absolute;
font-size: 0;
top: 4px;
} }
.seamless-warp2 ul.item li { .my-list {
float: left;
margin-right: 95px; margin-right: 95px;
display: inline-block;
font-size: 16px;
height: 35px;
line-height: 35px;
}
.my-uname {
color: #ccc;
transition: all 0.2s linear;
}
.my-uname:hover {
color: #1bbb9f;
} }
.footer { .footer {
display: block; display: block;
...@@ -130,26 +136,6 @@ export default { ...@@ -130,26 +136,6 @@ export default {
top: -8px; top: -8px;
left: 4px; left: 4px;
} }
.link-list {
margin-top: 15px;
display: inline-block;
position: relative;
top: -27px;
left: 80px;
}
.link-list li {
float: left;
width: 200px;
margin-right: 95px;
line-height: 25px;
}
.link-list li a {
font-size: 16px;
color: #cccccc;
}
.link-list li a:hover {
color: #1bbb9f;
}
.bottom-main { .bottom-main {
width: 1120px; width: 1120px;
margin: 0 auto; margin: 0 auto;
......
...@@ -394,7 +394,7 @@ export default { ...@@ -394,7 +394,7 @@ export default {
this.campsiteType = campsite.data.data this.campsiteType = campsite.data.data
const child = await axios.get('/vehicle/cata/app/unauth/types') const child = await axios.get('/vehicle/cata/app/unauth/types')
this.vehicleType = child.data.data this.vehicleType = child.data.data
console.log(this.childType) // console.log(this.childType)
}, },
enter() { enter() {
var test = window.location.pathname var test = window.location.pathname
......
This diff is collapsed.
...@@ -587,7 +587,6 @@ ...@@ -587,7 +587,6 @@
</nuxt-link> </nuxt-link>
</div> </div>
<div style="padding:15px"> <div style="padding:15px">
<div style="overflow: hidden;display:inline-block" class="head-img"> <div style="overflow: hidden;display:inline-block" class="head-img">
<img src="./../assets/images/headquarters.png" alt /> <img src="./../assets/images/headquarters.png" alt />
<!-- <img :src="companyList[0].cover" alt style="width:336px;height:124px" /> --> <!-- <img :src="companyList[0].cover" alt style="width:336px;height:124px" /> -->
...@@ -700,7 +699,6 @@ export default { ...@@ -700,7 +699,6 @@ export default {
preIndex: 0 //当前轮播选中图 preIndex: 0 //当前轮播选中图
} }
}, },
mounted: function() {},
created() { created() {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
window.addEventListener('scroll', this.handleScroll) window.addEventListener('scroll', this.handleScroll)
...@@ -831,6 +829,7 @@ export default { ...@@ -831,6 +829,7 @@ export default {
) )
let tour = fourth.data.data let tour = fourth.data.data
params.fourth = tour params.fourth = tour
return { return {
hotlist: params, hotlist: params,
companyList: company, companyList: company,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment