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
2dcb6133
Commit
2dcb6133
authored
Apr 29, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 动态设置门店文字颜色
parent
0cee28fd
Show 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 @
2dcb6133
...
...
@@ -55,13 +55,14 @@ export default {
mounted
()
{
this
.
bacImage
=
`url(
${
this
.
pageSettingData
.
backgroundImage
}
)`
;
this
.
imgRgb
=
`
${
this
.
pageSettingData
.
backgroundColor
}
`
;
this
.
mpApp
.
setStoreAddrColor
(
this
.
imgRgb
);
},
computed
:
{
},
methods
:
{
setHomeBgImg
({
backgroundImage
,
imgRgb
})
{
// this.bacImage = backgroundImage
;
this
.
mpApp
.
setStoreAddrColor
(
imgRgb
)
;
if
(
this
.
pageCode
!=
1
)
return
;
this
.
bacImage
=
""
;
this
.
imgRgb
=
imgRgb
;
...
...
src/components/common/StoreAddr.vue
View file @
2dcb6133
...
...
@@ -4,7 +4,9 @@
<div
class=
"logo"
>
<image
:src=
"logoUrl"
alt=
""
></image>
</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=
"addr"
v-if=
"distanceForXinHua"
>
{{
distanceForXinHua
|
formatDistance
}}
</p>
<p
class=
"change"
><i
class=
"ant-fanhui-line"
></i></p>
...
...
@@ -36,9 +38,11 @@ export default {
logoUrl
:
""
,
openThousandsStoresFlag
:
false
,
distanceForXinHua
:
0
,
imgRgb
:
""
,
};
},
async
onLoad
()
{
this
.
mpApp
.
setStoreAddrColor
=
this
.
setStoreAddrColor
;
try
{
this
.
getLocationHandle
(()
=>
{
this
.
$emit
(
"toUpdate"
);
...
...
@@ -63,6 +67,9 @@ export default {
computed
:
{
},
methods
:
{
setStoreAddrColor
(
imgRgb
)
{
this
.
imgRgb
=
imgRgb
;
},
reloadName
()
{
let
{
offlineShopName
}
=
getStoreInfo
();
this
.
name
=
decodeURI
(
offlineShopName
)
||
""
;
...
...
@@ -135,23 +142,25 @@ export default {
align-items
:
center
;
.contentInfo
{
height
:
0
;
background-color
:
currentColor
;
align-items
:
center
;
p{
filter
:
grayscale
(
1
)
contrast
(
999
)
invert
(
1
);
}
.info
{
font-size
:
14px
;
color
:
#333
;
flex
:
1
;
}
.addr
{
font-size
:
12px
;
margin-left
:
4px
;
color
:
#333
;
}
.change
{
flex-shrink
:
0
;
padding-left
:
6px
;
color
:
#333
;
font-size
:
14px
;
align-items
:
center
;
i{
...
...
src/main.js
View file @
2dcb6133
...
...
@@ -106,7 +106,9 @@ mpApp.openSelectGoods = function () { }
// 打开选择商品规格(2B)弹窗
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