yangc 7 жил өмнө
parent
commit
387023f257

+ 1 - 1
components/mobile/Home.vue

@@ -23,7 +23,7 @@
       </div>
       <ul class="link-list">
         <li>
-          <nuxt-link to="/mobile/applyPurchase/list">
+          <nuxt-link to="/mobile/supplier">
             <img src="/images/mobile/@2x/home/supplier.png" alt="">
             <span>供应商</span>
           </nuxt-link>

+ 1 - 1
components/mobile/MobileHeader.vue

@@ -137,7 +137,7 @@
 //          this.showHeader = false
 //          this.showSearch = false
 //        }
-        this.showHeader = val && val !== '/' && val !== '/mobile/applyPurchase/list'
+        this.showHeader = val && val !== '/' && val !== '/mobile/applyPurchase/list' && !this.startWith(val, '/mobile/supplier')
 //        this.showSearch = val !== '/' && !this.startWith(val, '/mobile/search')
         let title = '优软商城'
         if (this.startWith(val, '/mobile/brand/componentDetail/')) {

+ 5 - 5
components/mobile/search/MainSearch.vue

@@ -8,7 +8,7 @@
           <li @click="setSearchType(searchType == 'product' ? 'store' : 'product', $event)">{{searchType == 'product' ? '店铺' : '产品'}}</li>
         </ul>
       </div>
-      <input type="text" id="search-box" v-model="keyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="onSearch()">
+      <input type="text" id="search-box" v-model="keyword" :placeholder="searchType == 'product' ? '请输入您要查找的型号或品牌' : '请输入您要查找的店铺'" @keyup.13="onSearch()">
       <span @click="onSearch()">搜索</span>
       <a @click="cancelSearch">取消</a>
     </div>
@@ -207,8 +207,8 @@
         color: #366df3;
         font-size: .28rem;
         margin-left: .02rem;
-        border-top-right-radius: .05rem;
-        border-bottom-right-radius: .05rem;
+        border-top-right-radius: .14rem;
+        border-bottom-right-radius: .14rem;
         background: #fff;
         float: left;
         margin-top: .12rem;
@@ -223,7 +223,7 @@
         left: .5rem;
         font-size: .28rem;
         width: .8rem;
-        text-align: center;
+        padding-left: .05rem;
         background: url('/images/mobile/@2x/search/select-arrow.png') no-repeat;
         background-size: .14rem .12rem;
         background-position: .63rem .36rem;
@@ -242,7 +242,7 @@
             height: .59rem;
             border-radius: .02rem;
             background: rgba(0, 0, 0, .6);
-            font-size: .23rem;
+            font-size: .28rem;
             color: rgba(255, 255, 255, .89);
             text-align: center;
             line-height: .59rem;

+ 102 - 0
components/mobile/supplier/List.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="supplier-list mobile-content">
+    <div class="mobile-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <div class="search-content">
+        <input type="text" v-model="seekKeyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
+        <span @click="searchSeek">
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+    </div>
+    <ul>
+      <li v-for="item in list.content">
+        <img v-if="item.isStore == 1" class="open" src="/images/mobile/supplier/is-open.png" alt="">
+        <span>{{item.enName}}</span>
+        <nuxt-link :to="`/mobile/supplier/detail/${item.enUU}`">
+          <img class="tag" src="/images/mobile/supplier/tag.png" alt="">
+        </nuxt-link>
+      </li>
+    </ul>
+  </div>
+</template>
+<script>
+  export default {
+    computed: {
+      list () {
+        return this.$store.state.supplier.data.list.data
+      }
+    },
+    methods: {
+      goLastPage: function () {
+        window.history.back(-1)
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+    .supplier-list {
+      height: 100%;
+      background: #29a9f9;
+      .mobile-header {
+        position: fixed;
+        top: 0;
+        z-index: 10;
+        width:100%;
+        height:.88rem;
+        line-height: .88rem;
+        background: #3e82f5;
+        padding:0 .2rem 0 .1rem;
+        color:#fff;
+        > a {
+          font-size:.28rem;
+          color:#fff;
+          position: absolute;
+          i {
+            font-size: .48rem;
+            margin-right: -.1rem;
+          }
+        }
+        .search-content {
+          margin-left: .5rem;
+          line-height: normal;
+          padding-top: .14rem;
+          input {
+            color: #333;
+            width: 5.78rem;
+            line-height: normal;
+          }
+          span {
+            height: .46rem;
+            line-height: .46rem;
+          }
+        }
+      }
+      ul {
+        margin: .26rem auto 0;
+        width: 6.91rem;
+        li {
+          position: relative;
+          height: 1.21rem;
+          background: #fff;
+          line-height: 1.21rem;
+          padding-left: .74rem;
+          font-size: .32rem;
+          margin-bottom: .14rem;
+          border-radius: .05rem;
+          .open {
+            width: 1.35rem;
+            position: absolute;
+            top: -.08rem;
+            left: -.1rem;
+          }
+          .tag {
+            width: 1.08rem;
+            position: absolute;
+            right: -.1rem;
+            top: .16rem;
+          }
+        }
+      }
+    }
+</style>

+ 75 - 0
components/mobile/supplier/SupplierDetail.vue

@@ -0,0 +1,75 @@
+<template>
+  <div class="supplier-detail">
+    <div class="detail">
+      <h1>{{enInfo.enName}} <i class="iconfont icon-xiangyou"></i></h1>
+      <div class="line">
+        <img src="/images/mobile/supplier/business.png" alt="">
+        <span>营业执照号:</span>
+        <span>{{enInfo.enBussinessCode || '-'}}</span>
+      </div>
+      <div class="line">
+        <img src="/images/mobile/supplier/address.png" alt="">
+        <span>地址:</span>
+        <span>{{enInfo.enAddress || '-'}}</span>
+      </div>
+      <div class="line">
+        <img src="/images/mobile/supplier/email.png" alt="">
+        <span>邮箱:</span>
+        <span>{{enInfo.enEmail || '-'}}</span>
+      </div>
+      <div class="line">
+        <img src="/images/mobile/supplier/phone.png" alt="">
+        <span>电话:</span>
+        <span>{{enInfo.enTel || '-'}}</span>
+      </div>
+      <div class="line">
+        <img src="/images/mobile/supplier/house.png" alt="">
+        <p>行业</p>
+        <span>{{enInfo.enIndustry || '-'}}</span>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    computed: {
+      enInfo () {
+        return this.$store.state.supplier.data.enterpriseData.data
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .supplier-detail {
+    background: #29a9f9;
+    .detail {
+      width: 7.12rem;
+      height: 4.46rem;
+      padding: 0 .31rem;
+      margin: 0 auto;
+      background: #fff;
+      overflow: hidden;
+      h1 {
+        height: 1.11rem;
+        line-height: 1.11rem;
+        text-align: center;
+        font-size: .44rem;
+        border-bottom: 1px solid rgba(0, 0, 0, .26);
+        i {
+          color: #3f84f6;
+          font-size: .31rem;
+          float: right;
+        }
+      }
+      .line {
+        margin-top: .26rem;
+        font-size: .28rem;
+        color: #666;
+        padding: 0 .15rem;
+        img {
+          height: .25rem;
+        }
+      }
+    }
+  }
+</style>

+ 3 - 0
components/mobile/supplier/index.js

@@ -0,0 +1,3 @@
+import List from './List.vue'
+import SupplierDetail from './SupplierDetail.vue'
+export { List, SupplierDetail }

+ 4 - 2
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://10.1.51.124:8080/platform-b2c')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://10.1.51.82:8080/platform-b2c/')
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
@@ -173,6 +173,8 @@ module.exports = {
     // 公共物料匹配类目
     '/productuser/**': materialUrl,
     // 权限管理
-    '/account/**': baseUrl
+    '/account/**': baseUrl,
+    // 供应商
+    '/vendor/**': baseUrl
   }
 }

+ 0 - 1
pages/index.vue

@@ -105,7 +105,6 @@
         store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 50, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null}),
         store.dispatch('loadStoreStatus', { op: 'check' })
       ]) : Promise.all([
-        store.dispatch('loadStoreStatus', { op: 'check' }),
         store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
       ])
     },

+ 1 - 1
pages/mobile/applyPurchase/list/businessOpportunity.vue

@@ -16,7 +16,7 @@
     <seek-list v-if="purchaseManListData && purchaseManListData.length" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
     <div class="com-none-state" v-else>
       <img src="/images/mobile/@2x/car@2x.png">
-      <p>暂无求购信息</p>
+      <p>对个人物料库进行维护后,可获得更多的商机哦!</p>
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>
     <loading v-show="isSearchSearchingMore"></loading>

+ 39 - 0
pages/mobile/supplier/detail/_uu.vue

@@ -0,0 +1,39 @@
+<template>
+  <div>
+    <div class="sl-title">
+      供应商详情<i class="iconfont icon-fanhui"></i>
+    </div>
+    <supplier-detail></supplier-detail>
+  </div>
+</template>
+<script>
+  import { SupplierDetail } from '~components/mobile/supplier'
+  export default {
+    layout: 'mobile',
+    fetch ({ store, params }) {
+      return Promise.all([
+        store.dispatch('supplier/getSupplierEnInfo', {uu: params.uu})
+      ])
+    },
+    components: {
+      SupplierDetail
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .sl-title {
+    position: relative;
+    height: .72rem;
+    font-size: .35rem;
+    color: #fff;
+    background: #3f84f6;
+    text-align: center;
+    line-height: .72rem;
+    i {
+      position: absolute;
+      left: .32rem;
+      top: 0;
+    }
+  }
+</style>
+

+ 17 - 0
pages/mobile/supplier/index.vue

@@ -0,0 +1,17 @@
+<template>
+  <list></list>
+</template>
+<script>
+  import { List } from '~components/mobile/supplier'
+  export default {
+    layout: 'mobile',
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('supplier/getSupplierList', {page: 1, size: 10})
+      ])
+    },
+    components: {
+      List
+    }
+  }
+</script>

BIN
static/images/mobile/supplier/address.png


BIN
static/images/mobile/supplier/business.png


BIN
static/images/mobile/supplier/email.png


BIN
static/images/mobile/supplier/house.png


BIN
static/images/mobile/supplier/is-open.png


BIN
static/images/mobile/supplier/phone.png


BIN
static/images/mobile/supplier/tag.png


+ 24 - 0
store/supplier.js

@@ -0,0 +1,24 @@
+import axios from '~/plugins/axios'
+
+export const actions = {
+  // 获取浏览记录
+  getSupplierList ({ commit }, params = {}) {
+    commit('data/REQUEST_LIST')
+    return axios.get('/vendor/introduction/vendor/list', {params})
+      .then(response => {
+        commit('data/GET_LIST_SUCCESS', response.data)
+      }, err => {
+        commit('data/GET_LIST_FAILURE', err)
+      })
+  },
+  // 根据uu获取供应商企业信息
+  getSupplierEnInfo ({ commit }, params = {}) {
+    commit('data/REQUEST_EN')
+    return axios.get(`/basic/enterprise/${params.uu}/info`, {params})
+      .then(response => {
+        commit('data/GET_EN_SUCCESS', response.data)
+      }, err => {
+        commit('data/GET_EN_FAILURE', err)
+      })
+  }
+}

+ 33 - 0
store/supplier/data.js

@@ -0,0 +1,33 @@
+export const state = () => ({
+  list: {
+    fetching: false,
+    data: []
+  },
+  enterpriseData: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_LIST (state) {
+    state.list.fetching = true
+  },
+  GET_LIST_FAILURE (state) {
+    state.list.fetching = false
+  },
+  GET_LIST_SUCCESS (state, result = []) {
+    state.list.fetching = false
+    state.list.data = result
+  },
+  REQUEST_EN (state) {
+    state.enterpriseData.fetching = true
+  },
+  GET_EN_FAILURE (state) {
+    state.enterpriseData.fetching = false
+  },
+  GET_EN_SUCCESS (state, result = []) {
+    state.enterpriseData.fetching = false
+    state.enterpriseData.data = result
+  }
+}