소스 검색

update domain

Sherry 2 년 전
부모
커밋
37c291edc1
1개의 변경된 파일10개의 추가작업 그리고 10개의 파일을 삭제
  1. 10
    10
      src/fe/js/utlis.js

+ 10
- 10
src/fe/js/utlis.js 파일 보기

19
     isLIVE = false;
19
     isLIVE = false;
20
     break;
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
     isLIVE = true;
23
     isLIVE = true;
28
     break;
24
     break;
29
 }
25
 }
153
 }
149
 }
154
 
150
 
155
 function POST(theUrl, theData) {
151
 function POST(theUrl, theData) {
152
+  console.log("API__DOMAIN: "+API__DOMAIN)
156
   const _url = API__DOMAIN + theUrl;
153
   const _url = API__DOMAIN + theUrl;
157
   // console.log(JSON.stringify(theData))
154
   // console.log(JSON.stringify(theData))
158
   return fetch(_url, {
155
   return fetch(_url, {
178
 }
175
 }
179
 
176
 
180
 function GET(theUrl) {
177
 function GET(theUrl) {
178
+  // console.log("theUrl: "+theUrl)
181
   const _url = API__DOMAIN + theUrl;
179
   const _url = API__DOMAIN + theUrl;
180
+  console.log("_url: "+_url)
182
   return fetch(_url, {})
181
   return fetch(_url, {})
183
     .then((response) => {
182
     .then((response) => {
184
       return response.json(); 
183
       return response.json(); 
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
 const LIFFID = (isLIVE) ? PRO__LIFFID : PRE__LIFFID;
195
 const LIFFID = (isLIVE) ? PRO__LIFFID : PRE__LIFFID;
197
 
196
 
198
 function liffInit() {
197
 function liffInit() {
227
 }
226
 }
228
 
227
 
229
 const _PRE__HOST = 'infra.cecmartech.com:8077';
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
 const _URL = location.hostname;
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
 var isIE = false;
236
 var isIE = false;