接入服务号模板推送通知
This commit is contained in:
21
banban-mini/src/services/wechat-mp.ts
Normal file
21
banban-mini/src/services/wechat-mp.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { request } from './api'
|
||||
|
||||
export interface WechatMpBindStartResponse {
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface WechatMpBindStatus {
|
||||
bound: boolean
|
||||
subscribed: boolean
|
||||
updated_at?: string | null
|
||||
}
|
||||
|
||||
export async function getWechatMpBindStatus(): Promise<WechatMpBindStatus> {
|
||||
return request<WechatMpBindStatus>('/banban/wechat-mp/bind/status')
|
||||
}
|
||||
|
||||
export async function startWechatMpBind(): Promise<WechatMpBindStartResponse> {
|
||||
return request<WechatMpBindStartResponse>('/banban/wechat-mp/bind/start', {
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user