[baozhangchao] vor 3 Jahren
Ursprung
Commit
68d607627b
2 geänderte Dateien mit 23 neuen und 25 gelöschten Zeilen
  1. 22
    15
      public/index.html
  2. 1
    10
      src/utils/initial.js

+ 22
- 15
public/index.html Datei anzeigen

@@ -1,17 +1,24 @@
1 1
 <!DOCTYPE html>
2 2
 <html lang="">
3
-  <head>
4
-    <meta charset="utf-8">
5
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
-    <title><%= htmlWebpackPlugin.options.title %></title>
9
-  </head>
10
-  <body>
11
-    <noscript>
12
-      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13
-    </noscript>
14
-    <div id="app"></div>
15
-    <!-- built files will be auto injected -->
16
-  </body>
17
-</html>
3
+
4
+<head>
5
+  <meta charset="utf-8">
6
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+  <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
+  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
9
+  <title>
10
+    <%= htmlWebpackPlugin.options.title %>
11
+  </title>
12
+  <script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
13
+</head>
14
+
15
+<body>
16
+  <noscript>
17
+    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
18
+        Please enable it to continue.</strong>
19
+  </noscript>
20
+  <div id="app"></div>
21
+  <!-- built files will be auto injected -->
22
+</body>
23
+
24
+</html>

+ 1
- 10
src/utils/initial.js Datei anzeigen

@@ -41,6 +41,7 @@ export function share (opt) {
41 41
   const imgUrl = opt.imgUrl || defaultImg
42 42
 
43 43
   initSDK(link)
44
+
44 45
   window.wx.ready(function () {
45 46
     jsApiList.map((apiName) => {
46 47
       const fn = window.wx[apiName]
@@ -73,17 +74,7 @@ export function Login () {
73 74
     } catch (error) {
74 75
       console.error(error)
75 76
     }
76
-    if (isLoaded) {
77
-      console.log('hideLoading', isLoaded);
78
-      hideLoading()
79
-
80
-
81
-    } else {
82
-      isLoaded = true
83 77
 
84
-      console.log(4, isLoaded);
85
-
86
-    }
87 78
     return;
88 79
   })
89 80
 }