提交 5f6db383 作者: wj

更新抖音SDK

上级 b67bbbc4
...@@ -81,12 +81,11 @@ export class TTSDK { ...@@ -81,12 +81,11 @@ export class TTSDK {
return { code: code, message: msg } return { code: code, message: msg }
} }
this.LoginData = { ...this.LoginData, ...data }; this.LoginData = { ...this.LoginData, ...data };
const filters = (({ create_time, nickname, openid, uid, enter_game, origin_uid, origin_open_id }) => ({ const filters = (({ create_time, nickname, openid, uid, origin_uid = "", origin_open_id = "" }) => ({
create_time, create_time,
nickname, nickname,
openid, openid,
uid, uid,
enter_game,
origin_uid, origin_uid,
origin_open_id, origin_open_id,
}))(this.LoginData); }))(this.LoginData);
...@@ -99,7 +98,6 @@ export class TTSDK { ...@@ -99,7 +98,6 @@ export class TTSDK {
from_appid: this.LaunchOptions["appId"] || this.LaunchOptions["appid"], from_appid: this.LaunchOptions["appId"] || this.LaunchOptions["appid"],
launchOptions: this.LaunchOptions, launchOptions: this.LaunchOptions,
user_status: data.user_status || 0, user_status: data.user_status || 0,
game_club: this.LoginData["game_club"] || 0 // 游戏圈开关
} }
}; };
} }
...@@ -401,17 +399,17 @@ export class TTSDK { ...@@ -401,17 +399,17 @@ export class TTSDK {
public static sendPhoneCode = async (phoneInfo: any): Promise<any> => { public static sendPhoneCode = async (phoneInfo: any): Promise<any> => {
// 发送验证码接口 // 发送验证码接口
const { code } = await this.sdkRequest(ttLinks.sendCode, { ...this.SDKCOMMDATA, ...phoneInfo, type: "SDK.BIND_MOBILE" }); const { code } = await this.sdkRequest(ttLinks.sendCode, { ...this.SDKCOMMDATA, ...phoneInfo, type: "SDK.BIND_MOBILE" });
return { code: code }; return { code: code == 0 };
} }
public static bindPhone = async (phoneInfo: any): Promise<any> => { public static bindPhone = async (phoneInfo: any): Promise<any> => {
// 绑定手机 // 绑定手机
const { code } = await this.sdkRequest(ttLinks.saveNum, { ...this.SDKCOMMDATA, open_id: this.LoginData["openid"], ...phoneInfo, source: "WEIXIN" }); const { code } = await this.sdkRequest(ttLinks.saveNum, { ...this.SDKCOMMDATA, open_id: this.LoginData["openid"], ...phoneInfo, source: "WEIXIN" });
return { code: code }; return { code: code == 0 };
} }
public static checkUserPhoneBind = async (): Promise<any> => { public static checkUserPhoneBind = async (): Promise<any> => {
// 查询用户绑定状态 // 查询用户绑定状态
const { code } = await this.sdkRequest(ttLinks.bindPhone, { ...this.SDKCOMMDATA, uid: this.LoginData["uid"] }); const { code } = await this.sdkRequest(ttLinks.bindPhone, { ...this.SDKCOMMDATA, uid: this.LoginData["uid"] });
return { code: code }; return { code: code == 0 };
} }
// 获取用户信息 // 获取用户信息
public static getUserInfo = (): Promise<any> => { public static getUserInfo = (): Promise<any> => {
...@@ -521,6 +519,7 @@ export class TTSDK { ...@@ -521,6 +519,7 @@ export class TTSDK {
private static PaymentErrorCode: any = { private static PaymentErrorCode: any = {
"-1": "系统失败", "-1": "系统失败",
"-2": "支付取消", "-2": "支付取消",
"3023": "当前设备不支持",
"-15001": "缺少参数", "-15001": "缺少参数",
"-15002": "请求参数不合法", "-15002": "请求参数不合法",
"-15003": "app 不支持小游戏支付", "-15003": "app 不支持小游戏支付",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论