Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
ab34825c
Commit
ab34825c
authored
Apr 29, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 动态设置门店文字颜色
parent
bc7cb4c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
src/components/ThemeDataPlant.vue
+2
-1
src/components/common/StoreAddr.vue
+13
-4
src/main.js
+3
-1
No files found.
src/components/ThemeDataPlant.vue
View file @
ab34825c
...
@@ -55,13 +55,14 @@ export default {
...
@@ -55,13 +55,14 @@ export default {
mounted
()
{
mounted
()
{
this
.
bacImage
=
`url(
${
this
.
pageSettingData
.
backgroundImage
}
)`
;
this
.
bacImage
=
`url(
${
this
.
pageSettingData
.
backgroundImage
}
)`
;
this
.
imgRgb
=
`
${
this
.
pageSettingData
.
backgroundColor
}
`
;
this
.
imgRgb
=
`
${
this
.
pageSettingData
.
backgroundColor
}
`
;
this
.
mpApp
.
setStoreAddrColor
(
this
.
imgRgb
);
},
},
computed
:
{
computed
:
{
},
},
methods
:
{
methods
:
{
setHomeBgImg
({
backgroundImage
,
imgRgb
})
{
setHomeBgImg
({
backgroundImage
,
imgRgb
})
{
// this.bacImage = backgroundImage
;
this
.
mpApp
.
setStoreAddrColor
(
imgRgb
)
;
if
(
this
.
pageCode
!=
1
)
return
;
if
(
this
.
pageCode
!=
1
)
return
;
this
.
bacImage
=
""
;
this
.
bacImage
=
""
;
this
.
imgRgb
=
imgRgb
;
this
.
imgRgb
=
imgRgb
;
...
...
src/components/common/StoreAddr.vue
View file @
ab34825c
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
<div
class=
"logo"
>
<div
class=
"logo"
>
<image
:src=
"logoUrl"
alt=
""
></image>
<image
:src=
"logoUrl"
alt=
""
></image>
</div>
</div>
<div
class=
"contentInfo flex"
v-if=
"name != ''"
>
<div
class=
"contentInfo flex"
v-if=
"name != ''"
:style=
"
{
'color': imgRgb,
}">
<p
class=
"info"
>
{{
name
}}
</p>
<p
class=
"info"
>
{{
name
}}
</p>
<p
class=
"addr"
v-if=
"distanceForXinHua"
>
{{
distanceForXinHua
|
formatDistance
}}
</p>
<p
class=
"addr"
v-if=
"distanceForXinHua"
>
{{
distanceForXinHua
|
formatDistance
}}
</p>
<p
class=
"change"
><i
class=
"ant-fanhui-line"
></i></p>
<p
class=
"change"
><i
class=
"ant-fanhui-line"
></i></p>
...
@@ -36,9 +38,11 @@ export default {
...
@@ -36,9 +38,11 @@ export default {
logoUrl
:
""
,
logoUrl
:
""
,
openThousandsStoresFlag
:
false
,
openThousandsStoresFlag
:
false
,
distanceForXinHua
:
0
,
distanceForXinHua
:
0
,
imgRgb
:
""
,
};
};
},
},
async
onLoad
()
{
async
onLoad
()
{
this
.
mpApp
.
setStoreAddrColor
=
this
.
setStoreAddrColor
;
try
{
try
{
this
.
getLocationHandle
(()
=>
{
this
.
getLocationHandle
(()
=>
{
this
.
$emit
(
"toUpdate"
);
this
.
$emit
(
"toUpdate"
);
...
@@ -63,6 +67,9 @@ export default {
...
@@ -63,6 +67,9 @@ export default {
computed
:
{
computed
:
{
},
},
methods
:
{
methods
:
{
setStoreAddrColor
(
imgRgb
)
{
this
.
imgRgb
=
imgRgb
;
},
reloadName
()
{
reloadName
()
{
let
{
offlineShopName
}
=
getStoreInfo
();
let
{
offlineShopName
}
=
getStoreInfo
();
this
.
name
=
decodeURI
(
offlineShopName
)
||
""
;
this
.
name
=
decodeURI
(
offlineShopName
)
||
""
;
...
@@ -135,23 +142,25 @@ export default {
...
@@ -135,23 +142,25 @@ export default {
align-items
:
center
;
align-items
:
center
;
.contentInfo
{
.contentInfo
{
height
:
0
;
background-color
:
currentColor
;
align-items
:
center
;
align-items
:
center
;
p{
filter
:
grayscale
(
1
)
contrast
(
999
)
invert
(
1
);
}
.info
{
.info
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#333
;
flex
:
1
;
flex
:
1
;
}
}
.addr
{
.addr
{
font-size
:
12px
;
font-size
:
12px
;
margin-left
:
4px
;
margin-left
:
4px
;
color
:
#333
;
}
}
.change
{
.change
{
flex-shrink
:
0
;
flex-shrink
:
0
;
padding-left
:
6px
;
padding-left
:
6px
;
color
:
#333
;
font-size
:
14px
;
font-size
:
14px
;
align-items
:
center
;
align-items
:
center
;
i{
i{
...
...
src/main.js
View file @
ab34825c
...
@@ -106,7 +106,9 @@ mpApp.openSelectGoods = function () { }
...
@@ -106,7 +106,9 @@ mpApp.openSelectGoods = function () { }
// 打开选择商品规格(2B)弹窗
// 打开选择商品规格(2B)弹窗
mpApp
.
openTwoBAddCart
=
function
()
{
}
mpApp
.
openTwoBAddCart
=
function
()
{
}
// 动态设置首页背景图片
// 动态设置首页背景图片
mpApp
.
setHomeBgImg
=
function
()
{}
mpApp
.
setHomeBgImg
=
function
()
{
}
// 动态设置导航栏颜色
mpApp
.
setStoreAddrColor
=
function
()
{}
/**
/**
* 组件点击行为收集
* 组件点击行为收集
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment