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
b00cf4c5
Commit
b00cf4c5
authored
Feb 02, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增主题色
parent
e53352a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
15 deletions
+22
-15
custom-tab-bar/index.wxss
+0
-7
src/App.vue
+15
-8
src/utils/mayi.js
+7
-0
No files found.
custom-tab-bar/index.wxss
View file @
b00cf4c5
...
...
@@ -211,13 +211,6 @@
content: "\e6cf";
}
page {
--main-color: #ffffff;
--minor-color: #ffffff;
--theme-color:#EF114C;
}
@font-face {
font-family: "ant";
src: url('//cdn.mayi888.com/static/font/ant-171b61a6fb.eot');
...
...
src/App.vue
View file @
b00cf4c5
<
script
>
import
shop
from
"@/api/shop"
;
import
{
themeColor
}
from
"@/utils/mayi"
export
default
{
created
()
{
// NODE_ENV
...
...
@@ -10,7 +10,7 @@ export default {
process
.
env
.
NODE_ENV
==
"development"
||
JSON
.
stringify
(
extConfig
)
==
"{}"
)
{
extConfig
=
{
mixid
:
"antgood"
};
extConfig
=
{
mixid
:
"antgood"
,
shopid
:
67
};
}
console
.
log
(
"1444444444"
,
extConfig
.
mixid
);
this
.
$store
.
commit
(
"setExtConfig"
,
extConfig
.
mixid
);
...
...
@@ -40,12 +40,12 @@ export default {
// 初始
this
.
getShopInfo
(
extConfig
);
// 页面配置信息
this
.
getThemePage
();
this
.
getThemePage
(
extConfig
);
},
methods
:
{
//商城配置
getShopInfo
(
extConfig
)
{
shop
.
getShopInfo
({
shopMixId
:
"antgood"
}).
then
((
res
)
=>
{
getShopInfo
(
{
mixid
}
)
{
shop
.
getShopInfo
({
shopMixId
:
mixid
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
mpApp
=
getApp
();
// 商城基本数据
...
...
@@ -69,14 +69,20 @@ export default {
mpApp
.
footerCallBack
(
footerVal
);
}
}
// 设置主题色
themeColor
[
'--main-color'
]
=
val
.
themeColor
.
mainColor
themeColor
[
'--minor-color'
]
=
val
.
themeColor
.
minorColor
//
console
.
log
(
this
.
mpApp
,
'mmmmm74'
,
themeColor
)
}
});
},
getThemePage
()
{
getThemePage
(
{
mixid
,
shopid
}
)
{
shop
.
themePagesInfo
({
shopid
:
67
,
shopMixId
:
"antgood"
,
shopid
,
shopMixId
:
mixid
,
})
.
then
((
response
)
=>
{
if
(
response
.
data
.
code
==
200
)
{
...
...
@@ -128,4 +134,5 @@ export default {
/* @import url("../static/nicon/iconfont.css"); */
@import
url("../static/font/iconfont.css")
;
@import
url("../static/css/common.scss")
;
</
style
>
src/utils/mayi.js
View file @
b00cf4c5
// 主题色
export
let
themeColor
=
{
"--main-color"
:
"#ffffff"
,
"--minor-color"
:
"#ffffff"
}
// 获取link 中页面地址(link兼容 有object或者string)
export
function
getUrlofLink
(
data
)
{
return
data
.
link
...
...
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