49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
import request from "@/utils/request";
|
|
|
|
/*************************************************
|
|
* 微信公众号绑定(租户端)
|
|
* 流程:生成二维码 → 微信扫码关注 → 公众号回复验证码 → 输入验证码完成绑定
|
|
*************************************************/
|
|
|
|
/** 发起绑定:返回绑定指引(未认证公众号无带参二维码,公众号内发送「验证码」取码) */
|
|
export function startWechatMpBind() {
|
|
return request({
|
|
url: "/backend/wechatMp/bind/start",
|
|
method: "post",
|
|
});
|
|
}
|
|
|
|
/** 查询绑定会话状态:0待扫码 1已扫码待核销 2已核销 3已过期 */
|
|
export function getWechatMpBindStatus(scene) {
|
|
return request({
|
|
url: "/backend/wechatMp/bind/status",
|
|
method: "get",
|
|
params: { scene },
|
|
});
|
|
}
|
|
|
|
/** 核销验证码完成绑定 */
|
|
export function confirmWechatMpBind(data) {
|
|
return request({
|
|
url: "/backend/wechatMp/bind/confirm",
|
|
method: "post",
|
|
data,
|
|
});
|
|
}
|
|
|
|
/** 当前租户用户的绑定信息 */
|
|
export function getMyWechatMpBinding() {
|
|
return request({
|
|
url: "/backend/wechatMp/my",
|
|
method: "get",
|
|
});
|
|
}
|
|
|
|
/** 解除当前用户的微信绑定 */
|
|
export function unbindWechatMp() {
|
|
return request({
|
|
url: "/backend/wechatMp/unbind",
|
|
method: "post",
|
|
});
|
|
}
|