Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 6153ef98
authored
Jan 11, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
2c4b1845
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
214 additions
and
54 deletions
package-lock.json
package.json
src/images/phone.png
src/views/friendGroup/friendGroupAdd.vue
src/views/seckillActivity/crowdFundList.vue
src/views/sop/editSop/baseInfo.vue
src/views/sop/editSop/components/FriendGroupPreview/index.vue
src/views/sop/editSop/components/MessagePreview/index.vue
src/views/sop/editSop/editEvent.vue
package-lock.json
View file @
6153ef9
...
...
@@ -7069,9 +7069,9 @@
}
},
"glsx-components_beta"
:
{
"version"
:
"1.0.
2
"
,
"resolved"
:
"https://registry.npmmirror.com/glsx-components_beta/-/glsx-components_beta-1.0.
2
.tgz"
,
"integrity"
:
"sha512-
1srDgdgOnL8oi4B9d/C9uNe6yLt1PKFo1O18Y6Wcr1t7TeUGZF1ZVyann5UBb6B6iJ+Zn0systcewybrF+CfeQ
=="
,
"version"
:
"1.0.
3
"
,
"resolved"
:
"https://registry.npmmirror.com/glsx-components_beta/-/glsx-components_beta-1.0.
3
.tgz"
,
"integrity"
:
"sha512-
E1kAPMBQPnpjMA0N2kpHnPdq7eEAXNFlnErb4GjSRT4dGBGXnbDWHrkYv5zrGR5QYgSH2aZlHQFI9rNlKo6MDw
=="
,
"requires"
:
{
"core-js"
:
"^3.6.5"
,
"element-ui"
:
"^2.15.6"
,
...
...
package.json
View file @
6153ef9
...
...
@@ -14,7 +14,7 @@
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-components"
:
"^1.5.3"
,
"glsx-components_beta"
:
"^1.0.
2
"
,
"glsx-components_beta"
:
"^1.0.
3
"
,
"lodash"
:
"^4.17.21"
,
"node-sass"
:
"^4.0.0"
,
"vod-js-sdk-v6"
:
"^1.5.0"
,
...
...
src/images/phone.png
0 → 100644
View file @
6153ef9
18.7 KB
src/views/friendGroup/friendGroupAdd.vue
View file @
6153ef9
...
...
@@ -146,6 +146,7 @@ export default {
togetherItem
:
[
ATT_TYPE
.
TEXT
],
//只允许文本和图片
limitSize
:
10
,
//限制图片大小
limitNum
:
9
,
//限制图片数量
limitPx
:
1555200
,
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
Isdraggable
:
true
,
//图片拖拽
...
...
src/views/seckillActivity/crowdFundList.vue
View file @
6153ef9
...
...
@@ -271,6 +271,11 @@ export default {
tableOption
:
true
,
tableColumns
:
[
{
label
:
'活动名称'
,
prop
:
'activityName'
,
width
:
220
},
{
label
:
'浏览量(次)'
,
prop
:
'viewAmount'
,
addHtml
:
'linkText'
,
...
...
@@ -291,11 +296,6 @@ export default {
prop
:
'saleAmount'
},
{
label
:
'活动名称'
,
prop
:
'activityName'
,
width
:
220
},
{
label
:
'缩略图'
,
prop
:
'activityImg'
,
addHtml
:
'activityImg'
...
...
src/views/sop/editSop/baseInfo.vue
View file @
6153ef9
...
...
@@ -94,12 +94,14 @@
<p
class=
"m-r-20 txt-blue"
>
{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}
</p>
</div>
<div
class=
"event-link"
>
<!-- typeof(item.backupContent) == 'string' ? (obj,index) in JSON.parse(item.backupContent) : (obj,index) in item.backupContent-->
<div
v-for=
"(obj,index) in backupContentJson(item.backupContent)"
:key=
"index"
>
<div
class=
"event-content"
v-if=
"obj.attType == 1"
v-html=
"tramWord(obj.attContent)"
></div>
<div
class=
"event-content"
v-if=
"obj.attType == 2"
>
<img
class=
"limitPhoto"
<div>
<div
v-for=
"(obj,index) in backupContentJson(item.backupContent)"
:key=
"index"
>
<div
class=
"textHidden"
:title=
"obj.attContent"
v-if=
"obj.attType == 1"
v-html=
"tramWord(obj.attContent)"
></div>
</div>
<div
class=
"event-inline"
v-for=
"(obj,index) in backupContentJson(item.backupContent)"
:key=
"index"
>
<div
>
<div
v-if=
"obj.attType == 2"
>
<img
class=
"model-item-img"
:src=
"obj.attContent"
alt
/>
</div>
<div
v-if=
"obj.attType == 3"
>
...
...
@@ -114,9 +116,6 @@
<div
class=
"welcome-activity-desc"
>
<div
class=
"model-item-title"
>
{{ JSON.parse(obj.attContent).fileName }}
</div>
</div>
<div
class=
"delete-solid"
>
<i
class=
"el-icon-delete-solid"
@
click=
"close(index)"
></i>
</div>
</div>
</div>
</div>
...
...
@@ -128,9 +127,6 @@
v-if=
"marketingContentJSON(obj).selectType == 'coupon'"
/>
<img
src=
"@/assets/welcomeWord/gift.png"
alt=
""
v-else
/>
</div>
<!-- <div class="delete-solid">-->
<!-- <i class="el-icon-delete-solid" @click="close(index)"></i>-->
<!-- </div>-->
<div
class=
"welcome-activity-desc"
>
<
template
v-if=
"marketingContentJSON(obj).selectType == 'card'"
>
<div
class=
"model-item-title"
:title=
"marketingContentJSON(obj).equityName"
>
...
...
@@ -189,6 +185,7 @@
</div>
</div>
</div>
</div>
</div>
<div
class=
"event-btns"
>
<el-button
v-if=
"new Date(item.eventStartDate) > new Date() || routeInfo.addOrEdit =='copy'"
...
...
@@ -198,14 +195,13 @@
content=
"请先完善sop名称和营销对象"
placement=
"top"
>
<div>
<el-button
class=
"default-blue-btn newBtnSty"
v-if=
"new Date(item.eventStartDate) > new Date()"
:disabled=
"!editForm.customerInfoList.length || !editForm.sopName"
:size=
"size"
@
click=
"handleEventEdit('edit', item, index)"
>
编辑
</el-button>
</div>
</el-tooltip>
<!-- <el-button class="default-blue-btn"-->
<!-- :size="size" @click="handleEventEdit('look', item, index)">查看-->
<!-- </el-button>-->
</div>
</div>
</div>
...
...
@@ -452,9 +448,9 @@ export default {
return
htm
},
backupContentJson
(
val
)
{
if
(
typeof
(
val
)
==
'string'
){
if
(
typeof
(
val
)
==
'string'
)
{
return
JSON
.
parse
(
val
)
}
else
{
}
else
{
return
val
}
},
...
...
@@ -921,7 +917,9 @@ export default {
params
.
id
=
this
.
routeInfo
.
id
params
.
eventList
=
[]
var
idx
=
0
console
.
log
(
this
.
editForm
.
eventList
)
this
.
editForm
.
eventList
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
item
)
if
(
new
Date
(
item
.
eventStartDate
)
>
new
Date
())
{
params
.
eventList
.
push
(
{
...
...
@@ -950,6 +948,7 @@ export default {
if
(
backupContent
&&
backupContent
.
length
<=
2
)
{
backupContent
.
forEach
(
obj
=>
{
if
(
obj
&&
obj
.
attType
==
1
)
{
console
.
log
(
params
.
eventList
[
index
])
params
.
eventList
[
index
].
eventContent
=
obj
.
attContent
}
if
(
obj
&&
obj
.
attType
==
2
)
{
...
...
@@ -964,7 +963,7 @@ export default {
params
.
eventList
[
index
].
objectType
=
12
videoImageStorage
.
push
(
obj
.
attContent
)
params
.
eventList
[
index
].
resourceList
=
videoImageStorage
videoImageStorage
=
[]
videoImageStorage
=
[]
}
// 活动
if
(
obj
&&
obj
.
attType
==
7
)
{
...
...
@@ -1031,13 +1030,9 @@ export default {
}
})
}
// if (item.object) {
// params.eventList[idx].objectId = item.object.objectId
// params.eventList[idx].additionalType = item.object.additionalType
// params.eventList[idx].objectType = item.object.objectType
// delete params.eventList[idx].object
// }
idx
=
idx
+
1
}
else
{
params
.
eventList
.
push
(
item
)
}
})
}
else
{
...
...
@@ -1287,6 +1282,10 @@ export default {
line-height
:
24px
;
}
.event-flex
{
display
:
flex
;
}
.event-btns
{
position
:
absolute
;
top
:
16px
;
...
...
@@ -1305,10 +1304,6 @@ export default {
}
}
.limitPhoto
{
width
:
50px
;
height
:
50px
;
}
.welcome-activity-panel
{
display
:
flex
;
...
...
@@ -1416,4 +1411,15 @@ export default {
}
}
}
.textHidden
{
max-width
:
1000px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.event-inline
{
margin-top
:
8px
;
display
:
inline-block
}
</
style
>
src/views/sop/editSop/components/FriendGroupPreview/index.vue
0 → 100644
View file @
6153ef9
This diff is collapsed.
Click to expand it.
src/views/sop/editSop/components/MessagePreview/index.vue
0 → 100644
View file @
6153ef9
<
template
>
<div
class=
"form-image"
>
<img
src=
"@/images/phone.png"
/>
<div
class=
"preview-content"
>
<div
class=
"preview-info"
>
<!--
<div
class=
"preview-text text"
v-if=
"addForm.messageContext"
>
【短信签名】
{{
addForm
.
messageContext
}}
</div>
-->
<div
class=
"preview-box"
v-for=
"item in previewListFilter"
:key=
"item.id"
>
<div
class=
"preview-box-desc"
>
<template
v-if=
"item.attType == 1"
>
<div
class=
"preview-text text"
v-html=
"item.attContent"
></div>
</
template
>
<!-- <template v-if="item.attType == 7">-->
<!-- <div class="preview-text preview-link">-->
<!-- <img src="@/assets/guestCustom/preview-link.png" alt />-->
<!-- <div>{{ item.attContent[0].marketingName }}</div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent">-->
<!-- <el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image>-->
<!-- </template>-->
<!-- <template v-else-if="item.attType == 3">-->
<!-- <!– <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> –>-->
<!-- <div class="video-panel">-->
<!-- <video id="video" width="100%" height="100%" preload loop muted>-->
<!-- <source :src="item.attContent" type="video/mp4" />-->
<!-- </video>-->
<!-- <i-->
<!-- class="el-icon-video-play"-->
<!-- @click="-->
<!-- videoShow = true-->
<!-- videoUrl = item.attContent-->
<!-- "-->
<!-- ></i>-->
<!-- </div>-->
<!-- </template>-->
</div>
</div>
</div>
</div>
</div>
</template>
<
script
>
import
emoji
from
"@/utils/emo"
;
export
default
{
name
:
'MessagePreview'
,
props
:
{
previewView
:
Array
},
data
()
{
return
{
previewListFilter
:[]
}
},
watch
:
{
previewView
:
{
handler
(
val
)
{
const
previewVal
=
this
.
$common
.
utils
.
deepClone
(
val
).
filter
(
item
=>
item
)
console
.
log
(
previewVal
)
this
.
previewListFilter
=
[]
for
(
let
i
in
previewVal
)
{
if
(
previewVal
[
i
].
attType
==
1
)
{
const
attContent
=
previewVal
[
i
].
attContent
const
htm
=
attContent
.
replace
(
/
\[[\u
4E00-
\u
9FA56
]{1,4}
]/gi
,
function
(
res
)
{
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
)
const
list
=
emoji
.
flat
(
Infinity
)
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
if
(
index
<
10
)
{
index
=
'00'
+
index
}
else
if
(
index
>=
10
&&
index
<
100
)
{
index
=
'0'
+
index
}
return
`<img style="width: 18px;
height: 18px;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/
${
index
}
.png">`
})
this
.
previewListFilter
.
push
({
attType
:
1
,
attContent
:
htm
})
}
else
if
(
previewVal
[
i
].
attType
==
2
)
{
const
pindex
=
this
.
previewListFilter
.
findIndex
(
item
=>
item
.
attType
==
2
)
if
(
pindex
==
-
1
)
{
this
.
previewListFilter
.
push
({
attType
:
2
,
attContent
:
[
previewVal
[
i
].
attContent
]
})
}
else
{
this
.
previewListFilter
[
pindex
].
attContent
.
push
(
previewVal
[
i
].
attContent
)
}
}
else
{
this
.
previewListFilter
.
push
({
attType
:
previewVal
[
i
].
attType
,
attContent
:
previewVal
[
i
].
attContent
})
}
}
this
.
$nextTick
(()
=>
{
this
.
previewListFilter
=
this
.
previewListFilter
.
filter
(
item
=>
item
)
})
},
deep
:
true
}
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.form-image
{
width
:
280px
;
height
:
546px
;
margin
:
20px
80px
20px
0
;
position
:
relative
;
.preview-content
{
position
:
absolute
;
width
:
250px
;
height
:
320px
;
overflow-y
:
auto
;
top
:
125px
;
left
:
50px
;
.preview-text
{
padding
:
10px
;
position
:
relative
;
width
:
160px
;
color
:
#333
;
background-color
:
#f4f4f4
;
border-radius
:
4px
;
word-wrap
:
break-word
;
margin-bottom
:
10px
;
line-height
:
15px
;
}
}
img
{
width
:
100%
;
height
:
auto
;
}
}
</
style
>
src/views/sop/editSop/editEvent.vue
View file @
6153ef9
...
...
@@ -61,16 +61,18 @@
<div
class=
"marketingContent"
>
<div
class=
"group-content"
>
<el-form
:model=
"editForm"
:rules=
"editRule"
ref=
"groupForm"
label-width=
"154px"
>
<el-form-item
prop=
"eventContent"
class=
"attachment-panel"
>
<label
slot=
"label"
class=
"required"
>
营销内容:
</label>
<GLEditor
ref=
"welcome"
:form=
"'object'"
style=
"line-height: 12px;
"
:btnList=
"btnList"
@
previewWord=
"previewForm"
></GLEditor>
<div
v-show=
"hasEventContent
"
class=
"el-form-item__error"
>
请输入营销内容
</div>
</el-form-item>
<el-form-item
prop=
"eventContent"
class=
"attachment-panel"
>
<label
slot=
"label"
class=
"required"
>
营销内容:
</label>
<GLEditor
ref=
"welcome"
:form=
"'object'"
style=
"line-height: 12px;width:650px
"
:btnList=
"btnList"
@
previewWord=
"previewForm"
></GLEditor>
<div
v-show=
"hasEventContentDisplay
"
class=
"el-form-item__error"
>
请输入营销内容
</div>
</el-form-item>
</el-form>
</div>
<div
class=
"preview"
>
<Preview
:previewVal=
"previewList"
></Preview>
<Preview
:previewVal=
"previewList"
v-if=
"editForm.pushChannelType == 1"
></Preview>
<MessagePreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 2"
></MessagePreview>
<FriendGroupPreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 3"
></FriendGroupPreview>
</div>
</div>
</div>
...
...
@@ -135,6 +137,8 @@ import {limitPrice} from '@/common/constant'
import
ActivityModel
from
'./components/activityModel'
import
materialModel
from
'./components/materialModel'
import
nicknameModel
from
'./components/nicknameModel'
import
MessagePreview
from
'./components/MessagePreview/index'
import
FriendGroupPreview
from
'./components/FriendGroupPreview/index'
import
Preview
from
'@/views/customerTransform/components/preview.vue'
import
emoji
from
'@/utils/emo'
import
*
as
moment
from
'moment'
...
...
@@ -143,7 +147,8 @@ export default {
name
:
'editGift'
,
data
()
{
return
{
hasEventContent
:
false
,
hasShowWechat
:
false
,
hasEventContentDisplay
:
false
,
size
:
'small'
,
editChildRef
:
'editChildRef'
,
isMaterialVisible
:
false
,
...
...
@@ -565,7 +570,9 @@ export default {
ActivityModel
,
materialModel
,
nicknameModel
,
Preview
Preview
,
FriendGroupPreview
,
MessagePreview
},
watch
:
{
editForm
:
{
...
...
@@ -583,6 +590,13 @@ export default {
this
.
editFormDataChannel
[
idx
].
optionList
[
1
].
isDisabled
=
val
==
'4'
this
.
editFormDataChannel
[
idx
].
optionList
[
2
].
isDisabled
=
[
1
,
2
,
3
].
includes
(
val
)
},
'editForm.pushChannelType'
(
newValue
)
{
setTimeout
(()
=>
{
this
.
previewList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
previewList
))
})
},
},
created
()
{
...
...
@@ -595,7 +609,6 @@ export default {
mounted
()
{
Object
.
assign
(
this
.
editForm
,
this
.
eventObj
.
info
)
console
.
log
(
this
.
editForm
)
this
.
getStaffTypeList
()
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
...
...
@@ -609,7 +622,7 @@ export default {
val
.
forEach
(
item
=>
{
if
([
2
,
3
].
includes
(
item
.
attType
))
{
this
.
editFormDataChannel
[
0
].
optionList
[
1
].
isDisabled
=
true
if
(
this
.
editForm
.
pushChannelType
==
2
){
if
(
this
.
editForm
.
pushChannelType
==
2
)
{
this
.
editForm
.
pushChannelType
=
''
}
}
else
{
...
...
@@ -706,7 +719,7 @@ export default {
this
.
getCustomerNum
()
},
getWelcomeDetails
()
{
let
backupContent
=
typeof
(
this
.
editForm
.
backupContent
)
==
'string'
?
JSON
.
parse
(
this
.
editForm
.
backupContent
)
:
this
.
editForm
.
backupContent
let
backupContent
=
typeof
(
this
.
editForm
.
backupContent
)
==
'string'
?
JSON
.
parse
(
this
.
editForm
.
backupContent
)
:
this
.
editForm
.
backupContent
if
(
backupContent
)
{
const
previewList
=
backupContent
.
map
(
item
=>
{
if
(
item
.
attType
==
7
)
item
.
attContent
=
JSON
.
parse
(
item
.
attContent
)
...
...
@@ -731,11 +744,11 @@ export default {
handleMarketingContent
()
{
let
params
=
{}
const
previewList
=
this
.
$common
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
this
.
$refs
.
welcome
.
previewList
if
(
previewList
[
0
]
&&
previewList
[
0
].
attType
==
1
&&
previewList
[
0
].
attContent
==
''
)
{
this
.
hasEventContent
=
true
if
(
previewList
[
0
]
&&
previewList
[
0
].
attType
==
1
&&
previewList
[
0
].
attContent
==
''
)
{
this
.
hasEventContent
Display
=
true
return
}
else
{
this
.
hasEventContent
=
false
}
else
{
this
.
hasEventContent
Display
=
false
}
const
contentList
=
previewList
.
map
(
item
=>
{
if
(
item
.
attType
==
1
)
{
...
...
@@ -897,7 +910,7 @@ export default {
handleConfirm
()
{
this
.
handleMarketingContent
()
if
(
this
.
hasEventContent
){
if
(
this
.
hasEventContent
)
{
return
}
let
countParams
=
{
...
...
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