Browse Source

Merge branch 'master' into mobile-seek

yangc 8 years ago
parent
commit
db753a30a6

+ 19 - 14
components/applyPurchase/ApplyInfo.vue

@@ -53,9 +53,11 @@
           <div class="number-content"><img src="/images/applyPurchase/hot-fire.png" alt="" v-if="purchaseMan.offerAmount > 10"><span :style="purchaseMan.offerAmount > 10 ? 'color: #ff9a00': ''">{{purchaseMan.offerAmount || 0}}</span>&nbsp;条</div>
           <div class="btn-content">
             <!--<a @click="setLinkBoxIndex(index)">联系买家</a>-->
-            <a v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && (user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" style="background: #cccbcb;">我要报价</a>
-            <a v-else @click="sayPrice(purchaseMan, index)">我要报价</a>
-            <div class="is-say-price" v-if="purchaseMan.remainingTime > 0 && purchaseMan.quoted == 1">已报价 <img src="/images/applyPurchase/green-check.png" alt="">
+            <!--判断该求购是自己的-->
+            <div class="is-say-price" v-if="purchaseMan.remainingTime > 0 && purchaseMan.quoted == 1">已报价 <img src="/images/applyPurchase/green-check.png" alt=""></div>
+            <div v-else>
+              <a title="此为贵公司的求购" v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && (user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" style="background: #cccbcb;">我要报价</a>
+              <a v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && !(user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" @click="sayPrice(purchaseMan, index)">我要报价</a>
             </div>
           </div>
           <div class="expand-content">
@@ -203,7 +205,7 @@
               this.$message.error('抱歉,您需开通卖家功能才可报价')
             }
           } else {
-            this.$message.error('个人账户不可报价')
+            this.$message.error('个人账户不可报价')
           }
         } else {
           this.$router.push('/auth/login?returnUrl=' + window.location.href)
@@ -291,7 +293,7 @@
           background: #3975f4;
           text-align: center;
           margin: 0 6px 0 -1px;
-          vertical-align: middle;
+          /*vertical-align: middle;*/
           border: {
             top-right-radius: 3px;
             bottom-right-radius: 3px;
@@ -353,8 +355,8 @@
         margin-bottom: 29px;
         > li {
           position: relative;
-          min-height: 67px;
-          line-height: 67px;
+          min-height: 61px;
+          line-height: 61px;
           border: 1px solid #ededed;
           >div {
             overflow-x: hidden;
@@ -412,7 +414,7 @@
               }
             }
             &.btn-content {
-              > a {
+              >div a {
                 display: inline-block;
                 width: 71px;
                 height: 28px;
@@ -537,12 +539,12 @@
           .expand-content {
             display: none;
             position: absolute;
-            top: 67px;
+            top: 63px;
             justify-content: space-between;
             padding: 0 236px 0 36px;
             background: #fffbf0;
-            height: 45px;
-            line-height: 45px;
+            height: 48px;
+            line-height: 48px;
             color: #020202;
             div {
               display: inline-block;
@@ -552,14 +554,17 @@
             }
           }
           &:hover {
-            border: 1px solid #4290f7;
+            border-top: 1px solid #4290f7;
+            border-left: 1px solid #4290f7;
+            border-right: 1px solid #4290f7;
             .expand-content {
               display: flex;
               width: 1190px;
               z-index: 1;
-              border: 1px solid #4290f7;
+              border-bottom: 1px solid #4290f7;
+              border-left: 1px solid #4290f7;
+              border-right: 1px solid #4290f7;
               left: -1px;
-              border-top: none;
             }
           }
           .say-price {

+ 7 - 0
components/applyPurchase/BatchPublish.vue

@@ -175,6 +175,9 @@
     return str
   }
   let formatDate = function (date, fmt) {
+    if (!date) {
+      return null
+    }
     if (typeof date === 'string') {
       date = new Date(Date.parse(date.replace(/-/g, '/')))
     }
@@ -376,6 +379,10 @@
       },
       modifyItem: function (index) {
         for (let i = 0; i < this.bomList.content.length; i++) {
+          if (this.bomList.content[i].active) {
+            this.$message.error('抱歉,您尚有未保存的信息')
+            return
+          }
           this.bomList.content[i].active = false
         }
 //        this.$set(this.bomList.content[index], 'active', true)

+ 1 - 1
components/applyPurchase/SayPrice.vue

@@ -124,7 +124,7 @@
               this.$message.error('抱歉,您需开通卖家功能才可报价')
             }
           } else {
-            this.$message.error('个人账户不可报价')
+            this.$message.error('个人账户不可报价')
           }
         } else {
           this.$router.push('/auth/login?returnUrl=' + window.location.href)

+ 254 - 0
components/default/NewYear.vue

@@ -0,0 +1,254 @@
+<template>
+  <div class="christmas" v-if="isOpen">
+    <div class="christmas-modal">
+      <div class="newYear-info">
+        <a href="javascript:void(0)" @click="isOpen = false"></a>
+        <div class="newYear-img">
+          <img src="/images/newYear/chinese-knot.png" :class="{'active': timer > 3}">
+          <img src="/images/newYear/happy-new-year.png" :class="{'occur': timer > 3}">
+          <img src="/images/newYear/snow.png"  :class="{'snow': timer > 8}">
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'NewYear',
+    data () {
+      return {
+        isOpen: false,
+        timer: 0
+      }
+    },
+    created () {
+      setInterval(() => {
+        this.timer += 0.5
+      }, 500)
+    },
+    mounted () {
+      const endTime = window.localStorage.getItem('newYearEndTime2018')
+      const overTime = new Date('2018/02/24 23:59:59').getTime()
+      const now = new Date().getTime()
+      if (now <= overTime) {
+        if (endTime) {
+          if (now - endTime >= 1000 * 60 * 60 * 2) {
+            this.isOpen = true
+            window.localStorage.setItem('newYearEndTime2018', now)
+          } else {
+            this.isOpen = false
+          }
+        } else {
+          this.isOpen = true
+          window.localStorage.setItem('newYearEndTime2018', now)
+        }
+      } else {
+        this.isOpen = false
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .christmas{
+    position:fixed;
+    top:0px;
+    left:0;
+    z-index:10000;
+    width:100%;
+    height:100%;
+  }
+  .christmas-modal{
+    background:rgba(0,0,0,.6);
+    width:100%;
+    height:100%;
+  }
+  .newYear-info{
+    position:absolute;
+    top:50%;
+    left:50%;
+    transform: translate(-50%, -50%);
+  }
+  .newYear-info .newYear-img{
+    position:relative;
+  }
+  .newYear-info .newYear-img img{
+    position:absolute;
+    top:50%;
+    left:50%;
+    transform: translate(-50%, -50%);
+  }
+  .newYear-info .newYear-img img:nth-child(1){
+    animation: newYear1 3s linear;
+    -o-animation: newYear1 3s linear;
+    -webkit-animation: newYear1 3s linear;
+    -moz-animation: newYear1 3s linear;
+  }
+  /*.newYear-info .newYear-img img.active {
+    animation: newYear1-active 3s linear infinite;
+    -o-animation: newYear1-active 3s linear infinite;
+    -webkit-animation: newYear1-active 3s linear infinite;
+    -moz-animation: newYear1-active 3s linear infinite;
+  }*/
+
+  .newYear-info .newYear-img img:nth-child(2){
+    top: -159px;
+    left: 10px;
+    animation: newYear2 3s linear;
+    -moz-animation: newYear2 3s linear;
+    -o-animation: newYear2 3s linear;
+    -webkit-animation: newYear2 3s linear;
+  }
+ /* .newYear-info .newYear-img img.occur{
+    top: -224px;
+    left: -130px;
+    animation: newYear2-occur 3s linear infinite;
+    -moz-animation: newYear2-occur 3s linear infinite;
+    -o-animation: newYear2-occur 3s linear infinite;
+    -webkit-animation: newYear2-occur 3s linear infinite;
+  }*/
+
+  .newYear-info .newYear-img img:nth-child(3){
+    /*left: -15px;
+    top: -5px;*/
+   /* height: 700px;*/
+    opacity: 0.6;
+    animation: newYear3 8s linear;
+    -moz-animation: newYear3 8s linear;
+    -o-animation: newYear3 8s linear;
+    -webkit-animation: newYear3 8s linear;
+  }
+   .newYear-info .newYear-img img.snow{
+    animation: newYear3-snow 8s linear infinite;
+    -moz-animation: newYear3-snow 8s linear infinite;
+    -o-animation: newYear3-snow 8s linear infinite;
+    -webkit-animation: newYear3-snow 8s linear infinite;
+  }
+
+  .newYear-info a {
+    position:relative;
+    z-index:100000;
+    display:block;
+    top:-200px;
+    left:295px;
+    width: 45px;
+    height: 45px;
+    background: url('/images/christmas/close.png')no-repeat center center;
+    animation: newYear4 3s linear;
+    -moz-animation: newYear4 3s linear;
+    -o-animation: newYear4 3s linear;
+    -webkit-animation: newYear4 3s linear;
+  }
+
+  @keyframes newYear1 {
+    0%{top: -317px;left: -295px;transform:scale(0);opacity:0;}
+    25%{top: -317px;left: -295px;transform:scale(0.9);}
+    75%{top: -317px;left: -295px;transform:scale(0.8);}
+    100%{top: -317px;left: -295px;transform:scale( 1);opacity:1;}
+  }
+  @keyframes newYear1-active {
+    /*0%{top: -317px;left: -295px;transform:scale(1);}*/
+    0%{top: -317px;left: -295px;transform:scale(0.8);}
+    100%{top: -317px;left: -295px;transform:scale(0.9);}
+  }
+  @-webkit-keyframes newYear1 {
+    0%{top: -317px;left: -295px;transform:scale(0);opacity:0;}
+    25%{top: -317px;left: -295px;transform:scale(0.9);}
+    75%{top: -317px;left: -295px;transform:scale(0.8);}
+    100%{top: -317px;left: -295px;transform:scale( 1);opacity:1;}
+  }
+  @-moz-keyframes newYear1 {
+    0%{top: -317px;left: -295px;transform:scale(0);opacity:0;}
+    25%{top: -317px;left: -295px;transform:scale(0.9);}
+    75%{top: -317px;left: -295px;transform:scale(0.8);}
+    100%{top: -317px;left: -295px;transform:scale( 1);opacity:1;}
+  }
+  @-o-keyframes newYear1 {
+    0%{top: -317px;left: -295px;transform:scale(0);opacity:0;}
+    25%{top: -317px;left: -295px;transform:scale(0.9);}
+    75%{top: -317px;left: -295px;transform:scale(0.8);}
+    100%{top: -317px;left: -295px;transform:scale( 1);opacity:1;}
+  }
+
+  @keyframes newYear2 {
+    /*0%{ opacity:0;}*/
+    /*100%{transform:scale( 1);opacity:0.6;}*/
+    0%{ opacity: 0 }
+    25%{opacity: 0}
+    50%{opacity: 0}
+    75%{opacity: 0}
+    80%{opacity: 0}
+    90%{opacity: 0}
+    100%{opacity: 1}
+  }
+  @keyframes newYear2-occur {
+    0%{transform:scale(0.8);opacity:0.8;}
+    100%{transform:scale( 1);opacity:1;}
+  }
+  @-webkit-keyframes newYear2 {
+    0%{ opacity: 0 }
+    25%{opacity: 0}
+    50%{opacity: 0}
+    75%{opacity: 0}
+    80%{opacity: 0}
+    90%{opacity: 0}
+    100%{opacity: 1}
+  }
+  @-moz-keyframes newYear2 {
+    0%{ opacity: 0 }
+    25%{opacity: 0}
+    50%{opacity: 0}
+    75%{opacity: 0}
+    80%{opacity: 0}
+    90%{opacity: 0}
+    100%{opacity: 1}
+  }
+  @-o-keyframes newYear2 {
+    0%{opacity: 0 }
+    25%{opacity: 0}
+    50%{opacity: 0}
+    75%{opacity: 0}
+    80%{opacity: 0}
+    90%{opacity: 0}
+    100%{opacity: 1}
+  }
+
+  @keyframes newYear3 {
+    0%{ top: -280px;opacity: 0}
+    100%{top: -5px;opacity: 0.6}
+  }
+  @keyframes newYear3-snow {
+    0%{ top: -280px;opacity: 0.6}
+    100%{top: -5px;opacity: 0.6}
+  }
+  @-webkit-keyframes newYear3 {
+    0%{ top: -280px;opacity: 0}
+    100%{top: -5px;opacity: 0.6}
+  }
+  @-moz-keyframes newYear3{
+    0%{ top: -280px;opacity: 0}
+    100%{top: -5px;opacity: 0.6}
+  }
+  @-o-keyframes newYear3 {
+    0%{ top: -280px;opacity: 0}
+    100%{top: -5px;opacity: 0.6}
+  }
+
+  @keyframes newYear4 {
+    0%{ opacity: 0}
+    100%{ opacity: 1}
+  }
+  @-webkit-keyframes newYear4 {
+    0%{ opacity: 0}
+    100%{ opacity: 1}
+  }
+  @-moz-keyframes newYear4 {
+    0%{ opacity: 0}
+    100%{ opacity: 1}
+  }
+  @-o-keyframes newYear4 {
+    0%{ opacity: 0}
+    100%{ opacity: 1}
+  }
+</style>

+ 2 - 1
components/default/index.js

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

+ 10 - 6
components/home/floor/FloorList.vue

@@ -29,8 +29,10 @@
                     <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode}}</div>
                     <div>
                       <div class="is-say-price" v-if="purchaseMan.remainingTime > 0 && purchaseMan.quoted == 1">已报价 <img src="/images/applyPurchase/green-check.png" alt=""></div>
-                      <a v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && (user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" class="is-same">我要报价</a>
-                      <a v-else @click="sayPrice(purchaseMan, index)">我要报价</a>
+                      <div v-else>
+                        <a title="此为贵公司的求购" v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && (user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" class="is-same">我要报价</a>
+                        <a v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && !(user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" @click="sayPrice(purchaseMan, index)">我要报价</a>
+                      </div>
                     </div>
                   </li>
                 </ul>
@@ -177,10 +179,12 @@
       },
       purchaseManListData () {
         let list = this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
-        for (let i = 0; i < list.content.length; i++) {
-          this.purchaseManList.content.push(list.content[i])
+        if (list.content) {
+          for (let i = 0; i < list.content.length; i++) {
+            this.purchaseManList.content.push(list.content[i])
+          }
+          this.listTemplate = list
         }
-        this.listTemplate = list
         return list
       },
       user () {
@@ -208,7 +212,7 @@
               this.$message.error('抱歉,您需开通卖家功能才可报价')
             }
           } else {
-            this.$message.error('个人账户不可报价')
+            this.$message.error('个人账户不可报价')
           }
         } else {
           this.$router.push('/auth/login?returnUrl=' + window.location.href)

+ 1 - 1
components/main/Nav.vue

@@ -27,7 +27,7 @@
       </nuxt-link>
       <nuxt-link to="/applyPurchase" class="item">
         <span>求购询价</span>
-        <img class="new-animate" src="/images/all/banner-cuxiao03.jpg" alt="">
+        <img class="new-animate" src="/images/all/banner-cuxiao03.png" alt="">
       </nuxt-link>
     </div>
   </nav>

+ 1 - 1
components/register-saler/register/StepFirst.vue

@@ -521,7 +521,7 @@
         this.validUpload.isValidUpload = this.data.url !== ''
       },
       licenceCheck: function (num) {
-        if ((/^\S{1,255}$/).test(this.data.licenceId)) {
+        if ((/^[\S-]{1,255}$/).test(this.data.licenceId)) {
           if (num > 0) {
             this.$http.post('/basic/enterprise/register/valid/businessCode?businessCode=' + this.data.licenceId)
               .then(response => {

+ 1 - 1
components/store/BaseInfo.vue

@@ -34,7 +34,7 @@
             <div v-text="storeInfo.enterprise.enName">深圳市华商龙商务互联科技有限公司</div>
             <div v-if="storeInfo.enterprise.enAddress.length >0">地址:<span v-text="storeInfo.enterprise.enAddress">深圳市南山区科技园科技南五路英唐大厦一楼</span></div>
             <div v-if="storeInfo.enterprise.enTel.length >0">电话:<span v-text="storeInfo.enterprise.enTel">0755-26038000/26038047/26038008/86140880</span></div>
-            <div v-if="storeInfo.enterprise.enFax.length > 0">传真:<span v-text="storeInfo.enterprise.enFax">0755-26038111</span></div>
+            <div v-if="storeInfo.enterprise.enFax && storeInfo.enterprise.enFax.length > 0">传真:<span v-text="storeInfo.enterprise.enFax">0755-26038111</span></div>
           </div>
         </div>
       </div>

+ 1 - 1
pages/applyPurchase/result.vue

@@ -12,7 +12,7 @@
       <p>发布求购</p>
       <img src="/images/applyPurchase/batch-error.png" alt="">
       <h1>上传失败</h1>
-      <h2>请完善型号和品牌信息</h2>
+      <h2>请完善产品信息</h2>
       <div class="footer1">立刻
         <label>
           <input type="file" @change="upload" accept="*.xls, *.xlsx">

+ 4 - 2
pages/index.vue

@@ -4,7 +4,8 @@
       <Home></Home>
     </div>
     <div v-if="!isMobile">
-      <christmas v-if="isOpen" @listenopen="listenOpen" :hasNewYear="hasNewYear"></christmas>
+     <!-- <christmas v-if="isOpen" @listenopen="listenOpen" :hasNewYear="hasNewYear"></christmas>-->
+      <new-year></new-year>
       <carousel>
         <kind-category @loadchild="loadProductKinds"></kind-category>
       </carousel>
@@ -18,7 +19,7 @@
 </template>
 <script>
   import { KindCategory, Carousel, Advert, FloorList, Partner, News } from '~components/home'
-  import { Christmas } from '~components/default'
+  import { Christmas, NewYear } from '~components/default'
   import { Home } from '~components/mobile'
 
   export default {
@@ -66,6 +67,7 @@
       Partner,
       News,
       Christmas,
+      NewYear,
       Home
     },
     fetch ({store}) {

BIN
static/images/all/banner-cuxiao03.png


BIN
static/images/newYear/chinese-knot.png


BIN
static/images/newYear/close.png


BIN
static/images/newYear/happy-new-year.png


BIN
static/images/newYear/snow.png