syttunnel 0.1.5-2 → 0.1.5-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.
|
@@ -63,6 +63,9 @@ interface ISaveImageToLocalResponse {
|
|
|
63
63
|
errCode?: string;
|
|
64
64
|
errMessage?: string;
|
|
65
65
|
}
|
|
66
|
+
export interface ISFAddressParams {
|
|
67
|
+
encryptKey: string;
|
|
68
|
+
}
|
|
66
69
|
export declare class AppCommon {
|
|
67
70
|
openScan(params: IOpenCodeScanParams): Promise<string>;
|
|
68
71
|
shareMsgToWXAPI(params: IShareMsgToWXParams): Promise<IShareMsgToWXResponse>;
|
|
@@ -71,5 +74,10 @@ export declare class AppCommon {
|
|
|
71
74
|
onSelectContacts(): Promise<IOnSelectContactResponse>;
|
|
72
75
|
onSaveImageToLocal(params: ISaveImageToLocalParams): Promise<ISaveImageToLocalResponse>;
|
|
73
76
|
getEnvironment(): Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* 获取顺丰地址列表
|
|
79
|
+
* @returns 返回为json string加密的字符串,需密钥解密
|
|
80
|
+
*/
|
|
81
|
+
getSFAddress(params: ISFAddressParams): Promise<string>;
|
|
74
82
|
}
|
|
75
83
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 基本的调用事件
|
|
3
3
|
*/
|
|
4
4
|
import { IPostParams } from "./bridge";
|
|
5
|
-
export declare type CommonEvents = "getUserInfo" | "sytFetch" | "authorize" | "backToBefore" | "setTitle" | "setStyle" | "getNavigationFrame" | "loadUrl" | "payByWeChat" | "payByAli" | "startScanCode" | "shareMessageToWXReq" | "currentLocation" | "appVersion" | "selectContacts" | "saveImageToLocal" | "getEnvironment" | "goBack";
|
|
5
|
+
export declare type CommonEvents = "getUserInfo" | "sytFetch" | "authorize" | "backToBefore" | "setTitle" | "setStyle" | "getNavigationFrame" | "loadUrl" | "payByWeChat" | "payByAli" | "startScanCode" | "shareMessageToWXReq" | "currentLocation" | "appVersion" | "selectContacts" | "saveImageToLocal" | "getEnvironment" | "goBack" | "selectAddress";
|
|
6
6
|
export interface IPostBasicParams extends IPostParams {
|
|
7
7
|
method: CommonEvents;
|
|
8
8
|
}
|
|
@@ -33,8 +33,11 @@ interface IWxAutoPaySignResponse {
|
|
|
33
33
|
interface IOnDigiCnyPayResultParams {
|
|
34
34
|
status: 0 | 1 | 2 | 3;
|
|
35
35
|
}
|
|
36
|
-
interface
|
|
37
|
-
|
|
36
|
+
interface IPayByWXMiniProgram {
|
|
37
|
+
payToken: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IPayByWXMiniProgramResult {
|
|
40
|
+
result: boolean;
|
|
38
41
|
}
|
|
39
42
|
declare class PayParams {
|
|
40
43
|
amt: string;
|
|
@@ -56,11 +59,15 @@ interface IPayResponse {
|
|
|
56
59
|
result: IPayResult;
|
|
57
60
|
payParams?: PayParams;
|
|
58
61
|
}
|
|
62
|
+
interface IPayWaybillByPayIdParams {
|
|
63
|
+
payId: string;
|
|
64
|
+
}
|
|
59
65
|
export declare class SFAppPay extends AppPay {
|
|
60
66
|
payBySVIP(params: IPayBySVIPParams): Promise<IPayResponse>;
|
|
61
67
|
payBySDK(params: IPayBySDKParams): Promise<IPayResult>;
|
|
62
68
|
wxAutoPaySignReq(params: IWxAutoPaySignParams): Promise<IWxAutoPaySignResponse>;
|
|
63
69
|
onDigiCnyPayResult(params: IOnDigiCnyPayResultParams): void;
|
|
64
70
|
payWaybillByPayId(params: IPayWaybillByPayIdParams): void;
|
|
71
|
+
payByWXMiniProgram(params: IPayByWXMiniProgram): Promise<IPayByWXMiniProgramResult>;
|
|
65
72
|
}
|
|
66
73
|
export {};
|
|
@@ -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" | "setStateToPushNoTimeLimit" | "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" | "payByWXMiniProgram";
|
|
7
7
|
export interface IPostSFParams extends IPostParams {
|
|
8
8
|
method: SFEvents;
|
|
9
9
|
}
|
package/package.json
CHANGED
package/syttunnel.js
CHANGED
|
@@ -665,6 +665,17 @@ var AppCommon = /** @class */ (function () {
|
|
|
665
665
|
};
|
|
666
666
|
return bridge_1.default.postMessage(appFunc);
|
|
667
667
|
};
|
|
668
|
+
/**
|
|
669
|
+
* 获取顺丰地址列表
|
|
670
|
+
* @returns 返回为json string加密的字符串,需密钥解密
|
|
671
|
+
*/
|
|
672
|
+
AppCommon.prototype.getSFAddress = function (params) {
|
|
673
|
+
var appFunc = {
|
|
674
|
+
method: "selectAddress",
|
|
675
|
+
params: params,
|
|
676
|
+
};
|
|
677
|
+
return bridge_1.default.postMessage(appFunc);
|
|
678
|
+
};
|
|
668
679
|
return AppCommon;
|
|
669
680
|
}());
|
|
670
681
|
exports.AppCommon = AppCommon;
|