| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- <template>
- <div>
- <div class="home" v-if="!showMainSearch">
- <div class="header">
- <div v-swiper:mySwiper="swiperOption">
- <div class="swiper-wrapper">
- <div class="swiper-slide">
- <img class="home-bg" src="/images/mobile/@2x/applyPurchase/home/app-banner_01.jpg" alt="">
- </div>
- <div class="swiper-slide">
- <img class="home-bg" src="/images/mobile/@2x/applyPurchase/home/app-banner_02.jpg" alt="">
- </div>
- </div>
- <div class="swiper-pagination swiper-pagination-bullets"></div>
- </div>
- <div class="search-content">
- <input type="text" placeholder="请输入您要查找的型号、品牌或店铺" @click="onHomeSearchClick()">
- <span>
- <i class="iconfont icon-sousuo"></i>
- </span>
- <img src="/images/mobile/@2x/applyPurchase/home/phone.png" alt="" @click="showStoreInfo = true">
- </div>
- </div>
- <ul class="link-list">
- <li>
- <nuxt-link to="/mobile/supplier">
- <img src="/images/mobile/@2x/home/supplier.png" alt="">
- <span>供应商</span>
- </nuxt-link>
- </li>
- <li>
- <a @click="goOpportunity">
- <img src="/images/mobile/@2x/home/seek.png" alt="">
- <span>我的商机</span>
- </a>
- </li>
- <li>
- <nuxt-link to="/mobile/shop">
- <img src="/images/mobile/@2x/home/store.png" alt="">
- <span>店铺列表</span>
- <!-- <i></i>-->
- </nuxt-link>
- </li>
- <li>
- <nuxt-link to="/mobile/brand/brandCenter/ABCD">
- <img src="/images/mobile/@2x/home/brand.png" alt="">
- <span>品牌中心</span>
- </nuxt-link>
- </li>
- </ul>
- <div class="seek-title">
- <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
- <span>最新求购信息</span>
- <nuxt-link to="/mobile/applyPurchase/list">查看更多 <img src="/images/mobile/@2x/applyPurchase/home/arrow-right.png" alt=""></nuxt-link>
- </div>
- <seek-list :purchaseManList="purchaseManList"></seek-list>
- </div>
- <div class="mobile-modal" v-if="showStoreInfo">
- <div class="mobile-modal-box">
- <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
- <div class="mobile-modal-content">
- <div>商家地址:深圳市南山区英唐大厦1楼</div>
- <!-- <div class="content-line link-url">在线咨询</div>-->
- <div>致电:<a href="tel:4008301818" target="_blank" class="content-line link-url">4008301818</a></div>
- <div>邮件:<a href="mailto:yrsc@usoftchina.com" target="_blank" class="content-line link-url">yrsc@usoftchina.com</a></div>
- </div>
- </div>
- </div>
- <main-search v-if="showMainSearch" @cancelSearchAction="onCancelSearch"></main-search>
- <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
- <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
- </div>
- </template>
- <script>
- import SeekList from './applyPurchase/SeekList.vue'
- import MainSearch from '~/components/mobile/search/MainSearch.vue'
- import { RemindBox, LoginBox } from '~components/mobile/common'
- export default {
- data () {
- return {
- showStoreInfo: false,
- showMainSearch: false,
- swiperOption: {
- autoplay: 3000,
- initialSlide: 0,
- pagination: '.swiper-pagination',
- // 解决点击分页器后图片就不能轮播的问题
- autoplayDisableOnInteraction: false,
- paginationClickable: true,
- mousewheelControl: false,
- effect: 'fade',
- lazyLoading: true,
- loop: true,
- prevButton: '.swiper-button-prev',
- nextButton: '.swiper-button-next'
- },
- remindText: '',
- timeoutCount: 0,
- showLoginBox: false
- }
- },
- components: {
- SeekList,
- MainSearch,
- RemindBox,
- LoginBox
- },
- computed: {
- purchaseManList () {
- return this.$store.state.applyPurchase.purchaseManList.purchaseHomeList.data.content
- }
- },
- methods: {
- onHomeSearchClick () {
- this.showMainSearch = true
- this.$store.dispatch('searchData/getSearchHistory')
- },
- onCancelSearch: function () {
- this.showMainSearch = false
- },
- goOpportunity () {
- if (this.user.logged) {
- if (this.user.data.enterprise.uu) {
- this.$router.push('/mobile/applyPurchase/list/businessOpportunity')
- } else if (this.user.data.enterprise.isVendor !== 313) {
- this.onRemind('抱歉,您暂未开通卖家中心,可前往PC端开通')
- }
- } else {
- this.showLoginBox = true
- }
- },
- onRemind: function (str) {
- this.remindText = str
- this.timeoutCount ++
- }
- }
- }
- </script>
- <style lang="scss">
- .home {
- padding-bottom: 1rem;
- background: #f3f3f7;
- .header {
- height: 3.26rem;
- position: relative;
- .home-bg {
- height: 3.26rem;
- width: 100%;
- }
- .search-content {
- position: absolute;
- top: 0;
- width: 100%;
- }
- .swiper-container {
- height: 3.26rem;
- position: absolute;
- top: 0;
- width: 100%;
- z-index: 0;
- }
- .swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets {
- bottom: .1rem !important;
- }
- .swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
- width: .16rem !important;
- height: .16rem !important;
- margin: 0 .2rem;
- }
- }
- .link-list {
- background: #fff;
- height: 1.56rem;
- margin-bottom: .2rem;
- li {
- position: relative;
- display: inline-block;
- width: 25%;
- text-align: center;
- float: left;
- height: 1.56rem;
- img {
- width: .7rem;
- height: .7rem;
- margin-top: .2rem;
- }
- span {
- font-size: .26rem;
- color: #666;
- display: block;
- margin-top: .15rem;
- }
- i {
- height: 0.9rem;
- width: .01rem;
- background: #ddd;
- display: block;
- position: absolute;
- right: 0;
- top: .2rem;
- }
- }
- }
- }
- </style>
|