ts-glitter 22.0.1 → 22.0.3

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 (54) hide show
  1. package/lowcode/Entry.js +1 -1
  2. package/lowcode/Entry.ts +2 -2
  3. package/lowcode/backend-manager/bg-blog.js +19 -5
  4. package/lowcode/backend-manager/bg-blog.ts +20 -5
  5. package/lowcode/backend-manager/bg-line.js +2 -2
  6. package/lowcode/backend-manager/bg-line.ts +2 -2
  7. package/lowcode/backend-manager/bg-notify.js +10 -3
  8. package/lowcode/backend-manager/bg-notify.ts +10 -3
  9. package/lowcode/backend-manager/bg-sns.js +3 -3
  10. package/lowcode/backend-manager/bg-sns.ts +3 -3
  11. package/lowcode/backend-manager/bg-widget.js +77 -75
  12. package/lowcode/backend-manager/bg-widget.ts +121 -97
  13. package/lowcode/cms-plugin/auto-fcm-advertise.js +2 -2
  14. package/lowcode/cms-plugin/auto-fcm-advertise.ts +2 -2
  15. package/lowcode/cms-plugin/auto-fcm-history.js +2 -2
  16. package/lowcode/cms-plugin/auto-fcm-history.ts +2 -2
  17. package/lowcode/cms-plugin/menus-setting.js +2 -2
  18. package/lowcode/cms-plugin/menus-setting.ts +2 -4
  19. package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -7
  20. package/lowcode/cms-plugin/pos-pages/payment-page.ts +17 -11
  21. package/lowcode/cms-plugin/shopping-discount-setting.js +1 -1
  22. package/lowcode/cms-plugin/shopping-discount-setting.ts +1 -1
  23. package/lowcode/cms-plugin/shopping-finance-setting.js +23 -10
  24. package/lowcode/cms-plugin/shopping-finance-setting.ts +282 -269
  25. package/lowcode/cms-plugin/shopping-order-manager.js +1 -1
  26. package/lowcode/cms-plugin/shopping-order-manager.ts +1 -1
  27. package/lowcode/cms-plugin/shopping-rebate.js +1 -1
  28. package/lowcode/cms-plugin/shopping-rebate.ts +1 -1
  29. package/lowcode/cms-plugin/shopping-setting-basic.js +36 -8
  30. package/lowcode/cms-plugin/shopping-setting-basic.ts +36 -8
  31. package/lowcode/glitter-base/route/shopping.js +16 -9
  32. package/lowcode/glitter-base/route/shopping.ts +16 -10
  33. package/lowcode/glitter-base/route/user.js +19 -9
  34. package/lowcode/glitter-base/route/user.ts +21 -10
  35. package/lowcode/glitterBundle/plugins/editor-elem.js +1 -5
  36. package/lowcode/glitterBundle/plugins/editor-elem.ts +1 -5
  37. package/package.json +1 -1
  38. package/src/api-public/services/checkout-event.js +17 -7
  39. package/src/api-public/services/checkout-event.js.map +1 -1
  40. package/src/api-public/services/line-message.js +122 -138
  41. package/src/api-public/services/line-message.js.map +1 -1
  42. package/src/api-public/services/line-message.ts +1134 -1130
  43. package/src/api-public/services/shopping.js +13 -6
  44. package/src/api-public/services/shopping.js.map +1 -1
  45. package/src/api-public/services/shopping.ts +13 -7
  46. package/src/api-public/services/strategies/ecpay-strategy.js +0 -1
  47. package/src/api-public/services/strategies/ecpay-strategy.js.map +1 -1
  48. package/src/api-public/services/strategies/ecpay-strategy.ts +3 -4
  49. package/src/api-public/services/strategies/ezpay-strategy.js +0 -1
  50. package/src/api-public/services/strategies/ezpay-strategy.js.map +1 -1
  51. package/src/api-public/services/strategies/ezpay-strategy.ts +4 -7
  52. package/src/modules/firebase.js +0 -4
  53. package/src/modules/firebase.js.map +1 -1
  54. package/src/modules/firebase.ts +5 -12
@@ -1137,10 +1137,19 @@ class Shopping {
1137
1137
  axios_1.default
1138
1138
  .request(config)
1139
1139
  .then((response) => {
1140
- resolve(response.data.returnCode === '0000');
1140
+ if (response.data.returnCode === '0000') {
1141
+ resolve(true);
1142
+ }
1143
+ else {
1144
+ console.error(`line_pay_error:`, response);
1145
+ console.error(`line_pay_error_config:`, config);
1146
+ resolve(false);
1147
+ }
1141
1148
  })
1142
1149
  .catch((error) => {
1143
1150
  resolve(false);
1151
+ console.error(`line_pay_error:`, error);
1152
+ console.error(`line_pay_error_config:`, config);
1144
1153
  });
1145
1154
  });
1146
1155
  }
@@ -2134,11 +2143,9 @@ class Shopping {
2134
2143
  await this.calcSoldOutStock(item.count * -1, item.id, item.spec);
2135
2144
  });
2136
2145
  }
2137
- const emailList = new Set([origin.orderData.customer_info, origin.orderData.user_info].map(user => user === null || user === void 0 ? void 0 : user.email));
2138
- for (const email of emailList) {
2139
- if (email) {
2140
- await this.sendNotifications(orderData, 'order-cancel-success');
2141
- }
2146
+ const hasEamil = [origin.orderData.customer_info, origin.orderData.user_info].some(user => Boolean(user === null || user === void 0 ? void 0 : user.email));
2147
+ if (hasEamil) {
2148
+ await this.sendNotifications(orderData, 'order-cancel-success');
2142
2149
  }
2143
2150
  const useRecord = await rebateClass.getRebateListByRow({
2144
2151
  search: '',