ソースを参照

Merge remote-tracking branch 'origin/master'

wangdy 8 年 前
コミット
4663251e6f

+ 13 - 0
app.html

@@ -10,6 +10,10 @@
   {{ HEAD }}
   <script>
     var _hmt = _hmt || [];
+    var _paq = _paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
     (function (w, d) {
       if (/(MSIE)|(Trident)/.test(w.navigator.userAgent)) {
         var head = d.getElementsByTagName('head')[0]
@@ -41,6 +45,15 @@
       }
       var s = document.getElementsByTagName("script")[0];
       s.parentNode.insertBefore(bp, s);
+
+      // 用户浏览统计
+      <!-- Piwik -->
+        var u="//piwik.ubtob.com/";
+        _paq.push(['setTrackerUrl', u+'piwik.php']);
+        _paq.push(['setSiteId', '1']);
+        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+        g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+      <!-- End Piwik Code -->
     })(window, document)
   </script>
   <script type="text/javascript">

+ 3 - 11
assets/scss/activity.css

@@ -87,29 +87,21 @@ ul,li{
   display: inline-block;
   height: 235px;
 }
-.business .advantage .advantage-list ul  li{
+.business .advantage .advantage-list ul  li {
   float: left;
   width: 174px;
   height: 206px;
   border-radius: 10px;
   background: #fff;
-  margin: 0 6px;
+  margin: 0 10px;
   overflow: hidden;
   position: relative;
-  /*opacity:0;
-  transform:scale(0);
-  transition:.5s 0.1s;*/
 }
-/*.business .advantage.active .advantage-list ul  li{
-    opacity:1 !important; transform:none !important;
-}*/
 .business .advantage .advantage-list ul  li:hover{
   cursor: pointer;
-  width: 200px;
-  height: 233px;
-  margin: 0 10px;
   top: -16px;
   transition: top 1s ease-out;
+  transform:scale(1.2);
 }
 .business .advantage .advantage-list ul  li:hover p.title{
   background: #61d2f3;

+ 5 - 0
assets/scss/common.scss

@@ -19,6 +19,11 @@
   }
 }
 
+// ie等滚动条遮住元素
+html, body {
+  -ms-overflow-style: scrollbar;
+}
+
 #cnzz_stat_icon_1267002346 {
   display: none;
 }

+ 36 - 0
components/common/loading/Loading.vue

@@ -0,0 +1,36 @@
+<template lang="html">
+  <div class="loading" v-if="loading">
+    <img src="/images/all/loading.gif" alt="">
+  </div>
+</template>
+<script>
+  export default {
+    data: () => ({
+      loading: false
+    }),
+    methods: {
+      start () {
+        this.loading = true
+      },
+      finish () {
+        this.loading = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  .loading {
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    width:  100%;
+    height: 100%;
+    z-index: 1000;
+    text-align: center;
+  }
+  .loading img {
+    position: relative;
+    top: 40%;
+  }
+</style>

+ 118 - 36
components/default/Header.vue

@@ -10,28 +10,35 @@
         </div>
         <div class="navbar-right">
           <template v-if="user.logged">
-            <div class="item-wrap dropdown" @mouseleave="showEnterprises = false">
+            <div class="item-wrap dropdown">
               <div class="item dropdown-toggle">
                 欢迎您,{{ user.data.userName }}&nbsp;|&nbsp;
                 <a @click="logout()">[退出]</a>
                 <span>{{enterprise.enName}}</span>
               </div>
-              <ul class="dropdown-menu">
-                <li class="menu-item-first">
-                  <span class="member-text" :title="enterprise.enName"><i class="fa fa-map-marker"></i>&nbsp;{{ enterprise.uu?enterprise.enName: user.data.userName + '(个人账户)' }}</span>
-                  <a class="pull-right" @click="toggleEnterprises()" v-if="user.data.enterprises && user.data.enterprises.length > 0">
+              <div class="dropdown-menu">
+                <div class="menu-item-first">
+                  <span>您可切换至以下账户:</span>
+                </div>
+                <ul>
+                 <!-- <li class="menu-item-first">
+                    <span class="member-text" :title="enterprise.enName"><i class="fa fa-map-marker"></i>&nbsp;{{ enterprise.uu?enterprise.enName: user.data.userName + '(个人账户)' }}</span>
+                    <a class="pull-right" @click="toggleEnterprises()" v-if="user.data.enterprises && user.data.enterprises.length > 0">
                     {{ showEnterprises ? '取消' : '切换' }}
-                  </a>
-                </li>
-                <li class="menu-item"
-                    v-for="en in user.data.enterprises"
-                    v-if="showEnterprises && en.uu!=enterprise.uu">
-                  <a @click="switchEnterprise(en)" :title="en.enName">{{ en.enName }}</a>
-                </li>
-                <li class="menu-item"  v-if="showEnterprises && enterprise.uu">
-                  <a @click="switchEnterprise({uu: 0})"><span v-text="user.data.userName"></span>(个人账户)</a>
-                </li>
-              </ul>
+                    </a>
+                    <span>您可切换至以下账户:</span>
+                    <input type="text" placeholder="请输入公司名称" v-model="keyword"><span class="search-enterprise" @click="searchEnterprise()">搜索</span>
+                  </li>-->
+                  <li class="menu-item"
+                      v-for="en in sortEnterprises"
+                      v-if="en.uu!=enterprise.uu">
+                    <a @click="switchEnterprise(en)" :title="en.enName">{{ en.enName }}</a>
+                  </li>
+                  <li class="menu-item"  v-if="enterprise.uu">
+                    <a @click="switchEnterprise({uu: 0})"><span v-text="user.data.userName"></span>(个人账户)</a>
+                  </li>
+                </ul>
+              </div>
             </div>
             <nuxt-link class="item" :to="'/'">商城首页</nuxt-link>
             <!--<nuxt-link class="item" to="/user">买家中心</nuxt-link>
@@ -58,7 +65,11 @@
     name: 'header',
     data () {
       return {
-        showEnterprises: false
+//        showEnterprises: false
+//        searchEnterpriseArr: [],
+//        keyword: '',
+//        isSearching: false
+        showEnterpriseToggle: false
       }
     },
     computed: {
@@ -73,6 +84,15 @@
           return {enName: '个人账户'}
         }
       },
+      sortEnterprises () {
+        let ens = this.user.data.enterprises
+        if (ens && ens.length) {
+          ens.sort(function (a, b) {
+            return b.lastLoginTime - a.lastLoginTime
+          })
+        }
+        return ens
+      },
       url () {
         return this.$store.state.option.url
       }
@@ -100,12 +120,13 @@
           }
         })
       },
-      toggleEnterprises () {
-        this.showEnterprises = !this.showEnterprises
-      },
+//      toggleEnterprises () {
+//        this.showEnterprises = !this.showEnterprises
+//      },
       // 切换当前企业
       switchEnterprise (en) {
-        this.toggleEnterprises()
+//        this.toggleEnterprises()
+        this.showEnterpriseToggle = false
         this.$http.get(`/user/authentication/${en.uu}`).then(() => {
           this.$store.dispatch('loadUserInfo')
 //          let href = window.location.href
@@ -142,9 +163,21 @@
           }
         }
       }
-    },
-    beforeMount () {
-      // this.$store.dispatch('loadUserInfo')
+//      searchEnterprise () {
+//        let key = this.keyword
+//        let enterprise = this.user.data.enterprises
+//        this.isSearching = true
+//        this.searchEnterpriseArr = []
+//        if (this.keyword === '') {
+//          this.isSearching = false
+//        } else {
+//          for (let i = 0; i < enterprise.length; i++) {
+//            if (enterprise[i].enName.indexOf(key) !== -1) {
+//              this.searchEnterpriseArr.push(enterprise[i])
+//            }
+//          }
+//        }
+//      }
     }
   }
 </script>
@@ -162,7 +195,7 @@
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
-    height: 30px;
+    height: 25px;
   }
   .header .navbar .navbar-container .navbar-right .dropdown .dropdown-menu .menu-item{
     height: 30px;
@@ -239,9 +272,11 @@
           }
 
           .dropdown {
-
             .dropdown-toggle {
               line-height: $nav-height;
+              border-left: 1px solid $black-light;
+              border-right: 1px solid $black-light;
+              height: 35px;
               a {
                 margin-left: 15px;
                 float: right;
@@ -249,6 +284,10 @@
                   color: $red !important;
                 }
               }
+              &:hover {
+                border-left: 1px solid #999;
+                border-right: 1px solid #999;
+              }
               span {
                 display: inline-block;
                 max-width: 190px;
@@ -258,25 +297,68 @@
                 float: right;
               }
             }
+            .menu-item-first {
+              background: #eee;
+              padding: 0 12px;
+              line-height: 30px;
+              font-size: 12px;
+              >span:nth-child(1) {
+                cursor: default;
+                font-weight: bold;
+              }
+              input {
+                width: 174px;
+                height: 24px;
+                margin-left: 35px;
+                background: #fff;
+                border: 1px solid #5078cb;
+                padding-left: 4px;
+              }
+              .search-enterprise {
+                display: inline-block;
+                width: 36px;
+                height: 24px;
+                color: #fff;
+                background: #5078cb;
+                text-align: center;
+                line-height: 24px;
+                cursor: pointer;
+              }
+            }
 
             .dropdown-menu {
-              min-width: 220px;
-              margin-left: -1px;
-              border: $border;
-              border-top: none;
-              padding: 1em;
+              padding: 0 6px 13px;
               margin:0;
-              border: none;
               border-radius: 0;
+              right: unset;
+              background: #fff;
+              border: 1px solid #999999;
+              border-top: none;
+              -webkit-box-shadow: none;
+              -moz-box-shadow: none;
+              box-shadow: none;
+
+              ::-webkit-scrollbar {
+                background: #f6f6f6;
+              }
 
-              .menu-item-first {
-                margin-bottom: 10px;
+              ul {
+                max-height: 300px;
+                overflow-y: auto;
+                background: #f6f6f6;
               }
 
               .menu-item {
-                line-height: 30px;
+                padding: 0 12px;
                 a {
-                  color: $accent;
+                  color: #333;
+                  max-width: 300px;
+                  line-height: 30px;
+                  width: auto;
+                  &:hover {
+                    color: #5078cb;
+                    text-decoration: none!important;
+                  }
                 }
               }
             }

+ 3 - 3
components/default/RightBar.vue

@@ -233,16 +233,16 @@
         }
       },
       openWebChat: function (newTab, obj) {
-        this.$http.post('http://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
+        this.$http.post('https://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
           .then(response => {
             if (response.data.success) {
-              newTab.location.href = 'http://im.ubtob.com/chat/visit?gid=' + response.data.content
+              newTab.location.href = 'https://im.ubtob.com/chat/visit?gid=' + response.data.content
             }
           })
       },
       getChatCount: function () {
         if (this.user.logged) {
-          this.$http.get('http://im.ubtob.com/api/chat/message', {params: {enUU: this.enterprise.uu, operate: 'count_unread', phone: this.user.data.userTel}})
+          this.$http.get('https://im.ubtob.com/api/chat/message', {params: {enUU: this.enterprise.uu, operate: 'count_unread', phone: this.user.data.userTel}})
             .then(response => {
               this.chatCount = response.data.count
             })

+ 590 - 0
components/default/Zhongqiu.vue

@@ -0,0 +1,590 @@
+<template>
+  <div class="banner" v-if="isClose">
+    <div class="banner-modal">
+      <div class="banner-img">
+        <img src="/images/zhongqiu/zq1.png" />
+        <img src="/images/zhongqiu/zq2.png" />
+        <img src="/images/zhongqiu/zq3.png" />
+        <img src="/images/zhongqiu/zq4.png" />
+        <img src="/images/zhongqiu/zq5.png" />
+        <img src="/images/zhongqiu/zq6.png" />
+        <img src="/images/zhongqiu/zq7.png" />
+        <img src="/images/zhongqiu/zq8.png" />
+        <img src="/images/zhongqiu/zq9.png" />
+        <img src="/images/zhongqiu/zq10.png" />
+        <img src="/images/zhongqiu/zq11.png" />
+        <img src="/images/zhongqiu/zq12.png" />
+        <img src="/images/zhongqiu/zq13.png" />
+        <a @click="isOpendZq" href="javascript:void(0)">×</a>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    name: 'zhongqiu',
+    data () {
+      return {
+        isClose: false
+      }
+    },
+    beforeMount () {
+      var self = this
+      setTimeout(getTotelNumber, 10000)
+      function getTotelNumber () {
+        self.isOpendZq()
+      }
+      getTotelNumber()
+    },
+    mounted () {
+      const endTime = window.localStorage.getItem('endTime')
+      const overTime = new Date('2017/10/9 00:00:00').getTime()
+      if (overTime - (new Date().getTime()) > 0) {
+        if (endTime) {
+          if (new Date().getTime() - endTime >= 4 * 3600000) {
+            this.isClose = true
+            window.localStorage.setItem('endTime', new Date().getTime())
+          } else {
+            this.isClose = false
+          }
+        } else {
+          this.isClose = true
+          window.localStorage.setItem('endTime', new Date().getTime())
+        }
+      }
+    },
+    methods: {
+      isOpendZq () {
+        this.isClose = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  .banner{
+    width:100%;
+    height:100%;
+    top: 0;
+    left: 0;
+    position:fixed;
+    z-index:3000;
+  }
+  .banner-modal{
+    background: rgba(0,0,0,.6);
+    width:2000px;
+    height:1100px;
+  }
+  .banner-img{
+    position:absolute;
+    top:10%;
+    left:50%;
+    width:900px;
+    margin-left:-450px;
+  }
+  .banner-img img{
+    display:block;
+    width:900px;
+    position:absolute;
+    top:0;
+    left:0;
+  }
+  .banner-img a{
+    display:block;
+    width:30px;
+    height:30px;
+    line-height:30px;
+    font-size:20px;
+    background: #ffffff;
+    border-radius:50%;
+    text-align: center;
+    color:#d8d4d4;
+    position:absolute;
+    top:0;
+    right:0;
+    z-index:5000;
+  }
+  .banner-img a:hover{
+    cursor:pointer;
+  }
+  img:nth-child(1){
+    z-index:120;
+    -webkit-transform-origin: 200px 100px;
+    -moz--transform-origin: 200px 100px;
+    -ms--transform-origin: 200px 100px;
+    -o--transform-origin: 200px 100px;
+    transform-origin:130px 150px;
+    -webkit-animation: animation1 8s linear;
+    -moz-animation: animation1 8s linear;
+    -ms-animation: animation1 8s linear;
+    -o-animation: animation1 8s linear;
+    animation: animation1 8s linear;
+  }
+  img:nth-child(2){
+    z-index:110;
+    -webkit-animation: animation2 8s linear;
+    -moz-animation: animation2 8s linear;
+    -ms-animation: animation2 8s linear;
+    -o-animation: animation2 8s linear;
+    animation: animation2 8s linear;
+  }
+  img:nth-child(3){z-index:20;
+    -webkit-animation: animation3 8s linear;
+    -moz-animation: animation3 8s linear;
+    -ms-animation: animation3 8s linear;
+    -o-animation: animation3 8s linear;
+    animation: animation3 8s linear;
+  }
+  img:nth-child(4){z-index:30;
+    -webkit-animation: animation4 8s linear;
+    -moz-animation: animation4 8s linear;
+    -ms-animation: animation4 8s linear;
+    -o-animation: animation4 8s linear;
+    animation: animation4 8s linear;
+  }
+  img:nth-child(5){
+    z-index:100;
+    -webkit-animation: animation5 8s linear;
+    -moz-animation: animation5 8s linear;
+    -ms-animation: animation5 8s linear;
+    -o-animation: animation5 8s linear;
+    animation: animation5 8s linear;
+  }
+  img:nth-child(6){z-index:90;
+    -webkit-animation: animation6 8s linear;
+    -moz-animation: animation6 8s linear;
+    -ms-animation: animation6 8s linear;
+    -o-animation: animation6 8s linear;
+    animation: animation6 8s linear;
+  }
+  img:nth-child(7){z-index:10;
+    -webkit-transform-origin: 270px 450px;
+    -moz--transform-origin: 270px 450px;
+    -ms--transform-origin: 270px 450px;
+    -o--transform-origin: 270px 450px;
+    transform-origin:270px 500px;
+    -webkit-animation: animation7 8s linear;
+    -moz-animation: animation7 8s linear;
+    -ms-animation: animation7 8s linear;
+    -o-animation: animation7 8s linear;
+    animation: animation7 8s linear;
+  }
+  img:nth-child(8){z-index:130;
+    -webkit-animation: animation8 8s linear;
+    -moz-animation: animation8 8s linear;
+    -ms-animation: animation8 8s linear;
+    -o-animation: animation8 8s linear;
+    animation: animation8 8s linear;
+  }
+  img:nth-child(9){z-index:40;
+    -webkit-transform-origin: 200px 500px;
+    -moz--transform-origin: 200px 500px;
+    -ms--transform-origin: 200px 500px;
+    -o--transform-origin: 200px 500px;
+    transform-origin:200px 500px;
+    -webkit-animation: animation9 8s linear;
+    -moz-animation: animation9 8s linear;''
+  -ms-animation: animation9 8s linear;
+    -o-animation: animation9 8s linear;
+    animation: animation9 8s linear;
+  }
+  img:nth-child(10){z-index:50;
+    -webkit-transform-origin: 240px 500px;
+    -moz--transform-origin: 240px 500px;
+    -ms--transform-origin: 240px 500px;
+    -o--transform-origin: 240px 500px;
+    transform-origin:240px 500px;
+    -webkit-animation: animation10 8s linear;
+    -moz-animation: animation10 8s linear;
+    -ms-animation: animation10 8s linear;
+    -o-animation: animation10 8s linear;
+    animation: animation10 8s linear;
+  }
+  img:nth-child(11){z-index:60;
+    -webkit-transform-origin: 300px 500px;
+    -moz--transform-origin: 300px 500px;
+    -ms--transform-origin: 300px 500px;
+    -o--transform-origin: 300px 500px;
+    transform-origin:300px 500px;
+    -webkit-animation: animation11 8s linear;
+    -moz-animation: animation11 8s linear;
+    -ms-animation: animation11 8s linear;
+    -o-animation: animation11 8s linear;
+    animation: animation11 8s linear;
+  }
+  img:nth-child(12){z-index:70;
+    -webkit-transform-origin: 650px 500px;
+    -moz--transform-origin: 650px 500px;
+    -ms--transform-origin: 650px 500px;
+    -o--transform-origin: 650px 500px;
+    transform-origin:650px 500px;
+    -webkit-animation: animation12 8s linear;
+    -moz-animation: animation12 8s linear;
+    -ms-animation: animation12 8s linear;
+    -o-animation: animation12 8s linear;
+    animation: animation12 8s linear;
+  }
+  img:nth-child(13){z-index:80;
+    -webkit-transform-origin: 700px 500px;
+    -moz--transform-origin: 700px 500px;
+    -ms--transform-origin: 700px 500px;
+    -o--transform-origin: 700px 500px;
+    transform-origin:700px 500px;
+    -webkit-animation: animation13 8s linear;
+    -moz-animation: animation13 8s linear;
+    -ms-animation: animation13 8s linear;
+    -o-animation: animation13 8s linear;
+    animation: animation13 8s linear;
+  }
+  @keyframes animation1{
+    0%{ opacity:0 ;
+      -webkit-transform: rotate(60deg);
+      -moz-transform: rotate(60deg);
+      -ms-transform: rotate(60deg);
+      -o-transform: rotate(60deg);
+      transform: rotate(60deg)
+    }
+    5%{ opacity:1;
+      -webkit-transform: rotate(0deg);
+      -moz-transform: rotate(0deg);
+      -ms-transform: rotate(0deg);
+      -o-transform: rotate(0deg);
+      transform: rotate(0deg)
+    }
+    100%{ opacity:1;  }
+  }
+  @keyframes animation2{
+    0%{ opacity:0 ;
+    }
+    5%{ opacity:0 ;
+    }
+    10%{ opacity:1 ;
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation3{
+    0%{ opacity:0 ;
+    }
+    5%{ opacity:0 ;
+      -webkit-transform: scale(.5);
+      -moz-transform: scale(.5);
+      -ms-transform: scale(.5);
+      -o-transform: scale(.5);
+      transform: scale(.5)
+    }
+    50%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+      -webkit-transform: rotate(45deg);
+      -moz-transform: rotate(45deg);
+      -ms-transform: rotate(45deg);
+      -o-transform: rotate(45deg);
+      transform: rotate(45deg)
+    }
+    100%{ opacity:1;
+      -webkit-transform: rotate(0deg);
+      -moz-transform: rotate(0deg);
+      -ms-transform: rotate(0deg);
+      -o-transform: rotate(0deg);
+      transform: rotate(0deg)
+    }
+  }
+  @keyframes animation4{
+    0%{ opacity:0 ;
+    }
+    5%{ opacity:0 ;
+      -webkit-transform: scale(.5);
+      -moz-transform: scale(.5);
+      -ms-transform: scale(.5);
+      -o-transform: scale(.5);
+      transform: scale(.5)
+    }
+    50%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+      -webkit-transform: rotate(-60deg);
+      -moz-transform: rotate(-60deg);
+      -ms-transform: rotate(-60deg);
+      -o-transform: rotate(-60deg);
+      transform: rotate(-60deg)
+    }
+    100%{ opacity:1;
+      -webkit-transform: rotate(0deg);
+      -moz-transform: rotate(0deg);
+      -ms-transform: rotate(0deg);
+      -o-transform: rotate(0deg);
+      transform: rotate(0deg)
+    }
+  }
+  @keyframes animation5{
+    0%{ opacity:0 ;
+    }
+    7%{ opacity:0 ;
+    }
+    13%{ opacity:1 ;
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation6{
+    0%{ opacity:0 ;
+    }
+    10%{ opacity:0 ;
+      -webkit-transform: scale(.5);
+      -moz-transform: scale(.5);
+      -ms-transform: scale(.5);
+      -o-transform: scale(.5);
+      transform: scale(.5)
+    }
+    40%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+      -webkit-transform: rotate(60deg);
+      -moz-transform: rotate(60deg);
+      -ms-transform: rotate(60deg);
+      -o-transform: rotate(60deg);
+      transform: rotate(60deg)
+    }
+    100%{ opacity:1;
+      -webkit-transform: rotate(0deg);
+      -moz-transform: rotate(0deg);
+      -ms-transform: rotate(0deg);
+      -o-transform: rotate(0deg);
+      transform: rotate(0deg)
+    }
+  }
+  @keyframes animation7{
+    0%{ opacity:0 ;
+    }
+    30%{ opacity:0 ;
+    }
+    45%{ opacity:1 ;
+      -webkit-transform: rotate(-20deg);
+      -moz-transform: rotate(-20deg);
+      -ms-transform: rotate(-20deg);
+      -o-transform: rotate(-20deg);
+      transform: rotate(-20deg)
+    }
+    60%{ opacity:1 ;
+      -webkit-transform: rotate(20deg);
+      -moz-transform: rotate(20deg);
+      -ms-transform: rotate(20deg);
+      -o-transform: rotate(20deg);
+      transform: rotate(20deg)
+    }
+    70%{ opacity:1 ;
+      -webkit-transform: rotate(0deg);
+      -moz-transform: rotate(0deg);
+      -ms-transform: rotate(0deg);
+      -o-transform: rotate(0deg);
+      transform: rotate(0deg)
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation8{
+    0%{
+      opacity:0;
+    }
+    13%{ opacity:0 ;
+      -webkit-transform:translateY(300px);
+      -moz-transform:translateY(300px);
+      -ms-transform:translateY(300px);
+      -o-transform:translateY(300px);
+      transform:translateY(300px);
+    }
+    35%{ opacity:1 ;
+      -webkit-transform:translateY(0px);
+      -moz-transform:translateY(0px);
+      -ms-transform:translateY(0px);
+      -o-transform:translateY(0px);
+      transform:translateY(0px);
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation9{
+    0%{ opacity:0 ;
+
+    }
+    30%{ opacity:0 ;
+      -webkit-transform: scale(0);
+      -moz-transform: scale(0);
+      -ms-transform: scale(0);
+      -o-transform: scale(0);
+      transform: scale(0);
+    }
+    55%{ opacity:1 ;
+      -webkit-transform: scale(.9);
+      -moz-transform: scale(.9);
+      -ms-transform: scale(.9);
+      -o-transform: scale(.9);
+      transform: scale(.9);
+    }
+    60%{ opacity:1 ;
+      -webkit-transform: scale(.7);
+      -moz-transform: scale(.7);
+      -ms-transform: scale(.7);
+      -o-transform: scale(.7);
+      transform: scale(.7);
+    }
+    80%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation10{
+    0%{ opacity:0 ;
+
+    }
+    30%{ opacity:0 ;
+      -webkit-transform: scale(0);
+      -moz-transform: scale(0);
+      -ms-transform: scale(0);
+      -o-transform: scale(0);
+      transform: scale(0);
+    }
+    55%{ opacity:1 ;
+      -webkit-transform: scale(.9);
+      -moz-transform: scale(.9);
+      -ms-transform: scale(.9);
+      -o-transform: scale(.9);
+      transform: scale(.9);
+    }
+    60%{ opacity:1 ;
+      -webkit-transform: scale(.7);
+      -moz-transform: scale(.7);
+      -ms-transform: scale(.7);
+      -o-transform: scale(.7);
+      transform: scale(.7);
+    }
+    80%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation11{
+    0%{ opacity:0 ;
+
+    }
+    30%{ opacity:0 ;
+      -webkit-transform: scale(0);
+      -moz-transform: scale(0);
+      -ms-transform: scale(0);
+      -o-transform: scale(0);
+      transform: scale(0);
+    }
+    55%{ opacity:1 ;
+      -webkit-transform: scale(.9);
+      -moz-transform: scale(.9);
+      -ms-transform: scale(.9);
+      -o-transform: scale(.9);
+      transform: scale(.9);
+    }
+    60%{ opacity:1 ;
+      -webkit-transform: scale(.7);
+      -moz-transform: scale(.7);
+      -ms-transform: scale(.7);
+      -o-transform: scale(.7);
+      transform: scale(.7);
+    }
+    80%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation12{
+    0%{ opacity:0 ;
+
+    }
+    30%{ opacity:0 ;
+      -webkit-transform: scale(0);
+      -moz-transform: scale(0);
+      -ms-transform: scale(0);
+      -o-transform: scale(0);
+      transform: scale(0);
+    }
+    55%{ opacity:1 ;
+      -webkit-transform: scale(.9);
+      -moz-transform: scale(.9);
+      -ms-transform: scale(.9);
+      -o-transform: scale(.9);
+      transform: scale(.9);
+    }
+    60%{ opacity:1 ;
+      -webkit-transform: scale(.7);
+      -moz-transform: scale(.7);
+      -ms-transform: scale(.7);
+      -o-transform: scale(.7);
+      transform: scale(.7);
+    }
+    80%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+    }
+    100%{ opacity:1;
+    }
+  }
+  @keyframes animation13{
+    0%{ opacity:0 ;
+
+    }
+    30%{ opacity:0 ;
+      -webkit-transform: scale(0);
+      -moz-transform: scale(0);
+      -ms-transform: scale(0);
+      -o-transform: scale(0);
+      transform: scale(0);
+    }
+    55%{ opacity:1 ;
+      -webkit-transform: scale(.9);
+      -moz-transform: scale(.9);
+      -ms-transform: scale(.9);
+      -o-transform: scale(.9);
+      transform: scale(.9);
+    }
+    60%{ opacity:1 ;
+      -webkit-transform: scale(.7);
+      -moz-transform: scale(.7);
+      -ms-transform: scale(.7);
+      -o-transform: scale(.7);
+      transform: scale(.7);
+    }
+    80%{ opacity:1 ;
+      -webkit-transform: scale(1);
+      -moz-transform: scale(1);
+      -ms-transform: scale(1);
+      -o-transform: scale(1);
+      transform: scale(1);
+    }
+    100%{ opacity:1;
+    }
+  }
+</style>

+ 190 - 0
components/default/christmas.vue

@@ -0,0 +1,190 @@
+<template>
+  <div class="christmas" v-if="hasOpen">
+    <div class="christmas-modal">
+      <div class="christmas-info">
+        <a href="https://www.usoftmall.com/activity/business" target="_blank"></a>
+        <a href="javascript:void(0)" @click="close">×</a>
+        <div class="christmas-img">
+          <img src="/images/christmas/christmas1.png">
+          <img src="/images/christmas/christmas2.png">
+          <img src="/images/christmas/christmas4.png">
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+    export default {
+      name: 'christmas',
+      data () {
+        return {
+          hasOpen: true
+        }
+      },
+      methods: {
+        close () {
+          this.hasOpen = false
+          this.$emit('listenopen')
+        }
+      }
+    }
+</script>
+
+<style scoped>
+  .christmas{
+    position:fixed;
+    top:0;
+    left:0;
+    z-index:10000;
+    width:100%;
+    height:100%;
+  }
+  .christmas-modal{
+    background:rgba(0,0,0,.6);
+    width:100%;
+    height:100%;
+  }
+  .christmas-info{
+    position:absolute;
+    top:50%;
+    left:50%;
+    transform: translate(-50%, -50%);
+    width:985px;
+    height:740px;
+  }
+  .christmas-info a{
+    position:absolute;
+    z-index:100000;
+    display:block;
+  }
+  .christmas-info a:first-child{
+    top:72%;
+    left:39%;
+    width:200px;
+    height:50px;
+    background: url('/images/christmas/btn.png')no-repeat center center;
+    animation: christmas1 1s linear infinite;
+    -o-animation: christmas1 1s linear infinite;
+    -webkit-animation: christmas1 1s linear infinite;
+    -moz-animation: christmas1 1s linear infinite;
+  }
+  .christmas-info a:first-child:hover{
+    animation: none;
+    cursor:pointer;
+   }
+  .christmas-info a:nth-child(2){
+    top:8%;
+    left:85%;
+    width: 36px;
+    height: 36px;
+    font-size: 48px;
+    line-height: 28px;
+    text-align: center;
+    color: #8a8a8a;
+    background: #f6f6f6;
+    border-radius: 50%;
+  }
+  .christmas-info .christmas-img img{
+    position:absolute;
+    top:50%;
+    left:50%;
+    transform: translate(-50%, -50%);
+  }
+  .christmas-info .christmas-img img:nth-child(2){
+    animation: christmas2 25s infinite;
+    -moz-animation: christmas2 25s infinite;
+    -o-animation: christmas2 25s infinite;
+    -webkit-animation: christmas2 25s infinite;
+  }
+  .christmas-info .christmas-img img:nth-child(3){
+    animation: christmas3 30s infinite;
+    -o-animation: christmas3 30s infinite;
+    -webkit-animation: christmas3 30s infinite;
+    -moz-animation: christmas3 30s infinite;
+  }
+  @keyframes christmas1 {
+    0%{top:72%}
+    25%{top:71.9%}
+    50%{top:72.9%}
+    75%{top:71.9%}
+    100%{top:72%}
+  }
+  @keyframes christmas2 {
+    0%{top:40%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:45%;left:50%;opacity: 0}
+  }
+  @keyframes christmas3 {
+    0%{top:20%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:30%;left:50%;opacity: 0}
+  }
+  @-moz-keyframes christmas1 {
+    0%{top:72%}
+    25%{top:71.9%}
+    50%{top:72.9%}
+    75%{top:71.9%}
+    100%{top:72%}
+  }
+  @-moz-keyframes christmas2 {
+    0%{top:40%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:45%;left:50%;opacity: 0}
+  }
+  @-moz-keyframes christmas3 {
+    0%{top:20%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:30%;left:50%;opacity: 0}
+  }
+  @-webkit-keyframes christmas1 {
+    0%{top:72%}
+    25%{top:71.9%}
+    50%{top:72.9%}
+    75%{top:71.9%}
+    100%{top:72%}
+  }
+  @-webkit-keyframes christmas2 {
+    0%{top:40%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:45%;left:50%;opacity: 0}
+  }
+  @-webkit-keyframes christmas3 {
+    0%{top:20%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:30%;left:50%;opacity: 0}
+  }
+  @-o-keyframes christmas1 {
+    0%{top:72%}
+    25%{top:71.9%}
+    50%{top:72.9%}
+    75%{top:71.9%}
+    100%{top:72%}
+  }
+  @-o-keyframes christmas2 {
+    0%{top:40%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:45%;left:50%;opacity: 0}
+  }
+  @-o-keyframes christmas3 {
+    0%{top:20%;left:50%;opacity: 0}
+    25%{left:48%;opacity: 1}
+    50%{left:53%}
+    75%{left:48%; opacity: 1}
+    100%{top:30%;left:50%;opacity: 0}
+  }
+</style>

+ 3 - 1
components/default/index.js

@@ -1,5 +1,7 @@
 import Header from './Header.vue'
 import Footer from './Footer.vue'
 import RightBar from './RightBar.vue'
+import Christmas from './christmas.vue'
+import ZhongQiu from './Zhongqiu.vue'
 
-export { Header, Footer, RightBar }
+export { Header, Footer, RightBar, Christmas, ZhongQiu }

+ 8 - 1
components/home/Carousel.vue

@@ -30,7 +30,10 @@
         activeSlide: 0,
         swiperOption: {
           autoplay: 6000,
+          initialSlide: 0,
           pagination: '.swiper-pagination',
+          // 解决点击分页器后图片就不能轮播的问题
+          autoplayDisableOnInteraction: false,
           paginationClickable: true,
           mousewheelControl: false,
           effect: 'fade',
@@ -55,7 +58,11 @@
     },
     computed: {
       banners () {
-        return this.$store.state.carousel.banners
+        let banner = this.$store.state.carousel.banners
+        banner.data.sort(function (a, b) {
+          return a.orderNumber - b.orderNumber
+        })
+        return banner
       },
       activeColor () {
         return this.banners.data.length ? this.banners.data[this.activeSlide].metadata['background-color'] : null

+ 1 - 1
components/product/ComponentGoods.vue

@@ -12,7 +12,7 @@
         <th width="160">品牌/型号</th>
         <th width="100">包装/生产日期</th>
         <th width="110">库存</th>
-        <th width="90">数量</th>
+        <th width="90">梯度/pcs</th>
         <th width="90">香港交货<span style="font-size: 12px;">($)</span></th>
         <th width="100">大陆交货<span style="font-size: 12px;">(¥)</span></th>
         <th width="100">交期(天)</th>

+ 1 - 1
components/product/component/StoreInfo.vue

@@ -38,7 +38,7 @@
             <th class="text-center" width="120">生产日期</th>
             <th class="text-center" width="80">包装方式</th>
             <th class="text-center" width="150">库存</th>
-            <th class="text-center" width="80">数量</th>
+            <th class="text-center" width="80">梯度/pcs</th>
             <th class="text-center" width="100">香港交货<span style="font-size: 12px;">($)</span></th>
             <th class="text-center" width="130">大陆交货<span style="font-size: 12px;">(¥)</span></th>
             <th class="text-center" width="120">交期<span style="font-size: 12px;">(天)</span></th>

+ 11 - 3
components/provider/Carousel.vue

@@ -3,7 +3,9 @@
     <div v-swiper:mySwiper="swiperOption">
       <div class="swiper-wrapper">
         <div class="swiper-slide" v-for="banner in banners">
-          <img :src="banner.pictureUrl">
+          <a :href="banner.hrefUrl" target="_blank">
+            <img :src="banner.pictureUrl">
+          </a>
         </div>
       </div>
       <div class="swiper-pagination swiper-pagination-bullets"></div>
@@ -20,10 +22,12 @@
         activeSlide: 0,
         swiperOption: {
           autoplay: 5000,
-          initialSlide: 1,
+          initialSlide: 0,
           loop: true,
           effect: 'fade',
           lazyLoading: true,
+          // 解决点击分页器后图片就不能轮播的问题
+          autoplayDisableOnInteraction: false,
           pagination: '.swiper-pagination',
           paginationClickable: true,
           paginationElement: 'li',
@@ -42,7 +46,11 @@
 //    }
     computed: {
       banners () {
-        return this.$store.state.carousel.banners.data
+        let banner = this.$store.state.carousel.banners
+        banner.data.sort(function (a, b) {
+          return a.orderNumber - b.orderNumber
+        })
+        return banner.data
       }
     }
   }

+ 12 - 5
components/register-saler/register/StepThird.vue

@@ -265,7 +265,7 @@
       <span @click="sectionChange(2)">上一步</span>
       <span @click="btnDisabled?'':selectFlag == 'open'?submitApply():goProduct()" :class="btnDisabled?'btn-disabled':''">提交申请</span>
     </div>
-    <div class="loading" v-if="showLoading">
+    <div class="loading" v-show="showLoading">
       <img src="/images/all/loading.gif" alt="">
     </div>
   </div>
@@ -413,6 +413,7 @@
         }
       },
       registerSelf: function () {
+        this.showLoading = true
         this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
           .then(response => {
             if (response.data.success) {
@@ -426,17 +427,20 @@
                     this.loginData.enterprise.uu = response.data.data.enuu
                     this.storeApply(response.data.data.enuu)
 //                    window.location.reload()
+                    this.showLoading = false
                   })
                 }
               )
             } else {
               this.isSelfRegisterSuccess = false
-              this.$message.error('个人注册失败,请重新填写信息')
+              this.showLoading = false
+              this.$message.error('企业注册失败,请重新填写信息')
             }
           }, err => {
             console.log(err)
             this.isSelfRegisterSuccess = false
-            this.$message.error('个人注册失败,请重新填写信息')
+            this.showLoading = false
+            this.$message.error('企业注册失败,请重新填写信息')
           })
       },
       storeApply: function (enuu) {
@@ -558,6 +562,7 @@
           } else if (!this.checkData.checked) {
             this.$message.error('您还没有勾选相关条款')
           } else {
+            this.showLoading = true
             this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
               .then(response => {
                 if (response.data.success) {
@@ -566,12 +571,14 @@
                   this.reflashEnterprise(response.data.data.enuu, baseUrl || '/vendor#/vendor_upload')
                 } else {
                   this.isSelfRegisterSuccess = false
-                  this.$message.error('个人注册失败,请重新填写信息')
+                  this.$message.error('企业注册失败,请重新填写信息')
                 }
+                this.showLoading = false
               }, err => {
                 console.log(err)
                 this.isSelfRegisterSuccess = false
-                this.$message.error('个人注册失败,请重新填写信息')
+                this.showLoading = false
+                this.$message.error('企业注册失败,请重新填写信息')
               })
           }
         } else {

+ 1 - 1
components/search/GoodList.vue

@@ -45,7 +45,7 @@
             <th width="100">封装/生产日期</th>
             <th width="110">店铺名称</th>
             <th width="110">库存</th>
-            <th width="90">梯</th>
+            <th width="90">梯度/pcs</th>
             <th width="90" v-if="!crname_click_flag.rmb_click_flag">香港交货</th>
             <th width="110" v-if="!crname_click_flag.usd_click_flag">大陆交货<span style="font-size: 12px;">(含税)</span></th>
             <th width="110">交期<span style="font-size: 12px;">(天)</span></th>

+ 1 - 1
components/search/ResultTitle.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="result-title text-muted">
-    搜索"<span class="text-inverse" >{{keyword}}</span>"<span v-if="status != 1">暂无结果</span>
+    搜索"<span class="text-inverse" >{{keyword}}</span>"<span v-if="status != 1">暂无此型号</span>
     <span v-if="status != 3">,为您找到
     <span class="text-num" v-text="good_list.total"></span> 个<span v-if="status == 2">相关</span>产品</span>:
   </div>

+ 64 - 44
components/store/CommodityInfo.vue

@@ -63,7 +63,7 @@
               <span class="name">数&nbsp;量</span>:
               <div class="input-group" style="width: 120px">
                 <div :class="fragment.canSub ? ' input-group-addon operate':'input-group-addon'" @click="fragment.canSub ?subNum():''" :style="!fragment.canSub ?'cursor: not-allowed;':''">-</div>
-                <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()"style="padding: 0;min-width: 100px;text-align: center;"/>
+                <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()" @input="onInput()" style="padding: 0;min-width: 100px;text-align: center;"/>
                 <div :class="fragment.canAdd ?'input-group-addon operate':'input-group-addon'" @click="fragment.canAdd ?addNum():''" :style="!fragment.canAdd ?'cursor: not-allowed;':''">+</div>
                 <!--   <div class="input-group-addon operate" @click="subNum()">-</div>
                    <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()"style="padding: 0;min-width: 100px;text-align: center;"/>
@@ -99,7 +99,7 @@
               <div class="title">价格梯度</div>
               <div class="table">
                 <div class="head">
-                  <div class="fragment">数量</div>
+                  <div class="fragment">梯度/pcs</div>
                   <div class="price">单价¥(含税)</div>
                   <div class="price">单价$</div>
                 </div>
@@ -176,6 +176,10 @@
           canSub: true}
       }
     },
+    watch: {
+      fragment: function (val, oldVal) {
+      }
+    },
     filters: {
       currency: function (num) {
         if (typeof num === 'number' && num > 0) {
@@ -228,6 +232,18 @@
       })
     },
     methods: {
+      onInput () {
+        let prices = this.commodity.prices
+        if (prices && prices.length) {
+          let _this = this
+          for (let i = 0; i < prices.length; i++) {
+            if (_this.fragment.num >= prices[i].start && _this.fragment.num < prices[i].end) {
+              _this.fragment.price = _this.fragment.currency === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice
+              break
+            }
+          }
+        }
+      },
       loadSaveHistory () {
         if (this.user.logged) {
           this.$store.dispatch('shop/saveHistory', {id: this.commodity.batchCode})
@@ -245,55 +261,59 @@
         let buy = this.commodity.minBuyQty
         let reserve = this.commodity.reserve
         let breakUp = this.commodity.breakUp
-        newNum = parseInt(newNum)
-        if (breakUp) {
-          if (newNum < buy) {
-            this.$message.error('最小起订量为' + buy)
-            this.fragment.num = buy
-            this.fragment.canSub = false
-            this.fragment.canAdd = true
-          } else if (newNum > reserve) {
-            this.$message.error('库存不足')
-            this.fragment.num = reserve
-            this.fragment.canAdd = false
-            this.fragment.canSub = true
-          } else {
-            this.fragment.canSub = true
-            this.fragment.canAdd = true
-            this.fragment.num = newNum
-            newNum === buy && (this.fragment.canSub = false)
-            newNum === reserve && (this.fragment.canAdd = false)
-          }
+        if (!newNum) {
+          this.fragment.num = buy
         } else {
-          if (newNum < buy) {
-            this.$message.error('最小起订量为' + buy)
-            this.fragment.num = buy
-            this.fragment.canSub = false
-            if (newNum > reserve) {
+          newNum = parseInt(newNum)
+          if (breakUp) {
+            if (newNum < buy) {
+              this.$message.error('最小起订量为' + buy)
+              this.fragment.num = buy
+              this.fragment.canSub = false
+              this.fragment.canAdd = true
+            } else if (newNum > reserve) {
               this.$message.error('库存不足')
-              this.fragment.num = reserve - (reserve % pack)
+              this.fragment.num = reserve
               this.fragment.canAdd = false
+              this.fragment.canSub = true
+            } else {
+              this.fragment.canSub = true
+              this.fragment.canAdd = true
+              this.fragment.num = newNum
+              newNum === buy && (this.fragment.canSub = false)
+              newNum === reserve && (this.fragment.canAdd = false)
             }
-          } else if (newNum > reserve) {
-            this.fragment.canSub = true
-            this.fragment.canAdd = false
-            this.$message.error('库存不足')
-            this.fragment.num = reserve - (reserve % pack)
           } else {
-            this.fragment.canSub = true
-            this.fragment.canAdd = true
-            let remainder = newNum % pack
-            if (remainder !== 0) {
-              console.log(this.fragment.num)
-              this.$message.error('不支持拆包且包装量为' + pack)
-              // 这个直接赋值的,应该给这个值进行判断(Math.floor(newNum / pack) + 1) * pack
-              let res = (Math.floor(newNum / pack) + 1) * pack
-              this.fragment.num = res > reserve ? Math.floor(newNum / pack) * pack : res
+            if (newNum < buy) {
+              this.$message.error('最小起订量为' + buy)
+              this.fragment.num = buy
+              this.fragment.canSub = false
+              if (newNum > reserve) {
+                this.$message.error('库存不足')
+                this.fragment.num = reserve - (reserve % pack)
+                this.fragment.canAdd = false
+              }
+            } else if (newNum > reserve) {
+              this.fragment.canSub = true
+              this.fragment.canAdd = false
+              this.$message.error('库存不足')
+              this.fragment.num = reserve - (reserve % pack)
             } else {
-              this.fragment.num = newNum
+              this.fragment.canSub = true
+              this.fragment.canAdd = true
+              let remainder = newNum % pack
+              if (remainder !== 0) {
+//                console.log(this.fragment.num)
+                this.$message.error('不支持拆包且包装量为' + pack)
+                // 这个直接赋值的,应该给这个值进行判断(Math.floor(newNum / pack) + 1) * pack
+                let res = (Math.floor(newNum / pack) + 1) * pack
+                this.fragment.num = res > reserve ? Math.floor(newNum / pack) * pack : res
+              } else {
+                this.fragment.num = newNum
+              }
+              newNum === buy && (this.fragment.canSub = false)
+              newNum === reserve && (this.fragment.canAdd = false)
             }
-            newNum === buy && (this.fragment.canSub = false)
-            newNum === reserve && (this.fragment.canAdd = false)
           }
         }
       },

+ 1 - 1
components/store/CommodityList.vue

@@ -34,7 +34,7 @@
             <th width="150">品牌/型号</th>
             <th width="100">包装/生产日期</th>
             <th width="90">库存</th>
-            <th width="90">数量</th>
+            <th width="90">梯度/pcs</th>
             <th width="90">香港交货<span style="font-size: 12px;">($)</span></th>
             <th width="100">大陆交货<span style="font-size: 12px;">(¥)</span></th>
             <th width="100">交期(天)</th>

+ 2 - 2
components/store/common/StoreHeader.vue

@@ -171,10 +171,10 @@ export default {
       }
     },
     openWebChat: function (newTab, obj) {
-      this.$http.post('http://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
+      this.$http.post('https://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
         .then(response => {
           if (response.data.success) {
-            newTab.location.href = 'http://im.ubtob.com/chat/visit?gid=' + response.data.content
+            newTab.location.href = 'https://im.ubtob.com/chat/visit?gid=' + response.data.content
           }
         })
     }

+ 48 - 6
layouts/main.vue

@@ -2,6 +2,7 @@
   <div id="main">
     <header-view v-if="!isInFrame"></header-view>
     <main-header></main-header>
+    <christmas v-if="isOpen" @listenopen="listenOpen"></christmas>
     <main-nav></main-nav>
     <nuxt/>
     <footer-view></footer-view>
@@ -9,22 +10,23 @@
   </div>
 </template>
 <script>
-  import { Header, Footer, RightBar } from '~components/default'
+  import { Header, Footer, RightBar, Christmas } from '~components/default'
   import { MainHeader, MainNav } from '~components/main'
   export default {
     name: 'main',
     components: {
       HeaderView: Header,
       FooterView: Footer,
+      Christmas,
       RightBar,
       MainHeader,
       MainNav
     },
-//    data () {
-//      return {
-//        isInFrame: false
-//      }
-//    },
+    data () {
+      return {
+        isOpen: false
+      }
+    },
     head () {
       return {
         title: this.title,
@@ -34,7 +36,47 @@
         ]
       }
     },
+    mounted () {
+      let user = this.user.logged
+      let count = 1
+      let self = this
+      const nowDate = new Date()
+      const activeStartDate = new Date('2017/12/20 00:00:00')
+      const activeEndDate = new Date('2017/12/26 00:00:00')
+      if (nowDate > activeStartDate && nowDate < activeEndDate) {
+        const endTime = window.localStorage.getItem('endTime')
+        if (endTime) {
+          if (!user) {
+            setInterval(function () {
+              count++
+              if (count >= 60 * 60 * 2) {
+                count = 1
+                self.isOpen = true
+              }
+            }, 1000)
+          } else if (nowDate.getTime() - endTime >= 1000 * 60 * 60 * 2) {
+            this.isOpen = true
+            window.localStorage.setItem('endTime', nowDate.getTime())
+          } else {
+            this.isOpen = false
+          }
+        } else {
+          this.isOpen = true
+          window.localStorage.setItem('endTime', nowDate.getTime())
+        }
+      } else {
+        this.isOpen = false
+      }
+    },
+    methods: {
+      listenOpen () {
+        this.isOpen = false
+      }
+    },
     computed: {
+      user () {
+        return this.$store.state.option.user
+      },
       isInFrame () {
         let cookies = this.$store.state.option.cookies
         let cookieArr = cookies.split(';')

+ 3 - 3
layouts/shop.vue

@@ -46,7 +46,7 @@
       },
       title () {
         let path = this.$route.path
-        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+        if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
             return this.storeInfo.storeName + this.getStoreType(this.storeInfo.type) + '专卖店-优软商城'
           } else {
@@ -60,7 +60,7 @@
       },
       description () {
         let path = this.$route.path
-        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+        if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
             return this.storeInfo.storeName + '官方' + this.getStoreType(this.storeInfo.type) + '专卖店,提供最新IC电子元器件现货在线销售。'
           } else {
@@ -74,7 +74,7 @@
       },
       keywords () {
         let path = this.$route.path
-        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+        if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
             return '电子元器件' + this.getStoreType(this.storeInfo.type) + '专卖店'
           } else {

+ 4 - 4
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://10.10.100.107:8081/platform-b2c/' : 'http://192.168.253.121:8887/b2c-im/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://192.168.253.60:9090/platform-b2c/')
 
 module.exports = {
   router: {
@@ -23,9 +23,9 @@ module.exports = {
     ]
   },
   /*
-  ** Customize the progress-bar color
+  ** loading Style
   */
-  loading: { color: '#3B8070' },
+  loading: '~components/common/loading/Loading.vue',
   /*
   ** Build configuration
   */
@@ -107,5 +107,5 @@ module.exports = {
     ssr: false
   }],
   /* TODO 暂时代理到商城测试版,之后再做出调整 */
-  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**', '/produce/**', '/file**', '/rate/**', '/log/**', '/help-service/**']
+  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**', '/produce/**', '/file**', '/rate/**', '/log/**', '/help-service/**', '/keyword/**', '/tip/**']
 }

+ 8 - 4
pages/activity/business.vue

@@ -13,7 +13,8 @@
           我们严格把关供应商资质,从源头上杜绝虚假信息,做到付款交期如实,借助物流仓储的一站式服务帮您实现交易高效、库存无忧。<br/>
         </div>
         <div class="join">
-          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+          <a href="https://account.ubtob.com/sso/register_mall?appId=mall&returnURL=https%3A%2F%2Fwww.usoftmall.com%2F%3FreturnURL%3Dhttps%253A%252F%252Fwww.usoftmall.com%252F
+" target="_blank">立即入驻</a>
         </div>
       </div>
     </div>
@@ -49,7 +50,8 @@
           </ul>
         </div>
         <div class="join">
-          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+          <a href="https://account.ubtob.com/sso/register_mall?appId=mall&returnURL=https%3A%2F%2Fwww.usoftmall.com%2F%3FreturnURL%3Dhttps%253A%252F%252Fwww.usoftmall.com%252F
+" target="_blank">立即入驻</a>
         </div>
       </div>
     </div>
@@ -93,7 +95,8 @@
           </ul>
         </div>
         <div class="join">
-          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+          <a href="https://account.ubtob.com/sso/register_mall?appId=mall&returnURL=https%3A%2F%2Fwww.usoftmall.com%2F%3FreturnURL%3Dhttps%253A%252F%252Fwww.usoftmall.com%252F
+" target="_blank">立即入驻</a>
         </div>
       </div>
     </div>
@@ -115,7 +118,8 @@
           </div>
         </div>
         <div class="join">
-          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+          <a href="https://account.ubtob.com/sso/register_mall?appId=mall&returnURL=https%3A%2F%2Fwww.usoftmall.com%2F%3FreturnURL%3Dhttps%253A%252F%252Fwww.usoftmall.com%252F
+" target="_blank">立即入驻</a>
         </div>
       </div>
     </div>

BIN
static/images/christmas/btn.png


BIN
static/images/christmas/chirmas4.png


BIN
static/images/christmas/christmas1.png


BIN
static/images/christmas/christmas2.png


BIN
static/images/christmas/christmas3.png


BIN
static/images/christmas/christmas4.png