Jared před 2 roky
rodič
revize
0e2483d950
1 změnil soubory, kde provedl 108 přidání a 230 odebrání
  1. 108 230
      js/liff-functions.js

+ 108 - 230
js/liff-functions.js

@@ -64,248 +64,126 @@ function logout() {
 
 
 function createFlexMessageData() {
-  var myFlexContent = {
-      "type": "carousel",
+  var myFlexContent = 
+  {
+    "type": "bubble",
+    "styles": {
+      "footer": {
+        "backgroundColor": "#42b3f4"
+      }
+    },
+    "header": {
+      "type": "box",
+      "layout": "horizontal",
       "contents": [
         {
-          "type": "bubble",
-          "size": "nano",
-          "header": {
-            "type": "box",
-            "layout": "vertical",
-            "contents": [
-              {
-                "type": "text",
-                "text": "In Progress",
-                "color": "#ffffff",
-                "align": "start",
-                "size": "md",
-                "gravity": "center"
-              },
-              {
-                "type": "text",
-                "text": "70%",
-                "color": "#ffffff",
-                "align": "start",
-                "size": "xs",
-                "gravity": "center",
-                "margin": "lg"
-              },
-              {
-                "type": "box",
-                "layout": "vertical",
-                "contents": [
-                  {
-                    "type": "box",
-                    "layout": "vertical",
-                    "contents": [
-                      {
-                        "type": "filler"
-                      }
-                    ],
-                    "width": "70%",
-                    "backgroundColor": "#0D8186",
-                    "height": "6px"
-                  }
-                ],
-                "backgroundColor": "#9FD8E36E",
-                "height": "6px",
-                "margin": "sm"
-              }
-            ],
-            "backgroundColor": "#27ACB2",
-            "paddingTop": "19px",
-            "paddingAll": "12px",
-            "paddingBottom": "16px"
-          },
-          "body": {
-            "type": "box",
-            "layout": "vertical",
-            "contents": [
-              {
-                "type": "box",
-                "layout": "horizontal",
-                "contents": [
-                  {
-                    "type": "text",
-                    "text": "Buy milk and lettuce before class",
-                    "color": "#8C8C8C",
-                    "size": "sm",
-                    "wrap": true
-                  }
-                ],
-                "flex": 1
-              }
-            ],
-            "spacing": "md",
-            "paddingAll": "12px"
-          },
-          "styles": {
-            "footer": {
-              "separator": false
+          "type": "box",
+          "layout": "baseline",
+          "contents": [
+            {
+              "type": "icon",
+              "size": "xxl",
+              "url": "https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-1/p200x200/22814542_1962234637127047_1607260544847069468_n.png?_nc_cat=0&oh=2a303227c24dfab9e71a405b6d594d50&oe=5BC3965D"
             }
-          }
+          ]
         },
         {
-          "type": "bubble",
-          "size": "nano",
-          "header": {
-            "type": "box",
-            "layout": "vertical",
-            "contents": [
-              {
-                "type": "text",
-                "text": "Pending",
-                "color": "#ffffff",
-                "align": "start",
-                "size": "md",
-                "gravity": "center"
-              },
-              {
-                "type": "text",
-                "text": "30%",
-                "color": "#ffffff",
-                "align": "start",
-                "size": "xs",
-                "gravity": "center",
-                "margin": "lg"
-              },
-              {
-                "type": "box",
-                "layout": "vertical",
-                "contents": [
-                  {
-                    "type": "box",
-                    "layout": "vertical",
-                    "contents": [
-                      {
-                        "type": "filler"
-                      }
-                    ],
-                    "width": "30%",
-                    "backgroundColor": "#DE5658",
-                    "height": "6px"
-                  }
-                ],
-                "backgroundColor": "#FAD2A76E",
-                "height": "6px",
-                "margin": "sm"
-              }
-            ],
-            "backgroundColor": "#FF6B6E",
-            "paddingTop": "19px",
-            "paddingAll": "12px",
-            "paddingBottom": "16px"
-          },
-          "body": {
-            "type": "box",
-            "layout": "vertical",
-            "contents": [
-              {
-                "type": "box",
-                "layout": "horizontal",
-                "contents": [
-                  {
-                    "type": "text",
-                    "text": "Wash my car",
-                    "color": "#8C8C8C",
-                    "size": "sm",
-                    "wrap": true
-                  }
-                ],
-                "flex": 1
-              }
-            ],
-            "spacing": "md",
-            "paddingAll": "12px"
-          },
-          "styles": {
-            "footer": {
-              "separator": false
+          "type": "box",
+          "layout": "vertical",
+          "flex": 5,
+          "contents": [
+            {
+              "type": "text",
+              "text": "โรงพยาบาลอ่างทอง",
+              "weight": "bold",
+              "color": "#aaaaaa",
+              "size": "md",
+              "gravity": "top"
+            },
+            {
+              "type": "text",
+              "text": "ขอขอบพระคุณ",
+              "weight": "bold",
+              "color": "#aaaaaa",
+              "size": "lg",
+              "gravity": "top"
             }
-          }
+          ]
+        }
+      ]
+    },
+    "hero": {
+      "type": "image",
+      "url": "https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-9/35076722_2227987830551725_330757188106584064_n.jpg?_nc_cat=0&oh=0f5fa137c5bd65f109a40439afcd59eb&oe=5BB566B6",
+      "size": "full",
+      "aspectRatio": "16:9",
+      "aspectMode": "cover",
+      "action": {
+        "type": "uri",
+        "uri": "http://bit.ly/2JGBRKv"
+      }
+    },
+    "body": {
+      "type": "box",
+      "layout": "vertical",
+      "contents": [
+        {
+          "type": "text",
+          "margin": "sm",
+          "text": "คุณกานต์สินี ไหลสงวนงาม",
+          "weight": "bold",
+          "size": "md",
+          "wrap": true
         },
         {
-          "type": "bubble",
-          "size": "nano",
-          "header": {
-            "type": "box",
-            "layout": "vertical",
-            "contents": [
-              {
-                "type": "text",
-                "text": "In Progress",
-                "color": "#ffffff",
-                "align": "start",
-                "size": "md",
-                "gravity": "center"
-              },
-              {
-                "type": "text",
-                "text": "100%",
-                "color": "#ffffff",
-                "align": "start",
-                "size": "xs",
-                "gravity": "center",
-                "margin": "lg"
-              },
-              {
-                "type": "box",
-                "layout": "vertical",
-                "contents": [
-                  {
-                    "type": "box",
-                    "layout": "vertical",
-                    "contents": [
-                      {
-                        "type": "filler"
-                      }
-                    ],
-                    "width": "100%",
-                    "backgroundColor": "#7D51E4",
-                    "height": "6px"
-                  }
-                ],
-                "backgroundColor": "#9FD8E36E",
-                "height": "6px",
-                "margin": "sm"
-              }
-            ],
-            "backgroundColor": "#A17DF5",
-            "paddingTop": "19px",
-            "paddingAll": "12px",
-            "paddingBottom": "16px"
-          },
-          "body": {
-            "type": "box",
-            "layout": "vertical",
-            "contents": [
-              {
-                "type": "box",
-                "layout": "horizontal",
-                "contents": [
-                  {
-                    "type": "text",
-                    "text": "Buy milk and lettuce before class",
-                    "color": "#8C8C8C",
-                    "size": "sm",
-                    "wrap": true
-                  }
-                ],
-                "flex": 1
-              }
-            ],
-            "spacing": "md",
-            "paddingAll": "12px"
-          },
-          "styles": {
-            "footer": {
-              "separator": false
+          "type": "box",
+          "layout": "vertical",
+          "margin": "xs",
+          "contents": [
+            {
+              "type": "box",
+              "layout": "baseline",
+              "spacing": "sm",
+              "contents": [
+                {
+                  "type": "text",
+                  "text": "บริจาคเงินจำนวน ๑๘๐,๐๐๐ บาท เพื่อซื้อครุภัณฑ์ทางการแพทย์ ใช้ในโรงพยาบาลอ่างทอง โดยมีนายแพทย์พงษ์นรินทร์ ชาติรังสรรค์ผู้อำนวยการโรงพยาบาลอ่างทอง เป็นผู้รับมอบ",
+                  "wrap": true,
+                  "color": "#666666",
+                  "size": "sm",
+                  "flex": 6
+                }
+              ]
             }
+          ]
+        },
+        {
+          "type": "text",
+          "margin": "md",
+          "text": "วันที่ 12 มิ.ย. 2561",
+          "size": "sm",
+          "color": "#adadad"
+        }
+      ]
+    },
+    "footer": {
+      "type": "box",
+      "layout": "vertical",
+      "spacing": "sm",
+      "contents": [
+        {
+          "type": "button",
+          "style": "link",
+          "color": "#FFFFFF",
+          "height": "sm",
+          "action": {
+            "type": "uri",
+            "label": "อ่านต่อ...",
+            "uri": "http://bit.ly/2JGBRKv"
           }
         }
       ]
-
+    }
   };
 
   var flex = {