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 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() {
|
||||
if (!formData.value.img) return message.error('请上传图片');
|
||||
// if (!formData.value.img) return message.error('请上传图片');
|
||||
formRef.value.validateFields().then(async (values) => {
|
||||
console.log(values)
|
||||
try {
|
||||
showLoading()
|
||||
const params = {
|
||||
...values,
|
||||
img: formData.value.img,
|
||||
//img: formData.value.img,
|
||||
fullImg: formData.value.fullImg,
|
||||
smallImg: formData.value.smallImg,
|
||||
videoUrl: formData.value.videoUrl,
|
||||
|
||||
@ -105,6 +105,7 @@ import { usePagination } from '@/hooks'
|
||||
import EditDialog from './components/EditDialog.vue'
|
||||
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { delVideoItem } from '@/apis/modules/videoCenter'
|
||||
defineOptions({
|
||||
name: 'videoCenter',
|
||||
})
|
||||
@ -146,6 +147,7 @@ async function getPageList() {
|
||||
hideLoading()
|
||||
if (config('http.code.success') === success) {
|
||||
listData.value = data
|
||||
console.log(this.listData)
|
||||
paginationState.total = total
|
||||
}
|
||||
} catch (error) {
|
||||
@ -165,7 +167,7 @@ function handleDelete({ id }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
;(async () => {
|
||||
try {
|
||||
const { success } = await apis.videoCenter.delItem(id).catch(() => {
|
||||
const { success } = await apis.videoCenter.delVideoItem(id).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
|
||||
@ -112,6 +112,7 @@ getPageList()
|
||||
* 获取用户列表
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
|
||||
async function getPageList() {
|
||||
try {
|
||||
showLoading()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user