Initial commit: web_hghl admin project
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Executable
+46
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSyscfg } from '@/api/system/systemConfig'
|
||||
import { getToken } from '@/utils/auth' // get token from cookie
|
||||
export default {
|
||||
name: 'App',
|
||||
async created() {
|
||||
const hasToken = getToken()
|
||||
if (hasToken) {
|
||||
await this.getData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// TODO:请求系统配置列表数据
|
||||
getData() {
|
||||
if (getToken()) {
|
||||
getSyscfg({}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.form = res.data
|
||||
this.$store.dispatch('system/setConfig', res.data)
|
||||
} else {
|
||||
this.$message.error('请求系统配置失败')
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err, 'ss')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-tooltip__popper {
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
font-size: 12px !important;
|
||||
color: rgb(56, 51, 51) !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* @Author: 江涛
|
||||
* @Mail: jt213219216@gmail.com
|
||||
* @Date: 2021-02-22 10:36:38
|
||||
* @LastEditTime: 2021-03-15 11:11:22
|
||||
* @LastEditors: 江涛
|
||||
* @FilePath: /web-admin-MDDSP/src/api/account/accountList.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 帐号列表
|
||||
export function accList(params) {
|
||||
return request({
|
||||
url: '/api/web/acc/list',
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 账号删除
|
||||
export function accDel(data) {
|
||||
return request({
|
||||
url: '/api/web/acc/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 账号添加
|
||||
export function accAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/acc/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 更新账号
|
||||
export function accUp(data) {
|
||||
return request({
|
||||
url: '/api/web/acc/up',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取可用角色列表
|
||||
export function roleDrop(data) {
|
||||
return request({
|
||||
url: '/api/web/role/drop',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 更改账号状态
|
||||
export function accSavestatus(data) {
|
||||
return request({
|
||||
url: '/api/web/acc/savestatus',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* @Author: 江涛
|
||||
* @Mail: jt213219216@gmail.com
|
||||
* @Date: 2021-02-22 10:36:38
|
||||
* @LastEditTime: 2021-03-12 19:49:15
|
||||
* @LastEditors: 江涛
|
||||
* @FilePath: /web-admin-MDDSP/src/api/account/roleList.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增角色
|
||||
export function roleAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/role/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色删除
|
||||
export function roleDel(data) {
|
||||
return request({
|
||||
url: '/api/web/role/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取角色列表
|
||||
export function getRoleList(params) {
|
||||
return request({
|
||||
url: '/api/web/role/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 新增角色
|
||||
export function roleUp(data) {
|
||||
return request({
|
||||
url: '/api/web/role/up',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求角色权限
|
||||
export function getAuth(params) {
|
||||
return request({
|
||||
url: '/api/web/role/getauth',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 更新权限
|
||||
export function upAuth(data) {
|
||||
return request({
|
||||
url: '/api/web/role/upauth',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色使能
|
||||
export function roleEnable(data) {
|
||||
return request({
|
||||
url: '/api/web/role/enable',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取信息
|
||||
// export function roleGetinfo(data) {
|
||||
// return request({
|
||||
// url: '/web/role/getinfo',
|
||||
// method: 'post',
|
||||
// data
|
||||
// })
|
||||
// }
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
/*
|
||||
* @Author: 江涛
|
||||
* @Mail: jt213219216@gmail.com
|
||||
* @Date: 2021-02-22 10:36:38
|
||||
* @LastEditTime: 2022-08-15 19:48:00
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /sq_web_admin/src/api/account/upList.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增角色
|
||||
export function upAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/upmaster/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色删除
|
||||
export function upDel(data) {
|
||||
return request({
|
||||
url: '/api/web/uploader/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取角色列表
|
||||
export function getUpList(data) {
|
||||
return request({
|
||||
url: '/api/web/uploader/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
// 更新权限
|
||||
export function upAuth(data) {
|
||||
return request({
|
||||
url: '/api/web/uploader/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增角色
|
||||
// export function roleUp(data) {
|
||||
// return request({
|
||||
// url: '/api/web/role/up',
|
||||
// method: 'post',
|
||||
// data
|
||||
// })
|
||||
// }
|
||||
|
||||
// 请求角色权限
|
||||
// export function getAuth(params) {
|
||||
// return request({
|
||||
// url: '/api/web/role/getauth',
|
||||
// method: 'get',
|
||||
// params
|
||||
// })
|
||||
// }
|
||||
|
||||
// 角色使能
|
||||
// export function roleEnable(data) {
|
||||
// return request({
|
||||
// url: '/api/web/role/enable',
|
||||
// method: 'post',
|
||||
// data
|
||||
// })
|
||||
// }
|
||||
|
||||
// 获取信息
|
||||
// export function roleGetinfo(data) {
|
||||
// return request({
|
||||
// url: '/web/role/getinfo',
|
||||
// method: 'post',
|
||||
// data
|
||||
// })
|
||||
// }
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* @Author: 阮小七
|
||||
* @Mail: no
|
||||
* @Date: 2021-01-04 11:37:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2022-06-06 17:42:57
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 添加活动
|
||||
export function activityAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/activity/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除活动
|
||||
export function activityDel(data) {
|
||||
return request({
|
||||
url: '/api/web/activity/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求活动列表
|
||||
export function activitySearch(data) {
|
||||
return request({
|
||||
url: '/api/web/activity/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改活动
|
||||
export function activityUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/activity/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2021-12-21 23:13:49
|
||||
* @LastEditTime: 2022-06-06 17:43:04
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/advertise.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function advertiseAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/advertise/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function advertiseDel(data) {
|
||||
return request({
|
||||
url: '/api/web/advertise/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function advertiseList(data) {
|
||||
return request({
|
||||
url: '/api/web/advertise/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function advertiseUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/advertise/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Author: 江涛
|
||||
* @Mail: jt213219216@gmail.com
|
||||
* @Date: 2021-03-25 20:10:06
|
||||
* @LastEditTime: 2022-06-06 17:43:08
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/announcement.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增公告
|
||||
export function announcementAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公告
|
||||
export function announcementDel(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 公告列表
|
||||
export function announcementList(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改公告
|
||||
export function announcementUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增一个广播
|
||||
export function broadcastAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/broadcast/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除一个广播
|
||||
export function broadcastDel(data) {
|
||||
return request({
|
||||
url: '/api/web/broadcast/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 跑马灯配置管理
|
||||
export function broadcastList(params) {
|
||||
return request({
|
||||
url: '/api/web/broadcast/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 修改一个广播
|
||||
export function broadcastUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/broadcast/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-15 17:39:25
|
||||
* @LastEditTime: 2022-06-06 17:43:15
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/cardActivity.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function cardActivityAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/cardactivity/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cardActivityDel(data) {
|
||||
return request({
|
||||
url: '/api/web/cardactivity/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cardActivityList(data) {
|
||||
return request({
|
||||
url: '/api/web/cardactivity/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cardActivityUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/cardactivity/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function cardcolletList(data) {
|
||||
return request({
|
||||
url: '/api/web/cardcollet/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function cardinfoAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/cardinfo/add',
|
||||
method: 'post',
|
||||
data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function cardinfoDel(data) {
|
||||
return request({
|
||||
url: '/api/web/cardinfo/del',
|
||||
method: 'post',
|
||||
data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function cardinfoList(data) {
|
||||
return request({
|
||||
url: '/api/web/cardinfo/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function cardinfoUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/cardinfo/update',
|
||||
method: 'post',
|
||||
data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:24:36
|
||||
* @LastEditTime: 2022-06-06 17:43:41
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/activity/checkinList.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求签到历史记录
|
||||
export function getCheckinList(data) {
|
||||
return request({
|
||||
url: '/api/web/checkin/history/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function checkinListDel(data) {
|
||||
return request({
|
||||
url: '/api/web/checkin/history/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增签到配置
|
||||
export function checkinCfgAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/checkinprize/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除签到配置
|
||||
export function checkinCfgDel(data) {
|
||||
return request({
|
||||
url: '/api/web/checkinprize/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求签到配置列表
|
||||
export function checkinCfgSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/checkinprize/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改签到奖品配置
|
||||
export function checkinCfgUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/checkinprize/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取签到配置 /checkin/conf/get
|
||||
export function getCheckingCg(data) {
|
||||
return request({
|
||||
url: '/api/web/checkin/conf/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改签到配置 /api/web/checkin/conf/update
|
||||
export function updateCheckingCg(data) {
|
||||
return request({
|
||||
url: '/api/web/checkin/conf/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Author: 江涛
|
||||
* @Mail: jt213219216@gmail.com
|
||||
* @Date: 2021-03-25 20:10:38
|
||||
* @LastEditTime: 2022-06-06 17:43:54
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/contact.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增联系方式
|
||||
export function contactAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/contact/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除联系方式
|
||||
export function contactDel(data) {
|
||||
return request({
|
||||
url: '/api/web/contact/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 联系方式列表
|
||||
export function contactList(data) {
|
||||
return request({
|
||||
url: '/api/web/contact/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改联系方式
|
||||
export function contactUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/contact/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-06-14 20:50:13
|
||||
* @LastEditTime: 2022-06-14 20:51:37
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/hGame.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增联系方式
|
||||
export function hGameAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/hGame/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增联系方式
|
||||
export function hGameDel(data) {
|
||||
return request({
|
||||
url: '/api/web/hGame/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增联系方式
|
||||
export function hGameList(data) {
|
||||
return request({
|
||||
url: '/api/web/hGame/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增联系方式
|
||||
export function hGameUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/hGame/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-17 11:37:38
|
||||
* @LastEditTime: 2022-06-06 17:43:59
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/hopeActivity.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function hopeactivityAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/hopeactivity/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function hopeactivityDel(data) {
|
||||
return request({
|
||||
url: '/api/web/hopeactivity/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function hopeactivityList(data) {
|
||||
return request({
|
||||
url: '/api/web/hopeactivity/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function hopeactivityUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/hopeactivity/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-16 17:59:05
|
||||
* @LastEditTime: 2022-06-06 17:44:06
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/hopeDetails.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function hopeDetailsAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/hopedetails/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function hopeDetailsDel(data) {
|
||||
return request({
|
||||
url: '/api/web/hopedetails/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function hopeDetailsList(data) {
|
||||
return request({
|
||||
url: '/api/web/hopedetails/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function hopeDetailsUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/hopedetails/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:24:36
|
||||
* @LastEditTime: 2022-06-06 17:44:13
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/activity/msg.js
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增系统消息
|
||||
export function msgAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/message/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除系统消息
|
||||
export function msgDel(data) {
|
||||
return request({
|
||||
url: '/api/web/message/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 联系系统消息列表
|
||||
export function msgList(data) {
|
||||
return request({
|
||||
url: '/api/web/message/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改系统消息
|
||||
export function msgUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/message/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增一个通知
|
||||
export function notificationAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/notification/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除一个通知
|
||||
export function notificationDel(data) {
|
||||
return request({
|
||||
url: '/api/web/notification/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取通知列表
|
||||
export function notificationList(params) {
|
||||
return request({
|
||||
url: '/api/web/notification/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 修改一个通知
|
||||
export function notificationUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/notification/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:24:36
|
||||
* @LastEditTime: 2022-06-06 17:44:24
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/activity/noviceTaskCfg.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 添加新手任务
|
||||
export function noviceTaskAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/task/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除新手任务
|
||||
export function noviceTaskDel(data) {
|
||||
return request({
|
||||
url: '/api/web/task/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求新手任务列表
|
||||
export function noviceTaskSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/task/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改新手任务
|
||||
export function noviceTaskUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/task/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:24:36
|
||||
* @LastEditTime: 2022-06-06 17:44:30
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/activity/noviceTaskList.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 添加用户新手任务
|
||||
export function misssionAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/taskitem/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户新手任务
|
||||
export function misssionDel(data) {
|
||||
return request({
|
||||
url: '/api/web/taskitem/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求用户新手任务列表
|
||||
export function misssionSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/taskitem/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户新手任务
|
||||
export function misssionUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/taskitem/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-16 15:58:38
|
||||
* @LastEditTime: 2022-06-06 17:44:36
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/prize.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 添加用户新手任务
|
||||
export function prizeList(data) {
|
||||
return request({
|
||||
url: '/api/web/prize/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function prizeAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/prize/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function prizeDel(data) {
|
||||
return request({
|
||||
url: '/api/web/prize/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function prizeUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/prize/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:24:36
|
||||
* @LastEditTime: 2022-06-06 17:43:41
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/activity/checkinList.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求代理奖品领取历史记录
|
||||
export function getProxyPrizeHistory(data) {
|
||||
return request({
|
||||
url: '/api/web/proxyprize/history/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function proxyprizeHisyoryListDel(data) {
|
||||
return request({
|
||||
url: '/api/web/proxyprize/history/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function proxyprizeAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/proxyprize/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function proxyprizeDel(data) {
|
||||
return request({
|
||||
url: '/api/web/proxyprize/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求代理奖品列表
|
||||
export function proxyprizeSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/proxyprize/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function proxyprizeUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/proxyprize/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-16 17:11:00
|
||||
* @LastEditTime: 2022-06-06 17:44:42
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/activity/redeemprize.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function redeemprizeAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/redeemprize/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function redeemprizeDel(data) {
|
||||
return request({
|
||||
url: '/api/web/score/trans/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function redeemprizeList(data) {
|
||||
return request({
|
||||
url: '/api/web/score/trans/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
// 积分兑换流水记录导出
|
||||
export function redeemcodeListExport(params) {
|
||||
return request({
|
||||
url: '/api/web/score/trans/list',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
}
|
||||
|
||||
export function redeemprizeUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/redeemprize/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求位置列表
|
||||
export function advBindList(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/bind/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 位置更新更新
|
||||
export function advBindUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/bind/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增位置
|
||||
export function advBindAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/bind/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除位置
|
||||
export function advBindDel(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/bind/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求位置列表
|
||||
export function advInfoList(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/info/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 位置更新更新
|
||||
export function advInfoUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/info/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增位置
|
||||
export function advInfoAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/info/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除位置
|
||||
export function advInfoDel(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/info/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 批量修改广告链接
|
||||
export function batchUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/batch/update/link',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求位置列表
|
||||
export function advLocationList(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/location/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 位置更新更新
|
||||
export function advLocationUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/location/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增位置
|
||||
export function advLocationAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/location/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除位置
|
||||
export function advLocationDel(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/location/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 查看统计 media/web/advitise/click/list
|
||||
export function advVitiseList(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/click/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求位置列表
|
||||
export function appInfoList(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/info/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 位置更新更新
|
||||
export function appInfoUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/info/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增位置
|
||||
export function appInfoAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/info/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除位置
|
||||
export function appInfoDel(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/info/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function dockingAppCategoryList(data) {
|
||||
return request({
|
||||
url: '/media/web/appcategory/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dockingAppCategoryAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/appcategory/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dockingAppCategoryUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/appcategory/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dockingAppCategoryDel(data) {
|
||||
return request({
|
||||
url: '/media/web/appcategory/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function dockingAppList(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dockingAppAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dockingAppUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dockingAppDel(data) {
|
||||
return request({
|
||||
url: '/media/web/appinfo/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function upLoadFile(data, source) {
|
||||
return request({
|
||||
url: '/api/web/file/uploadImg',
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
data,
|
||||
timeout: 0,
|
||||
cancelToken: source.token
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export const CONTENT_TAG_TYPE = {
|
||||
VIDEO: 1,
|
||||
PLAYLET: 5
|
||||
}
|
||||
|
||||
export const CONTENT_TAG_TYPES = [
|
||||
{ label: '视频', value: CONTENT_TAG_TYPE.VIDEO },
|
||||
{ label: '短剧', value: CONTENT_TAG_TYPE.PLAYLET }
|
||||
]
|
||||
|
||||
export function fetchContentTagsByType(type) {
|
||||
const pageSize = 100
|
||||
const loadPage = pageNum => contentTagList({ type, pageNum, pageSize })
|
||||
return loadPage(1).then(async first => {
|
||||
if (!first || first.code !== 200) return []
|
||||
const list = [...((first.data && first.data.list) || [])]
|
||||
const total = (first.data && first.data.totalCount) || 0
|
||||
const pages = Math.ceil(total / pageSize)
|
||||
for (let pageNum = 2; pageNum <= pages; pageNum++) {
|
||||
const res = await loadPage(pageNum)
|
||||
if (res && res.code === 200 && res.data && res.data.list) {
|
||||
list.push(...res.data.list)
|
||||
}
|
||||
}
|
||||
return list.map(item => ({
|
||||
...item,
|
||||
title: item.name
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
export function contentTagList(params) {
|
||||
return request({
|
||||
url: '/api/web/content/tag/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function contentTagOption(params) {
|
||||
return request({
|
||||
url: '/api/web/content/tag/option',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function contentTagAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/content/tag/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function contentTagUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/content/tag/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function contentTagDel(data) {
|
||||
return request({
|
||||
url: '/api/web/content/tag/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2021-01-05 10:36:27
|
||||
* @LastEditors: 王涛
|
||||
* @LastEditTime: 2021-01-07 22:20:44
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
// 上传图片
|
||||
export function mediaUploadImg(data) {
|
||||
return request({
|
||||
url: '/api/web/file/uploadImg',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// // 请求首页今日数据
|
||||
export function getToday() {
|
||||
return request({ url: '/web/report/today', method: 'get' })
|
||||
}
|
||||
|
||||
// // 请求全部数据
|
||||
// export function getTotal() {
|
||||
// return request({
|
||||
// url: '/web/report/total',
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
// /**
|
||||
// *
|
||||
// * @param {*} params
|
||||
// */
|
||||
// export function getVisit(params) {
|
||||
// return request({
|
||||
// url: '/web/report/visit/list',
|
||||
// method: 'get',
|
||||
// params
|
||||
// })
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 水印列表导出
|
||||
// * @param {*} params
|
||||
// */
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-10-06 01:01:28
|
||||
* @LastEditors: 江涛
|
||||
* @LastEditTime: 2021-03-12 19:41:26
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/api/web/login/acc',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 确认绑定二维码 code为333时 调用
|
||||
// * @param {*} data
|
||||
// */
|
||||
export function validateQR(data) {
|
||||
return request({
|
||||
url: '/api/web/login/bind',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 视频列表
|
||||
export function mediaSearchV1(data) {
|
||||
return request({
|
||||
url: '/media/web/mediafile/search',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频列表V2
|
||||
export function mediaSearchV2(data) {
|
||||
return request({
|
||||
url: '/media/web/mediafile/searchV2',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 同步
|
||||
export function mediaUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/mediafile/sync',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除视频
|
||||
export function sourceDel(data) {
|
||||
return request({
|
||||
url: '/media/web/source/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 资源列表
|
||||
export function sourceList(data) {
|
||||
return request({
|
||||
url: '/media/web/source/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频
|
||||
export function sourceUpdate(data) {
|
||||
return request({
|
||||
url: '/media/web/source/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增视频
|
||||
export function sourceAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/source/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 视频上传
|
||||
export function videoBody(data) {
|
||||
return request({
|
||||
url: '/media/web/proxy/videoBody',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 视频上传成功
|
||||
export function videoOk(data) {
|
||||
return request({
|
||||
url: '/media/web/proxy/videoOk',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除视频
|
||||
export function taskDel(data) {
|
||||
return request({
|
||||
url: '/media/web/task/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 资源列表
|
||||
export function taskList(data) {
|
||||
return request({
|
||||
url: '/media/web/task/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增视频
|
||||
export function taskAdd(data) {
|
||||
return request({
|
||||
url: '/media/web/task/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 重新生成添加水印
|
||||
export function updateWaterMark(data) {
|
||||
return request({
|
||||
url: '/media/web/task/update/watermark',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function playletCategoryList(params) {
|
||||
return request({
|
||||
url: '/api/web/playlet/category/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletCategoryAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/category/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletCategoryUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/category/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletCategoryDel(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/category/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function playletHomeConfigList(params) {
|
||||
return request({
|
||||
url: '/api/web/playlet/home-config/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletHomeConfigAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/home-config/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletHomeConfigUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/home-config/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletHomeConfigDel(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/home-config/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletHomeConfigTopicOptions(params) {
|
||||
return request({
|
||||
url: '/api/web/playlet/home-config/topic/options',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function playletList(params) {
|
||||
return request({
|
||||
url: '/api/web/playlet/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletDel(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletStatusSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/status/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletRecommendSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/recommend/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletFeaturedSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/featured/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletThemeSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/theme/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletCategorySet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/category/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletTagSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/tag/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletWatermarkReset(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/watermark/reset',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletVirtualLikeSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/like/virtual/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletVirtualBrowseSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/browse/virtual/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletVirtualHeatSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/heat/virtual/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletBannerSet(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/banner/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletChapterList(params) {
|
||||
return request({
|
||||
url: '/api/web/playlet/chapter/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletChapterAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/chapter/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletChapterUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/chapter/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletChapterDel(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/chapter/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletChapterSync(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/chapter/sync',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function playletResourceList(params) {
|
||||
return request({
|
||||
url: '/api/web/resource/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletResourceChapters(params) {
|
||||
return request({
|
||||
url: '/api/web/resource/chapters',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletResourceImport(data) {
|
||||
return request({
|
||||
url: '/api/web/resource/import',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function playletTagList(params) {
|
||||
return request({
|
||||
url: '/api/web/playlet/tag/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletTagAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/tag/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletTagUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/tag/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletTagDel(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/tag/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function playletThemeList(params) {
|
||||
return request({
|
||||
url: '/api/web/playlet/theme/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function playletThemeAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/theme/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletThemeUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/theme/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function playletThemeDel(data) {
|
||||
return request({
|
||||
url: '/api/web/playlet/theme/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 广告每日点击列表
|
||||
export function advitiseDayList(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/day/click/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 广告每日点击详情
|
||||
export function advitiseDayInfo(data) {
|
||||
return request({
|
||||
url: '/media/web/advitise/day/click/info',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function announcementList(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function announcementAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function announcementUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function announcementDel(data) {
|
||||
return request({
|
||||
url: '/api/web/announcement/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function contactusAdd(data) { // 更新
|
||||
return request({
|
||||
url: '/api/web/contactus/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function contactusDel(data) { // 删除
|
||||
return request({
|
||||
url: '/api/web/contactus/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function contactusList(data) { // 查询
|
||||
return request({
|
||||
url: '/api/web/contactus/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function ipBlackAdd(data) { // 音频新增
|
||||
return request({
|
||||
url: '/api/web/ipblack/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function ipBlackDel(data) { // 音频新增
|
||||
return request({
|
||||
url: '/api/web/ipblack/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function ipBlackList(data) { // 音频新增
|
||||
return request({
|
||||
url: '/api/web/ipblack/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-10-04 14:54:35
|
||||
* @LastEditors: 江涛
|
||||
* @LastEditTime: 2021-03-12 20:17:59
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 操作日志
|
||||
export function accOps(data) {
|
||||
return request({
|
||||
url: '/api/web/acc/ops',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 媒资库操作日志
|
||||
export function mzkAccOps(data) {
|
||||
return request({
|
||||
url: '/media/web/acc/ops',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-10-06 01:01:28
|
||||
* @LastEditors: 江涛
|
||||
* @LastEditTime: 2021-03-23 22:03:06
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
// 获取系统配置
|
||||
export function getSyscfg(data) {
|
||||
return request({
|
||||
url: '/api/web/syscfg/get',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改系统配置
|
||||
export function updateSyscfg(data) {
|
||||
return request({
|
||||
url: '/api/web/syscfg/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 详情导航列表
|
||||
export function detailNavList(data) {
|
||||
return request({
|
||||
url: '/api/web/detailnav/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增详情导航
|
||||
export function detailNavAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/detailnav/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑详情导航
|
||||
export function detailNavUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/detailnav/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除详情导航
|
||||
export function detailNavDel(data) {
|
||||
return request({
|
||||
url: '/api/web/detailnav/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function homeBannerList(params) {
|
||||
return request({
|
||||
url: '/api/web/home/banner/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function homeBannerAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/home/banner/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function homeBannerUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/home/banner/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function homeBannerDel(data) {
|
||||
return request({
|
||||
url: '/api/web/home/banner/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 热门导航配置-列表
|
||||
export function hotNavList(data) {
|
||||
return request({
|
||||
url: '/api/web/hotnav/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 热门导航配置-增加
|
||||
export function hotNavAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/hotnav/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 热门导航配置-更新
|
||||
export function hotNavUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/hotnav/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 热门导航配置-删除
|
||||
export function hotNavDel(data) {
|
||||
return request({
|
||||
url: '/api/web/hotnav/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除视频
|
||||
export function translationDel(data) {
|
||||
return request({
|
||||
url: '/api/web/translation/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频列表
|
||||
export function translationSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/translation/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频
|
||||
export function translationUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/translation/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键同步
|
||||
export function translationAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/translation/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除视频
|
||||
export function translationcategoryDel(data) {
|
||||
return request({
|
||||
url: '/api/web/translationcategory/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频列表
|
||||
export function translationcategorySearch(data) {
|
||||
return request({
|
||||
url: '/api/web/translationcategory/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频
|
||||
export function translationcategoryUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/translationcategory/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键同步
|
||||
export function translationcategoryAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/translationcategory/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-12-30 19:38:43
|
||||
* @LastEditors: 王涛
|
||||
* @LastEditTime: 2020-12-30 19:39:21
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询封禁列表
|
||||
export function userBanlogs(data) {
|
||||
return request({
|
||||
url: '/api/web/user/banlogs',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询圈子列表
|
||||
export function circleListSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/user/circle/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新圈子列表
|
||||
export function updateCircle(data) {
|
||||
return request({
|
||||
url: '/api/web/user/circle/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增圈子
|
||||
export function addCircle(data) {
|
||||
return request({
|
||||
url: '/api/web/user/circle/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 查询圈子订阅列表
|
||||
export function subscribedCircle(data) {
|
||||
return request({
|
||||
url: '/api/web/user/subscribed/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量删除圈子
|
||||
|
||||
export function circleDelAll(data) {
|
||||
return request({
|
||||
url: '/api/web/user/circle/batch/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-10-13 17:04:50
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2022-06-06 18:02:18
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户列表
|
||||
// export function feedbackList(params) {
|
||||
// return request({
|
||||
// url: '/api/web/feedback/list',
|
||||
// method: 'get',
|
||||
// params
|
||||
// })
|
||||
// }
|
||||
export function feedbackList(data) {
|
||||
return request({
|
||||
url: '/api/web/feedback/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function feedbackUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/feedback/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function questionnaireList(data) {
|
||||
return request({
|
||||
url: '/api/web/questionnaire/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function questionnaireHandle(data) {
|
||||
return request({
|
||||
url: '/api/web/questionnaire/handle',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-06-04 13:49:44
|
||||
* @LastEditTime: 2022-06-06 18:02:23
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/user/tpList.js
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户列表
|
||||
export function tpList(data) {
|
||||
return request({
|
||||
url: '/api/web/tp/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* @Date: 2024-11-14 14:45:16
|
||||
* @LastEditors: Administrator admin@example.com
|
||||
* @LastEditTime: 2024-11-14 14:54:44
|
||||
* @FilePath: /loli_web_admin/src/api/user/upbloggers.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户列表
|
||||
export function upbloggersGet(data) {
|
||||
return request({
|
||||
url: '/api/web/user/upbloggers/get',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户列表
|
||||
export function upbloggersUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/user/upbloggers/update',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @Author: voanit
|
||||
* @Date: 2020-09-23 17:41:34
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2022-06-06 18:02:26
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户列表
|
||||
export function getUserList(data) {
|
||||
return request({
|
||||
url: '/api/web/user/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
export function userExport(data) {
|
||||
return request({
|
||||
url: '/api/web/user/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新用户
|
||||
export function userUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/user/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户VIP
|
||||
export function userUpdateVip(data) {
|
||||
return request({
|
||||
url: '/api/web/user/updateVip',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改用户绑定银行卡
|
||||
export function updateUserBank(data) {
|
||||
return request({
|
||||
url: '/api/web/user/updateUserBank',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改用户观影券
|
||||
export function userMovieTicketsUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/user/updatemovieticket',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 添加金币
|
||||
export function userIncCoin(data) {
|
||||
return request({
|
||||
url: '/api/web/user/incCoin',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function userCaptcha(data) {
|
||||
return request({
|
||||
url: '/api/web/user/captcha',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 封禁用户
|
||||
export function userBan(data) {
|
||||
return request({
|
||||
url: '/api/web/user/ban',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 解封用户
|
||||
export function userUnBan(data) {
|
||||
return request({
|
||||
url: '/api/web/user/unban',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户优惠卷列表
|
||||
export function couponList(data) {
|
||||
return request({
|
||||
url: '/api/web/coupons/user/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户增加优惠卷
|
||||
export function couponHandsel(data) {
|
||||
return request({
|
||||
url: '/api/web/coupons/user/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户删除优惠卷
|
||||
export function couponDel(data) {
|
||||
return request({
|
||||
url: '/api/web/coupons/user/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户余额和可提现金额
|
||||
export function getBalance(data) {
|
||||
return request({
|
||||
url: '/api/web/user/getegamecoind',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户游戏币
|
||||
export function updateGameCoin(data) {
|
||||
return request({
|
||||
url: '/api/web/user/updategamecoind',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 全民代理列表
|
||||
export function userAgentList(data) {
|
||||
return request({
|
||||
url: '/api/web/proxyuser/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求用户二维码
|
||||
export function userQrcode(data) {
|
||||
return request({
|
||||
url: '/api/web/user/qrcode',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:25:07
|
||||
* @LastEditTime: 2022-06-06 18:02:42
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/user/userStat.js
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户列表
|
||||
export function getUserStatList(data) {
|
||||
return request({
|
||||
url: '/api/web/userstat/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
export function userStatExport(data) {
|
||||
return request({
|
||||
url: '/api/web/userstat/export',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data,
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2023-07-14 12:00:29
|
||||
* @LastEditTime: 2023-07-14 16:08:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /web-admin/src/api/userAnalysis/index.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户日活
|
||||
export function analyzeDau(data) {
|
||||
return request({
|
||||
url: '/api/web/analyze/dau',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 首充区间
|
||||
export function analyzeInterval(data) {
|
||||
return request({
|
||||
url: '/api/web/analyze/interval',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 二次消费
|
||||
export function analyzePurchase(data) {
|
||||
return request({
|
||||
url: '/api/web/analyze/purchase',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-10-05 14:44:43
|
||||
* @LastEditors: 江涛
|
||||
* @LastEditTime: 2021-03-24 11:39:15
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求视频enkey解密密钥
|
||||
export function videoFeviewList(params, urll) {
|
||||
return request({
|
||||
url: '/api/web/enkey',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function videoOk(data) {
|
||||
return request({
|
||||
url: '/media/web/upload/videoOk',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* @Author: 江涛
|
||||
* @Mail: jt213219216@gmail.com
|
||||
* @Date: 2021-02-25 16:49:30
|
||||
* @LastEditTime: 2022-01-18 21:31:05
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /web_admin/src/api/videoManagement/actress.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
// 新增女优
|
||||
export function actressAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/actress/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 删除女优
|
||||
export function actressDel(data) {
|
||||
return request({
|
||||
url: '/api/web/actress/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求女优列表
|
||||
export function actressList(params) {
|
||||
return request({
|
||||
url: '/api/web/actress/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 修改女优
|
||||
export function actressUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/actress/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function actressExport(data) {
|
||||
return request({
|
||||
url: '/api/web/actress/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:25:07
|
||||
* @LastEditTime: 2022-06-06 18:02:49
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/videoManagement/actressList.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取女优列表
|
||||
export function actressSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaactor/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 随机选择指定条数
|
||||
export function commentLibSelect(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/batch/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-02-22 14:30:36
|
||||
* @LastEditTime: 2022-06-06 18:02:56
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/videoManagement/commentManage.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求评论列表
|
||||
export function commentList(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除评论
|
||||
export function commentDelete(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 评论回复
|
||||
export function commentReply(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/replay',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 删除所有评论
|
||||
export function commentDeluser(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/user/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 评论审核
|
||||
export function commentReview(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/review',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 评论批量审核
|
||||
export function commentReviewBatch(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/reviewBatch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 评论编辑/评论置顶
|
||||
export function commentUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/post/comment/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function contentExcelExport(params) {
|
||||
return request({
|
||||
url: '/api/web/contentexcel/export',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
}
|
||||
|
||||
export function contentExcelImport(data) {
|
||||
return request({
|
||||
url: '/api/web/contentexcel/import',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:25:07
|
||||
* @LastEditTime: 2022-06-06 18:03:01
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/api/videoManagement/filterWord.js
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取非法词列表
|
||||
export function getFilterList(data) {
|
||||
return request({
|
||||
url: 'api/web/filterword/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
// 删除非法词
|
||||
export function filterWordDel(data) {
|
||||
return request({
|
||||
url: '/api/web/filterword/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增非法词
|
||||
export function filterWordAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/filterword/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-07-21 19:49:58
|
||||
* @LastEditTime: 2023-02-22 10:33:20
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /xd_web_admin/src/api/videoManagement/mdsqsyncMedia.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 快手视频列表
|
||||
export function mdsqsyncMediaSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/mdsync/media/search',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手标签
|
||||
export function mdsqsyncMediatagSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/mdsync/mediatag/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手分类
|
||||
export function mdsqsyncMediacategorySearch(data) {
|
||||
return request({
|
||||
url: '/api/web/mdsync/mediacategory/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手专题
|
||||
export function mdsqsyncTopicSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/mdsync/topic/search',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量同步快手资源
|
||||
export function mdsqsyncSyncmedias(data) {
|
||||
return request({
|
||||
url: '/api/web/mdsync/syncmedias',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-01-07 20:12:33
|
||||
* @LastEditTime: 2022-06-03 15:57:33
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /web-admin/src/api/videoManagement/mediagpisode.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增选集
|
||||
export function mediaepisodeAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除选集
|
||||
export function mediaepisodeDel(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新选集信息
|
||||
export function mediaepisodeUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询选集列表
|
||||
export function mediaepisodeSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取一个能加入选集的视频列表
|
||||
export function mediacollAddmediaList(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/canaddmedia/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取一个选集的视频列表
|
||||
export function mediacollMediaList(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/media/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一个选集添加视频
|
||||
export function mediacollMediaAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/media/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一个选集删除视频
|
||||
export function mediacollMediaDel(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/media/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 设置集数
|
||||
export function mediaEpisodeindex(data) {
|
||||
return request({
|
||||
url: '/api/web/mediaepisode/media/index',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-07-07 15:16:43
|
||||
* @LastEditTime: 2022-07-07 15:17:51
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /web_admin/src/api/videoManagement/recommend.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 视频推荐列表
|
||||
export function recommendSeach(data) {
|
||||
return request({
|
||||
url: '/api/web/media/recommend/search',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除推荐视频
|
||||
export function recommendDel(data) {
|
||||
return request({
|
||||
url: '/api/web/media/recommend/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:25:07
|
||||
* @LastEditTime: 2022-06-06 18:03:15
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/api/videoManagement/recommendTopic.js
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function topicAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/recommend/topic/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function topicDel(data) {
|
||||
return request({
|
||||
url: '/api/web/recommend/topic/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function topicList(data) {
|
||||
return request({
|
||||
url: '/api/web/recommend/topic/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
export function topicUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/recommend/topic/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-07-21 19:49:58
|
||||
* @LastEditTime: 2023-02-22 10:33:20
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /xd_web_admin/src/api/videoManagement/mdsqsyncMedia.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 快手视频列表
|
||||
export function kkjmsqsyncMediaSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/kkjmsync/media/search',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手标签
|
||||
export function kkjmsqsyncMediatagSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/kkjmsync/mediatag/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手分类
|
||||
export function kkjmsqsyncMediacategorySearch(data) {
|
||||
return request({
|
||||
url: '/api/web/kkjmsync/mediacategory/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手专题
|
||||
export function kkjmsqsyncTopicSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/kkjmsync/topic/search',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量同步快手资源
|
||||
export function kkjmsqsyncSyncmedias(data) {
|
||||
return request({
|
||||
url: '/api/web/kkjmsync/syncmedias',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除视频
|
||||
export function videocategoryDel(data) {
|
||||
return request({
|
||||
url: '/api/web/videocategory/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频列表
|
||||
export function videocategorySearch(data) {
|
||||
return request({
|
||||
url: '/api/web/videocategory/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频
|
||||
export function videocategoryUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/videocategory/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键同步
|
||||
export function videocategoryAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/videocategory/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function videoinfoAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/sync',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function syncMediaFile(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/syncMediaFile',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除视频
|
||||
export function videoinfoDel(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频列表
|
||||
export function videoinfoSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频
|
||||
export function videoinfoUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频转H265
|
||||
export function videoinfoTranscode(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/transcode',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 单/批量设置标签(覆盖原有标签)
|
||||
export function setTags(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/tag/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 单/批量设置是否推荐
|
||||
export function setRecommend(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/recommend/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 单/批量设置假点赞数(收藏数),随机区间 [likesMin, likesMax]
|
||||
export function setFakeLikes(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/setFakeLikes',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 单/批量设置假观看次数,随机区间 [watchTimesMin, watchTimesMax]
|
||||
export function setFakeWatchTimes(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/setFakeWatchTimes',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function setVideoHeat(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/heat/set',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-01-21 16:55:02
|
||||
* @LastEditTime: 2022-08-09 21:30:33
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /sq_web_admin/src/api/videoManagement/videoRank.js
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询视频排行榜
|
||||
export function mediarankList(data) {
|
||||
return request({
|
||||
url: '/api/web/mediarank/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除视频排行榜
|
||||
export function mediarankDel(data) {
|
||||
return request({
|
||||
url: '/api/web/mediarank/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 添加一个视频排行榜
|
||||
export function mediarankAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/mediarank/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 更新一个视频排行榜
|
||||
export function mediarankupdate(data) {
|
||||
return request({
|
||||
url: '/api/web/mediarank/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除视频
|
||||
export function videotopicDel(data) {
|
||||
return request({
|
||||
url: '/api/web/videotopic/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频列表
|
||||
export function videotopicSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/videotopic/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频
|
||||
export function videotopicUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/videotopic/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键同步
|
||||
export function videotopicAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/videotopic/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 修改合集内视频列表
|
||||
export function videocollectionOption(data) {
|
||||
return request({
|
||||
url: '/api/web/videocollection/media/option',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取合集视频列表
|
||||
export function videocollectionMediaList(data) {
|
||||
return request({
|
||||
url: '/api/web/videocollection/media/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改合集里的视频排序
|
||||
export function videocollectionMediaRank(data) {
|
||||
return request({
|
||||
url: '/api/web/videocollection/media/rank',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增合集
|
||||
export function addVideocollectionMedia(data) {
|
||||
return request({
|
||||
url: '/api/web/videoinfo/addcoll',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除视频作者
|
||||
export function videocreaterDel(data) {
|
||||
return request({
|
||||
url: '/api/web/videocreater/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 视频作者列表
|
||||
export function videocreaterSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/videocreater/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改视频作者
|
||||
export function videocreaterUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/videocreater/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键同步
|
||||
export function videocreaterAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/videocreater/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 视频标签列表
|
||||
export function videotagList(data) {
|
||||
return request({
|
||||
url: '/api/web/videotag/list',
|
||||
method: 'post',
|
||||
filterParam: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除视频标签
|
||||
export function videotagDel(data) {
|
||||
return request({
|
||||
url: '/api/web/videotag/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增视频标签
|
||||
export function videotagAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/videotag/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 更新视频标签
|
||||
export function videotagUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/videotag/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-07-21 19:49:58
|
||||
* @LastEditTime: 2022-07-21 21:26:34
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /xd_web_admin/src/api/videoManagement/zhsyncMedia.js
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 快手视频列表
|
||||
export function zhsyncMediaSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/zhsync/media/search',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手标签
|
||||
export function zhsyncMediatagSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/zhsync/mediatag/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手分类
|
||||
export function zhsyncMediacategorySearch(data) {
|
||||
return request({
|
||||
url: '/api/web/zhsync/mediacategory/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 请求快手专题
|
||||
export function zhsyncTopicSearch(data) {
|
||||
return request({
|
||||
url: '/api/web/zhsync/topic/search',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量同步快手资源
|
||||
export function zhsyncSyncmedias(data) {
|
||||
return request({
|
||||
url: '/api/web/zhsync/syncmedias',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 请求富文本列表
|
||||
export function richtextcontentList(data) {
|
||||
return request({
|
||||
url: '/api/web/richtextcontent/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 富文本更新更新
|
||||
export function richtextcontentUpdate(data) {
|
||||
return request({
|
||||
url: '/api/web/richtextcontent/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增富文本
|
||||
export function richtextcontentAdd(data) {
|
||||
return request({
|
||||
url: '/api/web/richtextcontent/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除富文本
|
||||
export function richtextcontentDel(data) {
|
||||
return request({
|
||||
url: '/api/web/richtextcontent/del',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 160 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 328 B |
Executable
+94
@@ -0,0 +1,94 @@
|
||||
<!--
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-05-16 10:46:46
|
||||
* @LastEditors: 王涛
|
||||
* @LastEditTime: 2021-01-27 10:44:03
|
||||
-->
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span
|
||||
v-if="item.redirect==='noRedirect'||index==levelList.length-1"
|
||||
class="no-redirect">{{ item.meta.title }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route(route) {
|
||||
// if you go to the redirect page, do not update the breadcrumbs
|
||||
if (route.path.startsWith('/redirect/')) {
|
||||
return
|
||||
}
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
},
|
||||
methods: {
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
const matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
||||
// const first = matched[0]
|
||||
|
||||
// if (!this.isDashboard(first)) {
|
||||
// matched = [{ path: '/promptPage', meta: { title: '首页' }}].concat(matched)
|
||||
// }
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Home'.toLocaleLowerCase()
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(this.pathCompile(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/styles/variables.scss';
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
line-height: 50px;
|
||||
margin-left: 8px;
|
||||
|
||||
.no-redirect {
|
||||
color: $themeColor;
|
||||
cursor: text;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
<!--
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2021-11-16 17:10:43
|
||||
* @LastEditTime: 2022-04-07 20:17:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /comics-admin/src/components/Hamburger/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div style="padding: 0 15px" @click="toggleClick">
|
||||
<svg :class="{'is-active':isActive}" class="hamburger" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="64" height="64">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
|
||||
</svg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import variables from '@/styles/variables.scss'
|
||||
export default {
|
||||
name: 'Hamburger',
|
||||
props: {
|
||||
isActive: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
variables() {
|
||||
return variables
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleClick() {
|
||||
this.$emit('toggleClick')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.hamburger {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.hamburger.is-active {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
</style>
|
||||
Executable
+180
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<div :class="{'show':show}" class="header-search">
|
||||
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
|
||||
<el-select ref="headerSearchSelect" v-model="search" :remote-method="querySearch" filterable default-first-option remote placeholder="Search" class="header-search-select" @change="change">
|
||||
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" />
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// fuse is a lightweight fuzzy-search module
|
||||
// make search results more in line with expectations
|
||||
import Fuse from 'fuse.js'
|
||||
import path from 'path'
|
||||
|
||||
export default {
|
||||
name: 'HeaderSearch',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
options: [],
|
||||
searchPool: [],
|
||||
show: false,
|
||||
fuse: undefined
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
routes() {
|
||||
return this.$store.getters.permission_routes
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
routes() {
|
||||
this.searchPool = this.generateRoutes(this.routes)
|
||||
},
|
||||
searchPool(list) {
|
||||
this.initFuse(list)
|
||||
},
|
||||
show(value) {
|
||||
if (value) {
|
||||
document.body.addEventListener('click', this.close)
|
||||
} else {
|
||||
document.body.removeEventListener('click', this.close)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.searchPool = this.generateRoutes(this.routes)
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
this.show = !this.show
|
||||
if (this.show) {
|
||||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
|
||||
this.options = []
|
||||
this.show = false
|
||||
},
|
||||
change(val) {
|
||||
this.$router.push(val.path)
|
||||
this.search = ''
|
||||
this.options = []
|
||||
this.$nextTick(() => {
|
||||
this.show = false
|
||||
})
|
||||
},
|
||||
initFuse(list) {
|
||||
this.fuse = new Fuse(list, {
|
||||
shouldSort: true, // 是否按分数对结果列表排序
|
||||
threshold: 0.4, // 匹配算法阀值,阀值为0时需完全匹配,1为完全不匹配
|
||||
location: 0, // 确定文本中预期找到的模式的大致位置
|
||||
distance: 100,
|
||||
maxPatternLength: 32, // 模式的最大长度
|
||||
minMatchCharLength: 1, // 模式的最小字符长度
|
||||
keys: [
|
||||
{
|
||||
// 搜索标题与路径
|
||||
name: 'title',
|
||||
weight: 0.7
|
||||
},
|
||||
{
|
||||
name: 'path',
|
||||
weight: 0.3
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
// Filter out the routes that can be displayed in the sidebar
|
||||
// And generate the internationalized title
|
||||
generateRoutes(routes, basePath = '/', prefixTitle = []) {
|
||||
let res = []
|
||||
|
||||
for (const router of routes) {
|
||||
// skip hidden router
|
||||
if (router.hidden) {
|
||||
continue
|
||||
}
|
||||
|
||||
const data = {
|
||||
path: path.resolve(basePath, router.path),
|
||||
title: [...prefixTitle]
|
||||
}
|
||||
|
||||
if (router.meta && router.meta.title) {
|
||||
data.title = [...data.title, router.meta.title]
|
||||
|
||||
if (router.redirect !== 'noRedirect') {
|
||||
// only push the routes with title
|
||||
// special case: need to exclude parent router without redirect
|
||||
res.push(data)
|
||||
}
|
||||
}
|
||||
|
||||
// recursive child routes
|
||||
if (router.children) {
|
||||
const tempRoutes = this.generateRoutes(
|
||||
router.children,
|
||||
data.path,
|
||||
data.title
|
||||
)
|
||||
if (tempRoutes.length >= 1) {
|
||||
res = [...res, ...tempRoutes]
|
||||
}
|
||||
}
|
||||
}
|
||||
return res
|
||||
},
|
||||
querySearch(query) {
|
||||
if (query !== '') {
|
||||
this.options = this.fuse.search(query)
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header-search {
|
||||
font-size: 0 !important;
|
||||
|
||||
.search-icon {
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.header-search-select {
|
||||
font-size: 18px;
|
||||
transition: width 0.2s;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
||||
/deep/ .el-input__inner {
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
box-shadow: none !important;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&.show {
|
||||
.header-search-select {
|
||||
width: 210px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,373 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="Visible"
|
||||
@close="close"
|
||||
center
|
||||
class="ac-dialog"
|
||||
width="390px">
|
||||
<div class="itemData-main">
|
||||
<header class="header">
|
||||
<div class="title">{{ itemData.title }}</div>
|
||||
<div class="info">
|
||||
<a>{{ itemData.creatorName }} •</a>
|
||||
{{ itemData.addedTime | BeiJingTime }}
|
||||
<span v-for="(item, index) in itemData.categoryIds" :key="item">{{ item |
|
||||
changeCategoryName(videoCategoryList)
|
||||
}} <span v-if="index !== itemData.categoryIds.length - 1">•</span> </span>
|
||||
</div>
|
||||
</header>
|
||||
<div class="postContent">
|
||||
<div class="postBox" v-for="(item, index) in itemData.nodes" :key="index">
|
||||
<p class="postTitle">{{ item.title }}</p>
|
||||
<ShowImg v-for="(img, imgINdex) in item.images" :key="imgINdex" :urls="img" />
|
||||
<span class="postText">{{ item.text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<DPlayer
|
||||
ref="player"
|
||||
class="dplayerBox"
|
||||
v-if="itemData.video && itemData.video.url"
|
||||
:video="{
|
||||
url: '/api/web/m3u8/' + filterM3u8(itemData.video.url),
|
||||
type: 'hls',
|
||||
pic: '',
|
||||
}"
|
||||
hotkey></DPlayer>
|
||||
<div class="keywords">
|
||||
关键词:
|
||||
<span v-for="(keyName,keyIndex) in itemData.keyworld" :key="keyIndex">#{{keyName}} </span>
|
||||
</div>
|
||||
<div class="tagBox">
|
||||
<p class="tagList" v-for="(tag,tagIndex) in itemData.tags" :key="tagIndex">
|
||||
<span class="tagItem">{{tag | changeCategoryName(videoTagList)}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import ShowImg from '@/components/ShowImg/index.vue'
|
||||
import DPlayer from '@/components/VueDplayerHls/index.vue'
|
||||
|
||||
export default {
|
||||
props: ['itemData', 'videoCategoryList', 'videoTagList'],
|
||||
components: {
|
||||
ShowImg,
|
||||
DPlayer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Visible: true
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
||||
},
|
||||
filters: {
|
||||
changeCategoryName(v, list) {
|
||||
let arr = []
|
||||
if (v) {
|
||||
arr = list.filter(item => {
|
||||
return item.id === v
|
||||
})
|
||||
if (arr[0]) {
|
||||
return arr[0].name
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
filterM3u8(v) {
|
||||
return /\.m3u8/g.test(v) ? v : v + '.m3u8'
|
||||
},
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.ac-dialog{
|
||||
overflow: hidden;
|
||||
::v-deep{
|
||||
.el-dialog{
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.itemData-main {
|
||||
/* rem适配基础设置 */
|
||||
font-size: 16px;
|
||||
/* 基准字体大小 */
|
||||
background: #000;
|
||||
color: #fff;
|
||||
height: 844px;
|
||||
overflow-y: scroll;
|
||||
padding: 10px;
|
||||
|
||||
a,
|
||||
a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.topBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 16px;
|
||||
background: #212121;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99;
|
||||
/* display: none; */
|
||||
}
|
||||
|
||||
.navBtn {
|
||||
width: 51px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
color: #E0E0E0;
|
||||
border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
.navBtn .moreIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 94px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.searchIcon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 27px;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
/* height: 159px; */
|
||||
background: #212121;
|
||||
padding: 12px 16px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.header .title {
|
||||
text-align: center;
|
||||
color: #BDBDBD;
|
||||
font-size: 26px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.header .info {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: rgba(255, 255, 255, 0.70);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header .info a {
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
|
||||
.main .lineBox {
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.main .lineBox .line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
margin: 18px 0;
|
||||
}
|
||||
|
||||
.postContent {
|
||||
margin: 36px 0 0;
|
||||
}
|
||||
|
||||
.postBox {
|
||||
color: #FAFAFA;
|
||||
/* margin-bottom: 18px; */
|
||||
}
|
||||
|
||||
.postTitle {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
line-height: 32px;
|
||||
margin-bottom: 28px;
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.postText {
|
||||
color: #FAFAFA;
|
||||
margin: 0 16px 36px;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.postimage {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 18px;
|
||||
/* margin-bottom: 47px; */
|
||||
}
|
||||
|
||||
.postDesc {
|
||||
font-size: 16px;
|
||||
color: #FAFAFA;
|
||||
line-height: 22px;
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 19px;
|
||||
}
|
||||
|
||||
.postDesc span {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.postLine {
|
||||
margin: 0 16px;
|
||||
border-bottom: 1px dashed rgba(255, 255, 255, 0.50);
|
||||
}
|
||||
|
||||
.tagBox {
|
||||
margin-bottom: 12px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.tagBox .tagList {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 7px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.tagBox .tagList .tagItem {
|
||||
padding: 8px 16px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 62px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 12px;
|
||||
color: #BDBDBD;
|
||||
}
|
||||
|
||||
.lastDay {
|
||||
text-align: right;
|
||||
color: #BDBDBD;
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.copyBox {
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
text-shadow: 0 0 20px #FF8400, 0 0 20px #FF8400;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
line-height: 28px;
|
||||
/* 140% */
|
||||
padding: 18px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.copySuccess {
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
text-shadow: 0 0 20px #FF00B2, 0 0 20px #FF00B2;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
line-height: 28px;
|
||||
/* 140% */
|
||||
padding: 18px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.dplayerBox {
|
||||
margin-bottom: 18px;
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
.gridAdvBox {
|
||||
margin: 0 16px 18px;
|
||||
}
|
||||
|
||||
.gridAdvBox .gridAdvTitle {
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
height: 49px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.10);
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
font-size: 18px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.keywords {
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
color: #BDBDBD;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
|
||||
/* body {
|
||||
margin-top: 140px;
|
||||
} */
|
||||
body main {
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.topBox {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,251 @@
|
||||
<!--
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2021-11-13 14:46:20
|
||||
* @LastEditTime: 2023-01-02 19:27:36
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @FilePath: /web_admin/src/components/QuillEditor/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<quill-editor
|
||||
v-model="content"
|
||||
ref="myQuillEditor"
|
||||
:options="editorOption"
|
||||
@ready="onEditorReady($event)"></quill-editor>
|
||||
<!-- el-uploader不好手动触发上传功能 -->
|
||||
<uploader
|
||||
:style="{ display: 'none' }"
|
||||
:options="{ ...options, target: '/api/web/file/uploadImg' }"
|
||||
class="uploader-example"
|
||||
@file-success="imageSuccess">
|
||||
<uploader-drop>
|
||||
<uploader-btn ref="editorUploadImg" :attrs="attrsImg"></uploader-btn>
|
||||
</uploader-drop>
|
||||
</uploader>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { handleVerAutoImg } from '@/utils/index.js'
|
||||
import 'quill/dist/quill.core.css'
|
||||
import 'quill/dist/quill.snow.css'
|
||||
import 'quill/dist/quill.bubble.css'
|
||||
import Quill from 'quill'
|
||||
const Link = Quill.import('formats/link')
|
||||
Link.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel', 'yinseinner']
|
||||
import { quillEditor } from 'vue-quill-editor'
|
||||
import { ImageDrop } from 'quill-image-drop-module'
|
||||
import ImageResize from 'quill-image-resize-module'
|
||||
Quill.register('modules/imageDrop', ImageDrop)
|
||||
Quill.register('modules/imageResize', ImageResize)
|
||||
|
||||
// 自定义字体类型
|
||||
var fonts = ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial', 'Times-New-Roman', 'sans-serif']
|
||||
var Font = Quill.import('formats/font')
|
||||
Font.whitelist = fonts // 将字体加入到白名单
|
||||
Quill.register(Font, true)
|
||||
|
||||
export default {
|
||||
name: 'Editor',
|
||||
components: {
|
||||
quillEditor
|
||||
},
|
||||
props: {
|
||||
textNode: {
|
||||
default: ''
|
||||
}
|
||||
|
||||
},
|
||||
computed: {
|
||||
options() {
|
||||
return {
|
||||
chunkSize: 1024 * 1024 * 30, // 切片大小
|
||||
method: 'application/json',
|
||||
testChunks: false,
|
||||
allowDuplicateUploads: false, // 是否可以重复选择
|
||||
query: {},
|
||||
singleFile: false, // 是否只能选择单项
|
||||
headers: {
|
||||
Authorization: this.$store.getters.token
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const _that = this
|
||||
return {
|
||||
content: '',
|
||||
imgPath: [],
|
||||
domain: this.$store.getters.getSystemConfig.imgWebCdn, // 不能暴露源站地址
|
||||
attrsImg: {
|
||||
accept: ['image/*']
|
||||
},
|
||||
trackId: undefined,
|
||||
editorOption: {
|
||||
placeholder: '请输入帖子内容',
|
||||
modules: {
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
||||
['blockquote', 'code-block'],
|
||||
|
||||
[{ header: 1 }, { header: 2 }], // custom button values
|
||||
[{ list: 'ordered' }, { list: 'bullet' }],
|
||||
[{ script: 'sub' }, { script: 'super' }], // superscript/subscript
|
||||
[{ indent: '-1' }, { indent: '+1' }], // outdent/indent
|
||||
[{ direction: 'rtl' }], // text direction
|
||||
|
||||
[{ size: ['small', false, 'large', 'huge'] }], // custom dropdown
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
||||
|
||||
[{ color: [] }, { background: [] }], // dropdown with defaults from theme
|
||||
[{ font: [] }],
|
||||
[{ align: [] }],
|
||||
['link', 'image'],
|
||||
['clean']
|
||||
],
|
||||
handlers: {
|
||||
// 自定义上传图片
|
||||
image: value => {
|
||||
_that.$refs.editorUploadImg.$el.childNodes[0].click()
|
||||
}
|
||||
}
|
||||
},
|
||||
// //配置富文本框图片大小调整功能
|
||||
imageDrop: true,
|
||||
imageResize: {
|
||||
displayStyles: {
|
||||
backgroundColor: 'black',
|
||||
border: 'none',
|
||||
color: 'white'
|
||||
},
|
||||
modules: ['Resize', 'DisplaySize', 'Toolbar']
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 暂存图片base64
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getdata() {
|
||||
const myeditor = this.$refs.myQuillEditor.quill
|
||||
|
||||
// 找到所有包含 data-custom 属性的 img 标签
|
||||
const imgNodes = myeditor.container.querySelectorAll('img[data-custom]')
|
||||
imgNodes.forEach((node) => {
|
||||
const dataCustomValue = node.getAttribute('data-custom') // 获取 data-custom 的值
|
||||
// 交换 src 和 data-custom 的值
|
||||
node.setAttribute('src', dataCustomValue)
|
||||
node.removeAttribute('data-custom') // 删除 data-custom 属性
|
||||
})
|
||||
|
||||
// 检查内容是否为空
|
||||
if (this.content === '<p><br></p>' || this.content.trim() === '') {
|
||||
this.content = '' // 将内容设置为空字符串
|
||||
} else {
|
||||
// 直接更新 this.content 中的内容
|
||||
this.content = myeditor.root.innerHTML // 获取编辑器内容
|
||||
}
|
||||
return this.content
|
||||
},
|
||||
onEditorReady(e) {
|
||||
const updateImageSources = async() => {
|
||||
const promises = []
|
||||
const updatedHtml = this.textNode.replace(/<img[^>]+src="([^">]+)"/g, (match, src) => {
|
||||
const promise = handleVerAutoImg(this.domain + src, true).then((newSrc) => {
|
||||
// 返回一个对象,包含新的 src 和原始 src 作为 customData
|
||||
return { newSrc, originalSrc: src }
|
||||
})
|
||||
|
||||
promises.push(promise)
|
||||
return match // 返回原始匹配,稍后替换
|
||||
})
|
||||
|
||||
// 等待所有 Promise 完成
|
||||
const newMatches = await Promise.all(promises)
|
||||
|
||||
// 清空当前编辑器内容
|
||||
const myeditor = this.$refs.myQuillEditor.quill
|
||||
myeditor.setContents([])
|
||||
|
||||
// 更新 HTML 内容
|
||||
let finalHtml = updatedHtml
|
||||
newMatches.forEach(({ newSrc, originalSrc }) => {
|
||||
finalHtml = finalHtml.replace(
|
||||
new RegExp(`<img[^>]+src="${originalSrc}"`, 'g'), // 使用 originalSrc 进行全局匹配
|
||||
`<img src="${newSrc}" data-custom="${originalSrc}"`
|
||||
)
|
||||
})
|
||||
|
||||
// 使用 dangerouslyPasteHTML 插入更新后的 HTML
|
||||
myeditor.clipboard.dangerouslyPasteHTML(0, finalHtml)
|
||||
|
||||
// 直接操作 DOM 添加 data-custom 属性
|
||||
const imgNodes = myeditor.container.querySelectorAll('img')
|
||||
imgNodes.forEach((node) => {
|
||||
const src = node.getAttribute('src')
|
||||
const matchingMatch = newMatches.find(match => match.newSrc === src)
|
||||
if (matchingMatch) {
|
||||
node.setAttribute('data-custom', matchingMatch.originalSrc)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 使用示例
|
||||
updateImageSources().then(() => {
|
||||
console.log('Update complete')
|
||||
})
|
||||
},
|
||||
extractImageSources(htmlString) {
|
||||
const imgSrcRegex = /<img[^>]+src="([^">]+)"/g
|
||||
const srcArray = []
|
||||
let match
|
||||
|
||||
while ((match = imgSrcRegex.exec(htmlString)) !== null) {
|
||||
srcArray.push(match[1])
|
||||
}
|
||||
return srcArray
|
||||
},
|
||||
imageSuccess(rootFile, file, message) {
|
||||
const { code, data } = JSON.parse(message)
|
||||
if (code === 200) {
|
||||
const reader = new FileReader()
|
||||
|
||||
reader.onload = (e) => {
|
||||
const base64Data = e.target.result // 获取转换后的 Data URL
|
||||
|
||||
const myeditor = this.$refs.myQuillEditor.quill
|
||||
const index = myeditor.getSelection().index
|
||||
|
||||
// 插入图片
|
||||
myeditor.insertEmbed(index, 'image', base64Data)
|
||||
|
||||
// 使用 setTimeout 确保 DOM 更新
|
||||
setTimeout(() => {
|
||||
// 查找插入的 img 元素
|
||||
const imgNode = myeditor.container.querySelector(`img[src="${base64Data}"]`)
|
||||
if (imgNode) {
|
||||
imgNode.setAttribute('data-custom', data.path) // 设置自定义属性
|
||||
} else {
|
||||
console.log('Image not found in the DOM') // 调试信息
|
||||
}
|
||||
}, 0)
|
||||
// 设置光标位置
|
||||
myeditor.setSelection(index + 1)
|
||||
}
|
||||
|
||||
// 读取 Blob 数据
|
||||
reader.readAsDataURL(file.file)
|
||||
}
|
||||
},
|
||||
|
||||
clearInput() {
|
||||
this.value = ''
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Executable
+145
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div ref="rightPanel" :class="{show:show}" class="rightPanel-container">
|
||||
<div class="rightPanel-background" />
|
||||
<div class="rightPanel">
|
||||
<div class="handle-button" :style="{'top':buttonTop+'px','background-color':theme}" @click="show=!show">
|
||||
<i :class="show?'el-icon-close':'el-icon-setting'" />
|
||||
</div>
|
||||
<div class="rightPanel-items">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addClass, removeClass } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'RightPanel',
|
||||
props: {
|
||||
clickNotClose: {
|
||||
default: false,
|
||||
type: Boolean
|
||||
},
|
||||
buttonTop: {
|
||||
default: 250,
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.state.settings.theme
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(value) {
|
||||
if (value && !this.clickNotClose) {
|
||||
this.addEventClick()
|
||||
}
|
||||
if (value) {
|
||||
addClass(document.body, 'showRightPanel')
|
||||
} else {
|
||||
removeClass(document.body, 'showRightPanel')
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.insertToBody()
|
||||
},
|
||||
beforeDestroy() {
|
||||
const elx = this.$refs.rightPanel
|
||||
elx.remove()
|
||||
},
|
||||
methods: {
|
||||
addEventClick() {
|
||||
window.addEventListener('click', this.closeSidebar)
|
||||
},
|
||||
closeSidebar(evt) {
|
||||
const parent = evt.target.closest('.rightPanel')
|
||||
if (!parent) {
|
||||
this.show = false
|
||||
window.removeEventListener('click', this.closeSidebar)
|
||||
}
|
||||
},
|
||||
insertToBody() {
|
||||
const elx = this.$refs.rightPanel
|
||||
const body = document.querySelector('body')
|
||||
body.insertBefore(elx, body.firstChild)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.showRightPanel {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: calc(100% - 15px);
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.rightPanel-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transition: opacity .3s cubic-bezier(.7, .3, .1, 1);
|
||||
background: rgba(0, 0, 0, .2);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.rightPanel {
|
||||
width: 100%;
|
||||
max-width: 260px;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .05);
|
||||
transition: all .25s cubic-bezier(.7, .3, .1, 1);
|
||||
transform: translate(100%);
|
||||
background: #fff;
|
||||
z-index: 40000;
|
||||
}
|
||||
|
||||
.show {
|
||||
transition: all .3s cubic-bezier(.7, .3, .1, 1);
|
||||
|
||||
.rightPanel-background {
|
||||
z-index: 20000;
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rightPanel {
|
||||
transform: translate(0);
|
||||
}
|
||||
}
|
||||
|
||||
.handle-button {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
position: absolute;
|
||||
left: -48px;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
border-radius: 6px 0 0 6px !important;
|
||||
z-index: 0;
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
line-height: 48px;
|
||||
i {
|
||||
font-size: 24px;
|
||||
line-height: 48px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div>
|
||||
<svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import screenfull from 'screenfull'
|
||||
|
||||
export default {
|
||||
name: 'Screenfull',
|
||||
data() {
|
||||
return {
|
||||
isFullscreen: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.destroy()
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
if (!screenfull.enabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
}
|
||||
screenfull.toggle()
|
||||
},
|
||||
change() {
|
||||
this.isFullscreen = screenfull.isFullscreen
|
||||
},
|
||||
init() {
|
||||
if (screenfull.enabled) {
|
||||
screenfull.on('change', this.change)
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.enabled) {
|
||||
screenfull.off('change', this.change)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.screenfull-svg {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
fill: #5a5e66;;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
vertical-align: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div class="select-sort">
|
||||
<el-button size="mini" @click="openManage">标签管理</el-button>
|
||||
<div class="flex-wrap">
|
||||
<el-tag class="flex-wrap-item" size="mini" type="success" v-for="item in value" :key="item">
|
||||
{{ item | changeTagName(VcrightList) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
:visible.sync="visible"
|
||||
class="ac-dialog"
|
||||
center
|
||||
top="50px"
|
||||
width="700px"
|
||||
@close="cancel">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="标签搜索" prop="searchText" class="search-button">
|
||||
<el-input v-model="searchText" style="width: 180px;" clearable placeholder="请输入标签关键字"></el-input>
|
||||
<el-button style="margin-left: 10px;" type="primary" @click="filterLeftData">搜索选择</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="stretch">
|
||||
<el-col :span="10">
|
||||
<h3>未选中</h3>
|
||||
<draggable class="list-group" :list="leftData" group="people">
|
||||
<div class="list-group-item" v-for="(element, index) in leftData" @click="toggleSelection(element, 'left')" :key="index">
|
||||
<el-tag size="mini">{{ element.title }}</el-tag>
|
||||
</div>
|
||||
</draggable>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="transfer-wrapper">
|
||||
<div class="el-transfer__buttons">
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<h3>已选中</h3>
|
||||
<draggable class="list-group" :list="rightData" group="people">
|
||||
<div class="list-group-item" v-for="(element, index) in rightData" @click="toggleSelection(element, 'right')" :key="index">
|
||||
<el-tag size="mini" type="success">{{ element.title }}</el-tag>
|
||||
</div>
|
||||
</draggable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button @click="confirm" type="primary">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import draggable from 'vuedraggable'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
draggable
|
||||
},
|
||||
filters: {
|
||||
changeTagName(value, list) {
|
||||
const found = list.find(item => item.id === value)
|
||||
return found ? found.title : ''
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
VcrightList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '权益管理'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
rightData: [],
|
||||
leftData: [],
|
||||
searchText: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler: 'initializeData',
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
filterLeftData() {
|
||||
const leftArr = [...this.leftData]
|
||||
const rightArr = [...this.rightData]
|
||||
const selectedLabels = this.searchText.split(/\s+/) // 按空格分割
|
||||
const selected = leftArr.filter(item => selectedLabels.includes(item.title))
|
||||
const remaining = leftArr.filter(item => !selectedLabels.includes(item.title))
|
||||
this.leftData = remaining
|
||||
this.rightData = [...new Map([...rightArr, ...selected].map(item => [item.id, item])).values()]
|
||||
// if (this.searchText) {
|
||||
// // 当输入有文本时,过滤左侧数据
|
||||
// this.leftData = this.VcrightList.filter(item => item.title.toLowerCase().includes(this.searchText.toLowerCase()));
|
||||
// } else {
|
||||
// // 当没有文本时,恢复所有未选中的标签
|
||||
// this.leftData = this.VcrightList.filter(item => !this.rightData.some(selected => selected.id === item.id));
|
||||
// }
|
||||
},
|
||||
toggleSelection(item, direction) {
|
||||
if (direction === 'right') {
|
||||
this.rightData = this.rightData.filter(i => i !== item)
|
||||
this.leftData.push(item)
|
||||
} else {
|
||||
this.leftData = this.leftData.filter(i => i !== item)
|
||||
this.rightData.push(item)
|
||||
}
|
||||
},
|
||||
initializeData() {
|
||||
console.log(this.value, '-=-=')
|
||||
if (this.value && this.value.length > 0) {
|
||||
this.rightData = this.value.map(item => ({
|
||||
id: item,
|
||||
title: this.VcrightList.find(el => el.id === item) ? this.VcrightList.find(el => el.id === item).title : ''
|
||||
}))
|
||||
} else {
|
||||
this.rightData = []
|
||||
}
|
||||
if (this.VcrightList && this.VcrightList.length > 0) {
|
||||
this.leftData = this.VcrightList.filter(item => !this.value.includes(item.id))
|
||||
} else {
|
||||
this.leftData = []
|
||||
}
|
||||
},
|
||||
openManage() {
|
||||
this.visible = true
|
||||
},
|
||||
cancel() {
|
||||
this.visible = false
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('changeInput', this.rightData.map(item => item.id))
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.select-sort {
|
||||
// 容器样式
|
||||
margin: 10px 20px;
|
||||
|
||||
.flex-wrap {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.transfer-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__flex-wrap {
|
||||
margin-top: 6px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&-item {
|
||||
margin-right: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
&__list-group {
|
||||
padding: 4px;
|
||||
height: calc(100% - 40px);
|
||||
border: 1px solid #ebeef5;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
|
||||
&-item {
|
||||
// 其他 list-group item 的样式
|
||||
}
|
||||
}
|
||||
|
||||
&__transfer-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
font-size: 40px;
|
||||
|
||||
.el-transfer__buttons {
|
||||
// 按钮样式
|
||||
}
|
||||
}
|
||||
|
||||
&__search-button {
|
||||
display: flex;
|
||||
width: 500px;
|
||||
|
||||
::v-deep {
|
||||
.el-form-item__content {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-group {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
}
|
||||
// 响应式风格
|
||||
@media (max-width: 768px) {
|
||||
.select-sort {
|
||||
&__search-button {
|
||||
width: 100%; // 在小屏幕上占满宽度
|
||||
}
|
||||
|
||||
&__flex-wrap {
|
||||
flex-direction: column; // 在小屏幕下垂直排列
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
title="批量设置标签"
|
||||
:visible.sync="Visible"
|
||||
@close="close"
|
||||
center
|
||||
class="ac-dialog"
|
||||
width="520px">
|
||||
<div class="set-tag-tip">已选 {{ ids.length }} 项,设置后将覆盖原有标签。</div>
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="80px">
|
||||
<el-form-item label="标签" prop="tagIds">
|
||||
<el-select
|
||||
v-model="form.tagIds"
|
||||
multiple
|
||||
filterable
|
||||
placeholder="请选择标签"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in tagOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false">取 消</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fetchContentTagsByType } from '@/api/commonManagement/contentTag'
|
||||
|
||||
export default {
|
||||
name: 'SetContentTags',
|
||||
props: {
|
||||
ids: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
tagType: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
setApi: {
|
||||
type: Function,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
loading: false,
|
||||
tagOptions: [],
|
||||
form: {
|
||||
tagIds: []
|
||||
},
|
||||
rules: {
|
||||
tagIds: [{ type: 'array', required: true, min: 1, message: '请至少选择一个标签', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
fetchContentTagsByType(this.tagType).then(list => {
|
||||
this.tagOptions = list
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
this.setApi({
|
||||
ids: this.ids,
|
||||
tagIds: this.form.tagIds
|
||||
}).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('设置标签成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error(res.msg || res.tip || '设置标签失败')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('设置标签失败')
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.set-tag-tip {
|
||||
margin-bottom: 16px;
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
:visible.sync="Visible"
|
||||
@close="close"
|
||||
center
|
||||
class="ac-dialog"
|
||||
width="560px">
|
||||
<div class="set-fake-tip">已选 {{ ids.length }} 项,将为每个项目在设定区间内随机取值写入。至少设置一项。</div>
|
||||
<el-form :model="form" label-position="right" label-width="120px" ref="form">
|
||||
<el-row :gutter="12" type="flex" align="middle">
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.setWatch">观看数</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小值" label-width="70px">
|
||||
<el-input-number v-model="form.watchTimesMin" :min="0" :controls="false" :disabled="!form.setWatch" placeholder="最小" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最大值" label-width="70px">
|
||||
<el-input-number v-model="form.watchTimesMax" :min="0" :controls="false" :disabled="!form.setWatch" placeholder="最大" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="12" type="flex" align="middle">
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.setLikes">收藏数</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小值" label-width="70px">
|
||||
<el-input-number v-model="form.likesMin" :min="0" :controls="false" :disabled="!form.setLikes" placeholder="最小" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最大值" label-width="70px">
|
||||
<el-input-number v-model="form.likesMax" :min="0" :controls="false" :disabled="!form.setLikes" placeholder="最大" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
<el-button @click="Visible = false">取 消</el-button>
|
||||
<el-button @click="submit" type="primary" :loading="loading">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SetFakeData',
|
||||
// ids: 选中的ID数组;setLikesApi / setWatchApi: 对应模块的接口方法
|
||||
props: {
|
||||
ids: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
setLikesApi: {
|
||||
type: Function,
|
||||
required: true
|
||||
},
|
||||
setWatchApi: {
|
||||
type: Function,
|
||||
required: true
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '设置观看数 / 收藏数'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
loading: false,
|
||||
form: {
|
||||
setWatch: false,
|
||||
watchTimesMin: undefined,
|
||||
watchTimesMax: undefined,
|
||||
setLikes: false,
|
||||
likesMin: undefined,
|
||||
likesMax: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 校验区间:非空、>=0、max>=min
|
||||
validateRange(min, max, label) {
|
||||
if (min === undefined || min === null || max === undefined || max === null) {
|
||||
this.$message.error(`请填写完整的${label}区间`)
|
||||
return false
|
||||
}
|
||||
if (min < 0 || max < 0) {
|
||||
this.$message.error(`${label}区间无效`)
|
||||
return false
|
||||
}
|
||||
if (max < min) {
|
||||
this.$message.error(`${label}最大值不能小于最小值`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
async submit() {
|
||||
if (!this.ids.length) {
|
||||
this.$message.error('未选择数据')
|
||||
return
|
||||
}
|
||||
if (!this.form.setWatch && !this.form.setLikes) {
|
||||
this.$message.error('请至少设置观看数或收藏数')
|
||||
return
|
||||
}
|
||||
const tasks = []
|
||||
if (this.form.setWatch) {
|
||||
if (!this.validateRange(this.form.watchTimesMin, this.form.watchTimesMax, '观看次数')) return
|
||||
tasks.push(
|
||||
this.setWatchApi({
|
||||
ids: this.ids,
|
||||
watchTimesMin: this.form.watchTimesMin,
|
||||
watchTimesMax: this.form.watchTimesMax
|
||||
})
|
||||
)
|
||||
}
|
||||
if (this.form.setLikes) {
|
||||
if (!this.validateRange(this.form.likesMin, this.form.likesMax, '点赞数')) return
|
||||
tasks.push(
|
||||
this.setLikesApi({
|
||||
ids: this.ids,
|
||||
likesMin: this.form.likesMin,
|
||||
likesMax: this.form.likesMax
|
||||
})
|
||||
)
|
||||
}
|
||||
this.loading = true
|
||||
try {
|
||||
const resList = await Promise.all(tasks)
|
||||
const ok = resList.every(res => res && res.code === 200)
|
||||
if (ok) {
|
||||
const modified = resList.reduce((sum, res) => sum + ((res.data && res.data.modifiedCount) || 0), 0)
|
||||
this.$message.success(`设置成功,共修改 ${modified} 条`)
|
||||
this.Visible = false
|
||||
} else {
|
||||
const failed = resList.find(res => !res || res.code !== 200)
|
||||
this.$message.error((failed && failed.tip) || '设置失败')
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error('设置失败')
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.set-fake-tip {
|
||||
margin-bottom: 16px;
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,91 @@
|
||||
<!--
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-10-05 11:37:08
|
||||
* @LastEditors: 王涛
|
||||
* @LastEditTime: 2020-11-24 17:04:24
|
||||
-->
|
||||
<template>
|
||||
<el-dialog class="img_dialog" append-to-body :title="title" align="center" :visible.sync="dialogVisible" width="40%" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body='false'>
|
||||
<el-carousel v-if="isArry" indicator-position="outside">
|
||||
<el-carousel-item v-for="item in mediaUrl" :key="item">
|
||||
<div class="media-box" id="img-box" > <img :src="item" /></div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<div v-else class="media-box" id="img-box" > <img :src="mediaUrl" /></div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
baseConfig: {},
|
||||
dialogVisible: false,
|
||||
domain: this.$store.getters.getSystemConfig.imgWebCdn, // 存放图片的域名
|
||||
mediaUrl: '',
|
||||
title: '查看图片',
|
||||
isArry: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
token() {
|
||||
return this.$store.state.token
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleClose() {
|
||||
if (this.player) {
|
||||
this.player.dispose()
|
||||
}
|
||||
this.dialogVisible = false
|
||||
this.mediaUrl = ''
|
||||
},
|
||||
open(url, type, data) {
|
||||
if (typeof url === 'string') {
|
||||
this.isArry = false
|
||||
} else {
|
||||
this.isArry = true
|
||||
}
|
||||
this.dialogVisible = true
|
||||
this.title = '封面图查看'
|
||||
this.mediaUrl = url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.img_dialog{
|
||||
::v-deep{
|
||||
.el-dialog__body{
|
||||
height: auto;
|
||||
.el-carousel__item{
|
||||
overflow: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.media-box {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
img {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
#my-video {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,177 @@
|
||||
<!--
|
||||
* @Author: 王涛
|
||||
* @Mail: no
|
||||
* @Date: 2020-10-05 11:36:16
|
||||
* @LastEditors: 江涛
|
||||
* @LastEditTime: 2021-03-03 17:50:26
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="img-wrap">
|
||||
<div v-if='showChangeBtn' class="changeLeft" @click="changeLeft">
|
||||
<i class="el-icon-arrow-left"></i>
|
||||
</div>
|
||||
<div class="showImg">
|
||||
<div v-if="showNoImg">暂无</div>
|
||||
<el-image v-else-if="src" :src="src" :preview-src-list="previewSrcList" fit="contain">
|
||||
<div slot="placeholder" class="image-slot" :style="{ width: width, height: height, lineHeight: height }">
|
||||
<i class="el-icon-loading"></i>加载中
|
||||
</div>
|
||||
</el-image>
|
||||
</div>
|
||||
<div v-if='showChangeBtn' class="changeRight" @click="changeRight">
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</div>
|
||||
<!--封面图、视频弹窗组件-->
|
||||
<Dialog ref="dialog"></Dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Dialog from './components/dialog'
|
||||
import { handleVerAutoImg } from '@/utils/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showNoImg: false,
|
||||
src: '',
|
||||
showChangeBtn: false,
|
||||
imgsUrl: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Dialog
|
||||
},
|
||||
props: ['width', 'height', 'urls', 'domain'],
|
||||
watch: {
|
||||
urls: {
|
||||
handler(o, n) {
|
||||
this.getBlobUri()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentDomain() {
|
||||
return this.domain || this.$store.getters.getSystemConfig.imgWebCdn || ''
|
||||
},
|
||||
previewSrcList() {
|
||||
return this.imgsUrl && this.imgsUrl.length ? this.imgsUrl : [this.src]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
buildImageUrl(path) {
|
||||
if (!path) return ''
|
||||
if (/^(blob:|https?:\/\/|data:)/.test(path)) return path
|
||||
const base = this.currentDomain || ''
|
||||
if (!base) return path
|
||||
const normalizedBase = base.endsWith('/') ? base.slice(0, -1) : base
|
||||
const normalizedPath = path.startsWith('/') ? path : `/${path}`
|
||||
return `${normalizedBase}${normalizedPath}`
|
||||
},
|
||||
|
||||
changeLeft() {
|
||||
const index = this.imgsUrl.indexOf(this.src)
|
||||
if (index === 0) {
|
||||
this.src = this.imgsUrl[this.imgsUrl.length - 1]
|
||||
} else {
|
||||
this.src = this.imgsUrl[index - 1]
|
||||
}
|
||||
},
|
||||
changeRight() {
|
||||
const index = this.imgsUrl.indexOf(this.src)
|
||||
if (index === this.imgsUrl.length - 1) {
|
||||
this.src = this.imgsUrl[0]
|
||||
} else {
|
||||
this.src = this.imgsUrl[index + 1]
|
||||
}
|
||||
},
|
||||
async getBlobUri() {
|
||||
if (!this.urls) {
|
||||
this.showChangeBtn = false
|
||||
this.showNoImg = true
|
||||
return
|
||||
}
|
||||
|
||||
// 检查是否为数组
|
||||
if (Array.isArray(this.urls)) {
|
||||
if (this.urls.length) {
|
||||
this.showChangeBtn = true
|
||||
this.imgsUrl = []
|
||||
for (let index = 0; index < this.urls.length; index++) {
|
||||
await handleVerAutoImg(this.buildImageUrl(this.urls[index])).then(res => {
|
||||
this.imgsUrl[index] = res
|
||||
this.src = this.imgsUrl[0]
|
||||
this.showNoImg = false
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.showChangeBtn = false
|
||||
this.showNoImg = true
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
const imageUrl = this.buildImageUrl(this.urls)
|
||||
const baseUri = await handleVerAutoImg(imageUrl)
|
||||
if (baseUri && baseUri.length) {
|
||||
this.src = baseUri
|
||||
this.showNoImg = false
|
||||
} else {
|
||||
this.showNoImg = true
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error loading image:', e)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 查看媒体
|
||||
async checkMedia() {
|
||||
if (this.urls) { // 判断是否存在
|
||||
if (typeof (this.urls) === 'string') { // 判断是单张图片还是数组
|
||||
this.$refs.dialog.open(this.src)
|
||||
} else {
|
||||
this.$refs.dialog.open(this.imgsUrl, 'img')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.img-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
|
||||
.changeLeft,
|
||||
.changeRight {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
margin-top: 15%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.showImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.image-slot {
|
||||
background: #f5f7fa;
|
||||
font-size: 12px;
|
||||
color: #c0c4cc;
|
||||
}
|
||||
|
||||
.el-image__error {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.el-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user