generated from Leo_Ding/web-template
修改视频部分内容
This commit is contained in:
parent
080061044e
commit
1bb29656a1
@ -11,4 +11,4 @@ export const createDynamic = (params) => request.basic.post('/api/v1/videos', pa
|
|||||||
// 更新动态
|
// 更新动态
|
||||||
export const updateItem = (id, params) => request.basic.put(`/api/v1/videos/${id}`, params)
|
export const updateItem = (id, params) => request.basic.put(`/api/v1/videos/${id}`, params)
|
||||||
// 删除动态
|
// 删除动态
|
||||||
export const delItem = (id) => request.basic.delete(`/api/v1/videos/${id}`)
|
export const delVideoItem = (id) => request.basic.delete(`/api/v1/videos/${id}`)
|
||||||
|
|||||||
@ -155,14 +155,14 @@ async function handleEdit(record = {}) {
|
|||||||
* 确定
|
* 确定
|
||||||
*/
|
*/
|
||||||
function handleOk() {
|
function handleOk() {
|
||||||
if (!formData.value.img) return message.error('请上传图片');
|
// if (!formData.value.img) return message.error('请上传图片');
|
||||||
formRef.value.validateFields().then(async (values) => {
|
formRef.value.validateFields().then(async (values) => {
|
||||||
console.log(values)
|
console.log(values)
|
||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...values,
|
||||||
img: formData.value.img,
|
//img: formData.value.img,
|
||||||
fullImg: formData.value.fullImg,
|
fullImg: formData.value.fullImg,
|
||||||
smallImg: formData.value.smallImg,
|
smallImg: formData.value.smallImg,
|
||||||
videoUrl: formData.value.videoUrl,
|
videoUrl: formData.value.videoUrl,
|
||||||
|
|||||||
@ -105,6 +105,7 @@ import { usePagination } from '@/hooks'
|
|||||||
import EditDialog from './components/EditDialog.vue'
|
import EditDialog from './components/EditDialog.vue'
|
||||||
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { delVideoItem } from '@/apis/modules/videoCenter'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'videoCenter',
|
name: 'videoCenter',
|
||||||
})
|
})
|
||||||
@ -146,6 +147,7 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
listData.value = data
|
listData.value = data
|
||||||
|
console.log(this.listData)
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -165,7 +167,7 @@ function handleDelete({ id }) {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
;(async () => {
|
;(async () => {
|
||||||
try {
|
try {
|
||||||
const { success } = await apis.videoCenter.delItem(id).catch(() => {
|
const { success } = await apis.videoCenter.delVideoItem(id).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
|
|||||||
@ -112,6 +112,7 @@ getPageList()
|
|||||||
* 获取用户列表
|
* 获取用户列表
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
async function getPageList() {
|
async function getPageList() {
|
||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user