From 5c58bc4e0cb939e46abdedeffa3b7c0cfe6206bf Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 19 Apr 2023 19:28:04 +0800 Subject: [PATCH] =?UTF-8?q?REVIEW=20=E5=85=AC=E4=BC=97=E5=8F=B7=E7=9A=84?= =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/draft/components/CoverSelect.vue | 5 ++--- src/views/mp/draft/index.vue | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/mp/draft/components/CoverSelect.vue b/src/views/mp/draft/components/CoverSelect.vue index 2c9c64b1..ae2b6591 100644 --- a/src/views/mp/draft/components/CoverSelect.vue +++ b/src/views/mp/draft/components/CoverSelect.vue @@ -65,10 +65,10 @@ import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue' import { getAccessToken } from '@/utils/auth' import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus' import { NewsItem } from './types' - const message = useMessage() -const UPLOAD_URL = 'http://localhost:8000/upload/' //import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传永久素材的地址 +// const UPLOAD_URL = 'http://localhost:8000/upload/' // 上传永久素材的地址 +const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传永久素材的地址 const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部 const props = defineProps<{ @@ -109,7 +109,6 @@ const onMaterialSelected = (item: any) => { newsItem.value.thumbUrl = item.url } -// ======================== 文件上传 ======================== const onBeforeUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => { const isType = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/jpg'].includes( rawFile.type diff --git a/src/views/mp/draft/index.vue b/src/views/mp/draft/index.vue index 9e188ec4..7de992cd 100644 --- a/src/views/mp/draft/index.vue +++ b/src/views/mp/draft/index.vue @@ -46,6 +46,7 @@ +