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 7c6b5cc1
authored
Jan 19, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
图片路径问题,pc抓取图片素材问题等
1 parent
87360c67
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
55 deletions
linkwe-mobile/src/views/chat/index.vue
linkwe-ui/src/components/SelectMaterialMult/list.vue
linkwe-ui/src/components/Upload.vue
linkwe-ui/src/views/appTool/chatToolbar/list.vue
linkwe-mobile/src/views/chat/index.vue
View file @
7c6b5cc
...
...
@@ -7,7 +7,7 @@ export default {
props
:
{},
data
()
{
return
{
keyword
s
:
''
,
keyword
:
''
,
active
:
0
,
list
:
[],
loading
:
false
,
...
...
@@ -43,7 +43,7 @@ export default {
<
template
>
<div>
<van-search
v-model=
"keyword
s
"
v-model=
"keyword"
show-action
placeholder=
"请输入搜索关键词"
@
search=
"search"
...
...
linkwe-ui/src/components/SelectMaterialMult/list.vue
View file @
7c6b5cc
<
script
>
import
{
getTree
,
getList
}
from
'@/api/material'
import
{
getTree
,
getList
}
from
"@/api/material"
;
export
default
{
components
:
{},
props
:
{
type
:
{
type
:
String
,
default
:
'4'
,
default
:
"4"
,
},
multiple
:
{
type
:
Boolean
,
...
...
@@ -23,82 +23,83 @@ export default {
query
:
{
pageNum
:
1
,
pageSize
:
10
,
categoryId
:
''
,
search
:
''
,
mediaType
:
'4'
,
categoryId
:
""
,
search
:
""
,
mediaType
:
"4"
,
},
list
:
[],
// 列表
total
:
0
,
// 总条数
treeData
:
[],
// 树
// 树props
treeProps
:
{
children
:
'children'
,
label
:
'name'
,
children
:
"children"
,
label
:
"name"
,
},
// 分组props
groupProps
:
{
// expandTrigger: 'hover',
checkStrictly
:
true
,
children
:
'children'
,
label
:
'name'
,
value
:
'id'
,
children
:
"children"
,
label
:
"name"
,
value
:
"id"
,
emitPath
:
false
,
},
radio
:
''
,
radio
:
""
,
// 树props
treeProps
:
{
children
:
'children'
,
label
:
'name'
,
children
:
"children"
,
label
:
"name"
,
},
}
selectedx
:
[]
};
},
watch
:
{
radio
(
val
)
{
this
.
$emit
(
'change'
,
val
)
this
.
$emit
(
"change"
,
val
);
},
},
computed
:
{},
created
()
{
this
.
query
.
mediaType
=
this
.
type
this
.
getTree
()
this
.
getList
()
this
.
query
.
mediaType
=
this
.
type
;
this
.
getTree
()
;
this
.
getList
()
;
},
mounted
()
{},
methods
:
{
// 获取类目树
getTree
()
{
getTree
(
this
.
type
).
then
(({
data
})
=>
{
this
.
treeData
=
data
})
this
.
treeData
=
data
;
})
;
},
// 获取素材列表
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
page
&&
(
this
.
query
.
pageNum
=
page
)
;
this
.
loading
=
true
;
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
this
.
$emit
(
'listChange'
,
this
.
list
)
this
.
list
=
rows
;
this
.
total
=
+
total
;
this
.
loading
=
false
;
this
.
$emit
(
"listChange"
,
this
.
list
);
})
.
catch
(()
=>
{
this
.
loading
=
false
})
this
.
loading
=
false
;
})
;
},
// 节点单击事件
handleNodeClick
(
data
)
{
this
.
query
.
categoryId
=
data
.
id
this
.
getList
(
1
)
this
.
query
.
categoryId
=
data
.
id
;
this
.
getList
(
1
)
;
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
$emit
(
'update:selected'
,
selection
)
this
.
$emit
(
"update:selected"
,
selection
);
},
},
}
}
;
</
script
>
<
template
>
...
...
@@ -114,7 +115,7 @@ export default {
<el-input
v-model=
"query.search"
class=
"ml10 mr10"
style=
"width: 150px
;
"
style=
"width: 150px"
@
keydown
.
enter=
"getList(1)"
></el-input>
<el-button
...
...
@@ -200,23 +201,25 @@ export default {
</el-table>
<el-row
v-else
:gutter=
"20"
>
<el-col
:span=
"6"
style=
"margin-bottom: 24px;min-width: 220px;"
v-for=
"(item, index) in list"
:key=
"index"
>
<el-card
shadow=
"hover"
body-style=
"padding: 0px;"
>
<div
class=
"img-wrap"
>
<el-image
:src=
"item.materialUrl"
fit=
"contain"
></el-image>
</div>
<div
style=
"padding: 14px;"
>
<el-checkbox
v-model=
"ids"
:label=
"item.id"
>
{{
item.materialName
}}
</el-checkbox>
</div>
</el-card>
</el-col>
<el-checkbox-group
v-model=
"selectedx"
@
change=
"handleSelectionChange"
>
<el-col
:span=
"6"
style=
"margin-bottom: 24px; min-width: 220px"
v-for=
"(item, index) in list"
:key=
"index"
>
<el-card
shadow=
"hover"
body-style=
"padding: 0px;"
>
<div
class=
"img-wrap"
>
<el-image
:src=
"item.materialUrl"
fit=
"contain"
></el-image>
</div>
<div
style=
"padding: 14px"
>
<el-checkbox
:label=
"item"
>
{{
item.materialName
}}
</el-checkbox>
</div>
</el-card>
</el-col>
</el-checkbox-group>
</el-row>
</el-col>
</el-row>
...
...
linkwe-ui/src/components/Upload.vue
View file @
7c6b5cc
...
...
@@ -33,6 +33,7 @@ export default {
window
.
CONFIG
.
services
.
wecom
+
'/material/upload'
,
headers
:
window
.
CONFIG
.
headers
,
domain
:
process
.
env
.
VUE_APP_BASE_API
}
},
watch
:
{},
...
...
@@ -131,7 +132,7 @@ export default {
>
<slot>
<template
v-if=
"fileUrl"
>
<img
v-if=
"type === '0'"
:src=
"fileUrl"
class=
"upload-img"
/>
<img
v-if=
"type === '0'"
:src=
"
domain +
fileUrl"
class=
"upload-img"
/>
<div
v-else-if=
"type === '2'"
>
<video
id=
"myVideo"
...
...
@@ -144,7 +145,7 @@ export default {
:autoplay=
"false"
preload=
"auto"
>
<source
:src=
"fileUrl"
type=
"video/mp4"
/>
<source
:src=
"
domain +
fileUrl"
type=
"video/mp4"
/>
</video>
</div>
<div
v-else
>
{{
fileName
}}
</div>
...
...
linkwe-ui/src/views/appTool/chatToolbar/list.vue
View file @
7c6b5cc
...
...
@@ -60,7 +60,7 @@ export default {
background
:
'rgba(0, 0, 0, 0.7)'
,
})
this
.
metarialParams
.
materialIds
=
this
.
selectedMaterial
.
map
((
d
)
=>
d
.
id
)
if
(
metarialParams
.
checkAll
==
0
)
{
if
(
this
.
metarialParams
.
checkAll
==
0
)
{
this
.
metarialParams
.
materialIds
=
[]
}
getMaterial
(
this
.
metarialParams
)
...
...
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