Browse Source

对入驻按钮作重新设置跳转

wangcz 8 years ago
parent
commit
2617647d4c
3 changed files with 12 additions and 16 deletions
  1. 1 1
      components/default/christmas.vue
  2. 11 15
      layouts/main.vue
  3. BIN
      static/images/christmas/chirmas4.png

+ 1 - 1
components/default/christmas.vue

@@ -2,7 +2,7 @@
   <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="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>
         <a href="javascript:void(0)" @click="close">×</a>
         <div class="christmas-img">
           <img src="/images/christmas/christmas1.png">

+ 11 - 15
layouts/main.vue

@@ -2,7 +2,6 @@
   <div id="main">
     <header-view v-if="!isInFrame"></header-view>
     <main-header></main-header>
-    <zhong-qiu></zhong-qiu>
     <christmas v-if="isOpen" @listenopen="listenOpen"></christmas>
     <main-nav></main-nav>
     <nuxt/>
@@ -11,7 +10,7 @@
   </div>
 </template>
 <script>
-  import { Header, Footer, RightBar, Christmas, ZhongQiu } from '~components/default'
+  import { Header, Footer, RightBar, Christmas } from '~components/default'
   import { MainHeader, MainNav } from '~components/main'
   export default {
     name: 'main',
@@ -19,7 +18,6 @@
       HeaderView: Header,
       FooterView: Footer,
       Christmas,
-      ZhongQiu,
       RightBar,
       MainHeader,
       MainNav
@@ -38,26 +36,24 @@
         ]
       }
     },
-    beforeMount () {
+    mounted () {
       let user = this.user.logged
       let count = 1
       let self = this
-      if (!user) {
-        setInterval(function () {
-          count++
-          if (count >= 30) {
-            count = 0
-            self.isOpen = true
-          }
-        }, 1000)
-      }
-    },
-    mounted () {
       const nowDate = new Date()
       const activeStartDate = new Date('2017/12/20 00:00:00')
       const activeEndDate = new Date('2017/12/25 00:00:00')
       if (nowDate > activeStartDate && nowDate < activeEndDate) {
         const endTime = window.localStorage.getItem('endTime')
+        if (!user) {
+          setInterval(function () {
+            count++
+            if (count >= 30) {
+              count = 1
+              self.isOpen = true
+            }
+          }, 1000)
+        }
         if (endTime) {
           if (nowDate.getTime() - endTime >= 1000 * 60 * 2) {
             this.isOpen = true

BIN
static/images/christmas/chirmas4.png