REVIEW 公众号的草稿管理

pull/130/MERGE
YunaiV 2023-04-19 19:28:04 +08:00
parent 7997614a3c
commit 5c58bc4e0c
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -46,6 +46,7 @@
</ContentWrap>
<!-- 添加或修改草稿对话框 -->
<!-- TODO @Dhb52是不是整个做成一个组件 -->
<el-dialog
:title="isCreating ? '新建图文' : '修改图文'"
width="80%"