ts-glitter 20.6.8 → 20.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/lowcode/Entry.js +2 -2
  2. package/lowcode/Entry.ts +2 -2
  3. package/lowcode/backend-manager/bg-blog.js +617 -621
  4. package/lowcode/backend-manager/bg-blog.ts +2323 -2325
  5. package/lowcode/backend-manager/bg-line.js +5 -4
  6. package/lowcode/backend-manager/bg-line.ts +5 -4
  7. package/lowcode/backend-manager/bg-list-component.js +9 -0
  8. package/lowcode/backend-manager/bg-list-component.ts +15 -1
  9. package/lowcode/backend-manager/bg-notify.js +6 -4
  10. package/lowcode/backend-manager/bg-notify.ts +6 -4
  11. package/lowcode/backend-manager/bg-product.js +145 -0
  12. package/lowcode/backend-manager/bg-product.ts +153 -0
  13. package/lowcode/backend-manager/bg-sns.js +5 -3
  14. package/lowcode/backend-manager/bg-sns.ts +5 -3
  15. package/lowcode/backend-manager/bg-widget.js +92 -4
  16. package/lowcode/backend-manager/bg-widget.ts +122 -6
  17. package/lowcode/backend-manager/splitPage.js +0 -39
  18. package/lowcode/backend-manager/splitPage.ts +0 -40
  19. package/lowcode/cms-plugin/auto-fcm-advertise.js +17 -5
  20. package/lowcode/cms-plugin/auto-fcm-advertise.ts +19 -6
  21. package/lowcode/cms-plugin/auto-fcm-history.js +2732 -0
  22. package/lowcode/cms-plugin/auto-fcm-history.ts +2995 -0
  23. package/lowcode/cms-plugin/cms-router.js +5 -0
  24. package/lowcode/cms-plugin/cms-router.ts +6 -0
  25. package/lowcode/cms-plugin/filter-options.js +80 -27
  26. package/lowcode/cms-plugin/filter-options.ts +83 -27
  27. package/lowcode/cms-plugin/language-backend.js +50 -39
  28. package/lowcode/cms-plugin/language-backend.ts +109 -95
  29. package/lowcode/cms-plugin/menus-setting.js +175 -151
  30. package/lowcode/cms-plugin/menus-setting.ts +620 -591
  31. package/lowcode/cms-plugin/model/order.d.ts +1 -0
  32. package/lowcode/cms-plugin/module/data.js +7 -7
  33. package/lowcode/cms-plugin/module/data.ts +262 -233
  34. package/lowcode/cms-plugin/module/delivery-html.js +18 -10
  35. package/lowcode/cms-plugin/module/delivery-html.ts +26 -10
  36. package/lowcode/cms-plugin/module/order-setting.js +458 -328
  37. package/lowcode/cms-plugin/module/order-setting.ts +622 -351
  38. package/lowcode/cms-plugin/module/product-excel.js +1 -1
  39. package/lowcode/cms-plugin/module/product-excel.ts +2 -1
  40. package/lowcode/cms-plugin/order/order-module.js +90 -1
  41. package/lowcode/cms-plugin/order/order-module.ts +106 -1
  42. package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -8
  43. package/lowcode/cms-plugin/pos-pages/payment-page.ts +28 -15
  44. package/lowcode/cms-plugin/pos-pages/products-page.js +0 -39
  45. package/lowcode/cms-plugin/pos-pages/products-page.ts +0 -40
  46. package/lowcode/cms-plugin/shopping-collections.ts +1 -3
  47. package/lowcode/cms-plugin/shopping-finance-setting.js +19 -80
  48. package/lowcode/cms-plugin/shopping-finance-setting.ts +19 -87
  49. package/lowcode/cms-plugin/shopping-order-manager.js +122 -38
  50. package/lowcode/cms-plugin/shopping-order-manager.ts +160 -58
  51. package/lowcode/cms-plugin/shopping-product-setting.js +364 -376
  52. package/lowcode/cms-plugin/shopping-product-setting.ts +406 -415
  53. package/lowcode/cms-plugin/shopping-setting-advance.js +57 -16
  54. package/lowcode/cms-plugin/shopping-setting-advance.ts +69 -18
  55. package/lowcode/cms-plugin/stock-history.js +75 -63
  56. package/lowcode/cms-plugin/stock-history.ts +390 -376
  57. package/lowcode/cms-plugin/user/user-module.js +2 -43
  58. package/lowcode/cms-plugin/user/user-module.ts +2 -46
  59. package/lowcode/cms-plugin/user-list.js +4 -6
  60. package/lowcode/cms-plugin/user-list.ts +35 -38
  61. package/lowcode/css/editor.css +42 -3
  62. package/lowcode/glitter-base/global/language.js +6 -1
  63. package/lowcode/glitter-base/global/language.ts +10 -4
  64. package/lowcode/glitter-base/global/payment-config.js +19 -16
  65. package/lowcode/glitter-base/global/payment-config.ts +22 -16
  66. package/lowcode/glitter-base/global/shipment-config.js +6 -5
  67. package/lowcode/glitter-base/global/shipment-config.ts +12 -10
  68. package/lowcode/glitter-base/route/fcm.js +21 -1
  69. package/lowcode/glitter-base/route/fcm.ts +22 -2
  70. package/lowcode/glitter-base/route/shopping.js +8 -32
  71. package/lowcode/glitter-base/route/shopping.ts +10 -33
  72. package/lowcode/glitter-base/route/stock.ts +1 -0
  73. package/lowcode/glitter-base/route/user.js +11 -2
  74. package/lowcode/glitter-base/route/user.ts +23 -12
  75. package/lowcode/jspage/function-page/setting_editor.js +9 -0
  76. package/lowcode/jspage/function-page/setting_editor.ts +9 -0
  77. package/lowcode/public-components/blogs/list.js +223 -195
  78. package/lowcode/public-components/blogs/list.ts +383 -352
  79. package/lowcode/public-components/product/product-list.js +8 -4
  80. package/lowcode/public-components/product/product-list.ts +9 -4
  81. package/lowcode/public-components/terms-related/index.js +1 -1
  82. package/lowcode/public-components/terms-related/index.ts +1 -1
  83. package/lowcode/public-components/user-manager/um-login.js +1 -1
  84. package/lowcode/public-components/user-manager/um-login.ts +2 -2
  85. package/lowcode/public-components/user-manager/um-order.js +41 -5
  86. package/lowcode/public-components/user-manager/um-order.ts +58 -20
  87. package/lowcode/public-components/user-manager/um-voucher.ts +2 -2
  88. package/nhi4veq3gk.json +1 -0
  89. package/package.json +1 -1
  90. package/src/Language.d.ts +2 -0
  91. package/src/Language.js +66 -65
  92. package/src/Language.js.map +1 -1
  93. package/src/Language.ts +719 -715
  94. package/src/api-public/config/shipment-config.js +3 -2
  95. package/src/api-public/config/shipment-config.js.map +1 -1
  96. package/src/api-public/config/shipment-config.ts +3 -2
  97. package/src/api-public/controllers/ai-chat.js.map +1 -1
  98. package/src/api-public/controllers/ai-chat.ts +1 -2
  99. package/src/api-public/controllers/fcm.js +23 -58
  100. package/src/api-public/controllers/fcm.js.map +1 -1
  101. package/src/api-public/controllers/fcm.ts +28 -56
  102. package/src/api-public/controllers/shop.js +7 -1
  103. package/src/api-public/controllers/shop.js.map +1 -1
  104. package/src/api-public/controllers/shop.ts +17 -10
  105. package/src/api-public/controllers/user.js +1 -0
  106. package/src/api-public/controllers/user.js.map +1 -1
  107. package/src/api-public/controllers/user.ts +2 -0
  108. package/src/api-public/services/auto-send-email.js +247 -187
  109. package/src/api-public/services/auto-send-email.js.map +1 -1
  110. package/src/api-public/services/auto-send-email.ts +568 -505
  111. package/src/api-public/services/delivery.js +1 -1
  112. package/src/api-public/services/delivery.js.map +1 -1
  113. package/src/api-public/services/delivery.ts +6 -5
  114. package/src/api-public/services/financial-service.js +1 -2
  115. package/src/api-public/services/financial-service.js.map +1 -1
  116. package/src/api-public/services/financial-service.ts +4 -6
  117. package/src/api-public/services/manager.d.ts +4 -3
  118. package/src/api-public/services/manager.js +8 -12
  119. package/src/api-public/services/manager.js.map +1 -1
  120. package/src/api-public/services/manager.ts +57 -59
  121. package/src/api-public/services/model/handlePaymentTransaction.d.ts +1 -1
  122. package/src/api-public/services/model/handlePaymentTransaction.js +23 -3
  123. package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
  124. package/src/api-public/services/model/handlePaymentTransaction.ts +25 -36
  125. package/src/api-public/services/schedule.d.ts +1 -0
  126. package/src/api-public/services/schedule.js +27 -0
  127. package/src/api-public/services/schedule.js.map +1 -1
  128. package/src/api-public/services/schedule.ts +30 -0
  129. package/src/api-public/services/shopping.d.ts +22 -2
  130. package/src/api-public/services/shopping.js +371 -95
  131. package/src/api-public/services/shopping.js.map +1 -1
  132. package/src/api-public/services/shopping.ts +499 -141
  133. package/src/api-public/services/stock.js +0 -3
  134. package/src/api-public/services/stock.js.map +1 -1
  135. package/src/api-public/services/stock.ts +3 -3
  136. package/src/api-public/services/user.d.ts +1 -0
  137. package/src/api-public/services/user.js +32 -12
  138. package/src/api-public/services/user.js.map +1 -1
  139. package/src/api-public/services/user.ts +38 -19
  140. package/src/api-public/services/workers.js +3 -3
  141. package/src/api-public/services/workers.js.map +1 -1
  142. package/src/api-public/services/workers.ts +103 -103
  143. package/src/app-project/ios/proshake/AppDelegate.swift +51 -7
  144. package/src/app-project/ios/proshake/Info.plist +11 -9
  145. package/src/app-project/ios/proshake/SceneDelegate.swift +18 -0
  146. package/src/app-project/ios/proshake/glitter-interface/BasicUtil.swift +43 -2
  147. package/src/app-project/ios/proshake/glitter-interface/Ecommerce.swift +56 -0
  148. package/src/app-project/ios/proshake.xcodeproj/project.xcworkspace/xcuserdata/jianzhi.wang.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  149. package/src/app-project/serverless/src/modules/database.js +1 -1
  150. package/src/app-project/serverless/src/modules/database.js.map +1 -1
  151. package/src/app-project/serverless/src/modules/database.ts +171 -171
  152. package/src/controllers/template.d.ts +1 -1
  153. package/src/controllers/template.js +16 -16
  154. package/src/controllers/template.js.map +1 -1
  155. package/src/controllers/template.ts +98 -84
  156. package/src/modules/database.js +3 -1
  157. package/src/modules/database.js.map +1 -1
  158. package/src/modules/database.ts +185 -181
  159. package/src/modules/firebase.d.ts +17 -0
  160. package/src/modules/firebase.js +126 -0
  161. package/src/modules/firebase.js.map +1 -1
  162. package/src/modules/firebase.ts +169 -0
  163. package/src/public-config-initial/auto-fcm.js +8 -2
  164. package/src/public-config-initial/auto-fcm.js.map +1 -1
  165. package/src/public-config-initial/auto-fcm.ts +15 -6
  166. package/src/services/app.d.ts +2 -1
  167. package/src/services/app.js.map +1 -1
  168. package/src/services/app.ts +2 -1
  169. package/src/services/ios-project.js +12 -6
  170. package/src/services/ios-project.js.map +1 -1
  171. package/src/services/ios-project.ts +12 -6
  172. package/src/services/template.d.ts +3 -2
  173. package/src/services/template.js +2 -1
  174. package/src/services/template.js.map +1 -1
  175. package/src/services/template.ts +13 -20
@@ -25,47 +25,6 @@ export class UserModule {
25
25
  dialog.dataLoading({ visible: false });
26
26
  });
27
27
  }
28
- static printOption(gvc, vmt, opt) {
29
- const id = `user-tag-${opt.key}`;
30
- opt.key = `${opt.key}`;
31
- function call() {
32
- if (vmt.postData.includes(opt.key)) {
33
- vmt.postData = vmt.postData.filter(item => item !== opt.key);
34
- }
35
- else {
36
- vmt.postData.push(opt.key);
37
- }
38
- gvc.notifyDataChange(vmt.id);
39
- }
40
- return html `<div class="d-flex align-items-center gap-3 mb-3">
41
- ${gvc.bindView({
42
- bind: id,
43
- view: () => {
44
- return html `<input
45
- class="form-check-input mt-0 ${BgWidget.getCheckedClass(gvc)}"
46
- type="checkbox"
47
- id="${opt.key}"
48
- name="radio_${opt.key}"
49
- onclick="${gvc.event(() => call())}"
50
- ${vmt.postData.includes(opt.key) ? 'checked' : ''}
51
- />`;
52
- },
53
- divCreate: {
54
- class: 'd-flex align-items-center justify-content-center',
55
- },
56
- })}
57
- <div class="form-check-label c_updown_label cursor_pointer" onclick="${gvc.event(() => call())}">
58
- <div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
59
- ${opt.note ? html ` <div class="tx_gray_12">${opt.note}</div> ` : ''}
60
- </div>
61
- </div>`;
62
- }
63
- static renderOptions(gvc, vmt) {
64
- if (vmt.dataList.length === 0) {
65
- return html `<div class="d-flex justify-content-center fs-5">查無標籤</div>`;
66
- }
67
- return vmt.dataList.map((item) => this.printOption(gvc, vmt, { key: item, value: item })).join('');
68
- }
69
28
  static addTags(obj) {
70
29
  const gvc = obj.gvc;
71
30
  const dataArray = obj.dataArray;
@@ -95,7 +54,7 @@ export class UserModule {
95
54
  gvc2.notifyDataChange(vmt.id);
96
55
  }), vmt.search, '搜尋標籤', '0', '0'),
97
56
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中新增'),
98
- this.renderOptions(gvc2, vmt),
57
+ BgWidget.renderOptions(gvc2, vmt),
99
58
  ].join(BgWidget.mbContainer(18));
100
59
  }
101
60
  },
@@ -166,7 +125,7 @@ export class UserModule {
166
125
  else {
167
126
  return [
168
127
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中移除'),
169
- this.renderOptions(gvc2, vmt),
128
+ BgWidget.renderOptions(gvc2, vmt),
170
129
  ].join(BgWidget.mbContainer(18));
171
130
  }
172
131
  },
@@ -19,50 +19,6 @@ export class UserModule {
19
19
  });
20
20
  }
21
21
 
22
- static printOption(gvc: GVC, vmt: { id: string; postData: string[] }, opt: OptionsItem) {
23
- const id = `user-tag-${opt.key}`;
24
- opt.key = `${opt.key}`;
25
-
26
- function call() {
27
- if (vmt.postData.includes(opt.key)) {
28
- vmt.postData = vmt.postData.filter(item => item !== opt.key);
29
- } else {
30
- vmt.postData.push(opt.key);
31
- }
32
- gvc.notifyDataChange(vmt.id);
33
- }
34
-
35
- return html`<div class="d-flex align-items-center gap-3 mb-3">
36
- ${gvc.bindView({
37
- bind: id,
38
- view: () => {
39
- return html`<input
40
- class="form-check-input mt-0 ${BgWidget.getCheckedClass(gvc)}"
41
- type="checkbox"
42
- id="${opt.key}"
43
- name="radio_${opt.key}"
44
- onclick="${gvc.event(() => call())}"
45
- ${vmt.postData.includes(opt.key) ? 'checked' : ''}
46
- />`;
47
- },
48
- divCreate: {
49
- class: 'd-flex align-items-center justify-content-center',
50
- },
51
- })}
52
- <div class="form-check-label c_updown_label cursor_pointer" onclick="${gvc.event(() => call())}">
53
- <div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
54
- ${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
55
- </div>
56
- </div>`;
57
- }
58
-
59
- static renderOptions(gvc: GVC, vmt: { id: string; postData: string[]; dataList: any }) {
60
- if (vmt.dataList.length === 0) {
61
- return html`<div class="d-flex justify-content-center fs-5">查無標籤</div>`;
62
- }
63
- return vmt.dataList.map((item: any) => this.printOption(gvc, vmt, { key: item, value: item })).join('');
64
- }
65
-
66
22
  static addTags(obj: { gvc: GVC; vm: any; dataArray: any }) {
67
23
  const gvc = obj.gvc;
68
24
  const dataArray = obj.dataArray;
@@ -98,7 +54,7 @@ export class UserModule {
98
54
  '0'
99
55
  ),
100
56
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中新增'),
101
- this.renderOptions(gvc2, vmt),
57
+ BgWidget.renderOptions(gvc2, vmt),
102
58
  ].join(BgWidget.mbContainer(18));
103
59
  }
104
60
  },
@@ -170,7 +126,7 @@ export class UserModule {
170
126
  } else {
171
127
  return [
172
128
  BgWidget.grayNote('勾選的標籤,將會從已選取顧客的資料中移除'),
173
- this.renderOptions(gvc2, vmt),
129
+ BgWidget.renderOptions(gvc2, vmt),
174
130
  ].join(BgWidget.mbContainer(18));
175
131
  }
176
132
  },
@@ -228,12 +228,11 @@ export class UserList {
228
228
  UserList.setUserForm(gvc, () => gvc.notifyDataChange(vm.id));
229
229
  })}"
230
230
  >
231
- <i class="fa-regular fa-gear me-2 "></i>
231
+ <i class="fa-regular fa-gear me-2"></i>
232
232
  自訂資料
233
233
  </button>
234
234
  </div>
235
- <div class="title-container">
236
- ${BgWidget.tab(((_b = vm.group) === null || _b === void 0 ? void 0 : _b.type) === 'subscriber'
235
+ ${BgWidget.tab(((_b = vm.group) === null || _b === void 0 ? void 0 : _b.type) === 'subscriber'
237
236
  ? [
238
237
  {
239
238
  title: '一般列表',
@@ -260,8 +259,7 @@ export class UserList {
260
259
  ], gvc, vm.filter_type, text => {
261
260
  vm.filter_type = text;
262
261
  gvc.notifyDataChange(vm.id);
263
- }, 'margin: 0; margin-top: 24px;')}
264
- </div>
262
+ })}
265
263
  ${BgWidget.container((() => {
266
264
  if (vm.filter_type === 'notRegistered') {
267
265
  return BgNotify.email(gvc, 'list', () => obj === null || obj === void 0 ? void 0 : obj.backButtonEvent);
@@ -1095,7 +1093,7 @@ export class UserList {
1095
1093
  vmt.loading = true;
1096
1094
  gvc2.notifyDataChange(vmt.id);
1097
1095
  }), vmt.search, '搜尋標籤', '0', '0'),
1098
- UserModule.renderOptions(gvc2, vmt),
1096
+ BgWidget.renderOptions(gvc2, vmt),
1099
1097
  ].join(BgWidget.mbContainer(18));
1100
1098
  }
1101
1099
  },
@@ -276,46 +276,43 @@ export class UserList {
276
276
  UserList.setUserForm(gvc, () => gvc.notifyDataChange(vm.id));
277
277
  })}"
278
278
  >
279
- <i class="fa-regular fa-gear me-2 "></i>
279
+ <i class="fa-regular fa-gear me-2"></i>
280
280
  自訂資料
281
281
  </button>
282
282
  </div>
283
- <div class="title-container">
284
- ${BgWidget.tab(
285
- vm.group?.type === 'subscriber'
286
- ? [
287
- {
288
- title: '一般列表',
289
- key: 'normal',
290
- },
291
- {
292
- title: '黑名單',
293
- key: 'block',
294
- },
295
- {
296
- title: '未註冊',
297
- key: 'notRegistered',
298
- },
299
- ]
300
- : [
301
- {
302
- title: '一般列表',
303
- key: 'normal',
304
- },
305
- {
306
- title: '黑名單',
307
- key: 'block',
308
- },
309
- ],
310
- gvc,
311
- vm.filter_type,
312
- text => {
313
- vm.filter_type = text as any;
314
- gvc.notifyDataChange(vm.id);
315
- },
316
- 'margin: 0; margin-top: 24px;'
317
- )}
318
- </div>
283
+ ${BgWidget.tab(
284
+ vm.group?.type === 'subscriber'
285
+ ? [
286
+ {
287
+ title: '一般列表',
288
+ key: 'normal',
289
+ },
290
+ {
291
+ title: '黑名單',
292
+ key: 'block',
293
+ },
294
+ {
295
+ title: '未註冊',
296
+ key: 'notRegistered',
297
+ },
298
+ ]
299
+ : [
300
+ {
301
+ title: '一般列表',
302
+ key: 'normal',
303
+ },
304
+ {
305
+ title: '黑名單',
306
+ key: 'block',
307
+ },
308
+ ],
309
+ gvc,
310
+ vm.filter_type,
311
+ text => {
312
+ vm.filter_type = text as any;
313
+ gvc.notifyDataChange(vm.id);
314
+ }
315
+ )}
319
316
  ${BgWidget.container(
320
317
  (() => {
321
318
  if (vm.filter_type === 'notRegistered') {
@@ -1256,7 +1253,7 @@ export class UserList {
1256
1253
  '0',
1257
1254
  '0'
1258
1255
  ),
1259
- UserModule.renderOptions(gvc2, vmt),
1256
+ BgWidget.renderOptions(gvc2, vmt),
1260
1257
  ].join(BgWidget.mbContainer(18));
1261
1258
  }
1262
1259
  },
@@ -312,6 +312,44 @@ h6 {
312
312
  font-size: 1rem;
313
313
  }
314
314
 
315
+ .angle-style {
316
+ font-size: 12px;
317
+ color: var(--main-black);
318
+ }
319
+
320
+ .page-link-v2 {
321
+ display: inline-flex;
322
+ height: 32px;
323
+ padding: 10px;
324
+ flex-direction: column;
325
+ justify-content: center;
326
+ align-items: center;
327
+ gap: 10px;
328
+ cursor: pointer;
329
+ background: var(--main-white);
330
+ border: 1px solid var(--main-black);
331
+ color: var(--main-black);
332
+ }
333
+
334
+ .page-link-active {
335
+ background: var(--main-black);
336
+ color: var(--background-2);
337
+ }
338
+
339
+ .page-link-prev {
340
+ border-radius: 7px 0px 0px 7px;
341
+ border: 1px solid var(--main-black);
342
+ background: var(--main-white);
343
+ color: var(--main-black);
344
+ }
345
+
346
+ .page-link-next {
347
+ border-radius: 0px 7px 7px 0px;
348
+ border: 1px solid var(--main-black);
349
+ background: var(--main-white);
350
+ color: var(--main-black);
351
+ }
352
+
315
353
  .h_item {
316
354
  height: 36px;
317
355
  }
@@ -1237,9 +1275,10 @@ h6 {
1237
1275
  }
1238
1276
 
1239
1277
  .title-container {
1240
- padding-left: 8px;
1241
- padding-right: 8px;
1242
- margin-top: 10px;
1278
+ padding-left: 12px;
1279
+ padding-right: 12px;
1280
+ margin-top: 12px;
1281
+ margin-bottom: 12px;
1243
1282
  }
1244
1283
 
1245
1284
  .bt_orange_lin {
@@ -587,7 +587,12 @@ export class Language {
587
587
  cn: '此电话号码已存在',
588
588
  en: 'This phone number already exists',
589
589
  },
590
- { key: 'phone_verify_check', tw: '請前往認證電話號碼', cn: '請前往認證電話號碼', en: 'Please proceed to verify your phone number.' },
590
+ {
591
+ key: 'phone_verify_check',
592
+ tw: '請前往認證電話號碼',
593
+ cn: '請前往認證電話號碼',
594
+ en: 'Please proceed to verify your phone number.',
595
+ },
591
596
  { key: 'email_already_exists', tw: '此信箱已存在', cn: '此邮箱已存在', en: 'This email already exists' },
592
597
  { key: 'update_exception', tw: '更新異常', cn: '更新异常', en: 'Update Exception' },
593
598
  { key: 'change_success', tw: '更改成功', cn: '更改成功', en: 'Change Success' },
@@ -1,3 +1,5 @@
1
+ export type LanguageLocation = 'en-US' | 'zh-CN' | 'zh-TW';
2
+
1
3
  export class Language {
2
4
  public static languageSupport() {
3
5
  const sup = [
@@ -453,8 +455,8 @@ export class Language {
453
455
  { key: 'my', tw: '我的', cn: '我的', en: 'My' },
454
456
  { key: 'my_coupons', tw: '我的優惠券', cn: '我的优惠券', en: 'Coupons' },
455
457
  { key: 'coupons', tw: '優惠券', cn: '优惠券', en: 'Coupons' },
456
- {key: 'wait_ship',tw:'待出貨',cn: `待出货`,en: `To Ship`},
457
- {key: 'shipped',tw:'已出貨',cn: `已出货`,en: `Shipped`},
458
+ { key: 'wait_ship', tw: '待出貨', cn: `待出货`, en: `To Ship` },
459
+ { key: 'shipped', tw: '已出貨', cn: `已出货`, en: `Shipped` },
458
460
  { key: 'order_history', tw: '訂單記錄', cn: '订单记录', en: 'OrderEvent History' },
459
461
  { key: 'wishlist', tw: '心願單', cn: '心愿单', en: 'Wishlist' },
460
462
  { key: 'add_to_wishlist', tw: '添加至心願單', cn: '添加至心愿单', en: 'Add to Wishlist' },
@@ -595,7 +597,12 @@ export class Language {
595
597
  cn: '此电话号码已存在',
596
598
  en: 'This phone number already exists',
597
599
  },
598
- { key: 'phone_verify_check', tw: '請前往認證電話號碼', cn: '請前往認證電話號碼', en: 'Please proceed to verify your phone number.' },
600
+ {
601
+ key: 'phone_verify_check',
602
+ tw: '請前往認證電話號碼',
603
+ cn: '請前往認證電話號碼',
604
+ en: 'Please proceed to verify your phone number.',
605
+ },
599
606
  { key: 'email_already_exists', tw: '此信箱已存在', cn: '此邮箱已存在', en: 'This email already exists' },
600
607
  { key: 'update_exception', tw: '更新異常', cn: '更新异常', en: 'Update Exception' },
601
608
  { key: 'change_success', tw: '更改成功', cn: '更改成功', en: 'Change Success' },
@@ -944,7 +951,6 @@ export class Language {
944
951
  { key: 'quick_input', tw: '快速帶入', cn: '快速带入', en: 'Quick Fill' },
945
952
  { key: 'home_page', tw: '首頁', cn: '首页', en: 'Home page' },
946
953
  { key: 'account_user_info', tw: '會員中心', cn: '会员中心', en: 'Member Center' },
947
-
948
954
  ];
949
955
  }
950
956
 
@@ -18,22 +18,7 @@ export class PaymentConfig {
18
18
  keyData = Object.assign(Object.assign({}, keyData), data.response.result[0].value);
19
19
  }
20
20
  const offlinePayArray = [
21
- {
22
- key: 'atm',
23
- name: 'ATM銀行轉帳',
24
- customerClass: 'guide2-3',
25
- img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/20200804163522idfs9.jpg',
26
- },
27
- {
28
- key: 'line',
29
- name: 'LINE 轉帳',
30
- img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/unnamed.webp',
31
- },
32
- {
33
- key: 'cash_on_delivery',
34
- name: '貨到付款',
35
- img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/images.png',
36
- },
21
+ ...this.defalutOfflinePay,
37
22
  ...keyData.payment_info_custom.map((dd) => {
38
23
  return {
39
24
  key: dd.id,
@@ -96,3 +81,21 @@ PaymentConfig.onlinePay = [
96
81
  img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/unnamed (1) copy.jpg',
97
82
  },
98
83
  ];
84
+ PaymentConfig.defalutOfflinePay = [
85
+ {
86
+ key: 'atm',
87
+ name: 'ATM銀行轉帳',
88
+ customerClass: 'guide2-3',
89
+ img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/20200804163522idfs9.jpg',
90
+ },
91
+ {
92
+ key: 'line',
93
+ name: 'LINE 轉帳',
94
+ img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/unnamed.webp',
95
+ },
96
+ {
97
+ key: 'cash_on_delivery',
98
+ name: '貨到付款',
99
+ img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/images.png',
100
+ },
101
+ ];
@@ -46,33 +46,39 @@ export class PaymentConfig {
46
46
  },
47
47
  ];
48
48
 
49
+ public static defalutOfflinePay = [
50
+ {
51
+ key: 'atm',
52
+ name: 'ATM銀行轉帳',
53
+ customerClass: 'guide2-3',
54
+ img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/20200804163522idfs9.jpg',
55
+ },
56
+ {
57
+ key: 'line',
58
+ name: 'LINE 轉帳',
59
+ img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/unnamed.webp',
60
+ },
61
+ {
62
+ key: 'cash_on_delivery',
63
+ name: '貨到付款',
64
+ img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/images.png',
65
+ },
66
+ ];
67
+
49
68
  public static async getSupportPayment(all: boolean = false) {
50
69
  const saasConfig: { config: any; api: any } = (window.parent as any).saasConfig;
51
70
  const data = await saasConfig.api.getPrivateConfig(saasConfig.config.appName, 'glitter_finance');
52
71
  let keyData: any = {};
72
+
53
73
  if (data.response.result[0]) {
54
74
  keyData = {
55
75
  ...keyData,
56
76
  ...data.response.result[0].value,
57
77
  };
58
78
  }
79
+
59
80
  const offlinePayArray = [
60
- {
61
- key: 'atm',
62
- name: 'ATM銀行轉帳',
63
- customerClass: 'guide2-3',
64
- img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/20200804163522idfs9.jpg',
65
- },
66
- {
67
- key: 'line',
68
- name: 'LINE 轉帳',
69
- img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/unnamed.webp',
70
- },
71
- {
72
- key: 'cash_on_delivery',
73
- name: '貨到付款',
74
- img: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/images.png',
75
- },
81
+ ...this.defalutOfflinePay,
76
82
  ...keyData.payment_info_custom.map((dd: any) => {
77
83
  return {
78
84
  key: dd.id,
@@ -69,7 +69,7 @@ ShipmentConfig.list = [
69
69
  src: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/Chunghwa_Post_Logo.svg.png',
70
70
  },
71
71
  {
72
- title: '7-11交貨便',
72
+ title: '7-11店到店',
73
73
  value: 'UNIMARTC2C',
74
74
  src: 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1716734544575-34f72af5b441738b1f65a0597c28d9cf (1).png',
75
75
  paynow_id: '01',
@@ -118,15 +118,16 @@ ShipmentConfig.list = [
118
118
  },
119
119
  ];
120
120
  ShipmentConfig.supportPrintList = [
121
- 'FAMIC2C',
122
121
  'UNIMARTC2C',
123
- 'HILIFEC2C',
122
+ 'UNIMARTFREEZE',
123
+ 'FAMIC2C',
124
+ 'FAMIC2CFREEZE',
124
125
  'OKMARTC2C',
126
+ 'HILIFEC2C',
125
127
  'normal',
126
128
  'black_cat',
127
129
  'black_cat_ice',
128
- 'UNIMARTFREEZE',
129
130
  'black_cat_freezing',
130
131
  ];
131
- ShipmentConfig.supermarketList = ['UNIMARTC2C', 'FAMIC2C', 'HILIFEC2C', 'OKMARTC2C', 'UNIMARTFREEZE', 'FAMIC2CFREEZE'];
132
+ ShipmentConfig.supermarketList = ['UNIMARTC2C', 'UNIMARTFREEZE', 'FAMIC2C', 'FAMIC2CFREEZE', 'OKMARTC2C', 'HILIFEC2C'];
132
133
  window.glitter.setModule(import.meta.url, ShipmentConfig);
@@ -1,4 +1,3 @@
1
- //這邊儲存所有宅配的配置檔案
2
1
  export class ShipmentConfig {
3
2
  public static list = [
4
3
  {
@@ -22,7 +21,7 @@ export class ShipmentConfig {
22
21
  src: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/Chunghwa_Post_Logo.svg.png',
23
22
  },
24
23
  {
25
- title: '7-11交貨便',
24
+ title: '7-11店到店',
26
25
  value: 'UNIMARTC2C',
27
26
  src: 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1716734544575-34f72af5b441738b1f65a0597c28d9cf (1).png',
28
27
  paynow_id: '01',
@@ -70,22 +69,25 @@ export class ShipmentConfig {
70
69
  src: `<i class="fa-duotone fa-solid fa-shop" style="font-size: 35px;color:#319e49;"></i>`,
71
70
  },
72
71
  ];
73
- //支援列印托運單的配送方式
72
+
73
+ // 支援列印托運單的配送方式
74
74
  public static supportPrintList = [
75
- 'FAMIC2C',
76
75
  'UNIMARTC2C',
77
- 'HILIFEC2C',
76
+ 'UNIMARTFREEZE',
77
+ 'FAMIC2C',
78
+ 'FAMIC2CFREEZE',
78
79
  'OKMARTC2C',
80
+ 'HILIFEC2C',
79
81
  'normal',
80
82
  'black_cat',
81
83
  'black_cat_ice',
82
- 'UNIMARTFREEZE',
83
84
  'black_cat_freezing',
84
85
  ];
85
- //超商列表
86
- public static supermarketList = ['UNIMARTC2C', 'FAMIC2C', 'HILIFEC2C', 'OKMARTC2C', 'UNIMARTFREEZE', 'FAMIC2CFREEZE'];
87
86
 
88
- //所有的配送方式
87
+ // 超商列表
88
+ public static supermarketList = ['UNIMARTC2C', 'UNIMARTFREEZE', 'FAMIC2C', 'FAMIC2CFREEZE', 'OKMARTC2C', 'HILIFEC2C'];
89
+
90
+ // 所有的配送方式
89
91
  public static async shipmentMethod(cf: { type: 'all' | 'market' | 'support' }) {
90
92
  const saasConfig: { config: any; api: any } = (window.parent as any).saasConfig;
91
93
  const response: { response: any; result: boolean } = await saasConfig.api.getPrivateConfig(
@@ -101,7 +103,7 @@ export class ShipmentConfig {
101
103
  'zh-TW': { info: configData.info || '' },
102
104
  };
103
105
  }
104
- configData.support=configData.support??[];
106
+ configData.support = configData.support ?? [];
105
107
  const shipmentOptions = ShipmentConfig.list
106
108
  .map(dd => {
107
109
  return { key: dd.value, name: dd.title };
@@ -2,6 +2,26 @@ import { BaseApi } from "../../glitterBundle/api/base.js";
2
2
  export class ApiFcm {
3
3
  constructor() {
4
4
  }
5
+ static history(json) {
6
+ return BaseApi.create({
7
+ url: getBaseUrl() +
8
+ `/api-public/v1/fcm?${(() => {
9
+ let par = [`type=list`, `limit=${json.limit}`, `page=${json.page}`];
10
+ json.search && par.push(`search=${json.search}`);
11
+ json.searchType && par.push(`searchType=${json.searchType}`);
12
+ json.sendTime && par.push(`sendDate=${json.sendTime.date}&sendTime=${json.sendTime.time}`);
13
+ json.status && par.push(`status=${json.status.join(',')}`);
14
+ json.mailType && par.push(`mailType=${json.mailType.join(',')}`);
15
+ return par.join('&');
16
+ })()}`,
17
+ type: 'GET',
18
+ headers: {
19
+ 'Content-Type': 'application/json',
20
+ 'g-app': getConfig().config.appName,
21
+ Authorization: getConfig().config.token,
22
+ },
23
+ });
24
+ }
5
25
  static send(json) {
6
26
  return BaseApi.create({
7
27
  "url": getBaseUrl() + `/api-public/v1/fcm`,
@@ -16,7 +36,7 @@ export class ApiFcm {
16
36
  }
17
37
  }
18
38
  function getConfig() {
19
- const saasConfig = window.saasConfig;
39
+ const saasConfig = window.parent.saasConfig;
20
40
  return saasConfig;
21
41
  }
22
42
  function getBaseUrl() {
@@ -6,7 +6,27 @@ import {BaseApi} from "../../glitterBundle/api/base.js";
6
6
  export class ApiFcm {
7
7
  constructor() {
8
8
  }
9
-
9
+ public static history(json: { page: number; limit: number; search: string; searchType: string; sendTime?: { date: string; time: string }; status?: number[]; mailType?: string[] }) {
10
+ return BaseApi.create({
11
+ url:
12
+ getBaseUrl() +
13
+ `/api-public/v1/fcm?${(() => {
14
+ let par = [`type=list`, `limit=${json.limit}`, `page=${json.page}`];
15
+ json.search && par.push(`search=${json.search}`);
16
+ json.searchType && par.push(`searchType=${json.searchType}`);
17
+ json.sendTime && par.push(`sendDate=${json.sendTime.date}&sendTime=${json.sendTime.time}`);
18
+ json.status && par.push(`status=${json.status.join(',')}`);
19
+ json.mailType && par.push(`mailType=${json.mailType.join(',')}`);
20
+ return par.join('&');
21
+ })()}`,
22
+ type: 'GET',
23
+ headers: {
24
+ 'Content-Type': 'application/json',
25
+ 'g-app': getConfig().config.appName,
26
+ Authorization: getConfig().config.token,
27
+ },
28
+ });
29
+ }
10
30
  public static send(json: any) {
11
31
  return BaseApi.create({
12
32
  "url": getBaseUrl() + `/api-public/v1/fcm`,
@@ -24,7 +44,7 @@ export class ApiFcm {
24
44
  }
25
45
 
26
46
  function getConfig() {
27
- const saasConfig: { config: any; api: any } = (window as any).saasConfig;
47
+ const saasConfig: { config: any; api: any } = (window.parent as any).saasConfig;
28
48
  return saasConfig
29
49
  }
30
50