Files
biz-mobile-cloud-zax/src/sheep/api/social.ts
T
2026-06-18 17:01:09 +08:00

35 lines
899 B
TypeScript

import request from "@/sheep/utils/request"
export default {
/** 获取当前租户已启用的三方登录应用(公开接口) */
getLoginAppList: (): Promise<any> =>
request({
url: "/admin/social/getLoginAppList",
method: "GET",
}),
/** 绑定社交账号(需登录,PC/设置页仍用 code) */
bind: (state: string, code: string): Promise<any> =>
request({
url: "/admin/social/bind",
method: "POST",
params: { state, code },
}),
/** 解析微信 code(一次性),返回是否已绑定及 ticket */
wxResolve: (code: string): Promise<any> =>
request({
url: "/admin/social/wx/resolve",
method: "POST",
params: { code },
}),
/** 使用 ticket 绑定(需登录) */
bindByTicket: (state: string, ticket: string): Promise<any> =>
request({
url: "/admin/social/bind-ticket",
method: "POST",
params: { state, ticket },
}),
}