mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-13 15:53:42 +08:00
- src/api/media/{account,app,oauth}:4 个账号接口 + app 列表 + 取授权 URL
- src/views/media/account/index.vue:列表 + 搜索 + 详情对话框 + 启停 + 新增绑定
- src/views/media/account/oauth-result/index.vue:OAuth 回调结果落地页,
通过 window.opener.postMessage 通知父窗口刷新列表
- 路由 constantRoutes 加 hidden 路由 /media/account/oauth-result
- permission.ts whiteList 加上落地页路径,避免回调时被踢去 login
新增绑定交互:window.open 新窗口走授权,原列表保留状态;落地页发完成
事件后父窗口自动刷新;不删除账号(后端无 remove 端点)
13 lines
368 B
TypeScript
13 lines
368 B
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { AuthorizeUrlQuery } from '@/api/media/oauth/types';
|
|
|
|
/** 取媒体平台 OAuth 授权 URL */
|
|
export const getAuthorizeUrl = (query: AuthorizeUrlQuery): AxiosPromise<string> => {
|
|
return request({
|
|
url: '/media/oauth/authorize-url',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|