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 b9a796c8
authored
Feb 16, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
发现需求开发
1 parent
1398b7f4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
8 deletions
src/views/channel/add.vue
src/views/store/add.vue
src/views/store/edit.vue
vue.config.js
src/views/channel/add.vue
View file @
b9a796c
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
class=
"channel-content gl-form-page"
>
<div
class=
"channel-content gl-form-page"
>
<el-form
ref=
"ruleForm"
:model=
"channelForm"
label-width=
"154px"
size=
"small"
:rules=
"rules"
>
<el-form
ref=
"ruleForm"
:model=
"channelForm"
label-width=
"154px"
size=
"small"
:rules=
"rules"
>
<el-form-item
label=
"频道名称:"
prop=
"channelName"
>
<el-form-item
label=
"频道名称:"
prop=
"channelName"
>
<el-input
v-model=
"channelForm.channelName"
:disabled=
"isDisabled"
maxlength=
"4"
></el-input>
<el-input
v-model=
"channelForm.channelName"
maxlength=
"4"
></el-input>
</el-form-item>
</el-form-item>
<span
v-if=
"channelForm.channelType == 1"
>
<span
v-if=
"channelForm.channelType == 1"
>
<el-form-item
label=
"频道主题:"
prop=
"channelStyle"
>
<el-form-item
label=
"频道主题:"
prop=
"channelStyle"
>
...
@@ -60,7 +60,6 @@ export default {
...
@@ -60,7 +60,6 @@ export default {
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
isDisabled
:
false
,
id
:
this
.
$route
.
query
.
id
?
this
.
$route
.
query
.
id
:
''
,
id
:
this
.
$route
.
query
.
id
?
this
.
$route
.
query
.
id
:
''
,
merchantChannelId
:
this
.
$route
.
query
.
merchantChannelId
?
this
.
$route
.
query
.
merchantChannelId
:
''
,
merchantChannelId
:
this
.
$route
.
query
.
merchantChannelId
?
this
.
$route
.
query
.
merchantChannelId
:
''
,
channelForm
:
{
channelForm
:
{
...
@@ -102,7 +101,6 @@ export default {
...
@@ -102,7 +101,6 @@ export default {
},
},
created
()
{
created
()
{
if
(
this
.
id
||
this
.
merchantChannelId
)
this
.
getChannelDetail
()
if
(
this
.
id
||
this
.
merchantChannelId
)
this
.
getChannelDetail
()
this
.
isDisabled
=
this
.
id
?
true
:
this
.
merchantChannelId
?
false
:
true
},
},
methods
:
{
methods
:
{
changeChannelStyle
()
{
changeChannelStyle
()
{
...
...
src/views/store/add.vue
View file @
b9a796c
...
@@ -35,8 +35,11 @@ export default {
...
@@ -35,8 +35,11 @@ export default {
return
{
return
{
size
:
'small'
,
size
:
'small'
,
editChildRef
:
'editChildRef'
,
editChildRef
:
'editChildRef'
,
merchantId
:
this
.
$route
.
query
.
merchantId
?
this
.
$route
.
query
.
merchantId
:
''
,
editForm
:
{
editForm
:
{
channelIds
:
[]
channelIds
:
[],
merchantId
:
''
,
merchantName
:
''
},
},
merchantFlag
:
false
,
merchantFlag
:
false
,
editFormData
:
[
editFormData
:
[
...
@@ -64,10 +67,36 @@ export default {
...
@@ -64,10 +67,36 @@ export default {
}
}
}
}
},
},
created
()
{
mounted
()
{
if
(
this
.
merchantId
)
{
this
.
getconfigMerchant
()
this
.
getMerchantData
()
}
},
},
methods
:
{
methods
:
{
getMerchantData
()
{
var
params
=
{
merchantId
:
this
.
merchantId
,
pageSize
:
10
,
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
()
{
handleCancel
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
},
},
...
...
src/views/store/edit.vue
View file @
b9a796c
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<div
class=
"store-head"
>
<div
class=
"store-head"
>
<div
class=
"info"
>
{{
tabPaneText
}}
列表
</div>
<div
class=
"info"
>
{{
tabPaneText
}}
列表
</div>
<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"
size=
"small"
@
click=
"handleAdd"
>
编辑频道
</el-button>
<el-button
type=
"primary"
plain
size=
"small"
@
click=
"handleAddContent()"
>
新增内容
</el-button>
<el-button
type=
"primary"
plain
size=
"small"
@
click=
"handleAddContent()"
>
新增内容
</el-button>
</div>
</div>
...
@@ -25,6 +26,7 @@
...
@@ -25,6 +26,7 @@
<el-switch
v-model=
"scope.scope.isOpen"
@
change=
"updateState(scope.scope)"
></el-switch>
<el-switch
v-model=
"scope.scope.isOpen"
@
change=
"updateState(scope.scope)"
></el-switch>
</
template
>
</
template
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<
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>
<el-button
type=
"text"
v-if=
"scope.scope.contentType == 1"
@
click=
"handleConfig(scope.scope)"
>
{{
scope
.
scope
.
status
==
0
?
'待配置'
:
'编辑'
}}
</el-button>
<template
v-else
>
<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"
v-if=
"scope.scope.status == 1 && scope.scope.topStatus == 0"
@
click=
"handleTop(scope.scope)"
>
置顶
</el-button>
...
@@ -33,6 +35,8 @@
...
@@ -33,6 +35,8 @@
<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=
"handleOut(scope.scope, '上架')"
>
上架
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 2"
@
click=
"handleDelect(scope.scope)"
>
删除
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 2"
@
click=
"handleDelect(scope.scope)"
>
删除
</el-button>
</
template
>
</
template
>
</template>
<span
v-else
>
--
</span>
</div>
</div>
</GLTable>
</GLTable>
</div>
</div>
...
@@ -85,6 +89,12 @@ export default {
...
@@ -85,6 +89,12 @@ export default {
filter
:
'3,4'
filter
:
'3,4'
},
},
{
{
label
:
'宣传文案'
,
name
:
'promotion'
,
type
:
'input'
,
filter
:
'2'
},
{
label
:
'创建日期'
,
label
:
'创建日期'
,
name
:
'createdDate'
,
name
:
'createdDate'
,
type
:
'date'
,
type
:
'date'
,
...
@@ -367,9 +377,10 @@ export default {
...
@@ -367,9 +377,10 @@ export default {
setTableFinishFun
()
{
setTableFinishFun
()
{
this
.
$refs
.
editRef
.
data
.
length
?
(
this
.
$refs
.
editRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
editRef
.
setTableHeightFun
()
this
.
$refs
.
editRef
.
data
.
length
?
(
this
.
$refs
.
editRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
editRef
.
setTableHeightFun
()
},
},
//频道设置
handleEdit
(
val
)
{
handleEdit
(
val
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/store/edit'
path
:
`/store/add?merchantId=
${
this
.
merchantId
}
`
})
})
},
},
initParams
()
{
initParams
()
{
...
...
vue.config.js
View file @
b9a796c
...
@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
...
@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
const
publicPath
=
node_env
?
`/child/
${
packageName
}
/`
:
'/'
const
publicPath
=
node_env
?
`/child/
${
packageName
}
/`
:
'/'
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
)
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
)
const
CDN_DOMAIN
=
'https://
cdn.bootcdn.net
/'
const
CDN_DOMAIN
=
'https://
img02.glsx.com.cn
/'
const
cdn
=
{
const
cdn
=
{
css
:
[
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
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'
]
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