syttunnel 0.1.3-0 → 0.1.5-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.
@@ -9,6 +9,9 @@ interface IPayByWeChatParams {
9
9
  interface IPayByAliParams {
10
10
  orderStr: string;
11
11
  }
12
+ export interface INativePayResult {
13
+ result: IPayResult;
14
+ }
12
15
  export interface IPayResult {
13
16
  channelType: string;
14
17
  status: string | number;
@@ -16,7 +19,7 @@ export interface IPayResult {
16
19
  channelResult: object;
17
20
  }
18
21
  export declare class AppPay {
19
- payByWeChat(params: IPayByWeChatParams): Promise<IPayResult>;
20
- payByAli(params: IPayByAliParams): Promise<IPayResult>;
22
+ payByWeChat(params: IPayByWeChatParams): Promise<INativePayResult>;
23
+ payByAli(params: IPayByAliParams): Promise<INativePayResult>;
21
24
  }
22
25
  export {};
@@ -20,6 +20,7 @@ export declare class SFAppCommon extends AppCommon {
20
20
  getIMEICode(): Promise<string>;
21
21
  getPushAuthStatus(): Promise<boolean>;
22
22
  setPushState(): Promise<ICodeAndMessageResponse>;
23
+ setPushStateNoTimeLimit(): Promise<ICodeAndMessageResponse>;
23
24
  getLocalSource(params: IGetLocalSourceParams): Promise<IGetLocalSourceResponse>;
24
25
  getReducerData(params: IGetReducerDataParams): Promise<any>;
25
26
  getDeviceId(): Promise<string>;
@@ -3,7 +3,7 @@ import { CommonEvents } from "../basic/eventsName";
3
3
  /**
4
4
  * 顺丰内部使用的事件
5
5
  */
6
- export declare type SFEvents = CommonEvents | "getUserAvatar" | "getUserBaseInfo" | "payBySVIP" | "payBySDK" | "wxAutoPaySignReq" | "payWaybillByPayId" | "digiCnyPayResult" | "startGetIMEICode" | "getReducerData" | "getDeviceId" | "syncCookie" | "getPushAuthStatus" | "setStateToPush" | "getLocalWebSource" | "navigate" | "setCanBack";
6
+ export declare type SFEvents = CommonEvents | "getUserAvatar" | "getUserBaseInfo" | "payBySVIP" | "payBySDK" | "wxAutoPaySignReq" | "payWaybillByPayId" | "digiCnyPayResult" | "startGetIMEICode" | "getReducerData" | "getDeviceId" | "syncCookie" | "getPushAuthStatus" | "setStateToPush" | "setStateToPushNoTimeLimit" | "getLocalWebSource" | "navigate" | "setCanBack";
7
7
  export interface IPostSFParams extends IPostParams {
8
8
  method: SFEvents;
9
9
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "syttunnel",
3
- "version": "0.1.3-0",
3
+ "version": "0.1.5-2",
4
4
  "description": "",
5
- "main": "syttunel.js",
5
+ "main": "syttunnel.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1"
package/syttunnel.js CHANGED
@@ -463,7 +463,7 @@ var Bridge = /** @class */ (function () {
463
463
  Bridge.prototype.postMessage = function (params) {
464
464
  return new Promise(function (resolve, reject) {
465
465
  bridge.dealPostMessage(params, function (result) {
466
- if (result) {
466
+ if (result !== null && result !== undefined) {
467
467
  resolve(result);
468
468
  }
469
469
  else {