Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f2bf716f
authored
Nov 06, 2020
by
xinlaa
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
素材页面重构
1 parent
1ebf7390
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
linkwe-ui/src/api/material/index.js
linkwe-ui/src/styles/common.scss
linkwe-ui/src/views/material/components/MaPage.vue
linkwe-ui/src/views/material/text.vue
linkwe-ui/src/api/material/index.js
View file @
f2bf716
import
request
from
'@/utils/request'
;
import
request
from
'@/utils/request'
const
service
=
config
.
services
.
wecom
+
'/material'
;
const
service
=
config
.
services
.
wecom
+
'/material'
const
serviceCategory
=
config
.
services
.
wecom
+
'/category'
;
const
serviceCategory
=
config
.
services
.
wecom
+
'/category'
/**
/**
* 查询素材列表
* 查询素材列表
...
@@ -10,7 +10,7 @@ search:搜索的值
...
@@ -10,7 +10,7 @@ search:搜索的值
}
}
*/
*/
export
function
getList
(
params
)
{
export
function
getList
(
params
)
{
return
request
({
url
:
service
+
'/list'
,
params
})
;
return
request
({
url
:
service
+
'/list'
,
params
})
}
}
/**
/**
...
@@ -18,7 +18,7 @@ export function getList(params) {
...
@@ -18,7 +18,7 @@ export function getList(params) {
* @param {*} id 素材id
* @param {*} id 素材id
*/
*/
export
function
getDetail
(
id
)
{
export
function
getDetail
(
id
)
{
return
request
({
url
:
service
+
'/'
+
id
})
;
return
request
({
url
:
service
+
'/'
+
id
})
}
}
/**
/**
* 添加素材信息
* 添加素材信息
...
@@ -33,7 +33,7 @@ coverUrl:封面本地资源文件
...
@@ -33,7 +33,7 @@ coverUrl:封面本地资源文件
}
}
*/
*/
export
function
add
(
data
)
{
export
function
add
(
data
)
{
return
request
({
url
:
service
,
method
:
'post'
,
params
:
data
})
;
return
request
({
url
:
service
,
method
:
'post'
,
params
:
data
})
}
}
/**
/**
...
@@ -50,7 +50,7 @@ coverUrl:封面本地资源文件
...
@@ -50,7 +50,7 @@ coverUrl:封面本地资源文件
}
}
*/
*/
export
function
update
(
data
)
{
export
function
update
(
data
)
{
return
request
({
url
:
service
,
method
:
'put'
,
data
})
;
return
request
({
url
:
service
,
method
:
'put'
,
data
})
}
}
/**
/**
...
@@ -58,7 +58,7 @@ export function update(data) {
...
@@ -58,7 +58,7 @@ export function update(data) {
* @param {*} id
* @param {*} id
*/
*/
export
function
remove
(
id
)
{
export
function
remove
(
id
)
{
return
request
({
url
:
service
+
'/'
+
id
,
method
:
'DELETE'
})
;
return
request
({
url
:
service
+
'/'
+
id
,
method
:
'DELETE'
})
}
}
/**
/**
...
@@ -66,7 +66,7 @@ export function remove(id) {
...
@@ -66,7 +66,7 @@ export function remove(id) {
* @param {*} data
* @param {*} data
* {
* {
* file:文件
* file:文件
type:0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file)
type:0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file)
, 4 文本
}
}
*/
*/
export
function
upload
(
data
)
{
export
function
upload
(
data
)
{
...
@@ -74,7 +74,7 @@ export function upload(data) {
...
@@ -74,7 +74,7 @@ export function upload(data) {
url
:
config
.
services
.
wecom
+
'/upload'
,
url
:
config
.
services
.
wecom
+
'/upload'
,
method
:
'post'
,
method
:
'post'
,
params
:
data
,
params
:
data
,
})
;
})
}
}
/**
/**
...
@@ -82,7 +82,7 @@ export function upload(data) {
...
@@ -82,7 +82,7 @@ export function upload(data) {
* @param {*} mediaType 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file), 4 文本
* @param {*} mediaType 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file), 4 文本
*/
*/
export
function
getTree
(
mediaType
)
{
export
function
getTree
(
mediaType
)
{
return
request
({
url
:
serviceCategory
+
'/list'
,
params
:
{
mediaType
}
})
;
return
request
({
url
:
serviceCategory
+
'/list'
,
params
:
{
mediaType
}
})
}
}
/**
/**
...
@@ -90,7 +90,7 @@ export function getTree(mediaType) {
...
@@ -90,7 +90,7 @@ export function getTree(mediaType) {
* @param {*} id
* @param {*} id
*/
*/
export
function
getTreeDetail
(
id
)
{
export
function
getTreeDetail
(
id
)
{
return
request
({
url
:
serviceCategory
+
'/'
+
id
})
;
return
request
({
url
:
serviceCategory
+
'/'
+
id
})
}
}
/**
/**
...
@@ -103,7 +103,7 @@ export function getTreeDetail(id) {
...
@@ -103,7 +103,7 @@ export function getTreeDetail(id) {
}
}
*/
*/
export
function
addTree
(
data
)
{
export
function
addTree
(
data
)
{
return
request
({
url
:
serviceCategory
,
method
:
'post'
,
data
})
;
return
request
({
url
:
serviceCategory
,
method
:
'post'
,
data
})
}
}
/**
/**
...
@@ -116,7 +116,7 @@ export function addTree(data) {
...
@@ -116,7 +116,7 @@ export function addTree(data) {
}
}
*/
*/
export
function
updateTree
(
data
)
{
export
function
updateTree
(
data
)
{
return
request
({
url
:
serviceCategory
,
method
:
'put'
,
data
})
;
return
request
({
url
:
serviceCategory
,
method
:
'put'
,
data
})
}
}
/**
/**
...
@@ -127,5 +127,5 @@ export function removeTree(ids) {
...
@@ -127,5 +127,5 @@ export function removeTree(ids) {
return
request
({
return
request
({
url
:
serviceCategory
+
'/'
+
ids
,
url
:
serviceCategory
+
'/'
+
ids
,
method
:
'DELETE'
,
method
:
'DELETE'
,
})
;
})
}
}
linkwe-ui/src/styles/common.scss
View file @
f2bf716
...
@@ -177,7 +177,7 @@
...
@@ -177,7 +177,7 @@
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.ml0
{
.ml
1
0
{
margin-left
:
10px
;
margin-left
:
10px
;
}
}
...
@@ -193,7 +193,7 @@
...
@@ -193,7 +193,7 @@
margin-bottom
:
15px
;
margin-bottom
:
15px
;
}
}
.ml5
{
.ml
1
5
{
margin-left
:
15px
;
margin-left
:
15px
;
}
}
...
...
linkwe-ui/src/views/material/components/MaPage.vue
View file @
f2bf716
This diff is collapsed.
Click to expand it.
linkwe-ui/src/views/material/text.vue
View file @
f2bf716
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment