2019-08-04 13:14:08 +00:00
|
|
|
<template>
|
|
|
|
<div
|
2019-08-05 08:53:48 +00:00
|
|
|
v-if="isEffective(effectiveTime)"
|
2019-08-04 13:14:08 +00:00
|
|
|
id="geektime-ads"
|
|
|
|
:class="isMobile ? 'geektime-ads-mobile':''"
|
|
|
|
>
|
|
|
|
<a
|
2019-08-22 10:29:50 +00:00
|
|
|
href="https://time.geekbang.org/column/intro/154?utm_term=zeusGZFFE&utm_source=app&utm_medium=tangjinzhou"
|
2019-08-04 13:14:08 +00:00
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
height="100"
|
2019-08-22 10:29:50 +00:00
|
|
|
alt="重学前端"
|
2019-08-23 09:58:46 +00:00
|
|
|
src="https://qn.antdv.com/chongxueqianduan.jpg"
|
2019-08-12 12:38:09 +00:00
|
|
|
/>
|
2019-08-04 13:14:08 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-08-05 08:53:48 +00:00
|
|
|
import moment from 'moment';
|
2019-08-04 13:14:08 +00:00
|
|
|
export default {
|
|
|
|
props: ['isMobile'],
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
visible: true,
|
2019-08-05 08:53:48 +00:00
|
|
|
effectiveTime: {
|
|
|
|
start: '2019-08-05 17:00:00',
|
|
|
|
end: '2019-09-05 17:00:00',
|
|
|
|
},
|
2019-08-04 13:14:08 +00:00
|
|
|
};
|
|
|
|
},
|
2019-08-05 08:53:48 +00:00
|
|
|
methods: {
|
|
|
|
isEffective({ start, end }) {
|
|
|
|
return moment().isBetween(start, end);
|
|
|
|
},
|
|
|
|
},
|
2019-08-04 13:14:08 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
2019-08-05 08:53:48 +00:00
|
|
|
#geektime-ads {
|
2019-08-12 12:38:09 +00:00
|
|
|
width: 266px;
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0px;
|
2019-08-05 08:53:48 +00:00
|
|
|
padding: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
z-index: 9;
|
|
|
|
background-color: #fff;
|
|
|
|
border-radius: 3px;
|
|
|
|
font-size: 13px;
|
|
|
|
background: #f5f5f5;
|
|
|
|
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
|
|
|
|
}
|
|
|
|
#geektime-ads.geektime-ads-mobile {
|
|
|
|
width: 100%;
|
|
|
|
position: relative;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
padding: 0;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
}
|
2019-08-04 13:14:08 +00:00
|
|
|
</style>
|
|
|
|
|