liding
3 天以前 359f69135b571c8e7b6d046bc849655abfe7075d
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
<template>
  <div class="lottie-bg">
    <div>222进来了22222</div>
    <div id="lottie">
      <img
        src="@/assets/imgs/live-logo.gif"
        rel="preload"
        style="width: 100%;"
      />
    </div>
  </div>
</template>
<script>
  import { auth, oAuth } from "@/libs/wechat";
  import Cookies from 'js-cookie'
  const WX_AUTH = "wx_auth";
  export default {
    name: 'AuthSend',
    created() {
      import('@/assets/js/media_750')
      // const hash = window.location.search.slice(1)
      // if (window.localStorage) {
      //   window.localStorage.setItem('x-admin-oauth-code', hash)
      //   window.close()
      // }
      Cookies.set(WX_AUTH, this.$route.query.code);
    },
    render: function(h) {
      return h() // avoid warning message
    },
    mounted() {
    //  if(this.$route.query.code) location.replace("/login");
    // oAuth('/auth-send')
    //  if( Cookies.get(WX_AUTH)!==undefined) location.replace("/login");
    }
  }
</script>
<style scoped>
  .lottie-bg {
    position: fixed;
    left: 0;
    top: 0;
    background-color: #fff;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
  }
 
  #lottie {
    width: 35%;
    display: block;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    margin: auto;
  }
</style>