Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-discover
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 f22f3cb1
authored
Mar 07, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.5.0' into 'master'
合并V3.5.0 See merge request
!2
2 parents
1398b7f4
ae8ac346
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
34 deletions
src/views/channel/add.vue
src/views/channel/index.vue
src/views/store/add.vue
src/views/store/components/carChannel.vue
src/views/store/components/membrane.vue
src/views/store/edit.vue
vue.config.js
src/views/channel/add.vue
View file @
f22f3cb
...
...
@@ -5,7 +5,7 @@
<div
class=
"channel-content gl-form-page"
>
<el-form
ref=
"ruleForm"
:model=
"channelForm"
label-width=
"154px"
size=
"small"
:rules=
"rules"
>
<el-form-item
label=
"频道名称:"
prop=
"channelName"
>
<el-input
v-model=
"channelForm.channelName"
:disabled=
"isDisabled"
maxlength=
"4"
></el-input>
<el-input
v-model=
"channelForm.channelName"
></el-input>
</el-form-item>
<span
v-if=
"channelForm.channelType == 1"
>
<el-form-item
label=
"频道主题:"
prop=
"channelStyle"
>
...
...
@@ -23,7 +23,7 @@
</div>
</el-form-item>
</span>
<el-form-item
label=
"频道banner:"
prop=
"channelImg"
style=
"margin-top:
15px;
"
>
<el-form-item
label=
"频道banner:"
prop=
"channelImg"
style=
"margin-top:
15px
"
>
<glsx-preview
:picOptions=
"picOptions"
:imageUrlArr=
"channelForm.channelImgArr"
@
change=
"changeChannelImg"
></glsx-preview>
<div
class=
"el-form-item__error"
v-if=
"channelImgFlag"
>
请上传频道banner
</div>
</el-form-item>
...
...
@@ -60,7 +60,6 @@ export default {
data
()
{
return
{
loading
:
false
,
isDisabled
:
false
,
id
:
this
.
$route
.
query
.
id
?
this
.
$route
.
query
.
id
:
''
,
merchantChannelId
:
this
.
$route
.
query
.
merchantChannelId
?
this
.
$route
.
query
.
merchantChannelId
:
''
,
channelForm
:
{
...
...
@@ -102,7 +101,6 @@ export default {
},
created
()
{
if
(
this
.
id
||
this
.
merchantChannelId
)
this
.
getChannelDetail
()
this
.
isDisabled
=
this
.
id
?
true
:
this
.
merchantChannelId
?
false
:
true
},
methods
:
{
changeChannelStyle
()
{
...
...
@@ -117,7 +115,7 @@ export default {
this
.
channelForm
.
channelImg
=
this
.
commonImg
(
this
.
channelImgbgArr
[
this
.
channelForm
.
channelStyle
-
1
])
}
else
{
this
.
channelForm
.
channelImgArr
=
[
this
.
commonImg
(
this
.
channelOtherImgbgArr
[
this
.
channelForm
.
channelType
-
2
])]
this
.
channelForm
.
channelImg
=
this
.
commonImg
(
this
.
channelOtherImgbgArr
[
this
.
channelForm
.
channelType
-
2
])
this
.
channelForm
.
channelImg
=
this
.
commonImg
(
this
.
channelOtherImgbgArr
[
this
.
channelForm
.
channelType
-
2
])
}
},
getChannelDetail
()
{
...
...
@@ -130,7 +128,7 @@ export default {
this
.
channelForm
.
posterImgArr
.
push
(
res
.
data
.
posterImg
)
//海报
this
.
channelForm
.
publicityImgArr
.
push
(
res
.
data
.
publicityImg
)
//频道分享预览图
this
.
channelForm
.
channelImgArr
.
push
(
res
.
data
.
channelImg
)
//频道banner
if
(
!
res
.
data
.
channelImg
)
this
.
diffChannelStyle
()
if
(
!
res
.
data
.
channelImg
)
this
.
diffChannelStyle
()
}
})
},
...
...
@@ -256,4 +254,4 @@ export default {
margin-top
:
15px
;
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/channel/index.vue
View file @
f22f3cb
...
...
@@ -148,7 +148,7 @@ export default {
},
handleEdit
(
val
)
{
this
.
$router
.
push
({
path
:
`/channel/add?id=
${
val
.
id
}
&channelType=
${
val
.
channelType
}
`
path
:
`/channel/add?id=
${
val
.
id
}
&channelType=
${
val
.
channelType
}
&$title=频道设置
`
})
}
}
...
...
src/views/store/add.vue
View file @
f22f3cb
<
template
>
<div
class=
"add-wrap"
>
<div
class=
"container edit-container"
style=
"min-height: 520px !important"
>
<p
class=
"edit-title"
id=
"basic"
>
新增门店
</p>
<p
class=
"edit-title"
id=
"basic"
>
{{
merchantId
?
'编辑门店'
:
'新增门店'
}}
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<div
slot=
"merchantHtml"
>
<el-button
type=
"default"
class=
"el-icon-plus"
v-if=
"!isDisabled"
@
click=
"handleRelateStoreClose"
>
选择门店
</el-button>
...
...
@@ -13,7 +13,7 @@
</div>
<div
slot=
"channelHtml"
>
<el-checkbox-group
v-model=
"editForm.channelIds"
@
change=
"handleCheckedChannelChange"
>
<el-checkbox
v-for=
"channel in channelList"
:label=
"channel.
id"
:key=
"channel.id"
>
{{
channel
.
n
ame
}}
</el-checkbox>
<el-checkbox
v-for=
"channel in channelList"
:label=
"channel.
channelType"
:key=
"channel.channelType"
>
{{
channel
.
channelN
ame
}}
</el-checkbox>
</el-checkbox-group>
</div>
</glsx-combi-form>
...
...
@@ -35,8 +35,11 @@ export default {
return
{
size
:
'small'
,
editChildRef
:
'editChildRef'
,
merchantId
:
this
.
$route
.
query
.
merchantId
?
this
.
$route
.
query
.
merchantId
:
''
,
editForm
:
{
channelIds
:
[]
channelIds
:
[],
merchantId
:
''
,
merchantName
:
''
},
merchantFlag
:
false
,
editFormData
:
[
...
...
@@ -52,22 +55,56 @@ export default {
}
],
selectedList
:
[],
channelList
:
[
{
name
:
'新车专区'
,
id
:
1
},
{
name
:
'膜类专区'
,
id
:
2
},
{
name
:
'限时众筹'
,
id
:
3
},
{
name
:
'定保专区'
,
id
:
4
}
],
channelList
:
[],
relateStoreVisible
:
false
,
// 选择门店
editRule
:
{
channelIds
:
[{
required
:
true
,
message
:
'请选择频道名称'
,
trigger
:
'change'
}]
}
}
},
created
()
{
mounted
()
{
this
.
getChannelList
()
if
(
this
.
merchantId
)
{
this
.
getconfigMerchant
()
this
.
getMerchantData
()
}
},
methods
:
{
//获取频道名称
getChannelList
()
{
this
.
$apis
.
channel
.
getChannelListApi
({
pageSize
:
100
,
pageNum
:
1
})
.
then
(
res
=>
{
this
.
channelList
=
res
.
list
})
},
getMerchantData
()
{
var
params
=
{
merchantId
:
this
.
merchantId
,
pageSize
:
100
,
currentPage
:
1
}
this
.
$apis
.
common
.
getMerchantList
(
params
).
then
(
res
=>
{
if
(
res
.
list
.
length
)
{
this
.
editForm
.
merchantId
=
res
.
list
[
0
].
merchantNo
this
.
editForm
.
merchantName
=
res
.
list
[
0
].
merchantName
}
})
},
//获取频道配置
getconfigMerchant
()
{
this
.
$apis
.
store
.
getconfigMerchant
({
merchantId
:
this
.
merchantId
}).
then
(
res
=>
{
this
.
editForm
.
channelIds
=
[]
res
.
forEach
(
item
=>
{
this
.
editForm
.
channelIds
.
push
(
item
.
channelId
)
})
})
},
handleCancel
()
{
this
.
$router
.
go
(
-
1
)
},
...
...
@@ -114,7 +151,7 @@ export default {
}
}
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.add-wrap
{
.container
{
min-height
:
680px
;
...
...
@@ -161,4 +198,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/store/components/carChannel.vue
View file @
f22f3cb
...
...
@@ -32,7 +32,7 @@
<img
class=
"icon-dele"
src=
"@/assets/channel/dele.png"
/>
</div>
<el-form-item
label=
"选择视频:"
:prop=
"'contentList.' + index + '.mediaUrl'"
:rules=
"rules.mediaUrl"
>
<el-select
v-model=
"item.mediaUrl"
placeholder=
"请选择视频"
@
change=
"changeVideo(index)"
>
<el-select
v-model=
"item.mediaUrl"
filterable
placeholder=
"请选择视频"
@
change=
"changeVideo(index)"
>
<el-option
:label=
"video.fileName"
:value=
"video.mediaUrl"
v-for=
"video in videoList"
:key=
"video.id"
></el-option>
</el-select>
<div
class=
"preview"
@
click=
"handleView(index)"
>
预览
</div>
...
...
@@ -93,8 +93,8 @@
<div
class=
"gl-form-page mediaType-content"
>
<el-form
ref=
"ruleForm"
:model=
"editForm"
size=
"small"
:rules=
"rules"
>
<span
v-if=
"editForm.mediaType == 1"
>
<el-form-item
label=
"选择视频:"
:prop=
"'contentList.' + 0 + '.mediaUrl'"
:rules=
"rules.mediaCover"
>
<el-select
v-model=
"editForm.contentList[0].mediaUrl"
placeholder=
"请选择视频"
@
change=
"changeVideo(0)"
>
<el-form-item
label=
"选择视频:"
:prop=
"'contentList.' + 0 + '.mediaUrl'"
:rules=
"rules.mediaCover"
>
<el-select
v-model=
"editForm.contentList[0].mediaUrl"
filterable
placeholder=
"请选择视频"
@
change=
"changeVideo(0)"
>
<el-option
:label=
"video.fileName"
:value=
"video.mediaUrl"
v-for=
"video in videoList"
:key=
"video.id"
></el-option>
</el-select>
<div
class=
"preview"
@
click=
"handleView(0)"
>
预览
</div>
...
...
src/views/store/components/membrane.vue
View file @
f22f3cb
...
...
@@ -9,7 +9,7 @@
</el-form-item>
<template
v-if=
"membraneForm.mediaType == 1"
>
<el-form-item
label=
"选择视频:"
prop=
"mediaUrl"
>
<el-select
v-model=
"membraneForm.mediaUrl"
placeholder=
"请选择视频"
@
change=
"changeVideo"
>
<el-select
v-model=
"membraneForm.mediaUrl"
filterable
placeholder=
"请选择视频"
@
change=
"changeVideo"
>
<el-option
:label=
"video.fileName"
:value=
"video.mediaUrl"
v-for=
"video in videoList"
:key=
"video.id"
></el-option>
</el-select>
<div
class=
"preview"
@
click=
"handleView"
>
预览
</div>
...
...
src/views/store/edit.vue
View file @
f22f3cb
...
...
@@ -10,6 +10,7 @@
<div
class=
"store-head"
>
<div
class=
"info"
>
{{
tabPaneText
}}
列表
</div>
<div>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleEdit"
>
频道设置
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleAdd"
>
编辑频道
</el-button>
<el-button
type=
"primary"
plain
size=
"small"
@
click=
"handleAddContent()"
>
新增内容
</el-button>
</div>
...
...
@@ -25,14 +26,17 @@
<el-switch
v-model=
"scope.scope.isOpen"
@
change=
"updateState(scope.scope)"
></el-switch>
</
template
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.scope.contentType == 1"
@
click=
"handleConfig(scope.scope)"
>
{{ scope.scope.status == 0 ? '待配置' : '编辑' }}
</el-button>
<
template
v-else
>
<el-button
type=
"text"
v-if=
"scope.scope.status == 1 && scope.scope.topStatus == 0"
@
click=
"handleTop(scope.scope)"
>
置顶
</el-button>
<el-button
type=
"text"
@
click=
"handleAddContent(scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 1"
@
click=
"handleOut(scope.scope, '下架')"
>
下架
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 2"
@
click=
"handleOut(scope.scope, '上架')"
>
上架
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 2"
@
click=
"handleDelect(scope.scope)"
>
删除
</el-button>
<
template
v-if=
"scope.scope.confType != 1"
>
<el-button
type=
"text"
v-if=
"scope.scope.contentType == 1"
@
click=
"handleConfig(scope.scope)"
>
{{
scope
.
scope
.
status
==
0
?
'待配置'
:
'编辑'
}}
</el-button>
<template
v-else
>
<el-button
type=
"text"
v-if=
"scope.scope.status == 1 && scope.scope.topStatus == 0"
@
click=
"handleTop(scope.scope)"
>
置顶
</el-button>
<el-button
type=
"text"
@
click=
"handleAddContent(scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 1"
@
click=
"handleOut(scope.scope, '下架')"
>
下架
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 2"
@
click=
"handleOut(scope.scope, '上架')"
>
上架
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 2"
@
click=
"handleDelect(scope.scope)"
>
删除
</el-button>
</
template
>
</template>
<span
v-else
>
--
</span>
</div>
</GLTable>
</div>
...
...
@@ -85,6 +89,12 @@ export default {
filter
:
'3,4'
},
{
label
:
'宣传文案'
,
name
:
'promotion'
,
type
:
'input'
,
filter
:
'2'
},
{
label
:
'创建日期'
,
name
:
'createdDate'
,
type
:
'date'
,
...
...
@@ -285,7 +295,7 @@ export default {
})
})
this
.
SET_MERCHANT_ID
({
id
:
this
.
merchantId
})
this
.
SET_CHANNEL_STYLE
({
channelStyle
:
res
[
0
].
channelStyle
})
this
.
SET_CHANNEL_STYLE
({
channelStyle
:
res
&&
res
[
0
].
channelStyle
})
!
this
.
channelType
&&
this
.
SET_CHANNEL_TYPE
({
channelType
:
res
[
0
].
channelType
})
this
.
activeName
=
res
[
0
].
channelType
+
''
this
.
merchantChannelId
=
res
[
0
].
id
...
...
@@ -367,9 +377,10 @@ export default {
setTableFinishFun
()
{
this
.
$refs
.
editRef
.
data
.
length
?
(
this
.
$refs
.
editRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
editRef
.
setTableHeightFun
()
},
//频道设置
handleEdit
(
val
)
{
this
.
$router
.
push
({
path
:
'/store/edit'
path
:
`/store/add?merchantId=
${
this
.
merchantId
}
&$title=编辑门店`
})
},
initParams
()
{
...
...
vue.config.js
View file @
f22f3cb
...
...
@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
const
publicPath
=
node_env
?
`/child/
${
packageName
}
/`
:
'/'
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
)
const
CDN_DOMAIN
=
'https://
cdn.bootcdn.net
/'
const
CDN_DOMAIN
=
'https://
img02.glsx.com.cn
/'
const
cdn
=
{
css
:
[
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js
:
[
`
${
CDN_DOMAIN
}
ajax/libs/vue/2.6.11/vue.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vue-router/3.2.0/vue-router.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/index.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vuex/3.6.2/vuex.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
,
'https://webapi.amap.com/loader.js'
]
...
...
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