浏览代码

add photo loading

Sherry 1年前
父节点
当前提交
1bcfe834e4

+ 12
- 0
src/fe/healthpassport/css/all.css 查看文件

11340
   min-height: 100%;
11340
   min-height: 100%;
11341
   background: url(../images/passport-bg.png) no-repeat bottom center/contain, linear-gradient(to bottom, rgb(191, 230, 246) 0%, rgba(191, 230, 246, 0) 100%);
11341
   background: url(../images/passport-bg.png) no-repeat bottom center/contain, linear-gradient(to bottom, rgb(191, 230, 246) 0%, rgba(191, 230, 246, 0) 100%);
11342
 }
11342
 }
11343
+.passport .photo .load {
11344
+  width: 50%;
11345
+  height: 50%;
11346
+}
11347
+.passport .photo .load-wrapp {
11348
+  width: 11em;
11349
+  height: 11em;
11350
+}
11351
+.passport .photo .bubble-1, .passport .photo .bubble-2 {
11352
+  width: 2em;
11353
+  height: 2em;
11354
+}
11343
 .passport__container {
11355
 .passport__container {
11344
   width: 100%;
11356
   width: 100%;
11345
 }
11357
 }

+ 1
- 1
src/fe/healthpassport/css/all.css.map
文件差异内容过多而无法显示
查看文件


+ 14
- 0
src/fe/healthpassport/css/page/_passport.scss 查看文件

4
     width: 100%;
4
     width: 100%;
5
     min-height: 100%;
5
     min-height: 100%;
6
     background: url(../images/passport-bg.png) no-repeat bottom center/contain, linear-gradient(to bottom, rgba(191,230,246,1) 0%,rgba(191,230,246,0) 100%);;
6
     background: url(../images/passport-bg.png) no-repeat bottom center/contain, linear-gradient(to bottom, rgba(191,230,246,1) 0%,rgba(191,230,246,0) 100%);;
7
+    .photo {
8
+        .load {
9
+            width: 50%;
10
+            height: 50%;
11
+            &-wrapp {
12
+                width: 11em;
13
+                height: 11em;
14
+            }
15
+        }
16
+        .bubble-1, .bubble-2 {
17
+            width: 2em;
18
+            height: 2em;
19
+        }
20
+    }
7
     &__container {
21
     &__container {
8
         width: 100%;
22
         width: 100%;
9
     }
23
     }

+ 8
- 0
src/fe/healthpassport/index.html 查看文件

413
               <div class="passport__intro__container">
413
               <div class="passport__intro__container">
414
                 <div class="photo">
414
                 <div class="photo">
415
                   <div class="photo__img"></div>
415
                   <div class="photo__img"></div>
416
+                  <div class="load-wrapp">
417
+                    <div class="load">
418
+                      <div class="spinner">
419
+                        <div class="bubble-1"></div>
420
+                        <div class="bubble-2"></div>
421
+                      </div>
422
+                    </div>
423
+                  </div>
416
                   <input type="file" id="fileInput2" class="fileInput" accept="image/*">
424
                   <input type="file" id="fileInput2" class="fileInput" accept="image/*">
417
                   <div class="photo__icon photo__icon-2">
425
                   <div class="photo__icon photo__icon-2">
418
                     <img src="./images/solar_camera-linear.png" alt="">
426
                     <img src="./images/solar_camera-linear.png" alt="">

+ 11
- 11
src/fe/healthpassport/js/services/index.js 查看文件

12
   function init() {
12
   function init() {
13
     console.log('GameService init')
13
     console.log('GameService init')
14
 
14
 
15
-    // return liffInit().then((profile) => {
15
+    return liffInit().then((profile) => {
16
       
16
       
17
       // // 測試用資料
17
       // // 測試用資料
18
-      const profile = {
19
-        userId: "Ua89aacd560a328ece0fec5584435046f",
20
-        displayName: "Tim",
21
-        pictureUrl: "https://sprofile.line-scdn.net/0hAvrrYLRRHllfCwoU_RtgJi9bHTN8ekdLdWRZPmJYQGxnPFwLdG5Za29YSTkyb1AGID9XbzoLEmlTGGk_QV3ibVg7QG5mOVANdm5Uug",
22
-      }
18
+      // const profile = {
19
+      //   userId: "Ua89aacd560a328ece0fec5584435046f",
20
+      //   displayName: "Tim",
21
+      //   pictureUrl: "https://sprofile.line-scdn.net/0hAvrrYLRRHllfCwoU_RtgJi9bHTN8ekdLdWRZPmJYQGxnPFwLdG5Za29YSTkyb1AGID9XbzoLEmlTGGk_QV3ibVg7QG5mOVANdm5Uug",
22
+      // }
23
 
23
 
24
       m_LineUserId = profile.userId || '';
24
       m_LineUserId = profile.userId || '';
25
       m_LineName = profile.displayName || '';
25
       m_LineName = profile.displayName || '';
29
       console.log('lineUserId:', m_LineUserId)
29
       console.log('lineUserId:', m_LineUserId)
30
 
30
 
31
       // 測試用
31
       // 測試用
32
-      return Promise.resolve(profile);
32
+      // return Promise.resolve(profile);
33
 
33
 
34
-    //   return profile;
35
-    // }).catch((error) => {
36
-    //   console.log('[GameService] Liff Init Error \n Name:' + error.name + '\n Message:' + error.message);
37
-    // })
34
+      return profile;
35
+    }).catch((error) => {
36
+      console.log('[GameService] Liff Init Error \n Name:' + error.name + '\n Message:' + error.message);
37
+    })
38
 
38
 
39
   }
39
   }
40
 
40