REVIEW 公众号的草稿管理
parent
7997614a3c
commit
5c58bc4e0c
|
@ -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
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
</ContentWrap>
|
||||
|
||||
<!-- 添加或修改草稿对话框 -->
|
||||
<!-- TODO @Dhb52:是不是整个做成一个组件 -->
|
||||
<el-dialog
|
||||
:title="isCreating ? '新建图文' : '修改图文'"
|
||||
width="80%"
|
||||
|
|
Loading…
Reference in New Issue