Blame view

settled-merchant-master/src/components/base/v-header.vue 1.41 KB
3f535f30   杨鑫   '初始'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
  <template>
    <div class="header">
      <div class="warp headerBox">
        <div class="headerLeft" @click="goToHome">
          返回锦江公园商家入驻首页
        </div>
        <div class="headerRight">
          <!-- <div class="registeredLogin" v-if="userName !== 'undefined' && userName !== ' '">{{ userName }}</div>
          <div v-else class="registeredLogin" @click="goToLogin">登录/免费注册</div> -->
          <div class="contactUs">400-000-000</div>
        </div>
      </div>
    </div>
  </template>
  
  <script>
  import {mapGetters, mapMutations} from 'vuex'
  export default {
    name: 'login',
    computed: {
      ...mapGetters([
        'userName'
      ])
    },
    methods: {
      ...mapMutations({
        setUserInfo: 'SET_USERNAME' // 修改用户信息
      }),
      goToHome () {
        this.$router.push({path: '/'})
      },
      goToLogin () {
        this.setUserInfo('')
        window.location.href = `https://ceres.zkthink.com/pc/#/login?type=2`
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .header {
    background: #F1F2F7;
    .headerBox {
      display: flex;
      height: 42px;
      justify-content: space-between;
      align-items: center;
      color: #333333;
      font-size: 14px;
      .headerLeft {
        cursor: pointer;
      }
      .headerRight {
        display: flex;
        .registeredLogin {
          cursor: pointer;
          padding-right: 15px;
          border-right: 1px solid #999999;
          margin-right: 15px;
        }
      }
    }
  }
  </style>