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 79a792bd
authored
Jan 12, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
d7acddc2
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
90 additions
and
80 deletions
src/components/activity-model/index.vue
src/components/preview/index.vue
src/views/channel/add.vue
src/views/channel/index.vue
src/views/store/components/activity.vue
src/views/store/components/carChannel.vue
src/views/store/components/membrane.vue
src/views/store/index.vue
src/components/activity-model/index.vue
View file @
79a792b
...
...
@@ -122,7 +122,7 @@ export default {
dialogVisible
:
false
,
couponMenu
:
false
,
loading
:
false
,
activeName
:
3
,
activeName
:
1
,
modelList
:
[],
pageNum
:
1
,
pageSize
:
12
,
...
...
src/components/preview/index.vue
View file @
79a792b
...
...
@@ -21,7 +21,7 @@
<div
class=
"upload-img"
>
<i
class=
"el-icon-plus avatar-uploader-desc-icon"
></i>
<div
class=
"avatar-uploader-desc-word"
>
上传照片
</div>
<input
type=
"file"
class=
"upload-img"
style=
"opacity: 0"
accept=
".jpg, .jpeg, .png"
@
change=
"e => handleImgChange(e)"
/>
<input
type=
"file"
ref=
"uploadImg"
class=
"upload-img"
style=
"opacity: 0"
accept=
".jpg, .jpeg, .png"
@
change=
"e => handleImgChange(e)"
/>
</div>
</
template
>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
width=
"50%"
>
...
...
@@ -64,7 +64,6 @@ export default {
methods
:
{
// 上传图片
handleImgChange
(
e
)
{
console
.
log
(
this
.
key
)
this
.
$notify
({
title
:
'提示'
,
message
:
'图片上传中,请稍后'
...
...
@@ -82,7 +81,6 @@ export default {
this
.
$message
.
error
(
'最多上传9张图片'
)
return
}
document
.
querySelector
(
'.upload-img'
).
value
=
''
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
e
=>
{
const
imgFile
=
e
.
target
.
result
...
...
@@ -99,6 +97,8 @@ export default {
this
.
imageUrlArr
.
push
(
res
)
this
.
$emit
(
'change'
,
{
arr
:
this
.
imageUrlArr
,
key
:
this
.
picOptions
.
key
,
index
:
this
.
index
})
}
e
.
target
.
value
=
''
this
.
$refs
.
uploadImg
.
value
=
''
})
}
},
...
...
@@ -118,7 +118,7 @@ export default {
case
'img'
:
this
.
imageUrlArr
.
splice
(
index
,
1
)
console
.
log
(
this
.
imageUrlArr
)
this
.
$emit
(
'change'
,
{
arr
:
this
.
imageUrlArr
,
key
:
this
.
picOptions
.
key
,
id
:
1
,
index
:
this
.
index
})
this
.
$emit
(
'change'
,
{
arr
:
this
.
imageUrlArr
,
key
:
this
.
picOptions
.
key
,
id
:
1
,
index
:
this
.
index
})
break
default
:
this
.
videoUrl
=
''
...
...
@@ -138,7 +138,7 @@ export default {
height
:
104px
;
border-radius
:
4px
;
margin-right
:
8px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
&:hover
.mask
{
opacity
:
1
;
}
...
...
src/views/channel/add.vue
View file @
79a792b
...
...
@@ -5,7 +5,7 @@
<div
class=
"channel-content gl-form-page"
>
<el-form
ref=
"ruleForm"
:model=
"channelForm"
label-width=
"154px"
:rules=
"rules"
>
<el-form-item
label=
"频道名称:"
prop=
"channelName"
>
<el-input
v-model=
"channelForm.channelName"
:disabled=
"isDisabled"
></el-input>
<el-input
v-model=
"channelForm.channelName"
:disabled=
"isDisabled"
maxlength=
"4"
></el-input>
</el-form-item>
<span
v-if=
"channelForm.channelType == 1"
>
<el-form-item
label=
"频道主题:"
prop=
"channelStyle"
>
...
...
@@ -72,6 +72,7 @@ export default {
channelImgArr
:
[]
},
channelImgbgArr
:
[
'banner1'
,
'banner2'
],
channelOtherImgbgArr
:
[
'membrane'
,
'crowd'
,
'activity'
],
channelImgFlag
:
false
,
picOptions
:
{
width
:
'104px'
,
...
...
@@ -112,8 +113,13 @@ export default {
return
`https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/discover/
${
name
}
.png`
},
diffChannelStyle
()
{
this
.
channelForm
.
channelImgArr
=
[
this
.
commonImg
(
this
.
channelImgbgArr
[
this
.
channelForm
.
channelStyle
-
1
])]
this
.
channelForm
.
channelImg
=
this
.
commonImg
(
this
.
channelImgbgArr
[
this
.
channelForm
.
channelStyle
-
1
])
if
(
this
.
channelForm
.
channelType
==
1
)
{
this
.
channelForm
.
channelImgArr
=
[
this
.
commonImg
(
this
.
channelImgbgArr
[
this
.
channelForm
.
channelStyle
-
1
])]
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
])
}
},
getChannelDetail
()
{
let
apis
=
this
.
id
?
'getChannelDetail'
:
this
.
merchantChannelId
?
'getMerchantChannelDetail'
:
''
...
...
@@ -125,7 +131,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
//
this.diffChannelStyle()
this
.
diffChannelStyle
()
}
})
},
...
...
src/views/channel/index.vue
View file @
79a792b
...
...
@@ -146,7 +146,7 @@ export default {
},
handleEdit
(
val
)
{
this
.
$router
.
push
({
path
:
`/channel/add?id=
${
val
.
id
}
`
path
:
`/channel/add?id=
${
val
.
id
}
&channelType=
${
val
.
channelType
}
`
})
}
}
...
...
src/views/store/components/activity.vue
View file @
79a792b
...
...
@@ -2,7 +2,7 @@
<div
class=
"activity-content gl-form-page"
>
<el-form
ref=
"ruleForm"
:model=
"activityForm"
label-width=
"154px"
:rules=
"rules"
>
<el-form-item
label=
"频道卡片主标题:"
prop=
"topicTitle"
>
<el-input
v-model=
"activityForm.topicTitle"
maxlength=
"
6
"
></el-input>
<el-input
v-model=
"activityForm.topicTitle"
maxlength=
"
4
"
></el-input>
</el-form-item>
<template
v-if=
"channelType == 3"
>
<el-form-item
label=
"卡片背景图:"
prop=
"backgroundImg"
>
...
...
@@ -109,38 +109,21 @@ export default {
}
},
{
itemName
:
'膨胀金活动'
,
itemValue
:
2
,
itemType
:
'crowdfunding'
,
getInterfaceApi
:
this
.
$apis
.
store
.
bulgeActivity
,
params
:
{
currentPage
:
1
}
},
{
itemName
:
'定保活动'
,
itemValue
:
3
,
itemValue
:
1
,
itemType
:
'crowdfunding'
,
getInterfaceApi
:
this
.
$apis
.
store
.
bulgeActivity
,
params
:
{
currentPage
:
1
,
subscribe
:
2
}
},
// {
// itemName: '商品',
// itemValue: 5,
// itemType: 'goods',
// getInterfaceApi: this.$apis.store.goodsActivity,
// params: {
// currentPage: 1
// }
// }
}
]
}
},
mounted
()
{
this
.
diffChannelStyle
()
this
.
diffActivityList
()
},
computed
:
{
...
mapState
({
...
...
@@ -165,7 +148,6 @@ export default {
watch
:
{
topicDetail
:
{
handler
(
data
)
{
console
.
log
(
data
)
if
(
data
)
{
this
.
activityForm
=
{
...
data
,
...
...
@@ -179,7 +161,8 @@ export default {
data
.
contentList
[
0
].
mediaList
.
forEach
(
item
=>
{
this
.
activityForm
.
mediaUrlArr
.
push
(
item
.
mediaUrl
)
})
this
.
activityForm
.
activityPrice
=
this
.
activityForm
.
activityDetails
.
activityPrice
this
.
activityForm
.
activityPrice
=
Number
(
this
.
activityForm
.
activityDetails
.
activityPrice
)
/
100
this
.
activityForm
.
productPrice
=
Number
(
this
.
activityForm
.
activityDetails
.
contentPrice
)
/
100
console
.
log
(
this
.
activityForm
)
}
},
...
...
@@ -191,6 +174,9 @@ export default {
...
mapActions
({
addChannelTopic
:
'channel/addChannelTopic'
}),
diffActivityList
()
{
this
.
activityList
.
splice
(
4
-
this
.
channelType
,
1
)
},
commonImg
(
name
)
{
return
`https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/discover/
${
name
}
.png`
},
...
...
@@ -217,7 +203,7 @@ export default {
contentName
:
data
.
marketingName
}
this
.
activityForm
.
pagePathContent
=
data
.
marketingId
console
.
log
(
this
.
activityForm
.
activityDetails
)
console
.
log
(
this
.
activityForm
.
activityDetails
)
if
(
this
.
activityForm
.
activityDetails
.
selectType
==
'goods'
)
{
this
.
activityForm
.
pagePathType
=
2
this
.
activityForm
.
productPrice
=
this
.
activityForm
.
activityDetails
.
originalPrice
...
...
@@ -227,8 +213,8 @@ export default {
this
.
activityForm
.
activityDetails
.
contentPrice
=
this
.
activityForm
.
activityDetails
.
originalPrice
}
else
{
this
.
activityForm
.
pagePathType
=
1
this
.
activityForm
.
productPrice
=
Number
(
this
.
activityForm
.
activityDetails
.
crowdFundingPrice
)
/
100
this
.
activityForm
.
activityPrice
=
Number
(
this
.
activityForm
.
activityDetails
.
activityPrice
)
/
100
this
.
activityForm
.
productPrice
=
Number
(
this
.
activityForm
.
activityDetails
.
crowdFundingPrice
)
/
100
this
.
activityForm
.
activityPrice
=
Number
(
this
.
activityForm
.
activityDetails
.
activityPrice
)
/
100
this
.
activityForm
.
activityDetails
.
contentName
=
this
.
activityForm
.
activityDetails
.
activityName
}
...
...
@@ -249,10 +235,6 @@ export default {
handleSave
()
{
console
.
log
(
this
.
activityForm
)
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
// if (!this.channelForm.channelImg) {
// this.channelImgFlag = true
// return
// }
let
mediaList
=
[]
if
(
this
.
activityForm
.
backgroundType
==
1
)
{
mediaList
=
[
...
...
src/views/store/components/carChannel.vue
View file @
79a792b
...
...
@@ -78,7 +78,7 @@
</el-form>
</div>
<div
class=
"add-box"
>
<div
class=
"btn-basic"
@
click=
"handleAddItem"
>
<div
class=
"btn-basic"
@
click
.
stop
=
"handleAddItem"
>
<img
class=
"icon-add"
src=
"@/assets/channel/icon-add.png"
/>
<div>
新增一项
</div>
</div>
...
...
@@ -115,21 +115,23 @@
<!-- <div class="el-form-item__error">请上传频道banner</div> -->
</el-form-item>
</span>
<span
style=
"position: relative"
>
<el-form-item
label=
"口碑文案:"
:key=
"index"
:class=
"index != 0 ? 'publicPraise-box' : 'publicPraise-wrap'"
v-for=
"(text, index) in editForm.contentList[0].publicPraise"
>
<span
class=
"txt-red"
>
*
</span>
<el-input
type=
"text"
v-model=
"text.value"
maxlength=
"15"
></el-input>
<div
class=
"dele-publicPraise"
@
click=
"handleDelePraise(index)"
>
<img
class=
"icon-dele"
src=
"@/assets/channel/dele.png"
/>
</div>
</el-form-item>
<div
class=
"el-form-item-public"
v-if=
"publicPraiseFlag"
>
请输入口碑文案
</div>
</span>
<el-form-item
label=
"口碑文案:"
:key=
"index"
:class=
"index != 0 ? 'publicPraise-box' : 'publicPraise-wrap'"
v-for=
"(text, index) in editForm.contentList[0].publicPraise"
>
<span
class=
"txt-red"
>
*
</span>
<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>
</el-form-item>
<!-- <div class="el-form-item__error">请输入口碑文案</div> -->
<div
class=
"btn-basic"
style=
"margin-left: 154px; margin-bottom: 10px"
@
click=
"handleAddPraise"
>
<div
class=
"btn-basic"
style=
"margin-left: 154px; margin-bottom: 10px"
@
click
.
stop=
"handleAddPraise"
>
<img
class=
"icon-add"
src=
"@/assets/channel/icon-add.png"
/>
<div>
新增一条文案
</div>
</div>
<el-form-item
label=
"宣传文案:"
:prop=
"'contentList.' + 0 + '.promotion'"
:rules=
"rules.promotion"
>
<el-input
type=
"textarea"
v-model=
"editForm.contentList[0].promotion"
></el-input>
<el-input
type=
"textarea"
v-model=
"editForm.contentList[0].promotion"
maxlength=
"100"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
label=
"按钮报名:"
:prop=
"'contentList.' + 0 + '.buttonRegistration'"
:rules=
"rules.buttonRegistration"
>
<el-input
type=
"text"
maxlength=
"6"
v-model=
"editForm.contentList[0].buttonRegistration"
></el-input>
...
...
@@ -205,13 +207,15 @@ const url = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/discover/
export
default
{
data
()
{
return
{
isFlag
:
fals
e
,
isFlag
:
tru
e
,
dialogVisibleImg
:
false
,
publicPraiseFlag
:
false
,
dialogType
:
''
,
dialogSrc
:
''
,
editChildRef
:
'editChildRef'
,
currentPath
:
0
,
editForm
:
{
productUrl
:
''
,
styleArr
:
[],
productPrice
:
''
,
activityPrice
:
''
,
...
...
@@ -289,7 +293,7 @@ export default {
publicPraise
:
[{
required
:
true
,
message
:
'请输入口碑文案'
,
trigger
:
'blur'
}],
backgroundImg
:
[{
required
:
true
,
message
:
'请选择卡片背景图'
,
trigger
:
'change'
}],
channelImg
:
[{
required
:
true
,
message
:
'请上传频道banner'
,
trigger
:
'change'
}],
promotion
:
[{
required
:
true
,
message
:
'请输入
频道分享
文案'
,
trigger
:
'blur'
}],
promotion
:
[{
required
:
true
,
message
:
'请输入
宣传
文案'
,
trigger
:
'blur'
}],
buttonRegistration
:
[{
required
:
true
,
message
:
'请输入报名按钮'
,
trigger
:
'blur'
}],
mediaUrl
:
[{
required
:
true
,
message
:
'请选择视频'
,
trigger
:
'change'
}],
productUrl
:
[{
required
:
true
,
message
:
'请上传产品主图'
,
trigger
:
'change'
}],
...
...
@@ -310,7 +314,7 @@ export default {
label
:
'频道卡片主标题'
,
name
:
'topicTitle'
,
type
:
'input'
,
maxlength
:
6
,
maxlength
:
4
,
filter
:
'1,2,3'
},
{
...
...
@@ -456,13 +460,6 @@ export default {
value
:
text
})
})
// if (!publicPraiseArr.length) {
// this.$message({
// message: '请输入口碑文案',
// type: 'error'
// })
// return
// }
contentList
.
push
({
activityDetails
:
item
.
pageContentItem
,
...
item
,
...
...
@@ -492,9 +489,10 @@ export default {
this
.
editForm
.
mediaUrlArr
.
push
(
item
.
mediaUrl
)
this
.
editForm
.
productUrl
=
item
.
mediaUrl
})
this
.
editForm
.
productPrice
=
this
.
editForm
.
activityDetails
.
contentPrice
this
.
editForm
.
activityPrice
=
this
.
editForm
.
activityDetails
.
activityPrice
this
.
editForm
.
productPrice
=
this
.
editForm
.
pagePathType
==
2
?
this
.
editForm
.
activityDetails
.
contentPrice
:
Number
(
this
.
editForm
.
activityDetails
.
contentPrice
)
/
100
this
.
editForm
.
activityPrice
=
this
.
editForm
.
pagePathType
==
2
?
this
.
editForm
.
activityDetails
.
activityPrice
:
Number
(
this
.
editForm
.
activityDetails
.
activityPrice
)
/
100
this
.
isFlag
=
true
console
.
log
(
this
.
editForm
)
this
.
initParams
()
this
.
diffChannelStyle
()
}
...
...
@@ -524,9 +522,15 @@ export default {
return
`https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/discover/
${
name
}${
this
.
channelStyle
}
.png`
},
handleDelePraise
(
index
)
{
if
(
this
.
editForm
.
contentList
[
0
].
publicPraise
.
length
==
1
)
{
return
}
this
.
editForm
.
contentList
[
0
].
publicPraise
.
splice
(
index
,
1
)
},
delectContent
(
index
)
{
if
(
this
.
editForm
.
contentList
.
length
==
1
)
{
return
}
this
.
editForm
.
contentList
.
splice
(
index
,
1
)
},
//上传类型
...
...
@@ -551,7 +555,6 @@ export default {
]
},
handleSave
()
{
console
.
log
(
this
.
editForm
)
let
form1
=
''
let
form2
=
''
...
...
@@ -564,6 +567,7 @@ export default {
})
if
(
this
.
editForm
.
topicStyle
!=
3
)
{
// this.$refs.ruleForm.clearValidate()
form2
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
if
(
valid
)
{
...
...
@@ -572,6 +576,14 @@ export default {
})
})
}
//判断口碑文案是否未空
if
(
this
.
editForm
.
topicStyle
==
2
)
{
this
.
publicPraiseFlag
=
false
if
(
!
this
.
editForm
.
contentList
[
0
].
publicPraise
.
some
(
item
=>
item
.
value
!=
''
))
{
this
.
publicPraiseFlag
=
true
return
}
}
let
promiseArr
if
(
this
.
editForm
.
topicStyle
==
3
)
{
...
...
@@ -637,6 +649,7 @@ export default {
backgroundType
:
1
,
contentList
}
console
.
log
(
params
)
if
(
this
.
topicId
)
params
.
id
=
this
.
topicId
this
.
loading
=
true
this
.
addChannelTopic
({
...
...
@@ -776,12 +789,10 @@ export default {
})
},
changeChannelImg
(
val
)
{
console
.
log
(
val
)
if
(
val
.
index
!=
-
1
)
{
this
.
editForm
.
contentList
[
val
.
index
][
val
.
key
]
=
val
.
arr
[
0
]
}
else
{
this
.
editForm
[
val
.
key
]
=
val
.
arr
[
0
]
console
.
log
(
this
.
editForm
[
val
.
key
],
'9999999'
)
}
if
(
this
.
editForm
.
topicStyle
==
3
||
val
.
index
==
-
1
)
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
(
val
.
key
)
...
...
@@ -885,6 +896,15 @@ export default {
background
:
#f9f9f9
;
padding
:
20px
0
20px
20px
;
box-sizing
:
border-box
;
/deep/.el-form-item-public
{
color
:
#f56c6c
;
font-size
:
12px
;
line-height
:
1
;
padding-top
:
4px
;
position
:
absolute
;
bottom
:
-30px
;
left
:
154px
;
}
}
.preview
{
font-weight
:
400
;
...
...
@@ -903,7 +923,7 @@ export default {
cursor
:
pointer
;
padding
:
0
;
font-size
:
12px
;
width
:
200
px
;
width
:
105
px
;
}
.icon-add
{
width
:
20px
;
...
...
@@ -911,7 +931,7 @@ export default {
margin-right
:
6px
;
}
.publicPraise-box
{
margin-top
:
-
10
px
;
margin-top
:
-
7
px
;
/deep/
.el-form-item__label
{
color
:
#fff
;
}
...
...
src/views/store/components/membrane.vue
View file @
79a792b
...
...
@@ -82,17 +82,19 @@ export default {
watch
:
{
topicDetail
:
{
handler
(
data
)
{
this
.
membraneForm
=
{
...
data
.
contentList
[
0
].
mediaList
[
0
],
mediaCoverArr
:
[],
mediaUrlArr
:
[],
promotion
:
data
.
contentList
[
0
].
promotion
if
(
data
)
{
this
.
membraneForm
=
{
...
data
.
contentList
[
0
].
mediaList
[
0
],
mediaCoverArr
:
[],
mediaUrlArr
:
[],
promotion
:
data
.
contentList
[
0
].
promotion
}
this
.
membraneForm
.
mediaCoverArr
.
push
(
this
.
membraneForm
.
mediaCover
)
data
.
contentList
[
0
].
mediaList
.
forEach
(
item
=>
{
this
.
membraneForm
.
mediaUrlArr
.
push
(
item
.
mediaUrl
)
})
this
.
membraneForm
.
picUrl
=
this
.
membraneForm
.
mediaUrlArr
[
0
]
}
this
.
membraneForm
.
mediaCoverArr
.
push
(
this
.
membraneForm
.
mediaCover
)
data
.
contentList
[
0
].
mediaList
.
forEach
(
item
=>
{
this
.
membraneForm
.
mediaUrlArr
.
push
(
item
.
mediaUrl
)
})
this
.
membraneForm
.
picUrl
=
this
.
membraneForm
.
mediaUrlArr
[
0
]
},
immediate
:
true
,
deep
:
true
...
...
src/views/store/index.vue
View file @
79a792b
...
...
@@ -191,7 +191,7 @@ export default {
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
count
'
}
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
total
'
}
}
},
created
()
{},
...
...
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