ts-glitter 22.0.0 → 22.0.2
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.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +2 -2
- package/lowcode/backend-manager/bg-blog.js +19 -5
- package/lowcode/backend-manager/bg-blog.ts +20 -5
- package/lowcode/backend-manager/bg-line.js +2 -2
- package/lowcode/backend-manager/bg-line.ts +2 -2
- package/lowcode/backend-manager/bg-notify.js +10 -3
- package/lowcode/backend-manager/bg-notify.ts +10 -3
- package/lowcode/backend-manager/bg-sns.js +3 -3
- package/lowcode/backend-manager/bg-sns.ts +3 -3
- package/lowcode/backend-manager/bg-widget.js +77 -75
- package/lowcode/backend-manager/bg-widget.ts +121 -97
- package/lowcode/cms-plugin/auto-fcm-advertise.js +2 -2
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +2 -2
- package/lowcode/cms-plugin/auto-fcm-history.js +2 -2
- package/lowcode/cms-plugin/auto-fcm-history.ts +2 -2
- package/lowcode/cms-plugin/menus-setting.js +2 -2
- package/lowcode/cms-plugin/menus-setting.ts +2 -4
- package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -7
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +17 -11
- package/lowcode/cms-plugin/shopping-discount-setting.js +1 -1
- package/lowcode/cms-plugin/shopping-discount-setting.ts +1 -1
- package/lowcode/cms-plugin/shopping-finance-setting.js +23 -10
- package/lowcode/cms-plugin/shopping-finance-setting.ts +282 -269
- package/lowcode/cms-plugin/shopping-order-manager.js +1 -1
- package/lowcode/cms-plugin/shopping-order-manager.ts +1 -1
- package/lowcode/cms-plugin/shopping-rebate.js +1 -1
- package/lowcode/cms-plugin/shopping-rebate.ts +1 -1
- package/lowcode/cms-plugin/shopping-setting-basic.js +36 -8
- package/lowcode/cms-plugin/shopping-setting-basic.ts +36 -8
- package/lowcode/glitter-base/route/shopping.js +16 -9
- package/lowcode/glitter-base/route/shopping.ts +16 -10
- package/lowcode/glitter-base/route/user.js +33 -9
- package/lowcode/glitter-base/route/user.ts +21 -10
- package/lowcode/glitterBundle/plugins/editor-elem.js +1 -5
- package/lowcode/glitterBundle/plugins/editor-elem.ts +1 -5
- package/lowcode/public-components/public/ad.js +2 -2
- package/package.json +1 -1
- package/src/api-public/services/checkout-event.js +17 -7
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/line-message.js +122 -138
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/line-message.ts +1134 -1130
- package/src/api-public/services/shopping.js +3 -5
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +4 -6
- package/src/api-public/services/strategies/ecpay-strategy.js +0 -1
- package/src/api-public/services/strategies/ecpay-strategy.js.map +1 -1
- package/src/api-public/services/strategies/ecpay-strategy.ts +3 -4
- package/src/api-public/services/strategies/ezpay-strategy.js +0 -1
- package/src/api-public/services/strategies/ezpay-strategy.js.map +1 -1
- package/src/api-public/services/strategies/ezpay-strategy.ts +4 -7
- package/src/api-public/services/user.js +10 -43
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +26 -34
- package/src/modules/firebase.js +0 -4
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +5 -12
package/src/modules/firebase.ts
CHANGED
|
@@ -74,7 +74,6 @@ export class Firebase {
|
|
|
74
74
|
app?: string;
|
|
75
75
|
pass_store?: boolean;
|
|
76
76
|
}) {
|
|
77
|
-
console.log('sendMessage', cf);
|
|
78
77
|
cf.body = cf.body.replace(/<br\s*\/?>/gi, '\n');
|
|
79
78
|
if (cf.userID) {
|
|
80
79
|
WebSocket.noticeChangeMem[cf.userID] &&
|
|
@@ -96,12 +95,6 @@ export class Firebase {
|
|
|
96
95
|
).map((dd: any) => {
|
|
97
96
|
return dd.deviceToken;
|
|
98
97
|
});
|
|
99
|
-
console.log(
|
|
100
|
-
`sendMessage:${cf.userID}`,
|
|
101
|
-
`SELECT deviceToken
|
|
102
|
-
FROM \`${cf.app || this.app}\`.t_fcm
|
|
103
|
-
where userID = ${db.escape(cf.userID)};`
|
|
104
|
-
);
|
|
105
98
|
const user_cf = (
|
|
106
99
|
(
|
|
107
100
|
await db.query(
|
|
@@ -130,8 +123,8 @@ export class Firebase {
|
|
|
130
123
|
cf.token = [cf.token];
|
|
131
124
|
}
|
|
132
125
|
if (Array.isArray(cf.token)) {
|
|
133
|
-
let error_token:string[]=[]
|
|
134
|
-
await
|
|
126
|
+
let error_token: string[] = [];
|
|
127
|
+
await Promise.all(
|
|
135
128
|
cf.token.map(token => {
|
|
136
129
|
return new Promise(async (resolve, reject) => {
|
|
137
130
|
try {
|
|
@@ -168,7 +161,7 @@ export class Firebase {
|
|
|
168
161
|
})
|
|
169
162
|
.catch((error: any) => {
|
|
170
163
|
if (error.errorInfo.code === 'messaging/registration-token-not-registered') {
|
|
171
|
-
error_token.push(token)
|
|
164
|
+
error_token.push(token);
|
|
172
165
|
}
|
|
173
166
|
resolve(true);
|
|
174
167
|
});
|
|
@@ -179,11 +172,11 @@ export class Firebase {
|
|
|
179
172
|
});
|
|
180
173
|
})
|
|
181
174
|
);
|
|
182
|
-
if(error_token.length>0){
|
|
175
|
+
if (error_token.length > 0) {
|
|
183
176
|
await db.query(
|
|
184
177
|
`delete
|
|
185
178
|
FROM \`${cf.app || this.app}\`.t_fcm
|
|
186
|
-
where userID = ? and deviceToken in (${error_token.map(d=>db.escape(d)).join(',')});`,
|
|
179
|
+
where userID = ? and deviceToken in (${error_token.map(d => db.escape(d)).join(',')});`,
|
|
187
180
|
[cf.userID]
|
|
188
181
|
);
|
|
189
182
|
}
|