Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-content
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 a4f5ba62
authored
May 08, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
de4c9af0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
237 additions
and
80 deletions
package-lock.json
src/config/env.development.js
src/config/index.js
src/views/ChatLibrary/detail.vue
src/views/ChatLibrary/index.vue
package-lock.json
View file @
a4f5ba6
{
"name"
:
"
live
"
,
"name"
:
"
content
"
,
"version"
:
"1.0.0"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
...
...
@@ -1878,7 +1878,6 @@
"thread-loader"
:
"^2.1.3"
,
"url-loader"
:
"^2.2.0"
,
"vue-loader"
:
"^15.9.2"
,
"vue-loader-v16"
:
"npm:vue-loader@^16.1.0"
,
"vue-style-loader"
:
"^4.1.2"
,
"webpack"
:
"^4.0.0"
,
"webpack-bundle-analyzer"
:
"^3.8.0"
,
...
...
@@ -13295,75 +13294,6 @@
}
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.8.3"
,
"resolved"
:
"https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz"
,
"integrity"
:
"sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
"vue-router"
:
{
"version"
:
"3.6.5"
,
"resolved"
:
"https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz"
,
...
...
src/config/env.development.js
View file @
a4f5ba6
...
...
@@ -18,8 +18,8 @@ module.exports = {
code_message_map
:
{}
},
request
:
{
//
baseURL: 'http://scrm.test.glsx.com.cn/',
baseURL
:
'http://192.168.2.42:8064/'
,
baseURL
:
'http://scrm.test.glsx.com.cn/'
,
//
baseURL: 'http://192.168.2.42:8064/',
// 设置超时时间
timeout
:
180000
,
// 携带凭证
...
...
src/config/index.js
View file @
a4f5ba6
...
...
@@ -14,15 +14,15 @@ let timeout = 30000 //超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// console.log(1111111)
//
if (isEnv) {
//
let { request } = cfg
//
Object.assign(request, { timeout })
//
return Promise.resolve(cfg)
//
}
if
(
isEnv
)
{
let
{
request
}
=
cfg
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
cfg
)
}
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/6351298f6a118b4ff787ef2b/live
/config')
return
new
Http
().
get
(
'https://oss-config.dev.glsx.com.cn/mock/63969466b9cfb051d7d5fc27/content/config'
)
return
new
Http
().
get
(
'https://oss-config.glsx.com.cn/mock/63c129a528a4279537834035/content
/config'
)
//
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/63969466b9cfb051d7d5fc27/content/config')
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
...
...
src/views/ChatLibrary/detail.vue
0 → 100644
View file @
a4f5ba6
<
template
>
<div>
嘻嘻
</div>
</
template
>
<
script
type=
'text/ecmascript-6'
>
export
default
{
name
:
'detail'
,
data
()
{
return
{
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
scoped
lang=
'scss'
>
</
style
>
\ No newline at end of file
src/views/ChatLibrary/index.vue
0 → 100644
View file @
a4f5ba6
<
template
>
<div
class=
"main-container"
>
<div
class=
"top"
>
<el-button
type=
"primary"
@
click=
"add"
:size=
"size"
>
<i
class=
"el-icon-plus"
></i>
创建话术
</el-button>
</div>
<div
class=
"container"
>
<div
class=
"tabelList"
>
<GLTable
ref=
"materialRef"
:hasPage=
"false"
:noDataImg=
"url"
@
refreshTable=
"getListApi"
:layout=
"layout"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:tableData=
"materialTableData"
:pageConf=
"pageConf"
:tableTotal=
"tableTotal"
@
sortChange=
"sortChange"
:isCustomHead=
"true"
:customHeadShowList=
"customHeadShowList"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</span>
</GLTable>
</div>
</div>
</div>
</
template
>
<
script
>
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'materialList'
,
components
:
{
},
data
()
{
return
{
dialogVisibleImg
:
false
,
// 视频弹框
url
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
// 表格按钮
tableButtonList
:
[
{
type
:
'el-button'
,
name
:
'编辑'
,
attrs
:
{
type
:
'text'
,
fn
:
'编辑'
},
listeners
:
{
// click: row => row.createdType == 2 ? this.addMaterial(3, row) : this.addMaterial(2, row)
}
},
{
type
:
'el-button'
,
name
:
row
=>
{
return
row
.
status
==
0
?
'禁用'
:
'启用'
},
attrs
:
{
type
:
'text'
,
fn
:
'禁用'
},
listeners
:
{
click
:
this
.
handleForbid
}
},
{
type
:
'el-button'
,
name
:
'删除'
,
attrs
:
{
type
:
'text'
,
fn
:
'删除营销素材'
},
listeners
:
{
click
:
this
.
handleDelete
}
}
],
tableParams
:
{
listName
:
'data'
,
tableOption
:
true
,
tableColumns
:
[
{
label
:
'话术内容'
,
prop
:
'materialContentRpcResponse'
,
width
:
270
},
{
label
:
'状态'
,
prop
:
'status'
,
addHtml
:
'status'
,
// width: 170
},
{
label
:
'更新时间'
,
prop
:
'updatedTime'
,
// width: 210,
formatter
:
cellVal
=>
{
return
cellVal
.
updatedTime
}
}
]
},
// 获取素材总条数
tableTotal
:
0
}
},
mounted
()
{
this
.
getListApi
()
},
methods
:
{
add
()
{
this
.
$router
.
push
({
path
:
'/ChatLibrary/detail'
})
},
// 素材详情
handleDetail
(
scope
)
{
this
.
$router
.
push
({
path
:
'/material/materialDetail'
,
query
:
{
id
:
scope
.
id
}
})
},
// 获取素材列表
getTableList
(
params
)
{
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
let
data
=
res
let
tableData
=
[]
data
.
forEach
(
item
=>
{
// 根据素材类型是图文处理数据
if
(
item
.
materialType
==
3
||
item
.
materialType
==
4
||
item
.
materialType
==
5
||
item
.
materialType
==
6
)
{
let
html
=
decodeURIComponent
(
item
.
materialContentRpcResponse
.
materialUrl
)
let
imgHtml
=
html
.
match
(
/<img.*
?(?:
>|
\/
>
)
/g
)
let
videoHtml
=
html
.
match
(
/<video.*
?(?:
>|
\/
>
)
/g
)
if
(
imgHtml
)
{
let
imgSrc
=
imgHtml
[
0
].
match
(
'<img[^<>]*? src="([^<>]*?)"'
)
item
.
materialContentRpcResponse
.
materialUrl
=
imgSrc
[
1
]
item
.
urlType
=
'img'
item
.
imgCount
=
imgHtml
.
length
}
if
(
videoHtml
)
{
let
videoSrc
=
videoHtml
[
0
].
match
(
'<video[^<>]*? src="([^<>]*?)"'
)
item
.
materialContentRpcResponse
.
materialUrl
=
videoSrc
[
1
]
item
.
urlType
=
'video'
}
}
tableData
.
push
(
item
)
})
this
.
materialTableData
=
tableData
this
.
tableTotal
=
res
.
length
this
.
$refs
.
materialRef
.
tableHeightValues
=
this
.
tableHeight
// res.length ? (this.$refs.materialRef.tableHeightValues = this.tableHeight) : (this.$refs.materialRef.tableHeightValues = '230px')
})
},
// 获取所有素材
getListApi
()
{
let
params
=
this
.
getParams
()
// params.pageSize = this.$refs.materialRef.page.pageSize
// params.pageNum = this.$refs.materialRef.page.pageNum
params
.
pageSize
=
1000000
params
.
pageNum
=
1
params
.
groupId
=
''
this
.
getTableList
(
params
)
this
.
materialGroupName
=
'全部素材'
// })
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
margin-top
:
10px
;
height
:
100%
;
.tabelList
{
margin-top
:
10px
;
height
:
100%
;
background-color
:
#fff
;
box-sizing
:
border-box
;
padding
:
20px
;
}
}
</
style
>
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