Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 1a352923
authored
Apr 27, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
fbc68b12
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
77 deletions
linkwe-pc/src/components/ContentCenter/PreviewInPhone.vue
linkwe-pc/src/components/PhoneTemplate.vue
linkwe-pc/src/components/ContentCenter/PreviewInPhone.vue
View file @
1a35292
<
template
>
<
template
>
<div
class=
"preview"
>
<PhoneTemplate
:title=
"name"
>
<div
class=
"title"
>
{{
name
}}
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<!-- 欢迎语 -->
<!-- 欢迎语 -->
<div
class=
"item"
v-if=
"templateInfo"
>
<div
class=
"item"
v-if=
"templateInfo"
>
<div
class=
"avatar222"
><img
src=
"../../assets/drainageCode/header.png"
/></div>
<div
class=
"avatar222"
><img
src=
"../../assets/drainageCode/header.png"
/></div>
<div
class=
"msg"
>
<div
class=
"msg"
>
<div
class=
"word"
>
<div
class=
"word"
>
<p
style=
"line-height: 18px
;
"
v-html=
"templateInfo.replace(/\n|\r\n/g, '
<br>
').replace(/ /g, '
&
nbsp')">
</p>
<p
style=
"line-height: 18px"
v-html=
"templateInfo.replace(/\n|\r\n/g, '
<br>
').replace(/ /g, '
&
nbsp')">
</p>
<div
v-if=
"liveUrl"
style=
"margin-top: 10px
;
"
>
<div
v-if=
"liveUrl"
style=
"margin-top: 10px"
>
<p>
直播链接:
</p>
<p>
直播链接:
</p>
{{
liveUrl
}}
{{
liveUrl
}}
</div>
</div>
...
@@ -19,7 +18,7 @@
...
@@ -19,7 +18,7 @@
<div
class=
"avatar222"
><img
src=
"../../assets/drainageCode/header.png"
/></div>
<div
class=
"avatar222"
><img
src=
"../../assets/drainageCode/header.png"
/></div>
<div
class=
"msg"
v-if=
"data.mediaType === '4'"
>
<div
class=
"msg"
v-if=
"data.mediaType === '4'"
>
<div
class=
"word"
>
<div
class=
"word"
>
<p
style=
"white-space: pre-line
;
"
>
{{
data
.
content
}}
</p>
<p
style=
"white-space: pre-line"
>
{{
data
.
content
}}
</p>
</div>
</div>
</div>
</div>
<div
class=
"msg"
v-if=
"data.mediaType === '0'"
>
<div
class=
"msg"
v-if=
"data.mediaType === '0'"
>
...
@@ -104,8 +103,7 @@
...
@@ -104,8 +103,7 @@
<svg-icon
<svg-icon
class=
"icon-style"
class=
"icon-style"
:iconClass=
"data.materialUrl ? filType(data.materialUrl) : ''"
:iconClass=
"data.materialUrl ? filType(data.materialUrl) : ''"
v-if=
"data.materialUrl"
v-if=
"data.materialUrl"
></svg-icon>
></svg-icon>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -158,49 +156,49 @@
...
@@ -158,49 +156,49 @@
<p
v-html=
"article"
></p>
<p
v-html=
"article"
></p>
</div>
</div>
</div>
</div>
</
div
>
</
PhoneTemplate
>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'preview-client'
,
name
:
'preview-client'
,
components
:
{},
components
:
{},
props
:
{
props
:
{
name
:
{
name
:
{
type
:
String
,
type
:
String
,
default
:
'客户'
default
:
'客户'
,
},
},
// 文章详情展示
// 文章详情展示
article
:
{
article
:
{
type
:
String
,
type
:
String
,
default
:
null
default
:
null
,
},
},
// 内容
// 内容
templateInfo
:
{
templateInfo
:
{
type
:
String
,
type
:
String
,
default
:
null
default
:
null
,
},
},
list
:
{
list
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[],
},
},
// 直播链接
// 直播链接
liveUrl
:
{
liveUrl
:
{
type
:
String
,
type
:
String
,
default
:
null
default
:
null
,
},
},
// 新客拉新
// 新客拉新
pullnewsInfo
:
{
pullnewsInfo
:
{
type
:
Object
,
type
:
Object
,
default
:
null
default
:
null
,
}
},
},
},
watch
:
{
watch
:
{
list
:
{
list
:
{
handler
(
val
)
{
handler
(
val
)
{
// console.log(144, val)
// console.log(144, val)
},
},
immediate
:
true
immediate
:
true
,
}
},
},
},
data
()
{
data
()
{
return
{}
return
{}
...
@@ -223,12 +221,12 @@
...
@@ -223,12 +221,12 @@
}
else
{
}
else
{
return
''
return
''
}
}
}
},
}
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.redBox
{
.redBox
{
min-height
:
26px
;
min-height
:
26px
;
display
:
inline-block
;
display
:
inline-block
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -252,8 +250,8 @@
...
@@ -252,8 +250,8 @@
overflow
:
hidden
;
//
溢出隐藏
overflow
:
hidden
;
//
溢出隐藏
}
}
}
}
}
}
.function
{
.function
{
width
:
160px
;
width
:
160px
;
.function-item
{
.function-item
{
width
:
160px
;
width
:
160px
;
...
@@ -286,47 +284,14 @@
...
@@ -286,47 +284,14 @@
width
:
98px
;
width
:
98px
;
}
}
}
}
}
}
.icon-style
{
.icon-style
{
width
:
40px
;
width
:
40px
;
height
:
40px
;
height
:
40px
;
}
}
.preview
{
margin
:
0
auto
;
position
:
relative
;
width
:
300px
;
height
:
640px
;
background
:
url(../../assets/drainageCode/preview-bg.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
//
margin-top
:
20px
;
.title
{
.content
{
position
:
absolute
;
padding
:
15px
;
top
:
37px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
font-size
:
14px
;
font-weight
:
400
;
width
:
60%
;
color
:
#333333
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-align
:
center
;
}
.content
{
position
:
absolute
;
height
:
545px
;
width
:
280px
;
overflow-y
:
auto
;
top
:
70px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
border-bottom-left-radius
:
20px
;
border-bottom-right-radius
:
20px
;
padding
:
20px
;
.item
{
.item
{
font-size
:
12px
;
font-size
:
12px
;
...
@@ -430,6 +395,5 @@
...
@@ -430,6 +395,5 @@
}
}
}
}
}
}
}
}
}
</
style
>
</
style
>
linkwe-pc/src/components/PhoneTemplate.vue
View file @
1a35292
// 手机端背景框组件
// 手机端背景框组件
<
template
>
<
template
>
<div
class=
"preview"
>
<div
class=
"preview"
>
<!--
<div
class=
"preview-status"
>
<div>
13:14
</div>
</div>
-->
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"preview-bar"
v-if=
"isTab"
>
<div
class=
"preview-bar"
v-if=
"isTab"
>
<i
class=
"el-icon-arrow-left"
></i>
<i
class=
"
icon
el-icon-arrow-left"
></i>
{{
title
}}
{{
title
}}
<i
class=
"el-icon-more"
></i>
<i
class=
"
icon
el-icon-more"
></i>
</div>
</div>
<el-scrollbar
class=
"preview-content"
wrap-class=
"scrollbar-wrapper"
>
<el-scrollbar
class=
"preview-content"
wrap-class=
"scrollbar-wrapper"
>
<template>
<template>
...
@@ -20,6 +23,7 @@
...
@@ -20,6 +23,7 @@
export
default
{
export
default
{
components
:
{},
components
:
{},
props
:
{
props
:
{
// 是否显示顶部tab标题栏
isTab
:
{
isTab
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
,
...
@@ -44,25 +48,34 @@ export default {
...
@@ -44,25 +48,34 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
margin
:
0
auto
;
margin
:
0
auto
;
position
:
relative
;
position
:
relative
;
width
:
var
(
--phone-width
);
width
:
var
(
--phone-width
,
350px
);
max-width
:
375px
;
max-width
:
375px
;
min-width
:
320px
;
min-width
:
320px
;
height
:
7
5
0px
;
height
:
7
2
0px
;
border
:
1
5
px
solid
#edf2f9
;
border
:
1
2
px
solid
#edf2f9
;
border-radius
:
40px
;
border-radius
:
40px
;
box-sizing
:
content-box
;
box-sizing
:
content-box
;
overflow
:
hidden
;
overflow
:
hidden
;
background
:
#fff
;
background
:
#fff
;
//
.preview-status
{
//
display
:
flex
;
//
justify-content
:
space-between
;
//
align-items
:
center
;
//
padding
:
0
10px
;
//
}
.icon
{
font-size
:
16px
;
}
.line
{
.line
{
flex
:
none
;
flex
:
none
;
width
:
65
px
;
width
:
100
px
;
height
:
6
px
;
height
:
25
px
;
margin
:
0
auto
6px
;
margin
:
6px
auto
;
border-radius
:
0
0
50px
50px
;
border-radius
:
50px
;
background
:
#
eee
;
background
:
#
bbb
;
border
:
10px
solid
#333
;
//
border
:
10px
solid
#bbb
;
box-sizing
:
content-box
;
//
box-sizing
:
content-box
;
border-width
:
13px
62px
;
//
border-width
:
13px
62px
;
}
}
.line2
{
.line2
{
position
:
absolute
;
position
:
absolute
;
...
@@ -103,6 +116,9 @@ export default {
...
@@ -103,6 +116,9 @@ export default {
//
transform
:
translateX
(
-50%
);
//
transform
:
translateX
(
-50%
);
border-radius
:
0
0
20px
20px
;
border-radius
:
0
0
20px
20px
;
background
:
#f6f8ff
;
background
:
#f6f8ff
;
::v-deep
img
{
max-width
:
100%
;
}
}
}
::v-deep
{
::v-deep
{
...
...
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