[baozhangchao] 3 년 전
부모
커밋
7c50ca4351
3개의 변경된 파일39개의 추가작업 그리고 19개의 파일을 삭제
  1. BIN
      public/images/Loading1.png
  2. 27
    7
      public/index.html
  3. 12
    12
      src/utils/initial.js

BIN
public/images/Loading1.png 파일 보기


+ 27
- 7
public/index.html 파일 보기

25
     }
25
     }
26
 
26
 
27
     .page-loading {
27
     .page-loading {
28
-      width: 100vw;
28
+      width: 0px;
29
+      position: relative;
30
+      animation: loadingrotate 3s ease-in-out 0s 1 alternate forwards;
31
+      overflow: hidden;
29
       /* height: 100vw; */
32
       /* height: 100vw; */
30
     }
33
     }
31
 
34
 
32
     .page-loading .loading-image {
35
     .page-loading .loading-image {
33
-      width: 15vw;
34
-      height: 15vw;
35
-      animation: loadingrotate 1.5s linear infinite;
36
-      margin: auto;
36
+      width: 40vw;
37
+      height: 40vw;
38
+      /* margin: auto; */
37
     }
39
     }
38
 
40
 
39
     .page-loading .loading-tips {
41
     .page-loading .loading-tips {
42
     }
44
     }
43
 
45
 
44
     @keyframes loadingrotate {
46
     @keyframes loadingrotate {
47
+      0% {
48
+        width: 0px;
49
+        left: -1vw;
50
+
51
+
52
+      }
53
+
54
+      50% {
55
+        width: 10vw;
56
+        left: -12vw;
57
+
58
+
59
+      }
60
+
45
       100% {
61
       100% {
46
-        transform: rotate(360deg);
62
+        width: 31vw;
63
+        left: 0vw;
64
+
65
+
47
       }
66
       }
48
     }
67
     }
49
   </style>
68
   </style>
52
 <body>
71
 <body>
53
   <div class="page-loading-wrapper">
72
   <div class="page-loading-wrapper">
54
     <div class="page-loading">
73
     <div class="page-loading">
74
+
55
       <div class="loading-image">
75
       <div class="loading-image">
56
-        <img src="./images/Loading.png" width="100%" alt="">
76
+        <img src="./images/Loading1.png" width="100%" alt="">
57
       </div>
77
       </div>
58
     </div>
78
     </div>
59
   </div>
79
   </div>

+ 12
- 12
src/utils/initial.js 파일 보기

16
 
16
 
17
 function initSDK (url) {
17
 function initSDK (url) {
18
   request(`/api/wx/jssdk?url=${encodeURIComponent(url)}`)
18
   request(`/api/wx/jssdk?url=${encodeURIComponent(url)}`)
19
-  .then((res) => {
20
-    window.wx.config({
21
-      debug: process.env.NODE_ENV === 'development', // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
22
-      appId: res.appId, // 必填,公众号的唯一标识
23
-      timestamp: res.timestamp, // 必填,生成签名的时间戳
24
-      nonceStr: res.nonceStr, // 必填,生成签名的随机串
25
-      signature: res.signature, // 必填,签名
26
-      jsApiList // 必填,需要使用的JS接口列表
19
+    .then((res) => {
20
+      window.wx.config({
21
+        debug: process.env.NODE_ENV === 'development', // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
22
+        appId: res.appId, // 必填,公众号的唯一标识
23
+        timestamp: res.timestamp, // 必填,生成签名的时间戳
24
+        nonceStr: res.nonceStr, // 必填,生成签名的随机串
25
+        signature: res.signature, // 必填,签名
26
+        jsApiList // 必填,需要使用的JS接口列表
27
+      })
27
     })
28
     })
28
-  })
29
 }
29
 }
30
 // Vue.use(Vuex)
30
 // Vue.use(Vuex)
31
 
31
 
87
       console.error(error)
87
       console.error(error)
88
     }
88
     }
89
 
89
 
90
-    hideLoading()
90
+    // hideLoading()
91
 
91
 
92
     return;
92
     return;
93
   })
93
   })
102
  * 获取 code
102
  * 获取 code
103
  * @returns 
103
  * @returns 
104
  */
104
  */
105
- export function getCode () {
105
+export function getCode () {
106
   const matched = /[?&]*code=([^&]+)/.exec(location.search)
106
   const matched = /[?&]*code=([^&]+)/.exec(location.search)
107
   if (matched) {
107
   if (matched) {
108
     return decodeURIComponent(matched[1])
108
     return decodeURIComponent(matched[1])
118
   const originCode = localStorage.getItem('wxcode');
118
   const originCode = localStorage.getItem('wxcode');
119
   const wxfirst = localStorage.getItem('wxfirst') === null;
119
   const wxfirst = localStorage.getItem('wxfirst') === null;
120
   const queryCode = getCode();
120
   const queryCode = getCode();
121
- 
121
+
122
   localStorage.setItem('wxcode', queryCode)
122
   localStorage.setItem('wxcode', queryCode)
123
   localStorage.setItem('wxfirst', 'not');
123
   localStorage.setItem('wxfirst', 'not');
124
 
124