Commit 1a352923 by xinla

--no commit message

1 parent fbc68b12
<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>
// 手机端背景框组件 // 手机端背景框组件
<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: 750px; height: 720px;
border: 15px solid #edf2f9; border: 12px 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: 65px; width: 100px;
height: 6px; height: 25px;
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 {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!