@dcloudio/uni-quickapp-webview 2.0.1-alpha-35220220719002 → 2.0.1-alpha-35320220727002

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 (2) hide show
  1. package/dist/index.js +12 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1187,12 +1187,18 @@ function invokePushCallback (
1187
1187
  cidErrMsg = args.errMsg;
1188
1188
  invokeGetPushCidCallbacks(cid, args.errMsg);
1189
1189
  } else if (args.type === 'pushMsg') {
1190
- onPushMessageCallbacks.forEach((callback) => {
1191
- callback({
1192
- type: 'receive',
1193
- data: normalizePushMessage(args.message)
1194
- });
1195
- });
1190
+ const message = {
1191
+ type: 'receive',
1192
+ data: normalizePushMessage(args.message)
1193
+ };
1194
+ for (let i = 0; i < onPushMessageCallbacks.length; i++) {
1195
+ const callback = onPushMessageCallbacks[i];
1196
+ callback(message);
1197
+ // 该消息已被阻止
1198
+ if (message.stopped) {
1199
+ break
1200
+ }
1201
+ }
1196
1202
  } else if (args.type === 'click') {
1197
1203
  onPushMessageCallbacks.forEach((callback) => {
1198
1204
  callback({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-quickapp-webview",
3
- "version": "2.0.1-alpha-35220220719002",
3
+ "version": "2.0.1-alpha-35320220727002",
4
4
  "description": "uni-app quickapp-webview",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -17,5 +17,5 @@
17
17
  "name": "quickapp-webview",
18
18
  "title": "快应用(Webview)版"
19
19
  },
20
- "gitHead": "6f2fdbfa632fd7b9da6cbdf4faea5ac863f0eb67"
20
+ "gitHead": "91c99b6c5328a5844d3f7a75637675d681ec5695"
21
21
  }