Bläddra i källkod

Merge remote-tracking branch 'origin/release-201813-yc' into release-201813-yc

gaoxm 7 år sedan
förälder
incheckning
04b9c7231a

+ 1 - 14
components/applyPurchase/ApplyFooter.vue

@@ -126,20 +126,7 @@
         } else if (type === 'kind') {
           window.location.href = '/product/kind/home'
         } else if (type === 'openStore') {
-          if (this.user.logged) {
-            this.$http.get('/basic/vendor/transactionInfo').then(response => {
-              if (response.data.isOpenStore) {
-                window.location.href = '/vendor#/store/maintain'
-              } else {
-                window.location.href = '/vendor#/store-apply'
-              }
-            }, err => {
-              this.$message.error('该账户未开通卖家中心')
-              console.log(err)
-            })
-          } else {
-            this.login()
-          }
+          this.goStoreApply()
         } else if (type === 'brand') {
           window.location.href = '/product/brand/brandList/ABC'
         }

+ 0 - 11
components/home/displayCard.vue

@@ -158,17 +158,6 @@
           }
         }
         return num
-      },
-      goStoreApply: function () {
-        if (this.user.logged) {
-          if (this.enterprise && this.enterprise.isVendor === 313) {
-            window.location.href = '/vendor#/index'
-          } else {
-            this.$router.push('/register-saler')
-          }
-        } else {
-          this.$router.push('/auth/login')
-        }
       }
     },
     computed: {

+ 3 - 3
components/main/Nav.vue

@@ -39,9 +39,9 @@
       <nuxt-link to="/product/brand/brandList/A" class="item">
         <span>品牌墙</span>
       </nuxt-link>
-      <nuxt-link to="/pcb" class="item">
+     <!-- <nuxt-link to="/pcb" class="item">
         <span>pcb专区</span>
-      </nuxt-link>
+      </nuxt-link>-->
       <nuxt-link to="/news" class="item">
         <span>优软快讯</span>
       </nuxt-link>
@@ -97,7 +97,7 @@
       display: inline-block;
       height: $nav-height;
       line-height: $nav-height;
-      width: 122px;
+      width: 126px;
       text-align: center;
       margin: 0;
       vertical-align: middle;

+ 1 - 1
components/mobile/MobileHeader.vue

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

+ 154 - 0
components/mobile/center/Message.vue

@@ -0,0 +1,154 @@
+<template>
+  <div class="mobile-center">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>消息</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-content">
+      <div v-if="msgList && msgList.length" class="message-list" v-bind:key="item.id" v-for="item in msgList">
+        <div class="content">
+          <div class="new-dot">
+            <b v-if="item.isRead === 0"></b>
+            <img src="/images/mobile/center/user/message.png" alt="">
+          </div>
+          <div class="message">
+            <p>{{item.createTime | time}}</p>
+            <a :href="item.type === 'MALL跳转卖家待报价页面' ? '/mobile/center/user/seek?seekType=done' : item.type === 'MALL公共询价' ? '/mobile/center/vendor/seek?seekType=wait' : item.type === '商城公共询价采纳结果' ? '/mobile/center/vendor/seek?seekType=done' : ''"
+               v-if="item.type"
+               :title="item.content" class="info">{{item.content}}</a>
+            <a v-else :title="item.content" class="noLink info">{{item.content}}</a>
+          </div>
+        </div>
+      </div>
+      <empty-status v-if="!msgList.length"  :showLink="true" :text="'抱歉,暂无消息'"></empty-status>
+    </div>
+    <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    data () {
+      return {
+        count: 10,
+        page: 1,
+        isChange: false,
+        msgList: []
+      }
+    },
+    computed: {
+      user () {
+        return this.$store.state.option.user
+      },
+      messageList () {
+        return this.$store.state.messageShow.messageList.list.data
+      },
+      fetching () {
+        return this.$store.state.messageShow.messageList.list.fetching
+      },
+      allPage () {
+        return Math.floor(this.messageList.totalElements / this.messageList.size) + Math.floor(this.messageList.totalElements % this.messageList.size > 0 ? 1 : 0)
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus
+    },
+    watch: {
+      'messageList': {
+        handler: function (val) {
+          if (this.isChange) {
+            this.msgList = val.content
+            this.isChange = false
+          } else {
+            this.msgList = [...this.msgList, ...val.content]
+            this.getRead()
+          }
+        },
+        immediate: true
+      }
+    },
+    methods: {
+      reloadList: function () {
+        this.$store.dispatch('messageShow/getAllMessage', { receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, consumerApp: 'MALL', page: this.page, count: this.count, sorting: {'createTime': 'DESC'} })
+      },
+      onPullUpAction: function () {
+        this.page++
+        this.reloadList()
+      },
+      getRead () {
+        let ids = []
+        this.msgList.forEach((value) => {
+          if (value.isRead !== 1) {
+            ids.push(value.id)
+          }
+        })
+        if (ids.length !== 0) {
+          this.$http.post('/messages/read', {receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, messageId: ids.join(','), consumerApp: 'MALL'})
+            .then((res) => {
+              console.log(res.data)
+            })
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-content {
+    margin-top: .6rem !important;
+    padding: .2rem;
+    background: #f1f3f6;
+    .com-none-state {
+      padding-bottom: 100%;
+    }
+    .message-list {
+      background: #fff;
+      padding: 0 .15rem 0 .2rem;
+      .content {
+        padding: .14rem 0;
+        overflow: hidden;
+        border-bottom: 1px solid #d3d3d3;
+        .new-dot {
+          position: relative;
+          b{
+            position: absolute;
+            left: .1rem;
+            top: .25rem;
+            width: .16rem;
+            height: .16rem;
+            border-radius: 50%;
+            background: #fc0405;
+          }
+        }
+        img{
+          margin: .3rem 0 0 .12rem;
+          float: left;
+          width: .8rem;
+          height: .8rem;
+        }
+        .message{
+          margin-left: .24rem;
+          float: left;
+          width: 5.4rem;
+          p{
+            display: inherit;
+            margin-bottom: .1rem;
+            text-align: right;
+            font-size: .24rem;
+            color: #666;
+          }
+          a.info{
+            font-size: .28rem;
+            color: #333;
+            word-break: break-all;
+          }
+        }
+      }
+    }
+  }
+  .message-list:last-child .content{
+    border-bottom: none;
+  }
+</style>

+ 2 - 1
components/mobile/center/index.js

@@ -1,2 +1,3 @@
 import Seek from './Seek.vue'
-export { Seek }
+import Message from './Message.vue'
+export { Seek, Message }

+ 1 - 14
components/provider/NewStore.vue

@@ -31,7 +31,7 @@
           已入驻商家<span>{{storeCount}}</span>家
         </div>
         <div>
-          <a @click="goStoreApply()"><button>立即入驻</button></a>
+          <a @click="goStoreApply"><button>立即入驻</button></a>
         </div>
       </div>
     </div>
@@ -54,19 +54,6 @@ export default {
     enterprise () {
       return this.user.data.enterprise
     }
-  },
-  methods: {
-    goStoreApply: function () {
-      if (this.user.logged) {
-        if (this.enterprise && this.enterprise.isVendor === 313) {
-          window.location.href = '/vendor#/index'
-        } else {
-          this.$router.push('/register-saler')
-        }
-      } else {
-        this.$router.push('/auth/login')
-      }
-    }
   }
 }
 </script>

+ 0 - 11
components/provider/Suppliers.vue

@@ -124,17 +124,6 @@ export default {
       this.pageParams.keyword = this.keyword === '' ? null : this.keyword
 
       this.pageCommodity(this.pageParams)
-    },
-    goStoreApply: function () {
-      if (this.user.logged) {
-        if (this.enterprise && this.enterprise.isVendor === 313) {
-          window.location.href = '/vendor#/store-apply'
-        } else {
-          this.$router.push('/register-saler')
-        }
-      } else {
-        this.$router.push('/auth/login')
-      }
     }
   }
 }

+ 1 - 1
nuxt.config.js

@@ -1,7 +1,7 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 // b2c后台
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://192.168.253.121:9090/platform-b2c')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://192.168.253.3:36006')
 // 公共询价
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 // 公共物料

+ 4 - 145
pages/mobile/center/user/collect/message.vue

@@ -1,44 +1,11 @@
 <template>
-  <div class="mobile-center">
-    <div class="com-mobile-header mobile-center-header">
-      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
-      <p>消息</p>
-      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
-    </div>
-    <div class="mobile-content">
-      <div v-if="msgList && msgList.length" class="message-list" v-bind:key="item.id" v-for="item in msgList">
-        <div class="content">
-          <div class="new-dot">
-            <b v-if="item.isRead === 0"></b>
-            <img src="/images/mobile/center/user/message.png" alt="">
-          </div>
-          <div class="message">
-            <p>{{item.createTime | time}}</p>
-            <a :href="item.type === 'MALL跳转卖家待报价页面' ? '/mobile/center/user/seek?seekType=done' : item.type === 'MALL公共询价' ? '/mobile/center/vendor/seek?seekType=wait' : item.type === '商城公共询价采纳结果' ? '/mobile/center/vendor/seek?seekType=done' : ''"
-               v-if="item.type"
-               :title="item.content" class="info" target="_blank">{{item.content}}</a>
-            <a v-else :title="item.content" class="noLink info">{{item.content}}</a>
-          </div>
-        </div>
-      </div>
-      <empty-status v-if="!msgList.length"  :showLink="true" :text="'抱歉,暂无消息'"></empty-status>
-    </div>
-    <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
-  </div>
+  <message></message>
 </template>
 <script>
-  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  import { Message } from '~components/mobile/center'
   export default {
     middleware: 'authenticated',
     layout: 'mobileNoHeader',
-    data () {
-      return {
-        count: 10,
-        page: 1,
-        isChange: false,
-        msgList: []
-      }
-    },
     fetch ({ store }) {
       let user = store.state.option.user.data
       return Promise.all([
@@ -46,117 +13,9 @@
         store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
       ])
     },
-    computed: {
-      user () {
-        return this.$store.state.option.user
-      },
-      messageList () {
-        return this.$store.state.messageShow.messageList.list.data
-      },
-      fetching () {
-        return this.$store.state.messageShow.messageList.list.fetching
-      },
-      allPage () {
-        return Math.floor(this.messageList.totalElements / this.messageList.size) + Math.floor(this.messageList.totalElements % this.messageList.size > 0 ? 1 : 0)
-      }
-    },
     components: {
-      RemindBox,
-      PullUp,
-      EmptyStatus
-    },
-    watch: {
-      'messageList': {
-        handler: function (val) {
-          if (this.isChange) {
-            this.msgList = val.content
-            this.isChange = false
-          } else {
-            this.msgList = [...this.msgList, ...val.content]
-            this.getRead()
-          }
-        },
-        immediate: true
-      }
-    },
-    methods: {
-      reloadList: function () {
-        this.$store.dispatch('messageShow/getAllMessage', { receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, consumerApp: 'MALL', page: this.page, count: this.count, sorting: {'createTime': 'DESC'} })
-      },
-      onPullUpAction: function () {
-        this.page++
-        this.reloadList()
-      },
-      getRead () {
-        let ids = []
-        this.msgList.forEach((value) => {
-          if (value.isRead !== 1) {
-            ids.push(value.id)
-          }
-        })
-        if (ids.length !== 0) {
-          this.$http.post('/messages/read', {receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, messageId: ids.join(','), consumerApp: 'MALL'})
-            .then((res) => {
-              console.log(res.data)
-            })
-        }
-      }
+      Message
     }
   }
 </script>
-<style lang="scss" scoped>
-  .mobile-content {
-    margin-top: .6rem !important;
-    padding: .2rem;
-    background: #f1f3f6;
-    .com-none-state {
-      padding-bottom: 100%;
-    }
-    .message-list {
-      background: #fff;
-      padding: 0 .15rem 0 .2rem;
-      .content {
-        padding: .14rem 0;
-        overflow: hidden;
-        border-bottom: 1px solid #d3d3d3;
-        .new-dot {
-          position: relative;
-          b{
-            position: absolute;
-            left: .1rem;
-            top: .25rem;
-            width: .16rem;
-            height: .16rem;
-            border-radius: 50%;
-            background: #fc0405;
-          }
-        }
-        img{
-          margin: .3rem 0 0 .12rem;
-          float: left;
-          width: .8rem;
-          height: .8rem;
-        }
-        .message{
-          margin-left: .24rem;
-          float: left;
-          width: 5.4rem;
-          p{
-            display: inherit;
-            margin-bottom: .1rem;
-            text-align: right;
-            font-size: .24rem;
-            color: #666;
-          }
-          a.info{
-            font-size: .28rem;
-            color: #333;
-          }
-        }
-      }
-    }
-  }
-  .message-list:last-child .content{
-     border-bottom: none;
-   }
-</style>
+

+ 0 - 1
pages/mobile/center/vendor/attentionBus.vue

@@ -167,7 +167,6 @@
       border-bottom: 1px solid #d8d8d8;
       box-shadow: 0 1px 3px #ddd;
       .mobile-switch-btn {
-        background: #fff;
         color: #333;
         display: inline-block;
         height: .72rem;

+ 4 - 145
pages/mobile/center/vendor/message.vue

@@ -1,44 +1,11 @@
 <template>
-  <div class="mobile-center">
-    <div class="com-mobile-header mobile-center-header">
-      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
-      <p>消息</p>
-      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
-    </div>
-    <div class="mobile-content">
-      <div v-if="msgList && msgList.length" class="message-list" v-bind:key="item.id" v-for="item in msgList">
-        <div class="content">
-          <div class="new-dot">
-            <b v-if="item.isRead === 0"></b>
-            <img src="/images/mobile/center/user/message.png" alt="">
-          </div>
-          <div class="message">
-            <p>{{item.createTime | time}}</p>
-            <a :href="item.type === 'MALL跳转卖家待报价页面' ? '/mobile/center/user/seek?seekType=done' : item.type === 'MALL公共询价' ? '/mobile/center/vendor/seek?seekType=wait' : item.type === '商城公共询价采纳结果' ? '/mobile/center/vendor/seek?seekType=done' : ''"
-               v-if="item.type"
-               :title="item.content" class="info" target="_blank">{{item.content}}</a>
-            <a v-else :title="item.content" class="noLink info">{{item.content}}</a>
-          </div>
-        </div>
-      </div>
-      <empty-status v-if="!msgList.length"  :showLink="true" :text="'抱歉,暂无消息'"></empty-status>
-    </div>
-    <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
-  </div>
+  <message></message>
 </template>
 <script>
-  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  import { Message } from '~components/mobile/center'
   export default {
     middleware: 'authenticated',
     layout: 'mobileNoHeader',
-    data () {
-      return {
-        count: 10,
-        page: 1,
-        isChange: false,
-        msgList: []
-      }
-    },
     fetch ({ store }) {
       let user = store.state.option.user.data
       return Promise.all([
@@ -46,117 +13,9 @@
         store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
       ])
     },
-    computed: {
-      user () {
-        return this.$store.state.option.user
-      },
-      messageList () {
-        return this.$store.state.messageShow.messageList.list.data
-      },
-      fetching () {
-        return this.$store.state.messageShow.messageList.list.fetching
-      },
-      allPage () {
-        return Math.floor(this.messageList.totalElements / this.messageList.size) + Math.floor(this.messageList.totalElements % this.messageList.size > 0 ? 1 : 0)
-      }
-    },
     components: {
-      RemindBox,
-      PullUp,
-      EmptyStatus
-    },
-    watch: {
-      'messageList': {
-        handler: function (val) {
-          if (this.isChange) {
-            this.msgList = val.content
-            this.isChange = false
-          } else {
-            this.msgList = [...this.msgList, ...val.content]
-            this.getRead()
-          }
-        },
-        immediate: true
-      }
-    },
-    methods: {
-      reloadList: function () {
-        this.$store.dispatch('messageShow/getAllMessage', { receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, consumerApp: 'MALL', page: this.page, count: this.count, sorting: {'createTime': 'DESC'} })
-      },
-      onPullUpAction: function () {
-        this.page++
-        this.reloadList()
-      },
-      getRead () {
-        let ids = []
-        this.msgList.forEach((value) => {
-          if (value.isRead !== 1) {
-            ids.push(value.id)
-          }
-        })
-        if (ids.length !== 0) {
-          this.$http.post('/messages/read', {receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, messageId: ids.join(','), consumerApp: 'MALL'})
-            .then((res) => {
-              console.log(res.data)
-            })
-        }
-      }
+      Message
     }
   }
 </script>
-<style lang="scss" scoped>
-  .mobile-content {
-    margin-top: .6rem !important;
-    padding: .2rem;
-    background: #f1f3f6;
-    .com-none-state {
-      padding-bottom: 100%;
-    }
-    .message-list {
-      background: #fff;
-      padding: 0 .15rem 0 .2rem;
-      .content {
-        padding: .14rem 0;
-        overflow: hidden;
-        border-bottom: 1px solid #d3d3d3;
-        .new-dot {
-          position: relative;
-          b{
-            position: absolute;
-            left: .1rem;
-            top: .25rem;
-            width: .16rem;
-            height: .16rem;
-            border-radius: 50%;
-            background: #fc0405;
-          }
-        }
-        img{
-          margin: .3rem 0 0 .12rem;
-          float: left;
-          width: .8rem;
-          height: .8rem;
-        }
-        .message{
-          margin-left: .24rem;
-          float: left;
-          width: 5.4rem;
-          p{
-            display: inherit;
-            margin-bottom: .1rem;
-            text-align: right;
-            font-size: .24rem;
-            color: #666;
-          }
-          a.info{
-            font-size: .28rem;
-            color: #333;
-          }
-        }
-      }
-    }
-  }
-  .message-list:last-child .content{
-     border-bottom: none;
-   }
-</style>
+

+ 16 - 10
pages/mobile/product/_batchCode.vue

@@ -7,8 +7,9 @@
     <div class="product-info">
       <div class="wrap-title"><span class="line"></span>产品信息</div>
       <div class="focus-wrap inline-block" :class="{'active': isFocus}">
-        <i class="iconfont icon-shoucang" @click="collectStore"></i>
-        <div>店铺<br />关注</div>
+        <i class="iconfont icon-shoucang" @click="collectStore" style="font-size: 0.43rem;"></i>
+        <div>店铺</div>
+        <div>关注</div>
       </div>
       <div class="middle">
         <div class="list">
@@ -46,8 +47,8 @@
 
         <div class="list">
           <div class="name">交期(天):</div>
-          <div class="text red" v-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery != commodity.b2cMinDelivery)" v-text="commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></div>
-          <div class="text rd" v-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery == commodity.b2cMinDelivery)" v-text="commodity.b2cMinDelivery"></div>
+          <div class="text red" v-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery != commodity.b2cMinDelivery)" v-text="commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery + '(天)'"></div>
+          <div class="text red" v-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery == commodity.b2cMinDelivery)" v-text="commodity.b2cMinDelivery  + '(天)'"></div>
         </div>
 
         <!--<div class="list">-->
@@ -82,7 +83,7 @@
         <ul class="clearfix">
           <nuxt-link :to="`/mobile/shop/${storeInfo.uuid}`" tag="li" class="text-ellipse inline-block price-level">
             <i class="iconfont icon-dianpu"></i>
-            <p style="margin-left:0.25rem;">店铺</p>
+            <p>查看店铺</p>
           </nuxt-link>
           <li class="text-ellipse inline-block price-level" @click="showStoreInfo = true">
             <i class="iconfont icon-kefu1"></i>
@@ -235,6 +236,8 @@
 <style lang="scss" scoped>
   .commodity-detail {
     background: #f1f3f6;
+    padding-bottom: 1rem;
+    margin-bottom: 1.2rem;
     .wrap-title {
       color: #333;
       font-size: 0.28rem;
@@ -261,7 +264,7 @@
       border: 1px solid #e3e5e8;
       padding-bottom: 0.2rem;
       .focus-wrap {
-        text-align: center;
+        text-indent: 0.28rem;
         position: absolute;
         background-image: url('/images/mobile/product/productdetail_label.png');
         width: 0.93rem;
@@ -433,13 +436,16 @@
             line-height: 0.54rem;
             float: left;
             margin-right: 0.25rem;
-            font-size: 0.28rem;
             color: #fff;
             border-radius: 0.08rem;
+            font-size: 0;
             i {
               display: inline-block;
-              margin-right: 0.1rem;
-              margin-left: 0.1rem;
+              margin-right: 0.04rem;
+              margin-left: 0.24rem;
+              &.icon-pdf {
+                color: #929292;
+              }
               &.active {
                 color: #eb062b;
               }
@@ -460,9 +466,9 @@
               border: 1px solid #ff6000;
             }
             p {
+              font-size: 0.28rem;
               display: inline-block;
               text-align: center;
-              line-height: 0.5rem;
               vertical-align: top;
             }
           }

+ 19 - 0
plugins/mixin.js

@@ -77,6 +77,25 @@ Vue.mixin({
       } else {
         this.initSctoll.refresh()
       }
+    },
+    login: function (url) {
+      this.$router.push(`/auth/login${url ? '?returnUrl=' + url : ''}`)
+    },
+    goStoreApply: function () {
+      if (this.user.logged) {
+        this.$http.get('/basic/vendor/transactionInfo').then(response => {
+          if (response.data.isOpenStore) {
+            window.location.href = '/vendor#/store/maintain'
+          } else {
+            window.location.href = '/vendor#/store-apply'
+          }
+        }, err => {
+          this.$message.error('该账户未开通卖家中心')
+          console.log(err)
+        })
+      } else {
+        this.login()
+      }
     }
   },
   filters: {