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
4be4b1ce
Commit
4be4b1ce
authored
Feb 03, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用主题色
parent
370a1389
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
7 deletions
+19
-7
src/App.vue
+1
-0
src/main.js
+1
-0
src/pages/home/index.vue
+13
-2
static/nativeComponents/GoodsList/GoodsItem/index.wxss
+3
-3
static/nativeComponents/TimeLimitedDiscount/activityListItem/index.wxss
+0
-1
static/nativeComponents/TimeLimitedDiscount/index.wxss
+1
-1
No files found.
src/App.vue
View file @
4be4b1ce
...
@@ -73,6 +73,7 @@ export default {
...
@@ -73,6 +73,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
)
}
}
...
...
src/main.js
View file @
4be4b1ce
...
@@ -40,6 +40,7 @@ mpApp.footerCallBack = function () { }
...
@@ -40,6 +40,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对象
...
...
src/pages/home/index.vue
View file @
4be4b1ce
<
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"
>
-->
...
@@ -86,7 +86,7 @@ import shopPopup from '@/components/basicTool/shop-popup/index.vue'
...
@@ -86,7 +86,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
{
...
@@ -94,6 +94,10 @@ export default {
...
@@ -94,6 +94,10 @@ export default {
return
{
return
{
pageInfo
:
{},
pageInfo
:
{},
pageData
:
{},
pageData
:
{},
themeColor
:{
'--main-color'
:
""
,
'--minor-color'
:
""
,
}
};
};
},
},
components
:{
components
:{
...
@@ -163,6 +167,13 @@ export default {
...
@@ -163,6 +167,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
(
'/'
));
...
...
static/nativeComponents/GoodsList/GoodsItem/index.wxss
View file @
4be4b1ce
...
@@ -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: #fff
fff
;
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;
...
...
static/nativeComponents/TimeLimitedDiscount/activityListItem/index.wxss
View file @
4be4b1ce
...
@@ -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;
...
...
static/nativeComponents/TimeLimitedDiscount/index.wxss
View file @
4be4b1ce
...
@@ -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;
...
...
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