ts-glitter 20.6.8 → 20.6.9

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 (160) 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/user/user-module.js +2 -43
  56. package/lowcode/cms-plugin/user/user-module.ts +2 -46
  57. package/lowcode/cms-plugin/user-list.js +4 -6
  58. package/lowcode/cms-plugin/user-list.ts +35 -38
  59. package/lowcode/css/editor.css +42 -3
  60. package/lowcode/glitter-base/global/language.js +6 -1
  61. package/lowcode/glitter-base/global/language.ts +10 -4
  62. package/lowcode/glitter-base/global/payment-config.js +19 -16
  63. package/lowcode/glitter-base/global/payment-config.ts +22 -16
  64. package/lowcode/glitter-base/global/shipment-config.js +6 -5
  65. package/lowcode/glitter-base/global/shipment-config.ts +12 -10
  66. package/lowcode/glitter-base/route/fcm.js +21 -1
  67. package/lowcode/glitter-base/route/fcm.ts +22 -2
  68. package/lowcode/glitter-base/route/shopping.js +8 -32
  69. package/lowcode/glitter-base/route/shopping.ts +10 -33
  70. package/lowcode/glitter-base/route/user.js +11 -2
  71. package/lowcode/glitter-base/route/user.ts +23 -12
  72. package/lowcode/jspage/function-page/setting_editor.js +9 -0
  73. package/lowcode/jspage/function-page/setting_editor.ts +9 -0
  74. package/lowcode/public-components/blogs/list.js +223 -195
  75. package/lowcode/public-components/blogs/list.ts +383 -352
  76. package/lowcode/public-components/product/product-list.js +8 -4
  77. package/lowcode/public-components/product/product-list.ts +9 -4
  78. package/lowcode/public-components/terms-related/index.js +1 -1
  79. package/lowcode/public-components/terms-related/index.ts +1 -1
  80. package/lowcode/public-components/user-manager/um-login.js +1 -1
  81. package/lowcode/public-components/user-manager/um-login.ts +2 -2
  82. package/lowcode/public-components/user-manager/um-order.js +41 -5
  83. package/lowcode/public-components/user-manager/um-order.ts +58 -20
  84. package/lowcode/public-components/user-manager/um-voucher.ts +2 -2
  85. package/nhi4veq3gk.json +1 -0
  86. package/package.json +1 -1
  87. package/src/Language.d.ts +2 -0
  88. package/src/Language.js +66 -65
  89. package/src/Language.js.map +1 -1
  90. package/src/Language.ts +719 -715
  91. package/src/api-public/config/shipment-config.js +3 -2
  92. package/src/api-public/config/shipment-config.js.map +1 -1
  93. package/src/api-public/config/shipment-config.ts +3 -2
  94. package/src/api-public/controllers/ai-chat.js.map +1 -1
  95. package/src/api-public/controllers/ai-chat.ts +1 -2
  96. package/src/api-public/controllers/fcm.js +23 -58
  97. package/src/api-public/controllers/fcm.js.map +1 -1
  98. package/src/api-public/controllers/fcm.ts +28 -56
  99. package/src/api-public/controllers/shop.js +7 -1
  100. package/src/api-public/controllers/shop.js.map +1 -1
  101. package/src/api-public/controllers/shop.ts +17 -10
  102. package/src/api-public/controllers/user.js +1 -0
  103. package/src/api-public/controllers/user.js.map +1 -1
  104. package/src/api-public/controllers/user.ts +2 -0
  105. package/src/api-public/services/auto-send-email.js +247 -187
  106. package/src/api-public/services/auto-send-email.js.map +1 -1
  107. package/src/api-public/services/auto-send-email.ts +568 -505
  108. package/src/api-public/services/delivery.js +1 -1
  109. package/src/api-public/services/delivery.js.map +1 -1
  110. package/src/api-public/services/delivery.ts +6 -5
  111. package/src/api-public/services/financial-service.js +1 -2
  112. package/src/api-public/services/financial-service.js.map +1 -1
  113. package/src/api-public/services/financial-service.ts +4 -6
  114. package/src/api-public/services/manager.d.ts +4 -3
  115. package/src/api-public/services/manager.js +8 -12
  116. package/src/api-public/services/manager.js.map +1 -1
  117. package/src/api-public/services/manager.ts +57 -59
  118. package/src/api-public/services/model/handlePaymentTransaction.d.ts +1 -1
  119. package/src/api-public/services/model/handlePaymentTransaction.js +23 -3
  120. package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
  121. package/src/api-public/services/model/handlePaymentTransaction.ts +25 -36
  122. package/src/api-public/services/schedule.d.ts +1 -0
  123. package/src/api-public/services/schedule.js +27 -0
  124. package/src/api-public/services/schedule.js.map +1 -1
  125. package/src/api-public/services/schedule.ts +30 -0
  126. package/src/api-public/services/shopping.d.ts +22 -2
  127. package/src/api-public/services/shopping.js +362 -90
  128. package/src/api-public/services/shopping.js.map +1 -1
  129. package/src/api-public/services/shopping.ts +481 -134
  130. package/src/api-public/services/user.d.ts +1 -0
  131. package/src/api-public/services/user.js +32 -12
  132. package/src/api-public/services/user.js.map +1 -1
  133. package/src/api-public/services/user.ts +38 -19
  134. package/src/api-public/services/workers.js +3 -3
  135. package/src/api-public/services/workers.js.map +1 -1
  136. package/src/api-public/services/workers.ts +103 -103
  137. package/src/app-project/serverless/src/modules/database.js +1 -1
  138. package/src/app-project/serverless/src/modules/database.js.map +1 -1
  139. package/src/app-project/serverless/src/modules/database.ts +171 -171
  140. package/src/controllers/template.d.ts +1 -1
  141. package/src/controllers/template.js +16 -16
  142. package/src/controllers/template.js.map +1 -1
  143. package/src/controllers/template.ts +98 -84
  144. package/src/modules/database.js +3 -1
  145. package/src/modules/database.js.map +1 -1
  146. package/src/modules/database.ts +185 -181
  147. package/src/modules/firebase.d.ts +17 -0
  148. package/src/modules/firebase.js +126 -0
  149. package/src/modules/firebase.js.map +1 -1
  150. package/src/modules/firebase.ts +169 -0
  151. package/src/public-config-initial/auto-fcm.js +8 -2
  152. package/src/public-config-initial/auto-fcm.js.map +1 -1
  153. package/src/public-config-initial/auto-fcm.ts +15 -6
  154. package/src/services/app.d.ts +2 -1
  155. package/src/services/app.js.map +1 -1
  156. package/src/services/app.ts +2 -1
  157. package/src/services/template.d.ts +3 -2
  158. package/src/services/template.js +2 -1
  159. package/src/services/template.js.map +1 -1
  160. package/src/services/template.ts +13 -20
@@ -5,527 +5,590 @@ import db from '../../modules/database.js';
5
5
  import exception from '../../modules/exception.js';
6
6
 
7
7
  export class AutoSendEmail {
8
- public static async getDefCompare(app: string, tag: string, language: string) {
9
- const dataList: any = [
10
- {
11
- tag: 'auto-email-shipment',
12
- tag_name: '商品出貨',
13
- name: '@{{app_name}}',
14
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
15
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
16
- toggle: true,
17
- },
18
- {
19
- tag: 'auto-sns-shipment',
20
- tag_name: '簡訊通知商品出貨',
21
- name: '@{{app_name}}',
22
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
23
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
24
- toggle: true,
25
- },
26
- {
27
- tag: 'auto-line-shipment',
28
- tag_name: 'line訊息通知商品出貨',
29
- name: '@{{app_name}}',
30
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
31
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
32
- toggle: true,
33
- },
34
- {
35
- tag: 'auto-fb-shipment',
36
- tag_name: 'fb訊息通知商品出貨',
37
- name: '@{{app_name}}',
38
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
39
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
40
- toggle: true,
41
- },
42
- {
43
- tag: 'auto-email-shipment-arrival',
44
- tag_name: '商品到貨',
45
- name: '@{{app_name}}',
46
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
47
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
48
- toggle: true,
49
- },
50
- {
51
- tag: 'auto-sns-shipment-arrival',
52
- tag_name: '簡訊通知商品到貨',
53
- name: '@{{app_name}}',
54
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
55
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
56
- toggle: true,
57
- },
58
- {
59
- tag: 'auto-line-shipment-arrival',
60
- tag_name: 'line訊息通知商品到貨',
61
- name: '@{{app_name}}',
62
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
63
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
64
- toggle: true,
65
- },
66
- {
67
- tag: 'auto-fb-shipment-arrival',
68
- tag_name: 'fb訊息通知商品到貨',
69
- name: '@{{app_name}}',
70
- title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
71
- content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
72
- toggle: true,
73
- },
74
- {
75
- tag: 'auto-email-order-create',
76
- tag_name: '訂單成立',
77
- name: '@{{app_name}}',
78
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
79
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
80
- toggle: true,
81
- },
82
- {
83
- tag: 'auto-sns-order-create',
84
- tag_name: '簡訊通知訂單成立',
85
- name: '@{{app_name}}',
86
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
87
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
88
- toggle: true,
89
- },
90
- {
91
- tag: 'auto-line-order-create',
92
- tag_name: 'ling通知訂單成立',
93
- name: '@{{app_name}}',
94
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
95
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
96
- toggle: true,
97
- },
98
- {
99
- tag: 'auto-fb-order-create',
100
- tag_name: 'fb通知訂單成立',
101
- name: '@{{app_name}}',
102
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
103
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
104
- toggle: true,
105
- },
106
- {
107
- tag: 'auto-email-payment-successful',
108
- tag_name: '訂單付款成功',
109
- name: '@{{app_name}}',
110
- title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
111
- content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
112
- toggle: true,
113
- },
114
- {
115
- tag: 'auto-sns-payment-successful',
116
- tag_name: '簡訊通知訂單付款成功',
117
- name: '@{{app_name}}',
118
- title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
119
- content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
120
- toggle: true,
121
- },
122
- {
123
- tag: 'auto-line-payment-successful',
124
- tag_name: 'line訊息通知訂單付款成功',
125
- name: '@{{app_name}}',
126
- title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
127
- content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
128
- toggle: true,
129
- },
130
- {
131
- tag: 'auto-fb-payment-successful',
132
- tag_name: 'fb訊息通知訂單付款成功',
133
- name: '@{{app_name}}',
134
- title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
135
- content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
136
- toggle: true,
137
- },
138
- {
139
- tag: 'proof-purchase',
140
- tag_name: '訂單待核款',
141
- name: '@{{app_name}}',
142
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
143
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
144
- toggle: true,
145
- },
146
- {
147
- tag: 'sns-proof-purchase',
148
- tag_name: '簡訊通知訂單待核款',
149
- name: '@{{app_name}}',
150
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
151
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
152
- toggle: true,
153
- },
154
- {
155
- tag: 'line-proof-purchase',
156
- tag_name: 'line訊息通知訂單待核款',
157
- name: '@{{app_name}}',
158
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
159
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
160
- toggle: true,
161
- },
162
- {
163
- tag: 'fb-proof-purchase',
164
- tag_name: 'fb訊息通知訂單待核款',
165
- name: '@{{app_name}}',
166
- title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
167
- content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
168
- toggle: true,
169
- },
170
- {
171
- tag: 'auto-email-order-cancel-success',
172
- tag_name: '取消訂單成功',
173
- name: '@{{app_name}}',
174
- title: '[@{{app_name}}] 您已成功取消訂單 #@{{訂單號碼}}',
175
- content: '[@{{app_name}}] 您已成功取消訂單 #@{{訂單號碼}}',
176
- toggle: true,
177
- },
8
+ public static async getDefCompare(app: string, tag: string, language: string) {
9
+ const dataList: any = [
10
+ {
11
+ tag: 'auto-email-shipment',
12
+ tag_name: '商品出貨',
13
+ name: '@{{app_name}}',
14
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
15
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
16
+ toggle: true,
17
+ },
18
+ {
19
+ tag: 'auto-email-in-stock',
20
+ tag_name: '商品備貨',
21
+ name: '@{{app_name}}',
22
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
23
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
24
+ toggle: true,
25
+ },
26
+ {
27
+ tag: 'auto-sns-shipment',
28
+ tag_name: '簡訊通知商品出貨',
29
+ name: '@{{app_name}}',
30
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
31
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
32
+ toggle: true,
33
+ },
34
+ {
35
+ tag: 'auto-line-shipment',
36
+ tag_name: 'line訊息通知商品出貨',
37
+ name: '@{{app_name}}',
38
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
39
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
40
+ toggle: true,
41
+ },
42
+ {
43
+ tag: 'auto-line-in-stock',
44
+ tag_name: 'line訊息通知商品備貨',
45
+ name: '@{{app_name}}',
46
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
47
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
48
+ toggle: true,
49
+ },
50
+ {
51
+ tag: 'auto-fb-shipment',
52
+ tag_name: 'fb訊息通知商品出貨',
53
+ name: '@{{app_name}}',
54
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
55
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
56
+ toggle: true,
57
+ },
58
+ {
59
+ tag: 'auto-email-shipment-arrival',
60
+ tag_name: '商品到貨',
61
+ name: '@{{app_name}}',
62
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
63
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
64
+ toggle: true,
65
+ },
66
+ {
67
+ tag: 'auto-sns-shipment-arrival',
68
+ tag_name: '簡訊通知商品到貨',
69
+ name: '@{{app_name}}',
70
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
71
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
72
+ toggle: true,
73
+ },
74
+ {
75
+ tag: 'auto-line-shipment-arrival',
76
+ tag_name: 'line訊息通知商品到貨',
77
+ name: '@{{app_name}}',
78
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
79
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
80
+ toggle: true,
81
+ },
82
+ {
83
+ tag: 'auto-fb-shipment-arrival',
84
+ tag_name: 'fb訊息通知商品到貨',
85
+ name: '@{{app_name}}',
86
+ title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
87
+ content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 已到達',
88
+ toggle: true,
89
+ },
90
+ {
91
+ tag: 'auto-email-order-create',
92
+ tag_name: '訂單成立',
93
+ name: '@{{app_name}}',
94
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
95
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
96
+ toggle: true,
97
+ },
98
+ {
99
+ tag: 'auto-sns-order-create',
100
+ tag_name: '簡訊通知訂單成立',
101
+ name: '@{{app_name}}',
102
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
103
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
104
+ toggle: true,
105
+ },
106
+ {
107
+ tag: 'auto-line-order-create',
108
+ tag_name: 'ling通知訂單成立',
109
+ name: '@{{app_name}}',
110
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
111
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
112
+ toggle: true,
113
+ },
114
+ {
115
+ tag: 'auto-fb-order-create',
116
+ tag_name: 'fb通知訂單成立',
117
+ name: '@{{app_name}}',
118
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
119
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已成立',
120
+ toggle: true,
121
+ },
122
+ {
123
+ tag: 'auto-email-payment-successful',
124
+ tag_name: '訂單付款成功',
125
+ name: '@{{app_name}}',
126
+ title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
127
+ content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
128
+ toggle: true,
129
+ },
130
+ {
131
+ tag: 'auto-sns-payment-successful',
132
+ tag_name: '簡訊通知訂單付款成功',
133
+ name: '@{{app_name}}',
134
+ title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
135
+ content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
136
+ toggle: true,
137
+ },
138
+ {
139
+ tag: 'auto-line-payment-successful',
140
+ tag_name: 'line訊息通知訂單付款成功',
141
+ name: '@{{app_name}}',
142
+ title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
143
+ content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
144
+ toggle: true,
145
+ },
146
+ {
147
+ tag: 'auto-fb-payment-successful',
148
+ tag_name: 'fb訊息通知訂單付款成功',
149
+ name: '@{{app_name}}',
150
+ title: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
151
+ content: '[@{{app_name}}] #@{{訂單號碼}} 付款狀態 更新為: 已付款',
152
+ toggle: true,
153
+ },
154
+ {
155
+ tag: 'proof-purchase',
156
+ tag_name: '訂單待核款',
157
+ name: '@{{app_name}}',
158
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
159
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
160
+ toggle: true,
161
+ },
162
+ {
163
+ tag: 'sns-proof-purchase',
164
+ tag_name: '簡訊通知訂單待核款',
165
+ name: '@{{app_name}}',
166
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
167
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
168
+ toggle: true,
169
+ },
170
+ {
171
+ tag: 'line-proof-purchase',
172
+ tag_name: 'line訊息通知訂單待核款',
173
+ name: '@{{app_name}}',
174
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
175
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
176
+ toggle: true,
177
+ },
178
+ {
179
+ tag: 'fb-proof-purchase',
180
+ tag_name: 'fb訊息通知訂單待核款',
181
+ name: '@{{app_name}}',
182
+ title: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
183
+ content: '[@{{app_name}}] 您的訂單 #@{{訂單號碼}} 已進入待核款',
184
+ toggle: true,
185
+ },
186
+ {
187
+ tag: 'auto-email-order-cancel-success',
188
+ tag_name: '取消訂單成功',
189
+ name: '@{{app_name}}',
190
+ title: '[@{{app_name}}] 您已成功取消訂單 #@{{訂單號碼}}',
191
+ content: '[@{{app_name}}] 您已成功取消訂單 #@{{訂單號碼}}',
192
+ toggle: true,
193
+ },
178
194
 
179
- {
180
- tag: 'auto-email-order-cancel-false',
181
- tag_name: '取消訂單失敗',
182
- name: '@{{app_name}}',
183
- title: '[@{{app_name}}] 取消訂單申請 #@{{訂單號碼}} 已失敗',
184
- content: '[@{{app_name}}] 取消訂單申請 #@{{訂單號碼}} 已失敗',
185
- toggle: true,
186
- },
187
- {
188
- tag: 'auto-email-birthday',
189
- tag_name: '生日祝福',
190
- name: '@{{app_name}}',
191
- title: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
192
- content: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
193
- toggle: true,
194
- },
195
- {
196
- tag: 'auto-sns-birthday',
197
- tag_name: '簡訊通知生日祝福',
198
- name: '@{{app_name}}',
199
- title: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
200
- content: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
201
- toggle: true,
202
- },
203
- {
204
- tag: 'auto-line-birthday',
205
- tag_name: 'line訊息通知生日祝福',
206
- name: '@{{app_name}}',
207
- title: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
208
- content: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
209
- toggle: true,
210
- },
211
- {
212
- tag: 'auto-email-welcome',
213
- tag_name: '歡迎信件',
214
- name: '@{{app_name}}',
215
- title: '[@{{app_name}}] 歡迎您加入@{{app_name}}! 最豐富的選品商店',
216
- content: '[@{{app_name}}] 歡迎您加入@{{app_name}}! 最豐富的選品商店',
217
- toggle: true,
218
- },
219
- {
220
- tag: 'auto-email-verify',
221
- tag_name: '信箱驗證',
222
- name: '@{{app_name}}',
223
- title: '[@{{app_name}}] 帳號認證通知',
224
- content: '嗨!歡迎加入 @{{app_name}},請輸入驗證碼「 @{{code}} 」。請於一分鐘內輸入並完成驗證。',
225
- toggle: true,
226
- },
227
- {
228
- tag: 'auto-email-verify-update',
229
- tag_name: '信箱驗證',
230
- name: '@{{app_name}}',
231
- title: '[@{{app_name}}] 信箱認證通知',
232
- content: '請輸入驗證碼「 @{{code}} 」。請於五分鐘內輸入並完成驗證。',
233
- toggle: true,
234
- },
235
- {
236
- tag: 'auto-phone-verify-update',
237
- tag_name: '電話認證',
238
- name: '@{{app_name}}',
239
- title: '[@{{app_name}}] 帳號認證通知',
240
- content: '請輸入驗證碼「 @{{code}} 」。請於五分鐘內輸入並完成驗證。',
241
- toggle: true,
242
- },
243
- {
244
- tag: 'auto-phone-verify',
245
- tag_name: '電話認證',
246
- name: '@{{app_name}}',
247
- title: '[@{{app_name}}] 帳號認證通知',
248
- content: '嗨!歡迎加入 @{{app_name}},請輸入驗證碼「 @{{code}} 」。請於一分鐘內輸入並完成驗證。',
249
- toggle: true,
250
- },
251
- {
252
- tag: 'auto-email-forget',
253
- tag_name: '忘記密碼',
254
- name: '@{{app_name}}',
255
- title: '[@{{app_name}}] 重設密碼',
256
- content: '[@{{app_name}}],請輸入驗證碼「 @{{code}} 」。請於一分鐘內輸入並完成驗證。',
257
- toggle: true,
258
- },
259
- {
260
- tag: 'get-customer-message',
261
- tag_name: '客服訊息',
262
- name: '@{{app_name}}',
263
- title: '[@{{app_name}}] 收到客服訊息',
264
- content: this.getCustomerMessageHTML(),
265
- toggle: true,
266
- },
267
- ];
268
- const keyData = await new User(app).getConfigV2({
269
- key: tag,
270
- user_id: 'manager',
271
- });
272
- const appData = await new User(app).getConfigV2({
273
- key: 'store-information',
274
- user_id: 'manager',
275
- });
276
- const b = dataList.find((dd: any) => {
277
- return dd.tag === tag;
278
- })!;
279
- if (b) {
280
- if (keyData) {
281
- const c = keyData[language] || keyData;
282
- b.title = c.title || b.title;
283
- b.toggle = keyData.toggle ?? true;
284
- b.content = c.content || b.content;
285
- b.name = c.name || b.name;
286
- b.updated_time = new Date(keyData.updated_time);
287
- }
288
- Object.keys(b).map((dd) => {
289
- if (typeof b[dd] === 'string') {
290
- b[dd] = b[dd].replace(/@\{\{app_name\}\}/g, (appData && appData.shop_name) || '商店名稱');
291
- }
292
- });
293
- return b;
195
+ {
196
+ tag: 'auto-email-order-cancel-false',
197
+ tag_name: '取消訂單失敗',
198
+ name: '@{{app_name}}',
199
+ title: '[@{{app_name}}] 取消訂單申請 #@{{訂單號碼}} 已失敗',
200
+ content: '[@{{app_name}}] 取消訂單申請 #@{{訂單號碼}} 已失敗',
201
+ toggle: true,
202
+ },
203
+ {
204
+ tag: 'auto-email-birthday',
205
+ tag_name: '生日祝福',
206
+ name: '@{{app_name}}',
207
+ title: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
208
+ content: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
209
+ toggle: true,
210
+ },
211
+ {
212
+ tag: 'auto-sns-birthday',
213
+ tag_name: '簡訊通知生日祝福',
214
+ name: '@{{app_name}}',
215
+ title: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
216
+ content: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
217
+ toggle: true,
218
+ },
219
+ {
220
+ tag: 'auto-line-birthday',
221
+ tag_name: 'line訊息通知生日祝福',
222
+ name: '@{{app_name}}',
223
+ title: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
224
+ content: '[@{{app_name}}] [@{{user_name}}] 今天是您一年一度的大日子!祝您生日快樂!',
225
+ toggle: true,
226
+ },
227
+ {
228
+ tag: 'auto-email-welcome',
229
+ tag_name: '歡迎信件',
230
+ name: '@{{app_name}}',
231
+ title: '[@{{app_name}}] 歡迎您加入@{{app_name}}! 最豐富的選品商店',
232
+ content: '[@{{app_name}}] 歡迎您加入@{{app_name}}! 最豐富的選品商店',
233
+ toggle: true,
234
+ },
235
+ {
236
+ tag: 'auto-email-verify',
237
+ tag_name: '信箱驗證',
238
+ name: '@{{app_name}}',
239
+ title: '[@{{app_name}}] 帳號認證通知',
240
+ content: '嗨!歡迎加入 @{{app_name}},請輸入驗證碼「 @{{code}} 」。請於一分鐘內輸入並完成驗證。',
241
+ toggle: true,
242
+ },
243
+ {
244
+ tag: 'auto-email-verify-update',
245
+ tag_name: '信箱驗證',
246
+ name: '@{{app_name}}',
247
+ title: '[@{{app_name}}] 信箱認證通知',
248
+ content: '請輸入驗證碼「 @{{code}} 」。請於五分鐘內輸入並完成驗證。',
249
+ toggle: true,
250
+ },
251
+ {
252
+ tag: 'auto-phone-verify-update',
253
+ tag_name: '電話認證',
254
+ name: '@{{app_name}}',
255
+ title: '[@{{app_name}}] 帳號認證通知',
256
+ content: '請輸入驗證碼「 @{{code}} 」。請於五分鐘內輸入並完成驗證。',
257
+ toggle: true,
258
+ },
259
+ {
260
+ tag: 'auto-phone-verify',
261
+ tag_name: '電話認證',
262
+ name: '@{{app_name}}',
263
+ title: '[@{{app_name}}] 帳號認證通知',
264
+ content: '嗨!歡迎加入 @{{app_name}},請輸入驗證碼「 @{{code}} 」。請於一分鐘內輸入並完成驗證。',
265
+ toggle: true,
266
+ },
267
+ {
268
+ tag: 'auto-email-forget',
269
+ tag_name: '忘記密碼',
270
+ name: '@{{app_name}}',
271
+ title: '[@{{app_name}}] 重設密碼',
272
+ content: '[@{{app_name}}],請輸入驗證碼「 @{{code}} 」。請於一分鐘內輸入並完成驗證。',
273
+ toggle: true,
274
+ },
275
+ {
276
+ tag: 'get-customer-message',
277
+ tag_name: '客服訊息',
278
+ name: '@{{app_name}}',
279
+ title: '[@{{app_name}}] 收到客服訊息',
280
+ content: this.getCustomerMessageHTML(),
281
+ toggle: true,
282
+ },
283
+ ];
284
+ const keyData = await new User(app).getConfigV2({
285
+ key: tag,
286
+ user_id: 'manager',
287
+ });
288
+ const appData = await new User(app).getConfigV2({
289
+ key: 'store-information',
290
+ user_id: 'manager',
291
+ });
292
+ const b = dataList.find((dd: any) => {
293
+ return dd.tag === tag;
294
+ })!;
295
+ if (b) {
296
+ if (keyData) {
297
+ const c = keyData[language] || keyData;
298
+ b.title = c.title || b.title;
299
+ b.toggle = keyData.toggle ?? true;
300
+ b.content = c.content || b.content;
301
+ b.name = c.name || b.name;
302
+ b.updated_time = new Date(keyData.updated_time);
303
+ }
304
+ Object.keys(b).map(dd => {
305
+ if (typeof b[dd] === 'string') {
306
+ b[dd] = b[dd].replace(/@\{\{app_name\}\}/g, (appData && appData.shop_name) || '商店名稱');
294
307
  }
295
- return {};
308
+ });
309
+ return b;
296
310
  }
311
+ return {};
312
+ }
297
313
 
298
- public static getCustomerMessageHTML() {
299
- const html = String.raw;
300
- return html` <table
301
- width="100%"
302
- border="0"
303
- cellpadding="0"
304
- cellspacing="0"
305
- style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; color: rgb(65, 65, 65); font-family: sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);"
306
- id="isPasted"
314
+ public static getCustomerMessageHTML() {
315
+ const html = String.raw;
316
+ return html` <table
317
+ width="100%"
318
+ border="0"
319
+ cellpadding="0"
320
+ cellspacing="0"
321
+ style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; color: rgb(65, 65, 65); font-family: sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);"
322
+ id="isPasted"
323
+ >
324
+ <tbody
325
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
326
+ >
327
+ <tr
328
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
307
329
  >
308
- <tbody style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
309
- <tr style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
310
- <td style="box-sizing: border-box; border: 0px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px;">
311
- <table
312
- align="center"
313
- width="100%"
314
- border="0"
315
- cellpadding="0"
316
- cellspacing="0"
317
- style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; display: flex; flex-wrap: wrap; margin-top: calc(-1 * var(--bs-gutter-y)); margin-right: calc(-0.5 * var(--bs-gutter-x)); margin-left: calc(-0.5 * var(--bs-gutter-x)); border: none; empty-cells: show; max-width: 100%;"
330
+ <td
331
+ style="box-sizing: border-box; border: 0px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px;"
332
+ >
333
+ <table
334
+ align="center"
335
+ width="100%"
336
+ border="0"
337
+ cellpadding="0"
338
+ cellspacing="0"
339
+ style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; display: flex; flex-wrap: wrap; margin-top: calc(-1 * var(--bs-gutter-y)); margin-right: calc(-0.5 * var(--bs-gutter-x)); margin-left: calc(-0.5 * var(--bs-gutter-x)); border: none; empty-cells: show; max-width: 100%;"
340
+ >
341
+ <tbody
342
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased; flex-shrink: 0; width: 1055.59px; max-width: 100%; padding-right: calc(var(--bs-gutter-x) * 0.5); padding-left: calc(var(--bs-gutter-x) * 0.5); margin-top: var(--bs-gutter-y);"
343
+ >
344
+ <tr
345
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
346
+ >
347
+ <td
348
+ style="box-sizing: border-box; border: 0px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px;"
349
+ >
350
+ <table
351
+ align="center"
352
+ border="0"
353
+ cellpadding="0"
354
+ cellspacing="0"
355
+ width="600"
356
+ style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; color: rgb(0, 0, 0); width: 600px; margin: 0px auto;"
357
+ >
358
+ <tbody
359
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
360
+ >
361
+ <tr
362
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
318
363
  >
319
- <tbody
320
- style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased; flex-shrink: 0; width: 1055.59px; max-width: 100%; padding-right: calc(var(--bs-gutter-x) * 0.5); padding-left: calc(var(--bs-gutter-x) * 0.5); margin-top: var(--bs-gutter-y);"
364
+ <td
365
+ width="100%"
366
+ style="box-sizing: border-box; border: 0px; -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; font-weight: 400; text-align: left; padding-bottom: 5px; padding-top: 5px; vertical-align: top;"
367
+ >
368
+ <table
369
+ width="100%"
370
+ border="0"
371
+ cellpadding="0"
372
+ cellspacing="0"
373
+ style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%;"
321
374
  >
322
- <tr style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
323
- <td style="box-sizing: border-box; border: 0px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px;">
324
- <table
325
- align="center"
326
- border="0"
327
- cellpadding="0"
328
- cellspacing="0"
329
- width="600"
330
- style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; color: rgb(0, 0, 0); width: 600px; margin: 0px auto;"
331
- >
332
- <tbody style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
333
- <tr style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
334
- <td
335
- width="100%"
336
- style="box-sizing: border-box; border: 0px; -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; font-weight: 400; text-align: left; padding-bottom: 5px; padding-top: 5px; vertical-align: top;"
337
- >
338
- <table
339
- width="100%"
340
- border="0"
341
- cellpadding="0"
342
- cellspacing="0"
343
- style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%;"
344
- >
345
- <tbody style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
346
- <tr style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
347
- <td
348
- style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; width: 599px;"
349
- >
350
- <div align="center" style="box-sizing: border-box; -webkit-font-smoothing: antialiased; line-height: 10px;">
351
- <div style="box-sizing: border-box; -webkit-font-smoothing: antialiased; max-width: 600px;">
352
- <img
353
- src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1719903595261-s3s4scs3s7sfsfs7.png"
354
- class="fr-fic fr-dii"
355
- style="width: 100%;"
356
- />
357
- <br />
358
- </div>
359
- </div>
360
- </td>
361
- </tr>
362
- </tbody>
363
- </table>
375
+ <tbody
376
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
377
+ >
378
+ <tr
379
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
380
+ >
381
+ <td
382
+ style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; width: 599px;"
383
+ >
384
+ <div
385
+ align="center"
386
+ style="box-sizing: border-box; -webkit-font-smoothing: antialiased; line-height: 10px;"
387
+ >
388
+ <div
389
+ style="box-sizing: border-box; -webkit-font-smoothing: antialiased; max-width: 600px;"
390
+ >
391
+ <img
392
+ src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1719903595261-s3s4scs3s7sfsfs7.png"
393
+ class="fr-fic fr-dii"
394
+ style="width: 100%;"
395
+ />
396
+ <br />
397
+ </div>
398
+ </div>
399
+ </td>
400
+ </tr>
401
+ </tbody>
402
+ </table>
364
403
 
365
- <table
366
- width="100%"
367
- border="0"
368
- cellpadding="0"
369
- cellspacing="0"
370
- style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%;"
371
- >
372
- <tbody style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
373
- <tr style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
374
- <td
375
- style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; padding: 60px 45px 30px; text-align: left; width: 599px;"
376
- >
377
- <h1
378
- style="box-sizing: border-box; margin: 0px; font-weight: 700; line-height: 33.6px; color: rgb(54, 54, 54); font-size: 28px; -webkit-font-smoothing: antialiased; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; direction: ltr; font-family: Arial, Helvetica, sans-serif; text-align: left;"
379
- id="isPasted"
380
- >
381
- 客服訊息
382
- </h1>
383
- <br />
384
- <div style="width: 100%;text-align: start;">@{{text}}</div>
385
- <br />
386
- <br /><span
387
- style="color: rgb(16, 17, 18); font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"
388
- ><a
389
- href="@{{link}}"
390
- target="_blank"
391
- style="box-sizing: border-box; color: rgb(255, 255, 255); text-decoration: none; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 148, 2); border-width: 0px; border-style: solid; border-color: transparent; border-radius: 5px; display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 24px; padding-bottom: 15px; padding-top: 15px; text-align: center; width: auto; word-break: keep-all;"
392
- id="isPasted"
393
- ><span
394
- style="box-sizing: border-box; -webkit-font-smoothing: antialiased; padding-left: 30px; padding-right: 30px; font-size: 24px; display: inline-block; letter-spacing: normal;"
395
- ><span
396
- style="box-sizing: border-box; -webkit-font-smoothing: antialiased; word-break: break-word; line-height: 48px;"
397
- ><strong style="box-sizing: border-box; font-weight: 700; -webkit-font-smoothing: antialiased;"
398
- >前往商店</strong
399
- ></span
400
- ></span
401
- ></a
402
- ></span
403
- >
404
- <br />
405
- </td>
406
- </tr>
407
- </tbody>
408
- </table>
404
+ <table
405
+ width="100%"
406
+ border="0"
407
+ cellpadding="0"
408
+ cellspacing="0"
409
+ style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%;"
410
+ >
411
+ <tbody
412
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
413
+ >
414
+ <tr
415
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
416
+ >
417
+ <td
418
+ style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; padding: 60px 45px 30px; text-align: left; width: 599px;"
419
+ >
420
+ <h1
421
+ style="box-sizing: border-box; margin: 0px; font-weight: 700; line-height: 33.6px; color: rgb(54, 54, 54); font-size: 28px; -webkit-font-smoothing: antialiased; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; direction: ltr; font-family: Arial, Helvetica, sans-serif; text-align: left;"
422
+ id="isPasted"
423
+ >
424
+ 客服訊息
425
+ </h1>
426
+ <br />
427
+ <div style="width: 100%;text-align: start;">@{{text}}</div>
428
+ <br />
429
+ <br /><span
430
+ style="color: rgb(16, 17, 18); font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"
431
+ ><a
432
+ href="@{{link}}"
433
+ target="_blank"
434
+ style="box-sizing: border-box; color: rgb(255, 255, 255); text-decoration: none; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 148, 2); border-width: 0px; border-style: solid; border-color: transparent; border-radius: 5px; display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 24px; padding-bottom: 15px; padding-top: 15px; text-align: center; width: auto; word-break: keep-all;"
435
+ id="isPasted"
436
+ ><span
437
+ style="box-sizing: border-box; -webkit-font-smoothing: antialiased; padding-left: 30px; padding-right: 30px; font-size: 24px; display: inline-block; letter-spacing: normal;"
438
+ ><span
439
+ style="box-sizing: border-box; -webkit-font-smoothing: antialiased; word-break: break-word; line-height: 48px;"
440
+ ><strong
441
+ style="box-sizing: border-box; font-weight: 700; -webkit-font-smoothing: antialiased;"
442
+ >前往商店</strong
443
+ ></span
444
+ ></span
445
+ ></a
446
+ ></span
447
+ >
448
+ <br />
449
+ </td>
450
+ </tr>
451
+ </tbody>
452
+ </table>
409
453
 
410
- <table
411
- width="100%"
412
- border="0"
413
- cellpadding="0"
414
- cellspacing="0"
415
- style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; word-break: break-word; background-color: rgb(247, 247, 247);"
416
- >
417
- <tbody style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
418
- <tr style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
419
- <td
420
- style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; padding: 28px 45px 10px;"
421
- >
422
- <div
423
- style="box-sizing: border-box; -webkit-font-smoothing: antialiased; color: rgb(16, 17, 18); direction: ltr; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 400; letter-spacing: 0px; line-height: 19.2px; text-align: left;"
424
- >
425
- <p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;">
426
- 如果您有任何疑問或需要幫助,我們的團隊隨時在這裡為您提供支持。
427
- </p>
454
+ <table
455
+ width="100%"
456
+ border="0"
457
+ cellpadding="0"
458
+ cellspacing="0"
459
+ style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; word-break: break-word; background-color: rgb(247, 247, 247);"
460
+ >
461
+ <tbody
462
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
463
+ >
464
+ <tr
465
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
466
+ >
467
+ <td
468
+ style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; padding: 28px 45px 10px;"
469
+ >
470
+ <div
471
+ style="box-sizing: border-box; -webkit-font-smoothing: antialiased; color: rgb(16, 17, 18); direction: ltr; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 400; letter-spacing: 0px; line-height: 19.2px; text-align: left;"
472
+ >
473
+ <p
474
+ style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;"
475
+ >
476
+ 如果您有任何疑問或需要幫助,我們的團隊隨時在這裡為您提供支持。
477
+ </p>
428
478
 
429
- <p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;">
430
- 服務電話:+886 978-028-730
431
- </p>
479
+ <p
480
+ style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;"
481
+ >
482
+ 服務電話:+886 978-028-730
483
+ </p>
432
484
 
433
- <p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;">
434
- 電子郵件:mk@ncdesign.info
435
- </p>
436
- </div>
437
- </td>
438
- </tr>
439
- </tbody>
440
- </table>
485
+ <p
486
+ style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;"
487
+ >
488
+ 電子郵件:mk@ncdesign.info
489
+ </p>
490
+ </div>
491
+ </td>
492
+ </tr>
493
+ </tbody>
494
+ </table>
441
495
 
442
- <table
443
- width="100%"
444
- border="0"
445
- cellpadding="0"
446
- cellspacing="0"
447
- style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; word-break: break-word; background-color: rgb(247, 247, 247);"
448
- >
449
- <tbody style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
450
- <tr style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;">
451
- <td
452
- style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; padding: 20px 10px 10px;"
453
- >
454
- <div
455
- style="box-sizing: border-box; -webkit-font-smoothing: antialiased; color: rgb(16, 17, 18); direction: ltr; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 400; letter-spacing: 0px; line-height: 16.8px; text-align: center;"
456
- >
457
- <p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;">
458
- <a
459
- href="https://shopnex.tw/?article=termsofservice&page=blog_detail"
460
- target="_blank"
461
- rel="noopener"
462
- style="box-sizing: border-box; color: rgb(28, 28, 28); text-decoration: underline; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto;"
463
- >服務條款</a
464
- >&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
465
- <a
466
- href="https://shopnex.tw/?article=privacyterms&page=blog_detail"
467
- target="_blank"
468
- rel="noopener"
469
- style="box-sizing: border-box; color: rgb(28, 28, 28); text-decoration: underline; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto;"
470
- >隱私條款</a
471
- >&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
472
- <a
473
- href="https://shopnex.tw/?article=privacyterms&page=e-commerce-blog"
474
- target="_blank"
475
- rel="noopener"
476
- style="box-sizing: border-box; color: rgb(28, 28, 28); text-decoration: underline; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto;"
477
- >開店教學</a
478
- >
479
- </p>
480
- </div>
481
- </td>
482
- </tr>
483
- </tbody>
484
- </table>
485
- </td>
486
- </tr>
487
- </tbody>
488
- </table>
489
- </td>
496
+ <table
497
+ width="100%"
498
+ border="0"
499
+ cellpadding="0"
500
+ cellspacing="0"
501
+ style="box-sizing: border-box; caption-side: bottom; border-collapse: collapse; -webkit-font-smoothing: antialiased; border: none; empty-cells: show; max-width: 100%; word-break: break-word; background-color: rgb(247, 247, 247);"
502
+ >
503
+ <tbody
504
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
505
+ >
506
+ <tr
507
+ style="box-sizing: border-box; border-color: inherit; border-style: solid; border-width: 0px; -webkit-font-smoothing: antialiased;"
508
+ >
509
+ <td
510
+ style="box-sizing: border-box; border: 1px solid rgb(221, 221, 221); -webkit-font-smoothing: antialiased; user-select: text; min-width: 5px; padding: 20px 10px 10px;"
511
+ >
512
+ <div
513
+ style="box-sizing: border-box; -webkit-font-smoothing: antialiased; color: rgb(16, 17, 18); direction: ltr; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 400; letter-spacing: 0px; line-height: 16.8px; text-align: center;"
514
+ >
515
+ <p
516
+ style="box-sizing: border-box; margin-top: 0px; margin-bottom: 1.25rem; -webkit-font-smoothing: antialiased;"
517
+ >
518
+ <a
519
+ href="https://shopnex.tw/?article=termsofservice&page=blog_detail"
520
+ target="_blank"
521
+ rel="noopener"
522
+ style="box-sizing: border-box; color: rgb(28, 28, 28); text-decoration: underline; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto;"
523
+ >服務條款</a
524
+ >&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
525
+ <a
526
+ href="https://shopnex.tw/?article=privacyterms&page=blog_detail"
527
+ target="_blank"
528
+ rel="noopener"
529
+ style="box-sizing: border-box; color: rgb(28, 28, 28); text-decoration: underline; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto;"
530
+ >隱私條款</a
531
+ >&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
532
+ <a
533
+ href="https://shopnex.tw/?article=privacyterms&page=e-commerce-blog"
534
+ target="_blank"
535
+ rel="noopener"
536
+ style="box-sizing: border-box; color: rgb(28, 28, 28); text-decoration: underline; -webkit-font-smoothing: antialiased; transition: color 0.2s ease-in-out 0s; user-select: auto;"
537
+ >開店教學</a
538
+ >
539
+ </p>
540
+ </div>
541
+ </td>
490
542
  </tr>
491
- </tbody>
492
- </table>
493
- </td>
543
+ </tbody>
544
+ </table>
545
+ </td>
546
+ </tr>
547
+ </tbody>
548
+ </table>
549
+ </td>
494
550
  </tr>
495
- </tbody>
496
- </table>`;
497
- }
551
+ </tbody>
552
+ </table>
553
+ </td>
554
+ </tr>
555
+ </tbody>
556
+ </table>`;
557
+ }
498
558
 
499
- public static async customerOrder(app: string, tag: string, order_id: string, email: string, language: string) {
500
- try {
501
- const customerMail = await this.getDefCompare(app, tag, language);
502
- const brandAndMemberType = await App.checkBrandAndMemberType(app);
503
- const order = await db.query(
504
- `SELECT * FROM \`${app}\`.t_checkout WHERE cart_token = ?
559
+ public static async customerOrder(app: string, tag: string, order_id: string, email: string, language: string) {
560
+ try {
561
+ const customerMail = await this.getDefCompare(app, tag, language);
562
+ const brandAndMemberType = await App.checkBrandAndMemberType(app);
563
+ const order = await db.query(
564
+ `SELECT * FROM \`${app}\`.t_checkout WHERE cart_token = ?
505
565
  `,
506
- [order_id]
507
- );
508
- if (order[0]) {
509
- const order_data = order[0]['orderData'];
510
- if (customerMail.toggle) {
511
- await new Mail(app).postMail({
512
- name: customerMail.name,
513
- title: customerMail.title.replace(/@\{\{訂單號碼\}\}/g, order_id),
514
- content: customerMail.content
515
- .replace(/@\{\{訂單號碼\}\}/g, `<a href="https://${brandAndMemberType.domain}/order_detail?cart_token=${order_id}">${order_id}</a>`)
516
- .replace(/@\{\{訂單金額\}\}/g, order_data.total)
517
- .replace(/@\{\{姓名\}\}/g, order_data.customer_info.name ?? '')
518
- .replace(/@\{\{電話\}\}/g, order_data.customer_info.phone ?? '')
519
- .replace(/@\{\{地址\}\}/g, order_data.user_info.address ?? '')
520
- .replace(/@\{\{信箱\}\}/g, order_data.customer_info.email ?? ''),
521
- email: [email],
522
- type: tag,
523
- });
524
- }
525
- }
526
- } catch (error) {
527
- console.error(error);
528
- throw exception.BadRequestError('BAD_REQUEST', 'customerOrder Error:' + error, null);
566
+ [order_id]
567
+ );
568
+ if (order[0]) {
569
+ const order_data = order[0]['orderData'];
570
+ if (customerMail.toggle) {
571
+ await new Mail(app).postMail({
572
+ name: customerMail.name,
573
+ title: customerMail.title.replace(/@\{\{訂單號碼\}\}/g, order_id),
574
+ content: customerMail.content
575
+ .replace(
576
+ /@\{\{訂單號碼\}\}/g,
577
+ `<a href="https://${brandAndMemberType.domain}/order_detail?cart_token=${order_id}">${order_id}</a>`
578
+ )
579
+ .replace(/@\{\{訂單金額\}\}/g, order_data.total)
580
+ .replace(/@\{\{姓名\}\}/g, order_data.customer_info.name ?? '')
581
+ .replace(/@\{\{電話\}\}/g, order_data.customer_info.phone ?? '')
582
+ .replace(/@\{\{地址\}\}/g, order_data.user_info.address ?? '')
583
+ .replace(/@\{\{信箱\}\}/g, order_data.customer_info.email ?? ''),
584
+ email: [email],
585
+ type: tag,
586
+ });
529
587
  }
588
+ }
589
+ } catch (error) {
590
+ console.error(error);
591
+ throw exception.BadRequestError('BAD_REQUEST', 'customerOrder Error:' + error, null);
530
592
  }
593
+ }
531
594
  }