-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
968 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<div class="swiper-container" ref="swiper"> | ||
<div class="swiper-wrapper swiper"> | ||
<div class="swiper-slide item" v-for="(item,index) in banner" :key="index"> | ||
<img :src="item.src" alt=""> | ||
</div> | ||
</div> | ||
<div class="swiper-pagination"></div> | ||
</div> | ||
</template> | ||
<script> | ||
import { getBanner, ERR_OK } from '@/api/data' | ||
import Swiper from 'swiper' | ||
import 'swiper/dist/css/swiper.min.css' | ||
export default { | ||
data() { | ||
return { | ||
banner: [] | ||
} | ||
}, | ||
created() { | ||
getBanner().then(res=> { | ||
if(res.status === ERR_OK) { | ||
// console.log(res.data.banner) | ||
this.banner = res.data.banner | ||
let swiper = this.$refs.swiper | ||
this.$nextTick(()=> { | ||
let mySwiper = new Swiper(swiper,{ | ||
observer:true, | ||
observeParents:true, | ||
autoplay: { | ||
delay: 1000 | ||
}, | ||
loop: true, | ||
pagination: { | ||
el: '.swiper-pagination' | ||
} | ||
}) | ||
}) | ||
} | ||
}) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="stylus" scoped> | ||
.swiper | ||
height 3.2rem | ||
img | ||
width 100% | ||
height 100% | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<div class="inputwrap"> | ||
<div class="goinput" @click="fail"> | ||
<input type="text" placeholder="请输入鱼塘关键字"> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
methods: { | ||
fail() { | ||
this.$toast('这个功能小哥哥还未完成哦') | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
|
||
<style lang="stylus" scoped> | ||
.inputwrap | ||
width 10rem | ||
height 1.5rem | ||
line-height 1.5rem | ||
background-color #f7f7f7 | ||
.goinput | ||
width 96% | ||
height 100% | ||
margin 0 auto | ||
text-align center | ||
box-sizing border-box | ||
padding .3rem | ||
display flex | ||
justify-content center | ||
align-items center | ||
input | ||
width 100% | ||
height 100% | ||
padding-left 40% | ||
outline none | ||
border none | ||
background-color #fff | ||
border-radius .13rem | ||
box-sizing border-box | ||
background #fff url('../../assets/images/search.png') no-repeat | ||
background-size .6rem .6rem | ||
background-position 35% 50% | ||
</style> |
Oops, something went wrong.