|
@@ -19,11 +19,7 @@ switch (window.location.host.toLowerCase()) {
|
19
|
19
|
isLIVE = false;
|
20
|
20
|
break;
|
21
|
21
|
|
22
|
|
- case 'line.maltssociety.com.tw':
|
23
|
|
- isLIVE = true;
|
24
|
|
- break;
|
25
|
|
-
|
26
|
|
- case 'www.mortlach.com.tw':
|
|
22
|
+ case 'event.leecy.org.tw':
|
27
|
23
|
isLIVE = true;
|
28
|
24
|
break;
|
29
|
25
|
}
|
|
@@ -153,6 +149,7 @@ function eraseCookie(name) {
|
153
|
149
|
}
|
154
|
150
|
|
155
|
151
|
function POST(theUrl, theData) {
|
|
152
|
+ console.log("API__DOMAIN: "+API__DOMAIN)
|
156
|
153
|
const _url = API__DOMAIN + theUrl;
|
157
|
154
|
// console.log(JSON.stringify(theData))
|
158
|
155
|
return fetch(_url, {
|
|
@@ -178,7 +175,9 @@ function POST(theUrl, theData) {
|
178
|
175
|
}
|
179
|
176
|
|
180
|
177
|
function GET(theUrl) {
|
|
178
|
+ // console.log("theUrl: "+theUrl)
|
181
|
179
|
const _url = API__DOMAIN + theUrl;
|
|
180
|
+ console.log("_url: "+_url)
|
182
|
181
|
return fetch(_url, {})
|
183
|
182
|
.then((response) => {
|
184
|
183
|
return response.json();
|
|
@@ -191,8 +190,8 @@ function GET(theUrl) {
|
191
|
190
|
// });
|
192
|
191
|
}
|
193
|
192
|
|
194
|
|
-const PRE__LIFFID = '2000769399-lGpVNobN'; // 測試liffId待定
|
195
|
|
-const PRO__LIFFID = '2000844179-J80gOzVP'; // 正式liffId待定
|
|
193
|
+const PRE__LIFFID = '2000769399-lGpVNobN'; // 測試liffId
|
|
194
|
+const PRO__LIFFID = '2000844179-J80gOzVP'; // 正式liffId
|
196
|
195
|
const LIFFID = (isLIVE) ? PRO__LIFFID : PRE__LIFFID;
|
197
|
196
|
|
198
|
197
|
function liffInit() {
|
|
@@ -227,10 +226,11 @@ function sleep(seconds) {
|
227
|
226
|
}
|
228
|
227
|
|
229
|
228
|
const _PRE__HOST = 'infra.cecmartech.com:8077';
|
230
|
|
-const _PRO__HOST = 'line.maltssociety.com.tw';
|
|
229
|
+const _PRO__HOST = 'event.leecy.org.tw';
|
231
|
230
|
const _URL = location.hostname;
|
232
|
|
-const _host = (_URL.indexOf(_PRO__HOST) != -1) ? _PRO__HOST : _PRE__HOST;
|
233
|
|
-const API__DOMAIN = location.protocol+'//' + _host;
|
|
231
|
+const _host = (_URL.indexOf(_PRO__HOST) != -1) ? 'https://' + _PRO__HOST : 'http://' + _PRE__HOST;
|
|
232
|
+const API__DOMAIN = _host;
|
|
233
|
+console.log(API__DOMAIN)
|
234
|
234
|
|
235
|
235
|
|
236
|
236
|
var isIE = false;
|