123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639 |
- import ajax from '../utils/request.js';
- /**
- * 登录
- * @param {object} ori
- * @returns
- */
- export function login(ori) {
- return ajax({
- api: '/user/login',
- data: ori.data,
- method: 'POST',
- });
- }
- /**
- * 登出
- * @param {object} ori
- * @returns
- */
- export function loginout(ori) {
- return ajax({
- api: '/user/logout',
- data: ori.data,
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 查看详情
- * @param {object} ori
- * @returns
- */
- export function getDetail(ori) {
- return ajax({
- api: '/news/data/info?offset=' + ori.data.offset,
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 文案校对
- * @param {object} ori
- * @returns
- */
- export function check(ori) {
- return ajax({
- api: '/api/check',
- data: ori.data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 热门话题
- * @param {object} ori
- * @returns
- */
- export function hotRank(ori) {
- return ajax({
- api: '/news/hotRank/list',
- data: ori.data,
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 检索新闻接口
- * @param {object} ori
- * @returns
- */
- export function searchData(ori) {
- return ajax({
- api: '/news/data/search',
- data: ori.data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获得新闻分类
- * @param {object} ori
- * @returns
- */
- export function getClass(ori) {
- return ajax({
- api: '/news/data/category',
- data: ori.data,
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * h5商城接口
- * @param {Object} ori
- * @returns
- */
- // export function getH5Mall(ori) {
- // return ajax({
- // api: '/topic/tool/img/cache/oridata.json?' + Date.now(),
- // data: ori.data,
- // base: 'json',
- // type: 'ajax',
- // method: 'GET',
- // headers: {
- // Authorization: localStorage.getItem('token'),
- // },
- // });
- // }
- /**
- * 行政区划接口
- * @param {Object} ori
- * @returns
- */
- export function getEconomize(ori) {
- return ajax({
- api: '/news/area/list',
- data: ori.data,
- type: 'ajax',
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取用户
- * @param {Object} ori
- * @returns
- */
- export function getInfo(ori) {
- return ajax({
- api: '/user/info',
- data: ori.data,
- type: 'ajax',
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 报料
- * @param {object} ori
- * @returns
- */
- export function getreporting(ori) {
- return ajax({
- api: '/clue/list',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 报料删除
- */
- export function delreporting(ori) {
- return ajax({
- api: '/clue/delete',
- data: ori.data,
- type: 'ajax',
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 查看报料
- */
- export function getreportingDetail(ori) {
- return ajax({
- api: '/clue/info',
- data: ori.data,
- type: 'ajax',
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 审核报料
- */
- export function reportingShenhe(ori) {
- return ajax({
- api: '/clue/verify',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 回复报料
- */
- export function reportingReply(ori) {
- return ajax({
- api: '/clue/reply',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取模板列表
- */
- export function getTemplateList(ori) {
- return ajax({
- api: '/h5template/list',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 生成页面
- */
- export function createTemplateList(ori) {
- return ajax({
- api: '/h5operate/store',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 更新页面
- */
- export function updateTemplateList(ori) {
- return ajax({
- api: '/h5operate/update',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 个人页面列表
- */
- export function getPersonalList(ori) {
- return ajax({
- api: '/h5operate/list',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 删除个人列表
- */
- export function deletePersonalList(ori) {
- return ajax({
- api: '/h5operate/delete',
- data: ori.data,
- type: 'ajax',
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取各个平台授权账号
- */
- export function getAccountList(ori) {
- return ajax({
- api: '/new-media/list',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取各个平台授权账号传播数据
- */
- export function getAccountData(ori) {
- return ajax({
- api: '/new-media/agg',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取平台更新时间
- */
- export function getUpdateTime(ori) {
- return ajax({
- api: '/new-media/platform',
- data: ori.data,
- type: 'ajax',
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取组件列表
- */
- export function getComponentsList(ori) {
- return ajax({
- api: '/operate/h5Template/json/components.json?' + Date.now(),
- data: ori.data,
- type: 'ajax',
- base: 'json',
- method: 'GET',
- });
- }
- /**
- * 获取绘画风格
- */
- export function getPaintingStyle(ori) {
- return ajax({
- api: '/get/modifiers',
- data: ori.data,
- type: 'ajax',
- base: 'easyDiffusion',
- method: 'GET',
- });
- }
- /**
- * 生成绘画
- */
- export function createDraw(ori) {
- return ajax({
- noload: true,
- api: '/render',
- data: ori.data,
- type: 'ajax',
- base: 'easyDiffusion',
- method: 'POST',
- });
- }
- /**
- * 查询生成绘画
- */
- export function queryDraw(ori) {
- return ajax({
- noload: true,
- api: '/image/stream/' + ori.data,
- type: 'ajax',
- base: 'easyDiffusion',
- method: 'POST',
- });
- }
- export function ChartGpt(data) {
- return ajax({
- noLoad: true,
- url: 'completions',
- method: 'POST',
- urlType: 'chat',
- errorToast: '当前访问人数过多,请重试。',
- data,
- });
- }
- export function getFM(data) {
- return ajax({
- noLoad: true,
- api: '/epg/tv',
- method: 'GET',
- base: 'epg',
- errorToast: '当前访问人数过多,请重试。',
- data,
- });
- }
- export function getTV(data) {
- return ajax({
- noLoad: true,
- api: '/epg/fm',
- method: 'GET',
- base: 'epg',
- errorToast: '当前访问人数过多,请重试。',
- data,
- });
- }
- export function getAllEpg(channelId) {
- return ajax({
- noLoad: true,
- api: '/epg/all?channelId=' + channelId,
- method: 'GET',
- base: 'epg',
- errorToast: '当前访问人数过多,请重试。',
- });
- }
- export function getKeywords({ channelId, page, pageSize }) {
- return ajax({
- noLoad: true,
- api:
- '/keywords/list?channelId=' +
- channelId +
- '&page=' +
- page +
- '&pagesize=' +
- pageSize,
- method: 'GET',
- base: 'epg',
- errorToast: '当前访问人数过多,请重试。',
- });
- }
- export function createData(data) {
- return ajax({
- noLoad: true,
- api: '/keywords/disable',
- method: 'POST',
- data,
- base: 'epg',
- errorToast: '当前访问人数过多,请重试。',
- });
- }
- export function disableEPG(data) {
- return ajax({
- noLoad: true,
- api: '/epg/disable',
- method: 'POST',
- data,
- base: 'epg',
- errorToast: '当前访问人数过多,请重试。',
- });
- }
- export function disableKeywords(data) {
- return ajax({
- noLoad: true,
- api: '/keywords/update',
- method: 'POST',
- data,
- base: 'epg',
- errorToast: '当前访问人数过多,请重试。',
- });
- }
- /**
- * 修改密码
- * @param {object} data
- * @returns
- */
- export function changePwdApi(data) {
- return ajax({
- api: '/user/pwd/reset',
- data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取用户列表
- * @param {object} data
- * @returns
- */
- export function getUserListApi(data) {
- return ajax({
- api: '/user/list',
- data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取角色列表
- * @param {object} data
- * @returns
- */
- export function getRoleListApi(data) {
- return ajax({
- api: '/user/role/list',
- data,
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 管理员修改用户信息
- * @param {object} data
- * @returns
- */
- export function managerChangeUserApi(data) {
- return ajax({
- api: '/user/update',
- data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 管理员新增用户
- * @param {object} data
- * @returns
- */
- export function managerAddUserApi(data) {
- return ajax({
- api: '/user/store',
- data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 删除角色
- * @param {object} data
- * @returns
- */
- export function deleteUserApi(data) {
- return ajax({
- api: '/user/role/delete',
- data,
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 获取菜单
- * @param {object} data
- * @returns
- */
- export function getMenuApi(data) {
- return ajax({
- api: '/menus/list',
- data,
- method: 'GET',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 新增角色
- * @param {object} data
- * @returns
- */
- export function addRoleApi(data) {
- return ajax({
- api: '/user/role/store',
- data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
- /**
- * 修改角色
- * @param {object} data
- * @returns
- */
- export function chagneRoleApi(data) {
- return ajax({
- api: '/user/role/update',
- data,
- method: 'POST',
- headers: {
- Authorization: localStorage.getItem('token'),
- },
- });
- }
|