Commit 644c074c authored by guoyou's avatar guoyou

友情链接bug修复

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