Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-home
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 88ddcf42
authored
May 25, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
b56215ee
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
50 deletions
src/components/glsx-combi-form/index.vue
src/utils/color.js
src/views/home/components/Marketing/GPTAnalysis.vue
src/views/home/components/Marketing/MarketingRight.vue
src/views/home/components/Marketing/PhoneView.vue
src/components/glsx-combi-form/index.vue
View file @
88ddcf4
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<slot
:name=
"item.suffixSlot"
:scope=
"item"
></slot>
<slot
:name=
"item.suffixSlot"
:scope=
"item"
></slot>
</div>
</div>
<div
v-else-if=
"item.type === 'InputNumber'"
>
<div
v-else-if=
"item.type === 'InputNumber'"
>
<el-input-number
v-model=
"formObj[item.name]"
@
change=
"e => handleInputChange(e, item)"
:min=
"formObj[item.min] || 0"
:max=
"formObj[item.max]"
label=
"描述文字"
></el-input-number>
<el-input-number
v-model=
"formObj[item.name]"
:min=
"formObj[item.min] || 0"
:max=
"formObj[item.max]"
label=
"描述文字"
></el-input-number>
</div>
</div>
<!-- 选择框 -->
<!-- 选择框 -->
<div
v-else-if=
"item.type === 'select'"
>
<div
v-else-if=
"item.type === 'select'"
>
...
@@ -99,6 +99,14 @@
...
@@ -99,6 +99,14 @@
</template>
</template>
<slot
name=
"footer"
></slot>
<slot
name=
"footer"
></slot>
</el-form>
</el-form>
<GLDialog
v-if=
"isImgVisible"
:appendToBody=
"true"
bigTitle=
"查看"
mode=
"big"
:visible
.
sync=
"isImgVisible"
:close-on-click-modal=
"false"
@
onOk=
"isImgVisible = false"
@
onCancel=
"isImgVisible = false"
>
<div
class=
"dialog-look"
>
<video
v-if=
"dialogObj.uploadType == 'video'"
class=
"dialog-video"
controls
>
<source
:src=
"dialogObj.url"
type=
"video/mp4"
/>
</video>
<img
v-else
class=
"dialog-img"
width=
"100%"
:src=
"dialogObj.url"
alt=
""
/>
</div>
</GLDialog>
<GLDialog
:appendToBody=
"true"
bigTitle=
"选择地址"
mode=
"big"
:visible
.
sync=
"dialogMapVisible"
@
onOk=
"getAddress"
@
onCancel=
"dialogMapVisible = false"
>
<GLDialog
:appendToBody=
"true"
bigTitle=
"选择地址"
mode=
"big"
:visible
.
sync=
"dialogMapVisible"
@
onOk=
"getAddress"
@
onCancel=
"dialogMapVisible = false"
>
<map-view
v-if=
"dialogMapVisible"
ref=
"mapForm"
></map-view>
<map-view
v-if=
"dialogMapVisible"
ref=
"mapForm"
></map-view>
<!-- <span slot="footer" class="dialog-footer">
<!-- <span slot="footer" class="dialog-footer">
...
@@ -522,4 +530,9 @@ export default {
...
@@ -522,4 +530,9 @@ export default {
color
:
#5850ff
;
color
:
#5850ff
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.el-input-number__decrease
:hover
,
.el-input-number__decrease
:hover:not
(
.is-disabled
)
~
.el-input
.el-input__inner
:not
(
.is-disabled
),
.el-input-number__increase
:hover:not
(
.is-disabled
)
~
.el-input
.el-input__inner
:not
(
.is-disabled
)
{
border-color
:
#5850ff
;
}
</
style
>
</
style
>
src/utils/color.js
View file @
88ddcf4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-22 20:12:55
* @Date: 2023-05-22 20:12:55
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-2
2 20:27:53
* @LastEditTime: 2023-05-2
5 11:36:45
* @FilePath: \scrm-micro-home\src\utils\color.js
* @FilePath: \scrm-micro-home\src\utils\color.js
* @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
*/
*/
...
@@ -12,7 +12,7 @@ var canvas = document.createElement('canvas')
...
@@ -12,7 +12,7 @@ var canvas = document.createElement('canvas')
var
context
=
canvas
.
getContext
(
'2d'
)
var
context
=
canvas
.
getContext
(
'2d'
)
var
myColor
=
[]
var
myColor
=
[]
function
getColor
()
{
function
getColor
()
{
var
imageData
=
context
.
getImageData
(
img_width
-
1
,
img_height
-
1
,
img_width
,
img_height
)
var
imageData
=
context
.
getImageData
(
img_width
-
1
0
,
img_height
-
10
,
img_width
,
img_height
)
myColor
=
[
imageData
.
data
[
0
],
imageData
.
data
[
1
],
imageData
.
data
[
2
]]
myColor
=
[
imageData
.
data
[
0
],
imageData
.
data
[
1
],
imageData
.
data
[
2
]]
var
hexColor
=
gethex
(...
myColor
)
var
hexColor
=
gethex
(...
myColor
)
return
`#
${
hexColor
}
`
return
`#
${
hexColor
}
`
...
...
src/views/home/components/Marketing/GPTAnalysis.vue
View file @
88ddcf4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 10:23:52
* @Date: 2023-05-16 10:23:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-2
4 15:30:15
* @LastEditTime: 2023-05-2
5 16:24:02
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\GPTAnalysis.vue
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\GPTAnalysis.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
-->
-->
...
@@ -115,6 +115,7 @@
...
@@ -115,6 +115,7 @@
<img
class=
"server-type"
:src=
"require(`@/assets/img/coupon/equity.png`)"
/>
<img
class=
"server-type"
:src=
"require(`@/assets/img/coupon/equity.png`)"
/>
<div
class=
"gift-content"
>
<div
class=
"gift-content"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in selectedEquityList"
:key=
"subIndex"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in selectedEquityList"
:key=
"subIndex"
>
<span
class=
"circle"
></span>
<p
:class=
"['gift-coupon-name']"
>
{{ subItem.packageName }}
</p>
<p
:class=
"['gift-coupon-name']"
>
{{ subItem.packageName }}
</p>
<i
class=
"el-icon-delete"
style=
"color: #c6c6c6"
@
click=
"handleEquityDelete(subIndex)"
></i>
<i
class=
"el-icon-delete"
style=
"color: #c6c6c6"
@
click=
"handleEquityDelete(subIndex)"
></i>
</div>
</div>
...
@@ -203,8 +204,8 @@ export default {
...
@@ -203,8 +204,8 @@ export default {
name
:
'analysis'
,
name
:
'analysis'
,
data
()
{
data
()
{
return
{
return
{
mainColor
:
''
,
editChildRef
:
'editChildRef'
,
editChildRef
:
'editChildRef'
,
logoInfo
:
''
,
importNum
:
0
,
importNum
:
0
,
couponTemplateList
:
[],
couponTemplateList
:
[],
orderShow
,
orderShow
,
...
@@ -289,7 +290,7 @@ export default {
...
@@ -289,7 +290,7 @@ export default {
suffixSlot
:
'detailImage'
,
suffixSlot
:
'detailImage'
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
getUploadImgColor
(
file
,
color
=>
{
getUploadImgColor
(
file
,
color
=>
{
this
.
mainColor
=
color
this
.
editForm
.
mainColor
=
color
})
})
const
imgFile
=
e
.
target
.
result
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
...
@@ -374,7 +375,6 @@ export default {
...
@@ -374,7 +375,6 @@ export default {
name
:
'merchantLog'
,
name
:
'merchantLog'
,
type
:
'upload'
,
type
:
'upload'
,
width
:
'320px'
,
width
:
'320px'
,
tips
:
'进入活动页的图片'
,
mark
:
'建议尺寸:最大1M,尺寸216*60'
,
mark
:
'建议尺寸:最大1M,尺寸216*60'
,
style
:
'color: #999999;'
,
style
:
'color: #999999;'
,
limitSize
:
5
,
limitSize
:
5
,
...
@@ -416,20 +416,21 @@ export default {
...
@@ -416,20 +416,21 @@ export default {
...
mapState
(
'marketing'
,
[
'activityInfo'
,
'GPTList'
,
'merchantInfo'
]),
...
mapState
(
'marketing'
,
[
'activityInfo'
,
'GPTList'
,
'merchantInfo'
]),
mergeStr
()
{
mergeStr
()
{
const
{
backgroundImage
,
detailImage
,
merchantLog
}
=
this
.
editForm
const
{
backgroundImage
,
detailImage
,
merchantLog
}
=
this
.
editForm
if
(
!
backgroundImage
||
!
detailImage
||
!
merchantLog
)
return
return
[
backgroundImage
,
detailImage
,
merchantLog
]
return
backgroundImage
+
detailImage
+
merchantLog
}
}
},
},
watch
:
{
watch
:
{
activityInfo
(
val
)
{
activityInfo
(
val
)
{
val
&&
this
.
confirmMsg
(
val
)
val
&&
this
.
confirmMsg
(
val
)
},
},
//监听主图、内容图、logo
mergeStr
(
val
)
{
mergeStr
(
val
)
{
if
(
val
)
{
if
(
val
&&
val
.
every
(
item
=>
item
)
)
{
this
.
getMergeImgs
()
this
.
getMergeImgs
()
}
else
{
}
else
{
this
.
bigImage
=
null
this
.
editForm
.
bigImage
=
null
}
}
console
.
log
(
this
.
editForm
.
bigImage
)
}
}
},
},
components
:
{
components
:
{
...
@@ -505,14 +506,22 @@ export default {
...
@@ -505,14 +506,22 @@ export default {
uploadImg
(
imgFile
)
{
uploadImg
(
imgFile
)
{
const
base64
=
'png'
+
'@'
+
imgFile
.
split
(
','
)[
1
]
const
base64
=
'png'
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
$apis
.
common
.
pictureUpload
({
file
:
base64
,
fileType
:
'image'
}).
then
(
res
=>
{
this
.
$apis
.
common
.
pictureUpload
({
file
:
base64
,
fileType
:
'image'
}).
then
(
res
=>
{
this
.
bigImage
=
res
this
.
editForm
.
bigImage
=
res
})
})
},
},
//主图、内容图、logo合并图片
async
getMergeImgs
()
{
async
getMergeImgs
()
{
const
{
backgroundImage
,
detailImage
,
merchantLog
}
=
this
.
editForm
const
{
backgroundImage
,
detailImage
,
merchantLog
}
=
this
.
editForm
try
{
try
{
const
res
=
await
Promise
.
all
([
this
.
getImgWH
(
backgroundImage
),
this
.
getImgWH
(
detailImage
),
this
.
getImgWH
(
merchantLog
)])
const
res
=
await
Promise
.
all
([
this
.
getImgWH
(
backgroundImage
),
this
.
getImgWH
(
detailImage
),
this
.
getImgWH
(
merchantLog
)])
const
h
=
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
375
+
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
375
const
h
=
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
375
+
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
375
this
.
logoInfo
=
{
imgSrc
:
merchantLog
,
x
:
375
-
res
[
2
].
dw
/
2
-
20
,
y
:
20
,
width
:
res
[
2
].
dw
/
2
,
height
:
res
[
2
].
dh
/
2
}
const
draw
=
new
Drawing
(
const
draw
=
new
Drawing
(
{
{
width
:
375
,
width
:
375
,
...
@@ -533,13 +542,7 @@ export default {
...
@@ -533,13 +542,7 @@ export default {
width
:
375
,
width
:
375
,
height
:
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
375
height
:
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
375
},
},
{
{
...
this
.
logoInfo
}
imgSrc
:
merchantLog
,
x
:
375
-
res
[
2
].
dw
-
20
,
y
:
20
,
width
:
res
[
2
].
dw
/
2
,
height
:
res
[
2
].
dh
/
2
}
],
],
base64
=>
{
base64
=>
{
this
.
uploadImg
(
base64
)
this
.
uploadImg
(
base64
)
...
@@ -669,7 +672,7 @@ export default {
...
@@ -669,7 +672,7 @@ export default {
},
},
getViewParams
()
{
getViewParams
()
{
const
prams
=
this
.
getCouponInfoParams
()
const
prams
=
this
.
getCouponInfoParams
()
return
{
...
prams
,
selectedEquityList
:
this
.
selectedEquityList
,
couponList
:
this
.
editForm
.
superMarketingCouponRelRequestList
,
selectedGoodsList
:
this
.
selectedGoodsList
}
return
{
...
prams
,
selectedEquityList
:
this
.
selectedEquityList
,
couponList
:
this
.
editForm
.
superMarketingCouponRelRequestList
,
selectedGoodsList
:
this
.
selectedGoodsList
,
logoInfo
:
this
.
logoInfo
,
bigImage
:
this
.
editForm
.
bigImage
}
},
},
getCouponInfoParams
()
{
getCouponInfoParams
()
{
var
param
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
var
param
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
...
@@ -697,7 +700,6 @@ export default {
...
@@ -697,7 +700,6 @@ export default {
const
equityServices
=
this
.
selectedEquityList
.
map
(
i
=>
i
.
packageCode
)
const
equityServices
=
this
.
selectedEquityList
.
map
(
i
=>
i
.
packageCode
)
param
.
equityServices
=
equityServices
.
join
(
','
)
param
.
equityServices
=
equityServices
.
join
(
','
)
param
.
importCustomersUrl
=
this
.
exportUrl
param
.
importCustomersUrl
=
this
.
exportUrl
param
.
bigImage
=
this
.
bigImage
param
.
superMarketingCouponRelRequestList
=
couponLists
.
concat
(
selectedGoodsList
)
||
[]
param
.
superMarketingCouponRelRequestList
=
couponLists
.
concat
(
selectedGoodsList
)
||
[]
delete
param
.
createdTime
delete
param
.
createdTime
delete
param
.
activityCouponBaseInfoDTOS
delete
param
.
activityCouponBaseInfoDTOS
...
@@ -740,13 +742,13 @@ export default {
...
@@ -740,13 +742,13 @@ export default {
this
.
selectedGoodsList
=
couponItemList
this
.
selectedGoodsList
=
couponItemList
this
.
selectedGoodsList
.
forEach
(
item
=>
{
this
.
selectedGoodsList
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
item
.
id
=
item
.
couponId
item
.
denomination
=
item
.
couponAnticipatedCost
})
})
})
})
},
},
// isGetList =true 创建成功初始化
init
(
isGetList
=
true
)
{
init
(
isGetList
=
true
)
{
isGetList
&&
this
.
setSchemeListData
({
merchantId
:
this
.
editForm
.
merchantId
,
pageSize
:
5
,
currentPage
:
1
})
isGetList
&&
this
.
setSchemeListData
({
merchantId
:
this
.
editForm
.
merchantId
,
pageSize
:
5
,
currentPage
:
1
})
this
.
editForm
=
{
ma
rketingTitl
e
:
''
,
marketingSubtitle
:
''
,
activityTime
:
[],
superMarketingCouponRelRequestList
:
[],
backgroundImage
:
''
,
detailImage
:
''
,
merchantLog
:
''
,
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
,
merchantId
:
this
.
merchantInfo
.
merchantNo
}
this
.
editForm
=
{
ma
inColor
:
''
,
marketingTitle
:
''
,
bigImag
e
:
''
,
marketingSubtitle
:
''
,
activityTime
:
[],
superMarketingCouponRelRequestList
:
[],
backgroundImage
:
''
,
detailImage
:
''
,
merchantLog
:
''
,
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
,
merchantId
:
this
.
merchantInfo
.
merchantNo
}
this
.
selectedGoodsList
=
[]
this
.
selectedGoodsList
=
[]
this
.
selectedEquityList
=
[]
this
.
selectedEquityList
=
[]
this
.
exportUrl
=
''
this
.
exportUrl
=
''
...
@@ -830,11 +832,9 @@ export default {
...
@@ -830,11 +832,9 @@ export default {
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
setActivityInfo
()
this
.
setActivityInfo
()
})
})
}
},
},
mounted
()
{
// 未开通不显示
this
.
couponTemplate
()
equityMerchant
()
{
this
.
init
(
false
)
var
params
=
{
var
params
=
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
merchantId
:
this
.
$globalState
.
session
.
merchantId
}
}
...
@@ -844,6 +844,12 @@ export default {
...
@@ -844,6 +844,12 @@ export default {
}
}
})
})
}
}
},
mounted
()
{
this
.
couponTemplate
()
this
.
init
(
false
)
this
.
equityMerchant
()
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
@@ -941,6 +947,7 @@ export default {
...
@@ -941,6 +947,7 @@ export default {
width
:
calc
(
100%
-
70px
);
width
:
calc
(
100%
-
70px
);
border-bottom
:
1px
solid
#e5e5e5
;
border-bottom
:
1px
solid
#e5e5e5
;
line-height
:
22px
;
line-height
:
22px
;
padding-left
:
10px
;
.gift-item
{
.gift-item
{
display
:
inline-block
;
display
:
inline-block
;
width
:
50%
;
width
:
50%
;
...
...
src/views/home/components/Marketing/MarketingRight.vue
View file @
88ddcf4
...
@@ -2,45 +2,69 @@
...
@@ -2,45 +2,69 @@
* @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-05-2
4 15:46:24
* @LastEditTime: 2023-05-2
5 16:24:16
* @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
-->
-->
<
template
>
<
template
>
<div
class=
"review-box"
>
<div
class=
"review-box"
>
<div
class=
"review-title"
>
预览营销方案
</div>
<div
class=
"review-title"
>
预览营销方案
</div>
<phone-view
:activityInfo=
"activity
Info
"
></phone-view>
<phone-view
:activityInfo=
"activity
Detail
"
></phone-view>
<div
class=
"review-refresh"
@
click=
"renewImg"
>
更新预览图
</div>
<div
class=
"review-refresh"
@
click=
"renewImg"
>
更新预览图
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
PhoneView
from
'./PhoneView'
import
PhoneView
from
'./PhoneView'
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
activityInfo
:
{}
activityDetail
:
{},
getComponent
:
''
}
}
},
},
mounted
()
{
setTimeout
(()
=>
{
let
children
=
this
.
$parent
.
$children
this
.
findComponent
(
children
)
},
300
)
},
components
:
{
components
:
{
PhoneView
PhoneView
},
},
computed
:
{
...
mapState
(
'marketing'
,
[
'activityInfo'
]),
imgArr
()
{
const
{
backgroundImage
,
detailImage
,
merchantLog
,
mainColor
,
logoInfo
,
bigImage
}
=
this
.
getComponent
&&
this
.
getComponent
.
getViewParams
()
return
[
backgroundImage
,
detailImage
,
merchantLog
,
mainColor
,
logoInfo
,
bigImage
]
}
},
watch
:
{
imgArr
(
val
)
{
const
[
backgroundImage
=
''
,
detailImage
=
''
,
merchantLog
=
''
,
mainColor
,
logoInfo
,
bigImage
]
=
val
this
.
activityDetail
=
{
...
this
.
activityDetail
,
...{
backgroundImage
,
detailImage
,
merchantLog
,
mainColor
,
logoInfo
,
bigImage
}
}
console
.
log
(
this
.
activityDetail
)
},
activityInfo
(
val
)
{
this
.
activityDetail
=
{}
console
.
log
(
this
.
activityDetail
)
}
},
methods
:
{
methods
:
{
renewImg
()
{
findComponent
(
children
)
{
const
_this
=
this
let
children
=
this
.
$parent
.
$children
findComponent
(
children
)
function
findComponent
(
children
)
{
for
(
let
i
=
0
;
i
<
children
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
children
.
length
;
i
++
)
{
if
(
children
[
i
].
$options
.
componentsName
==
'analysis'
)
{
if
(
children
[
i
].
$options
.
componentsName
==
'analysis'
)
{
_this
.
activityInfo
=
children
[
i
].
getViewParams
()
this
.
getComponent
=
children
[
i
]
console
.
log
(
_this
.
activityInfo
)
return
return
}
}
if
(
children
[
i
].
$children
)
{
if
(
children
[
i
].
$children
)
{
findComponent
(
children
[
i
].
$children
)
this
.
findComponent
(
children
[
i
].
$children
)
}
}
}
}
}
},
renewImg
()
{
this
.
activityDetail
=
this
.
getComponent
.
getViewParams
()
console
.
log
(
this
.
activityDetail
)
}
}
}
}
}
}
...
...
src/views/home/components/Marketing/PhoneView.vue
View file @
88ddcf4
...
@@ -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-05-2
4 15:48:19
* @LastEditTime: 2023-05-2
5 16:22:34
* @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
-->
-->
...
@@ -13,20 +13,24 @@
...
@@ -13,20 +13,24 @@
<div
class=
"review-title_top"
>
{{
detail
.
marketingTitle
||
detail
.
activityName
}}
</div>
<div
class=
"review-title_top"
>
{{
detail
.
marketingTitle
||
detail
.
activityName
}}
</div>
<div
class=
"review-content"
>
<div
class=
"review-content"
>
<div
class=
"review-main"
>
<div
class=
"review-main"
>
<template
v-if=
"detail.activityBigImg || detail.bigImage"
>
<div
class=
"review-bg-img"
>
<div
class=
"review-bg-img"
>
<img
:src=
"detail.activityBigImg"
v-if=
"detail.activityBigImg
"
/>
<img
:src=
"detail.activityBigImg || detail.bigImage
"
/>
</div>
</div>
</
template
>
<
template
v-else
>
<div
class=
"review-bg-img"
>
<div
class=
"review-bg-img"
>
<img
:src=
"detail.backgroundImage"
v-if=
"detail.backgroundImage"
/>
<img
:src=
"detail.backgroundImage"
v-if=
"detail.backgroundImage"
/>
</div>
</div>
<div
class=
"review-main-img"
>
<div
class=
"review-main-img"
>
<img
:src=
"detail.detailImage"
v-if=
"detail.detailImage"
/>
<img
:src=
"detail.detailImage"
v-if=
"detail.detailImage"
/>
</div>
</div>
<div
class=
"review-logo-img
"
>
<div
class=
"review-logo-img"
:style=
"
{ height: logoInfo.height + 'px', width: logoInfo.width + 'px', top: logoInfo.y + 'px', left: logoInfo.x + 'px' }
">
<img
:src=
"detail.merchantLog"
v-if=
"detail.merchantLog"
/>
<img
:src=
"detail.merchantLog"
v-if=
"detail.merchantLog"
/>
</div>
</div>
</
template
>
</div>
</div>
<div
class=
"review-package"
>
<div
class=
"review-package"
:style=
"{ background: activityInfo.mainColor }"
>
<div
class=
"review-equity"
v-if=
"detail.selectedEquityList && detail.selectedEquityList.length"
>
<div
class=
"review-equity"
v-if=
"detail.selectedEquityList && detail.selectedEquityList.length"
>
<div
class=
"service-item"
v-for=
"(item, index) in detail.selectedEquityList"
:key=
"index"
>
<div
class=
"service-item"
v-for=
"(item, index) in detail.selectedEquityList"
:key=
"index"
>
<div
class=
"service-time"
>
1年
</div>
<div
class=
"service-time"
>
1年
</div>
...
@@ -35,7 +39,6 @@
...
@@ -35,7 +39,6 @@
</div>
</div>
<div
class=
"review-goods"
v-if=
"detail.selectedGoodsList && detail.selectedGoodsList.length"
>
<div
class=
"review-goods"
v-if=
"detail.selectedGoodsList && detail.selectedGoodsList.length"
>
<div
class=
"goods-item"
v-for=
"(item, index) in detail.selectedGoodsList"
:key=
"index"
>
<div
class=
"goods-item"
v-for=
"(item, index) in detail.selectedGoodsList"
:key=
"index"
>
<div
class=
"service-logo"
></div>
<div
class=
"service-desc"
>
<div
class=
"service-desc"
>
<div
class=
"title"
>
{{ item.brandName }}{{ item.goodsName }}
</div>
<div
class=
"title"
>
{{ item.brandName }}{{ item.goodsName }}
</div>
<div
class=
"content"
>
x{{ item.couponAmount }} 抵扣券
</div>
<div
class=
"content"
>
x{{ item.couponAmount }} 抵扣券
</div>
...
@@ -83,7 +86,7 @@
...
@@ -83,7 +86,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"review-footer"
v-if=
"
detail.activityPrice
"
>
<div
class=
"review-footer"
v-if=
"
!isNaN(detail.activityPrice)
"
>
<label>
¥
</label>
<label>
¥
</label>
{{ (detail.activityPrice / 100).toFixed(2) }}
{{ (detail.activityPrice / 100).toFixed(2) }}
</div>
</div>
...
@@ -99,6 +102,7 @@ export default {
...
@@ -99,6 +102,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
detail
:
{},
detail
:
{},
logoInfo
:
{},
discount
:
{
discount
:
{
2
:
'折扣券'
,
2
:
'折扣券'
,
3
:
'代金券'
,
3
:
'代金券'
,
...
@@ -124,6 +128,14 @@ export default {
...
@@ -124,6 +128,14 @@ export default {
activityInfo
:
{
activityInfo
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
detail
=
val
this
.
detail
=
val
if
(
!
this
.
detail
.
logoInfo
)
return
const
{
x
,
y
,
height
,
width
}
=
this
.
detail
.
logoInfo
this
.
logoInfo
=
{
x
:
(
x
*
262
)
/
375
,
y
:
(
y
*
262
)
/
375
,
height
:
(
height
*
262
)
/
375
,
width
:
(
width
*
262
)
/
375
}
},
},
deep
:
true
,
deep
:
true
,
immediate
:
true
immediate
:
true
...
@@ -142,11 +154,12 @@ export default {
...
@@ -142,11 +154,12 @@ export default {
}
}
.review-title_top
{
.review-title_top
{
position
:
absolute
;
position
:
absolute
;
top
:
38
px
;
top
:
44
px
;
left
:
0px
;
left
:
0px
;
width
:
100%
;
width
:
100%
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40px
;
line-height
:
40px
;
font-size
:
14px
;
}
}
.review-footer
{
.review-footer
{
position
:
absolute
;
position
:
absolute
;
...
@@ -176,13 +189,12 @@ export default {
...
@@ -176,13 +189,12 @@ export default {
}
}
}
}
.review-package
{
.review-package
{
background
:
#ddd8c0
;
padding
:
16px
;
padding
:
16px
;
.review-equity,
.review-equity,
.review-service,
.review-service,
.review-goods
{
.review-goods
{
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
12
px
;
border-radius
:
6
px
;
padding
:
10px
;
padding
:
10px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
...
@@ -273,7 +285,7 @@ export default {
...
@@ -273,7 +285,7 @@ export default {
}
}
.service-desc
{
.service-desc
{
width
:
5
5%
;
width
:
6
5%
;
.title
{
.title
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#111111
;
color
:
#111111
;
...
@@ -303,7 +315,7 @@ export default {
...
@@ -303,7 +315,7 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
32px
;
height
:
32px
;
background
:
rgba
(
255
,
255
,
255
,
0.8
);
background
:
rgba
(
255
,
255
,
255
,
0.8
);
border-radius
:
8px
8
px
0
0
;
border-radius
:
6px
6
px
0
0
;
padding
:
0px
10px
;
padding
:
0px
10px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
...
@@ -325,6 +337,7 @@ export default {
...
@@ -325,6 +337,7 @@ export default {
display
:
flex
;
display
:
flex
;
padding
:
10px
;
padding
:
10px
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
0
0
6px
6px
;
.store
{
.store
{
font-weight
:
500
;
font-weight
:
500
;
font-size
:
14px
;
font-size
:
14px
;
...
...
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