Browse Source

修改卖家中心

q867427795 7 years ago
parent
commit
7062cdd65e

+ 66 - 0
components/main/vendorHeader.vue

@@ -0,0 +1,66 @@
+<template>
+  <div class="user_header clearfix">
+    <div class="container">
+      <!--Logo商标-->
+      <div class="user_header-brand pull-left">
+        <nuxt-link :to="'/'">
+          <img src="/images/vendor/logo.png" class="mall-logo"/>
+          <!-- <div class="mall-slogan">
+            <p>For the World<br/>为世界电子产业创造价值</p>
+          </div> -->
+        </nuxt-link>
+      </div>
+      <!--搜索-->
+      <div class="user_header-search">
+        <search-box :SelectItem="false"></search-box>
+      </div>
+      <!--统计-->
+      <!-- <div class="header-count pull-right">
+        <count-box></count-box>
+      </div> -->
+    </div>
+  </div>
+</template>
+<script>
+import SearchBox from './Search.vue'
+import CountBox from './count/Box.vue'
+
+export default {
+  name: 'home-header',
+  components: {
+    SearchBox,
+    CountBox
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '~assets/scss/variables';
+
+.user_header {
+  width: 100%;
+  margin: 0px auto;
+  height: 80px;
+  background: #5078cb;
+  .user_header-brand {
+    .mall-logo {
+      margin-top: 15px;
+    }
+
+    .mall-slogan {
+      line-height: 20px;
+      font-weight: bold;
+      color: $primary;
+      border-left: 1px solid $primary;
+      padding-left: 12px;
+      margin-left: 118px;
+      margin-top: 20px;
+    }
+  }
+
+  .user_header-search {
+    margin-top: 20px;
+    margin-left: 75px;
+    float: right
+  }
+}
+</style>

+ 3 - 0
components/vendor/index.js

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

+ 62 - 0
components/vendor/toul.vue

@@ -0,0 +1,62 @@
+<template>
+  <div class="center-toul">
+    <div class="center-toul-title active">买家中心</div>
+    <ul>
+      <li>购物车<span>(9)</span></li>
+      <li>订单中心</li>
+      <li>我的求购</li>
+      <li>支付中心</li>
+      <li>发票管理</li>
+      <li>账户管理</li>
+    </ul>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'toul'
+}
+</script>
+
+<style lang="scss" scoped>
+.center-toul {
+  width: 146px;
+  border: #ddd 1px solid;
+  background: #fff;
+  border-bottom: none;
+  text-align: center;
+  float: left;
+  .center-toul-title {
+    background: #ecf2fd;
+    color: #666;
+    height: 40px;
+    line-height: 40px;
+    font-weight: bold;
+    &.active {
+      background: #5078cb;
+      color: #fff
+    }
+    &:hover {
+      background: #67afe4;
+      color: #fff;
+      cursor: pointer;
+    }
+  }
+  ul
+   li {
+      line-height: 50px;
+      height: 50px;
+      color: #333;
+      border-bottom: 1px solid #ddd;
+      transition: all 0.3s;
+      &.active {
+        background: #5078cb
+      }
+      &:hover {
+        background: #67afe4;
+        color: #fff;
+        cursor: pointer;
+      }
+   }
+}
+</style>

+ 81 - 0
layouts/uservendor.vue

@@ -0,0 +1,81 @@
+<template>
+  <div id="main" class="uservendor">
+    <header-view v-if="!isInFrame"></header-view>
+    <vendor-header></vendor-header>
+    <nuxt/>
+    <footer-view></footer-view>
+    <right-bar></right-bar>
+  </div>
+</template>
+<script>
+  import { Header, Footer, RightBar } from '~components/default'
+  import { VendorHeader } from '~components/main'
+  export default {
+    name: 'main',
+    components: {
+      HeaderView: Header,
+      FooterView: Footer,
+      RightBar,
+      VendorHeader
+    },
+    head () {
+      return {
+        title: this.title,
+        meta: [
+          {hid: 'description', name: 'description', content: this.description},
+          {hid: 'keywords', name: 'keywords', content: this.keywords}
+        ]
+      }
+    },
+    computed: {
+      isMobile: function () {
+        return this.$store.state.option.isMobile
+      },
+      isInFrame () {
+        if (this.$route.query.type === 'erp') {
+          this.$store.commit('option/ADD_COOKIES', 'type=erp;')
+          return true
+        } else {
+          let cookies = this.$store.state.option.cookies
+          let cookieArr = cookies.split(';')
+          let cookieObj = {}
+          for (let i = 0; i < cookieArr.length; i++) {
+            let tmpArr = cookieArr[i].split('=') || []
+            if (tmpArr.length === 2) {
+              cookieObj[tmpArr[0].trim()] = tmpArr[1].trim()
+            }
+          }
+          return cookieObj.type === 'erp'
+        }
+      },
+      title () {
+        return '卖家中心-优软商城'
+      },
+      description () {
+        return '优软商城,电子元器件搜索引擎'
+      },
+      keywords () {
+        return '软商城,B2B,B2C,行业门户,网上贸易,电子商务,网上贸易,网上交易,交易市场,在线交易,供求信息,采购,求购信息,供应信息'
+      },
+      kinds () {
+        return this.$store.state.product.kind.kindsParentWithBother.data
+      },
+      componentDetail () {
+        return this.$store.state.componentDetail.detail.data
+      },
+      brandDetail () {
+        return this.$store.state.brandDetail.detail.data
+      },
+      newsDetail () {
+        return this.$store.state.newsData.detailNews.detailNews.data
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+.uservendor {
+  background: #f7f7f7;
+}
+</style>
+

BIN
static/images/vendor/edit.png


BIN
static/images/vendor/logo.png


BIN
static/images/vendor/user_photo.png