Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-outbound
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 c025c59c
authored
Jul 14, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
a320fbe9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
167 additions
and
41 deletions
src/views/calendar/components/PhoneView.vue
src/views/calendar/components/PhoneView.vue
View file @
c025c59
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-1
3 21:03:19
* @LastEditTime: 2023-07-1
4 09:40:52
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<img
src=
"@/assets/phone.png"
class=
"review-phone"
/>
<img
src=
"@/assets/phone.png"
class=
"review-phone"
/>
<div
class=
"review-title_top"
>
{{
detail
.
title
}}
</div>
<div
class=
"review-title_top"
>
{{
detail
.
title
}}
</div>
<div
class=
"review-content"
v-if=
"isRenewal"
>
<div
class=
"review-content"
v-if=
"isRenewal"
>
<div
class=
"review-main"
>
<div
class=
"review-main"
v-if=
"backgroundHeight"
:style=
"
{ height: backgroundHeight + 'px' }"
>
<template
v-for=
"item in draggableList"
>
<template
v-for=
"item in draggableList"
>
<vue-draggable-resizable
<vue-draggable-resizable
:customId=
"item.customId"
:customId=
"item.customId"
...
@@ -69,6 +69,24 @@
...
@@ -69,6 +69,24 @@
<img
:src=
"detail.captionImg"
v-if=
"detail.captionImg"
/>
<img
:src=
"detail.captionImg"
v-if=
"detail.captionImg"
/>
</div>
</div>
</div>
</div>
<div
class=
"review-package"
>
<div
class=
"review-goods"
v-if=
"selectedGoodsList && selectedGoodsList.length"
>
<div
class=
"goods-item"
v-for=
"(item, index) in selectedGoodsList"
:key=
"index"
>
<div
class=
"service-logo"
>
<img
:src=
"item.goodsImage || $vip"
/>
</div>
<div
class=
"service-desc"
>
<div
class=
"title"
>
{{ item.brandName }}{{ item.goodsName }}
</div>
<div
class=
"content"
>
x{{ item.couponAmount }} 抵扣券
</div>
</div>
<div
class=
"service-price"
>
{{ (item.denomination / 100).toFixed(2) }}
<span>
元
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -93,6 +111,7 @@ export default {
...
@@ -93,6 +111,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
currentIndex
:
0
,
currentIndex
:
0
,
backgroundHeight
:
0
,
modelNum
:
4
,
modelNum
:
4
,
isRenewal
:
false
,
isRenewal
:
false
,
discount
:
{
discount
:
{
...
@@ -172,52 +191,38 @@ export default {
...
@@ -172,52 +191,38 @@ export default {
},
},
watch
:
{
watch
:
{
editForm
:
{
editForm
:
{
handler
(
val
)
{
async
handler
(
val
)
{
this
.
isRenewal
=
false
this
.
isRenewal
=
false
this
.
backgroundHeight
=
0
if
(
RENEWAL
.
includes
(
val
.
codeId
))
{
if
(
RENEWAL
.
includes
(
val
.
codeId
))
{
this
.
modelNum
=
val
.
codeId
this
.
modelNum
=
val
.
codeId
this
.
isRenewal
=
true
this
.
isRenewal
=
true
}
}
this
.
detail
=
this
.
editForm
const
mainTitle
=
this
.
cavansObj
[
1
],
{
title
,
subTitle
}
=
val
,
textList
=
[]
if
(
mainTitle
)
{
title
.
split
(
' '
).
forEach
((
item
,
index
)
=>
{
textList
.
push
({
x
:
mainTitle
.
titleStyle
.
x
*
0.7
,
y
:
(
mainTitle
.
titleStyle
.
y
+
index
*
mainTitle
.
titleStyle
.
fontSize
*
1.1
)
*
0.7
,
fontSize
:
mainTitle
.
titleStyle
.
fontSize
*
0.7
,
color
:
mainTitle
.
titleStyle
.
color
,
text
:
item
})
})
new
Array
(
subTitle
).
forEach
((
item
,
index
)
=>
{
textList
.
push
({
x
:
mainTitle
.
subTitleStyle
.
x
*
0.7
,
y
:
(
mainTitle
.
subTitleStyle
.
y
+
mainTitle
.
titleStyle
.
fontSize
*
1.1
*
(
textList
.
length
-
1
))
*
0.7
,
fontSize
:
mainTitle
.
subTitleStyle
.
fontSize
*
0.7
,
color
:
mainTitle
.
subTitleStyle
.
color
,
text
:
item
})
})
}
this
.
textList
=
textList
this
.
detail
=
val
this
.
detail
=
val
},
const
{
title
,
subTitle
,
titleStyle
,
subTitleStyle
,
backgroundImg
}
=
val
deep
:
true
,
try
{
immediate
:
true
},
'editForm.titleStyle'
:
{
handler
(
val
)
{
console
.
log
(
888
)
const
{
title
,
subTitle
,
titleStyle
,
subTitleStyle
,
marketingType
}
=
this
.
editForm
if
(
marketingType
==
5
)
{
const
style1
=
JSON
.
parse
(
titleStyle
)
const
style1
=
JSON
.
parse
(
titleStyle
)
const
style2
=
JSON
.
parse
(
subTitleStyle
)
const
style2
=
JSON
.
parse
(
subTitleStyle
)
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
title
,
...
style1
,
color
:
style1
.
style
.
color
,
font
:
style1
.
font
,
height
:
style1
.
size
})
if
(
this
.
isRenewal
)
{
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
subTitle
,
...
style2
,
color
:
style2
.
style
.
color
,
font
:
style2
.
font
,
height
:
style2
.
size
})
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
title
,
...
style1
,
color
:
style1
.
style
.
color
,
font
:
style1
.
font
,
height
:
style1
.
size
})
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
subTitle
,
...
style2
,
color
:
style2
.
style
.
color
,
font
:
style2
.
font
,
height
:
style2
.
size
})
this
.
backgroundHeight
=
await
this
.
getImgH
(
backgroundImg
)
return
}
const
textList
=
[]
textList
.
push
({
...
style1
,
text
:
title
})
textList
.
push
({
...
style2
,
text
:
subTitle
})
this
.
textList
=
textList
console
.
log
(
this
.
textList
)
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
},
},
deep
:
true
,
deep
:
true
,
...
@@ -225,6 +230,17 @@ export default {
...
@@ -225,6 +230,17 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
//获取图片宽度高度
getImgH
(
src
)
{
return
new
Promise
(
resolve
=>
{
const
img
=
new
Image
()
img
.
src
=
src
img
.
onload
=
()
=>
{
console
.
log
(
WIDTH
,
img
.
height
,
img
.
width
)
resolve
(
Math
.
floor
((
WIDTH
*
img
.
height
)
/
img
.
width
))
}
})
},
onDrag
(
x
,
y
)
{
onDrag
(
x
,
y
)
{
this
.
draggableList
[
this
.
currentIndex
].
x
=
x
this
.
draggableList
[
this
.
currentIndex
].
x
=
x
this
.
draggableList
[
this
.
currentIndex
].
y
=
y
this
.
draggableList
[
this
.
currentIndex
].
y
=
y
...
@@ -271,7 +287,6 @@ export default {
...
@@ -271,7 +287,6 @@ export default {
left
:
13px
;
left
:
13px
;
.review-main
{
.review-main
{
position
:
relative
;
position
:
relative
;
height
:
300px
;
.main-title
{
.main-title
{
width
:
100%
;
width
:
100%
;
position
:
absolute
;
position
:
absolute
;
...
@@ -282,6 +297,117 @@ export default {
...
@@ -282,6 +297,117 @@ export default {
}
}
}
}
}
}
.review-package
{
background
:
#ddd8c0
;
padding
:
16px
;
.review-equity,
.review-service,
.review-goods
{
background
:
#ffffff
;
border-radius
:
12px
;
padding
:
10px
;
margin-bottom
:
10px
;
}
.service-item
{
height
:
48px
;
background-image
:
linear-gradient
(
117deg
,
#ffead3
3%
,
#f0ca90
92%
);
border-radius
:
4px
;
display
:
flex
;
align-items
:
center
;
padding
:
4px
;
margin-top
:
5px
;
&:first-child
{
margin-top
:
0px
;
}
.service-title
{
width
:
74%
;
height
:
40px
;
background
:
#ffffff
;
border-radius
:
6px
;
font-size
:
14px
;
color
:
#333333
;
line-height
:
40px
;
padding-left
:
12px
;
}
.service-time
{
color
:
#8e5310
;
text-align
:
center
;
flex
:
1
;
font-size
:
12px
;
line-height
:
48px
;
}
}
.coupon-item
{
height
:
48px
;
background
:
#fff5f3
;
border-radius
:
4px
;
display
:
flex
;
align-items
:
center
;
padding
:
4px
;
margin-top
:
5px
;
&:first-child
{
margin-top
:
0px
;
}
.service-title
{
width
:
64%
;
height
:
40px
;
background
:
#ffffff
;
border-radius
:
6px
;
font-size
:
14px
;
color
:
#333333
;
line-height
:
40px
;
padding
:
0px
12px
;
display
:
flex
;
justify-content
:
space-between
;
span
{
font-size
:
14px
;
color
:
#333333
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
&:last-child
{
font-size
:
11px
;
color
:
#9b9b9b
;
}
}
}
.service-time
{
color
:
#fc5b32
;
text-align
:
center
;
flex
:
1
;
font-size
:
12px
;
line-height
:
48px
;
}
}
.goods-item
{
display
:
flex
;
border-bottom
:
1px
solid
#f8f7f2
;
padding
:
5px
;
&:last-child
{
border-bottom
:
none
;
}
.service-logo
{
width
:
32px
;
height
:
32px
;
margin-right
:
10px
;
img
{
width
:
32px
;
height
:
32px
;
}
}
.service-desc
{
width
:
55%
;
.title
{
font-size
:
12px
;
color
:
#111111
;
}
.content
{
font-size
:
11px
;
color
:
#9b9b9b
;
}
}
}
}
.main-body
{
.main-body
{
margin-top
:
63px
;
margin-top
:
63px
;
}
}
...
...
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