Commit 451c0cc8 by 程智春

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 3290e924 4be4b1ce
...@@ -76,6 +76,7 @@ export default { ...@@ -76,6 +76,7 @@ export default {
// 设置主题色 // 设置主题色
themeColor['--main-color']=val.themeColor.mainColor themeColor['--main-color']=val.themeColor.mainColor
themeColor['--minor-color']=val.themeColor.minorColor themeColor['--minor-color']=val.themeColor.minorColor
mpApp.themeColorCallBack(themeColor);
// //
console.log(this.mpApp,'mmmmm74',themeColor) console.log(this.mpApp,'mmmmm74',themeColor)
} }
......
...@@ -41,6 +41,7 @@ mpApp.footerCallBack = function () { } ...@@ -41,6 +41,7 @@ mpApp.footerCallBack = function () { }
// webview变化 // webview变化
mpApp.webviewCallBack = function () { } mpApp.webviewCallBack = function () { }
mpApp.shareInit = function () {}; mpApp.shareInit = function () {};
mpApp.themeColorCallBack = function () {};
console.log('3555555', wx) console.log('3555555', wx)
// 全局跳转 data为link对象 // 全局跳转 data为link对象
......
<template> <template>
<div class="domain"> <div class="domain" :style="{'--main-color':themeColor['--main-color'],'--minor-color':themeColor['--minor-color']}">
<!-- <view class="ant-daipinglun">1</view> --> <!-- <view class="ant-daipinglun">1</view> -->
<!-- <goods-list id="goodsList"></goods-list> --> <!-- <goods-list id="goodsList"></goods-list> -->
<!-- <scroll-view @scroll="scrolls" @scrolltolower="scrolltolower" style="height:100vh;overflow-y:auto;" scroll-y="true"> --> <!-- <scroll-view @scroll="scrolls" @scrolltolower="scrolltolower" style="height:100vh;overflow-y:auto;" scroll-y="true"> -->
...@@ -89,7 +89,7 @@ import shopPopup from '@/components/basicTool/shop-popup/index.vue' ...@@ -89,7 +89,7 @@ import shopPopup from '@/components/basicTool/shop-popup/index.vue'
import text from '@/components/content/text' import text from '@/components/content/text'
import imgText from '@/components/content/imgText' import imgText from '@/components/content/imgText'
import videoPlayer from '@/components/content/videoPlayer' import videoPlayer from '@/components/content/videoPlayer'
import { setTabBarActive, checkTabbarPage } from "../../utils/mayi.js"; import { setTabBarActive, checkTabbarPage,themeColor } from "../../utils/mayi.js";
const app = getApp(); const app = getApp();
export default { export default {
...@@ -97,6 +97,10 @@ export default { ...@@ -97,6 +97,10 @@ export default {
return { return {
pageInfo: {}, pageInfo: {},
pageData: {}, pageData: {},
themeColor:{
'--main-color':"",
'--minor-color':"",
}
}; };
}, },
components:{ components:{
...@@ -166,6 +170,13 @@ export default { ...@@ -166,6 +170,13 @@ export default {
that.init(params); that.init(params);
}; };
} }
if(themeColor['--main-color']!='#ffffff'){
this.themeColor = themeColor
}else {
this.mpApp.themeColorCallBack=(res)=>{
this.themeColor = res
}
}
}, },
onShow() { onShow() {
setTabBarActive.bind(this)(checkTabbarPage('/')); setTabBarActive.bind(this)(checkTabbarPage('/'));
......
...@@ -16,7 +16,7 @@ image{ ...@@ -16,7 +16,7 @@ image{
.goods-item-child { .goods-item-child {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background: #ffffff; background: #fff;
} }
.goodsRowList .goods-item-child{ .goodsRowList .goods-item-child{
display: flex; display: flex;
...@@ -88,7 +88,7 @@ align-items: flex-start; ...@@ -88,7 +88,7 @@ align-items: flex-start;
color: #fff; color: #fff;
} }
.goodsPicture .saleWay .saleWayBg{ .goodsPicture .saleWay .saleWayBg{
background: #eee; background: var(--main-color);
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -256,7 +256,7 @@ align-items: flex-start; ...@@ -256,7 +256,7 @@ align-items: flex-start;
right: 0; right: 0;
bottom: 0; bottom: 0;
border-radius: 30rpx; border-radius: 30rpx;
background-color: #333; background-color: var(--main-color);
width: 140rpx; width: 140rpx;
white-space: nowrap; white-space: nowrap;
padding: 8rpx 20rpx; padding: 8rpx 20rpx;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
height: 100%; height: 100%;
} }
.countDown { .countDown {
padding: 4rpx 10rpx;
justify-content: flex-end; justify-content: flex-end;
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
} }
.goods-item-child .info .allPrice .btn { .goods-item-child .info .allPrice .btn {
font-size: 24rpx; font-size: 24rpx;
background: #333; background: var(--main-color);
padding: 8rpx; padding: 8rpx;
color: #fff; color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
......
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