Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5c58bc4e
authored
Apr 19, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REVIEW 公众号的草稿管理
parent
7997614a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/views/mp/draft/components/CoverSelect.vue
+2
-3
src/views/mp/draft/index.vue
+1
-0
No files found.
src/views/mp/draft/components/CoverSelect.vue
View file @
5c58bc4e
...
@@ -65,10 +65,10 @@ import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
...
@@ -65,10 +65,10 @@ import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
import
{
getAccessToken
}
from
'@/utils/auth'
import
{
getAccessToken
}
from
'@/utils/auth'
import
type
{
UploadFiles
,
UploadProps
,
UploadRawFile
}
from
'element-plus'
import
type
{
UploadFiles
,
UploadProps
,
UploadRawFile
}
from
'element-plus'
import
{
NewsItem
}
from
'./types'
import
{
NewsItem
}
from
'./types'
const
message
=
useMessage
()
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
HEADERS
=
{
Authorization
:
'Bearer '
+
getAccessToken
()
}
// 设置上传的请求头部
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
...
@@ -109,7 +109,6 @@ const onMaterialSelected = (item: any) => {
...
@@ -109,7 +109,6 @@ const onMaterialSelected = (item: any) => {
newsItem
.
value
.
thumbUrl
=
item
.
url
newsItem
.
value
.
thumbUrl
=
item
.
url
}
}
// ======================== 文件上传 ========================
const
onBeforeUpload
:
UploadProps
[
'beforeUpload'
]
=
(
rawFile
:
UploadRawFile
)
=>
{
const
onBeforeUpload
:
UploadProps
[
'beforeUpload'
]
=
(
rawFile
:
UploadRawFile
)
=>
{
const
isType
=
[
'image/jpeg'
,
'image/png'
,
'image/gif'
,
'image/bmp'
,
'image/jpg'
].
includes
(
const
isType
=
[
'image/jpeg'
,
'image/png'
,
'image/gif'
,
'image/bmp'
,
'image/jpg'
].
includes
(
rawFile
.
type
rawFile
.
type
...
...
src/views/mp/draft/index.vue
View file @
5c58bc4e
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
</ContentWrap>
</ContentWrap>
<!-- 添加或修改草稿对话框 -->
<!-- 添加或修改草稿对话框 -->
<!-- TODO @Dhb52:是不是整个做成一个组件 -->
<el-dialog
<el-dialog
:title=
"isCreating ? '新建图文' : '修改图文'"
:title=
"isCreating ? '新建图文' : '修改图文'"
width=
"80%"
width=
"80%"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment