egret-sdk-qq游戏大厅

非接入文档内容

定义sdk的声明文件

qqyxdt_sdk.d.ts
1
2
3
4
5
6
7
8
9
10
declare module fusion2{

export class dialog{
public static relogin();

public static buy(param);

public static openVipGift(param);
}
}

签名

  • 订单签名
1
2
3
4
5
6
7
8
let url_path = "/v3/pay/buy_goods";
let unTouStr = encodeURIComponent(url_path);
let unCompStr = encodeURIComponent(strData);
unCompStr = unCompStr.replace(/\*/g, "%2A"); /// 因encodeURIComponent无法转换 * 字符,所以才手动替换
const hmac = crypto.createHmac('sha1', data.appkey + "&");

unCompStr = "GET&" + unTouStr + "&" + unCompStr;
sign = hmac.update(unCompStr).digest('base64');

日志

时间 进度