egret-sdk-应用宝H5

非接入文档内容

定义sdk的声明文件

yyb_sdk.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
declare module H5YSDK {

// 平台检测,应用宝内webview返回true,其他返回false
export let isYYB:boolean;

/**
* 调用后回调状态
* H5YSDK.STATE.SUCCESS 调用成功 0
* H5YSDK.STATE.FAIL 调用失败 1
*/
export let STATE:stateParam;

/**
* H5YSDK.PAY_STATE.SUCCESS 成功 14
* H5YSDK.PAY_STATE.PLUGININIT 插件下载中 -2
* H5YSDK.PAY_STATE.PLUGINENONE 拉取支付插件失败 -3
* H5YSDK.PAY_STATE.PLUGINERROR 插件下载失败 3
* H5YSDK.PAY_STATE.USERCANCEL 用户取消 15
* H5YSDK.PAY_STATE.UNKNOW 未知错误 100
* H5YSDK.PAY_STATE.ACCESSERROR 用户登录态校验失败 101
*/
// export let PAY_STATE:payStateParam;

export interface stateParam {
SUCCESS : number,
FAIL : number
}

// export interface payStateParam {
// SUCCESS : number,
// PLUGININIT : number
// PLUGINENONE : number
// PLUGINERROR : number
// USERCANCEL : number
// UNKNOW : number
// ACCESSERROR : number
// }

/**
* 支付接口2.0
*/
// export interface payParam {
// saveValue : number,
// zoneId : string,
// offerid : string,
// openid : string,
// openkey : string,
// pf : string,
// pfkey : string,
// onError : Function,
// onSuccess : Function
// }

/**
* 道具直购
*/
// export interface payGoodParam {
// saveValue : number,
// zoneId : string,
// offerid : string,
// openid : string,
// openkey : string,
// sessionId : string,
// sessionType : string,
// goodsTokenUrl : string,
// pf : string,
// pfKey : string,
// isCanChange : boolean,
// unit : string,
// isShowSaveNum : boolean,
// callback : Function,
// }

export interface chargeParam {
save_value : string,
zoneid : string,
callback : Function,
}

export interface buyItemParam {
midas_appkey : string,
zoneid : string,
save_value : string,
itemid : string,
item_name : string,
item_desc : string,
item_price : string,
item_num : string,
callback : Function,
}

export interface buyItemURLParam {
item_url : string,
zoneid : string,
callback : Function,
}

export function requestAutoLogin(callback: Function);

export function requestQQLogin(callback: Function);

export function requestWXLogin(callback: Function);

export function requestLogout(callback: Function);

export function requestUserInfo(callback: Function);

export function requestCharge(chargeParam: chargeParam);

export function requestBuyItem(buyItemParam: buyItemParam);

export function requestBuyItemURL(buyItemURLParam: buyItemURLParam);

// export function pay(payParam: string);

// export function requestPayForGood(payGoodParam: string);

// export function addGameDesktopShortCut(callback: Function);

// export function webViewClass(): ui;

// export interface titleBar {
// show : Function,
// hide : Function
// }

// export class ui{
// titleBar: titleBar;

// private constructor();

// public setOrientation(callback: Function);

// public closeWebView(callback: Function);

// }
}

链接

百度小程序官网

日志

时间 问题 解决方法
2019-4-25 沙箱充值提示1016-1016-0 沙箱的充值要用应用宝提供的测试应用宝扫码,不能用正式的应用宝
2019-4-27 沙箱充值有些机器还是问题 应用宝提供的测试应用宝有问题,重新出了一个新的