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 d091455b
authored
Jan 09, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
dbfde54e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
102 additions
and
42 deletions
src/api/modules/channel.js
src/api/modules/store.js
src/assets/css/public.scss
src/views/channel/add.vue
src/views/store/components/carChannel.vue
src/views/store/components/selectGiftDialog.vue
src/views/store/content.vue
src/views/store/edit.vue
src/views/store/index.vue
src/api/modules/channel.js
View file @
d091455
...
...
@@ -33,6 +33,29 @@ const updateChannel = params => {
returnAll
:
true
})
}
// 门店频道详情
const
getMerchantChannelDetail
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.discover.channel.merchant.detail`
return
http
({
url
,
method
:
'post'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 新增或编辑门店频道
const
updateMerchantChannel
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.discover.channel.merchant.add.or.update`
return
http
({
url
,
method
:
'post'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 开通订阅
const
openSubscribe
=
params
=>
{
params
.
method
=
`entmicro.api.system.subscribe.open`
...
...
@@ -105,4 +128,4 @@ const subscribeMerchant = params => {
})
}
export
default
{
subscribeMerchant
,
generateRescueCode
,
updateState
,
getActivityList
,
getChannelListApi
,
openSubscribe
,
selStoreConfig
,
getChannelDetail
,
updateChannel
,
correlateActivity
}
export
default
{
updateMerchantChannel
,
getMerchantChannelDetail
,
subscribeMerchant
,
generateRescueCode
,
updateState
,
getActivityList
,
getChannelListApi
,
openSubscribe
,
selStoreConfig
,
getChannelDetail
,
updateChannel
,
correlateActivity
}
src/api/modules/store.js
View file @
d091455
...
...
@@ -185,13 +185,24 @@ const configCoupons = params => {
}
// 编辑-选择定向礼包列表
const
getDirectionalGiftListApi
=
params
=>
{
params
.
method
=
'scrm.api.coupon.directional.gift.coupon.list'
// params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
export
default
{
configCoupons
,
getDirectionalGiftListApi
,
deleteChannel
,
updownshelvesChannel
,
topshelvesChannel
,
goodsActivity
,
crowdfundingActivity
,
bulgeActivity
,
getTencentcloudmedialist
,
addChannelTopic
,
getTopicDetail
,
getChannelTopicList
,
getMerchantListApi
,
openSubscribe
,
selStoreConfig
,
getMerchantShare
,
configMerchant
,
getconfigMerchant
}
params
.
method
=
'scrm.api.coupon.directional.gift.coupon.list'
// params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
// 获取膜类专区-配置券
const
getCouponconfig
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.discover.channel.topic.getcouponconfig'
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getCouponconfig
,
configCoupons
,
getDirectionalGiftListApi
,
deleteChannel
,
updownshelvesChannel
,
topshelvesChannel
,
goodsActivity
,
crowdfundingActivity
,
bulgeActivity
,
getTencentcloudmedialist
,
addChannelTopic
,
getTopicDetail
,
getChannelTopicList
,
getMerchantListApi
,
openSubscribe
,
selStoreConfig
,
getMerchantShare
,
configMerchant
,
getconfigMerchant
}
src/assets/css/public.scss
View file @
d091455
...
...
@@ -127,4 +127,7 @@ html {
.theme-color
{
color
:
#5850ff
;
}
.flex-default
{
display
:
flex
;
}
src/views/channel/add.vue
View file @
d091455
...
...
@@ -7,7 +7,7 @@
<el-form-item
label=
"频道名称:"
prop=
"channelName"
>
<el-input
v-model=
"channelForm.channelName"
></el-input>
</el-form-item>
<span
v-if=
"
id
== 1"
>
<span
v-if=
"
channelForm.channelType
== 1"
>
<el-form-item
label=
"频道主题:"
prop=
"channelStyle"
>
<el-col
:span=
"11"
class=
"theme"
></el-col>
<el-col
:span=
"11"
class=
"theme dark"
></el-col>
...
...
@@ -62,6 +62,7 @@ export default {
return
{
loading
:
false
,
id
:
this
.
$route
.
query
.
id
?
this
.
$route
.
query
.
id
:
''
,
merchantChannelId
:
this
.
$route
.
query
.
merchantChannelId
?
this
.
$route
.
query
.
merchantChannelId
:
''
,
channelForm
:
{
posterImgArr
:
[],
publicityImgImgArr
:
[],
...
...
@@ -101,13 +102,14 @@ export default {
}
},
created
()
{
console
.
log
(
this
.
id
)
this
.
getChannelDetail
()
if
(
this
.
id
||
this
.
merchantChannelId
)
this
.
getChannelDetail
()
},
methods
:
{
getChannelDetail
()
{
let
params
=
{
id
:
this
.
id
}
this
.
$apis
.
channel
.
getChannelDetail
(
params
).
then
(
res
=>
{
let
apis
=
this
.
id
?
'getChannelDetail'
:
this
.
merchantChannelId
?
'getMerchantChannelDetail'
:
''
let
params
=
{}
this
.
id
?
(
params
.
id
=
this
.
id
)
:
this
.
merchantChannelId
?
(
params
.
merchantChannelId
=
this
.
merchantChannelId
)
:
''
this
.
$apis
.
channel
[
apis
](
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
channelForm
=
{
...
res
.
data
,
posterImgArr
:
[],
publicityImgImgArr
:
[],
channelImgImgArr
:
[]
}
this
.
channelForm
.
posterImgArr
.
push
(
res
.
data
.
posterImg
)
//海报
...
...
@@ -125,19 +127,18 @@ export default {
this
.
$refs
.
ruleForm
.
clearValidate
(
val
.
key
)
},
handleSave
()
{
console
.
log
(
this
.
channelForm
.
channelImg
)
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
if
(
!
this
.
channelForm
.
channelImg
)
{
this
.
channelImgFlag
=
true
return
}
// if (!this.channelForm.publicityImg) {
// this.publicityImgFlag = true
// return
// }
if
(
valid
)
{
let
params
=
{
id
:
this
.
id
,
channelName
:
this
.
channelForm
.
channelName
,
channelType
:
this
.
channelForm
.
channelType
,
channelStyle
:
this
.
channelForm
.
channelStyle
,
...
...
@@ -146,9 +147,11 @@ export default {
publicityImg
:
this
.
channelForm
.
publicityImg
,
posterImg
:
this
.
channelForm
.
posterImg
}
if
(
this
.
id
==
1
)
params
.
channelStyle
=
this
.
channelForm
.
channelStyle
if
(
this
.
channelForm
.
channelType
==
1
)
params
.
channelStyle
=
this
.
channelForm
.
channelStyle
let
apis
=
this
.
id
?
'updateChannel'
:
this
.
merchantChannelId
?
'updateMerchantChannel'
:
''
this
.
id
?
(
params
.
id
=
this
.
id
)
:
this
.
merchantChannelId
?
(
params
.
merchantChannelId
=
this
.
merchantChannelId
)
:
''
this
.
loading
=
true
this
.
$apis
.
channel
.
updateChannel
(
params
).
then
(
res
=>
{
this
.
$apis
.
channel
[
apis
]
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
loading
=
false
this
.
$router
.
go
(
-
1
)
...
...
src/views/store/components/carChannel.vue
View file @
d091455
...
...
@@ -41,7 +41,7 @@
</el-form-item>
<div
class=
"text-tip"
>
建议尺寸:184*230
</div>
<el-form-item
label=
"宣传文案:"
:prop=
"'contentList.' + index + '.promotion'"
:rules=
"rules.promotion"
>
<el-input
type=
"textarea"
v-model=
"item.promotion"
></el-input>
<el-input
type=
"textarea"
v-model=
"item.promotion"
maxlength=
"100"
></el-input>
</el-form-item>
<el-form-item
label=
"页面路径:"
:prop=
"'contentList.' + index + '.pagePathType'"
:rules=
"rules.pagePathType"
>
<el-button
type=
"default"
class=
"el-icon-plus"
@
click=
"handlePath(index)"
>
选择路径
</el-button>
...
...
@@ -107,7 +107,7 @@
</span>
<el-form-item
label=
"口碑文案:"
:key=
"index"
:class=
"index != 0 ? 'publicPraise-box' : ''"
v-for=
"(text, index) in editForm.contentList[0].publicPraise"
>
<el-input
type=
"text"
v-model=
"text.value"
></el-input>
<el-input
type=
"text"
v-model=
"text.value"
maxlength=
"20"
></el-input>
<div
class=
"dele-publicPraise"
@
click=
"handleDelePraise(index)"
>
<img
class=
"icon-dele"
src=
"@/assets/channel/dele.png"
/>
</div>
...
...
@@ -710,6 +710,13 @@ export default {
// this.$refs.ruleForm.clearValidate(val.key)
},
handleAddItem
()
{
if
(
this
.
editForm
.
contentList
.
length
==
6
)
{
this
.
$message
({
message
:
'最多新增6个视频'
,
type
:
'error'
})
return
}
this
.
editForm
.
contentList
.
push
({
mediaType
:
''
,
mediaUrl
:
''
,
...
...
@@ -722,6 +729,13 @@ export default {
})
},
handleAddPraise
()
{
if
(
this
.
editForm
.
contentList
[
0
].
publicPraise
.
length
==
10
)
{
this
.
$message
({
message
:
'最多新增10条口碑文案'
,
type
:
'error'
})
return
}
this
.
editForm
.
contentList
[
0
].
publicPraise
.
push
({
value
:
''
})
...
...
src/views/store/components/selectGiftDialog.vue
View file @
d091455
...
...
@@ -14,7 +14,7 @@
<el-tab-pane
label=
"兑换券"
name=
"exchange"
></el-tab-pane>
</el-tabs>
<div>
<glsx-combi-form
class=
"p-16"
style=
"padding-bottom: 0px
;
"
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<glsx-combi-form
class=
"p-16"
style=
"padding-bottom: 0px"
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<span
slot=
"footer"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
...
...
@@ -84,6 +84,7 @@
<
script
>
import
url
from
'@/assets/empty.png'
import
{
mapState
}
from
'vuex'
export
default
{
name
:
'selectGiftDialog'
,
data
()
{
...
...
@@ -200,11 +201,16 @@ export default {
this
.
userInfo
=
this
.
$globalState
.
session
this
.
getList
({},
true
,
true
)
},
computed
:
{
...
mapState
({
merchantId
:
state
=>
state
.
channel
.
merchantId
})
},
methods
:
{
getList
(
page
,
isResetPage
=
false
,
isMount
=
false
)
{
var
params
=
{
...
this
.
searchForm
,
merchantId
:
this
.
merchantId
,
discountType
:
this
.
selectedGiftList
[
this
.
activeName
].
discountType
,
pageNum
:
isResetPage
?
1
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageNum
,
pageSize
:
isResetPage
?
10
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageSize
...
...
@@ -355,8 +361,8 @@ export default {
couponName
:
item
.
couponName
,
couponAmount
:
isSelected
?
list
.
find
(
k
=>
k
.
id
==
item
.
id
).
couponAmount
:
'1'
,
couponAnticipatedCost
:
item
.
couponAnticipatedCost
,
effectiveType
:
this
.
toLabelText
(
item
),
residueAmount
:
item
.
residueAmount
,
effectiveType
:
this
.
toLabelText
(
item
),
residueAmount
:
item
.
residueAmount
,
status
:
'2'
})
}
...
...
src/views/store/content.vue
View file @
d091455
...
...
@@ -26,7 +26,7 @@ export default {
},
data
()
{
return
{
merchantChannelId
:
this
.
$route
.
query
.
channelId
?
this
.
$route
.
query
.
c
hannelId
:
''
,
//门店频道id
merchantChannelId
:
this
.
$route
.
query
.
merchantChannelId
?
this
.
$route
.
query
.
merchantC
hannelId
:
''
,
//门店频道id
topicId
:
this
.
$route
.
query
.
topicId
?
this
.
$route
.
query
.
topicId
:
''
,
//频道主题ID
channelType
:
this
.
$route
.
query
.
channelType
?
this
.
$route
.
query
.
channelType
:
''
,
//频道类型
currentComponent
:
'carChannel'
,
...
...
@@ -62,15 +62,13 @@ export default {
4
:
'activity'
}
this
.
currentComponent
=
arr
[
this
.
channelType
]
console
.
log
(
this
.
currentComponent
,
'77777777'
)
},
handleCancel
()
{
this
.
$router
.
go
(
-
1
)
},
handleSave
()
{
this
.
$refs
.
componentRef
.
handleSave
()
},
handleCheckedChannelChange
()
{}
}
}
}
</
script
>
...
...
src/views/store/edit.vue
View file @
d091455
...
...
@@ -27,10 +27,11 @@
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.scope.contentType == 1"
@
click=
"handleConfig(scope.scope)"
>
待配置
</el-button>
<
template
v-else
>
<el-button
type=
"text"
@
click=
"handleTop(scope.scope)"
>
置顶
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 1"
@
click=
"handleTop(scope.scope)"
>
置顶
</el-button>
<el-button
type=
"text"
@
click=
"handleAddContent(scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleOut(scope.scope)"
>
下架
</el-button>
<el-button
type=
"text"
@
click=
"handleDelect(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
>
</div>
</GLTable>
...
...
@@ -49,6 +50,7 @@ export default {
isFlag
:
false
,
merchantId
:
this
.
$route
.
query
.
merchantId
?
this
.
$route
.
query
.
merchantId
:
''
,
activeName
:
''
,
merchantChannelId
:
''
,
tableSearchForm
:
{
merchantName
:
''
,
createDate
:
[]
...
...
@@ -166,7 +168,7 @@ export default {
label
:
'状态'
,
prop
:
'status'
,
formatter
:
cellValue
=>
{
return
cellValue
.
status
==
1
?
'上架'
:
cellValue
.
status
==
2
?
'下架
中
'
:
'--'
return
cellValue
.
status
==
1
?
'上架'
:
cellValue
.
status
==
2
?
'下架'
:
'--'
},
filter
:
'1,2,3,4'
},
...
...
@@ -222,7 +224,7 @@ export default {
// params.beginDate = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
// params.endDate = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
// }
params
.
merchantChannelId
=
this
.
activeName
params
.
merchantChannelId
=
this
.
merchantChannelId
return
params
},
...
...
@@ -261,16 +263,16 @@ export default {
//获取频道配置
getconfigMerchant
()
{
this
.
$apis
.
store
.
getconfigMerchant
({
merchantId
:
this
.
merchantId
}).
then
(
res
=>
{
console
.
log
(
res
)
res
.
forEach
(
item
=>
{
this
.
tabPaneList
.
push
({
label
:
item
.
channelName
,
name
:
item
.
channelType
,
channelId
:
item
.
channelI
d
merchantChannelId
:
item
.
i
d
})
})
this
.
SET_MERCHANT_ID
({
id
:
this
.
merchantId
})
this
.
activeName
=
res
[
0
].
channelType
this
.
merchantChannelId
=
res
[
0
].
id
this
.
isFlag
=
true
this
.
initParams
()
})
...
...
@@ -278,9 +280,9 @@ export default {
//新增编辑内容
handleAddContent
(
val
)
{
if
(
val
)
{
this
.
$router
.
push
(
`/store/content?
channelId=
${
this
.
c
hannelId
}
&topicId=
${
val
.
topicId
}
&channelType=
${
this
.
activeName
}
`
)
this
.
$router
.
push
(
`/store/content?
merchantChannelId=
${
this
.
merchantC
hannelId
}
&topicId=
${
val
.
topicId
}
&channelType=
${
this
.
activeName
}
`
)
}
else
{
this
.
$router
.
push
(
`/store/content?
channelId=
${
this
.
c
hannelId
}
&channelType=
${
this
.
activeName
}
`
)
this
.
$router
.
push
(
`/store/content?
merchantChannelId=
${
this
.
merchantC
hannelId
}
&channelType=
${
this
.
activeName
}
`
)
}
},
//膜类待配置
...
...
@@ -289,13 +291,13 @@ export default {
},
handleClick
()
{
this
.
tabPaneList
.
forEach
(
item
=>
{
item
.
name
==
this
.
activeName
?
(
this
.
channelId
=
item
.
c
hannelId
)
:
''
item
.
name
==
this
.
activeName
?
(
this
.
merchantChannelId
=
item
.
merchantC
hannelId
)
:
''
})
this
.
initParams
()
this
.
handleSearch
()
},
handleAdd
(
scope
)
{
this
.
$router
.
push
(
`/channel/add?
id=
${
this
.
activeName
}
`
)
this
.
$router
.
push
(
`/channel/add?
merchantChannelId=
${
this
.
merchantChannelId
}
`
)
},
handleOut
(
row
)
{
this
.
secondConfirm
(
'下架'
,
'确定下架此频道主题内容?'
,
'store'
,
'updownshelvesChannel'
,
{
topicId
:
row
.
topicId
})
...
...
src/views/store/index.vue
View file @
d091455
...
...
@@ -22,7 +22,7 @@
<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"
@
click=
"handlePreview(scope.scope)"
>
预览
</el-button
>
<
!-- <el-button type="text" @click="handlePreview(scope.scope)">预览</el-button> --
>
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleShare(scope.scope)"
>
分享
</el-button>
</div>
...
...
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