mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 12:18:43 +08:00 
			
		
		
		
	REVIEW 公众号的草稿管理
This commit is contained in:
		@@ -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%"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user