Commit b00cf4c5 by 程默

新增主题色

parent e53352a8
...@@ -211,13 +211,6 @@ ...@@ -211,13 +211,6 @@
content: "\e6cf"; content: "\e6cf";
} }
page {
--main-color: #ffffff;
--minor-color: #ffffff;
--theme-color:#EF114C;
}
@font-face { @font-face {
font-family: "ant"; font-family: "ant";
src: url('//cdn.mayi888.com/static/font/ant-171b61a6fb.eot'); src: url('//cdn.mayi888.com/static/font/ant-171b61a6fb.eot');
......
<script> <script>
import shop from "@/api/shop"; import shop from "@/api/shop";
import {themeColor} from "@/utils/mayi"
export default { export default {
created() { created() {
// NODE_ENV // NODE_ENV
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
process.env.NODE_ENV == "development" || process.env.NODE_ENV == "development" ||
JSON.stringify(extConfig) == "{}" JSON.stringify(extConfig) == "{}"
) { ) {
extConfig = { mixid: "antgood" }; extConfig = { mixid: "antgood", shopid:67};
} }
console.log("1444444444", extConfig.mixid); console.log("1444444444", extConfig.mixid);
this.$store.commit("setExtConfig", extConfig.mixid); this.$store.commit("setExtConfig", extConfig.mixid);
...@@ -40,12 +40,12 @@ export default { ...@@ -40,12 +40,12 @@ export default {
// 初始 // 初始
this.getShopInfo(extConfig); this.getShopInfo(extConfig);
// 页面配置信息 // 页面配置信息
this.getThemePage(); this.getThemePage(extConfig);
}, },
methods: { methods: {
//商城配置 //商城配置
getShopInfo(extConfig) { getShopInfo({mixid}) {
shop.getShopInfo({ shopMixId: "antgood" }).then((res) => { shop.getShopInfo({ shopMixId: mixid }).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
let mpApp = getApp(); let mpApp = getApp();
// 商城基本数据 // 商城基本数据
...@@ -69,14 +69,20 @@ export default { ...@@ -69,14 +69,20 @@ export default {
mpApp.footerCallBack(footerVal); 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 shop
.themePagesInfo({ .themePagesInfo({
shopid: 67, shopid,
shopMixId: "antgood", shopMixId: mixid,
}) })
.then((response) => { .then((response) => {
if (response.data.code == 200) { if (response.data.code == 200) {
...@@ -128,4 +134,5 @@ export default { ...@@ -128,4 +134,5 @@ export default {
/* @import url("../static/nicon/iconfont.css"); */ /* @import url("../static/nicon/iconfont.css"); */
@import url("../static/font/iconfont.css"); @import url("../static/font/iconfont.css");
@import url("../static/css/common.scss"); @import url("../static/css/common.scss");
</style> </style>
// 主题色
export let themeColor={
"--main-color": "#ffffff",
"--minor-color": "#ffffff"
}
// 获取link 中页面地址(link兼容 有object或者string) // 获取link 中页面地址(link兼容 有object或者string)
export function getUrlofLink(data) { export function getUrlofLink(data) {
return data.link return data.link
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment