Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
b0368046
Commit
b0368046
authored
May 29, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
45d55ee3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
style4.vue
components/goods/style4.vue
+16
-3
index.vue
pages/index/index.vue
+1
-1
No files found.
components/goods/style4.vue
View file @
b0368046
<
template
>
<
template
>
<view
<view
style=
"padding: 12px; padding-bottom: 0;width:100%;"
style=
"padding: 12px; padding-bottom: 0;width:100%;
min-height:450rpx;
"
:style=
"
{
:style=
"
{
'background-color': goodsInfo.backgroundColor,
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'background-image': goodsInfo.backgroundPicUrl,
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
}}
</view>
}}
</view>
<view
class=
"good-price-info"
>
<view
class=
"good-price-info"
>
<view
class=
"price"
:style=
"
{'color':mainColor}">
{{
<view
class=
"price"
:style=
"
{'color':mainColor}">
{{
goodsInfo
.
showGoodsPrice
?
item
.
price
:
""
goodsInfo
.
showGoodsPrice
?
getPrice
(
item
.
price
)
:
""
}}
</view>
}}
</view>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<view
class=
"buy"
v-if=
"goodsInfo.showBuyBtn"
@
click
.
stop=
"showSkuHandler(item)"
>
<u-icon
<u-icon
...
@@ -107,6 +107,19 @@ export default {
...
@@ -107,6 +107,19 @@ export default {
showSkuHandler
(
g
){
showSkuHandler
(
g
){
this
.
sku
=
g
this
.
sku
=
g
this
.
showSku
=
true
this
.
showSku
=
true
},
//格式化价格添加.00
getPrice
(
value
){
var
html
,
_val
;
value
=
Number
(
value
).
toFixed
(
2
);
if
(
value
==
0
){
value
=
0
;
return
html
=
"¥0"
;
}
else
if
(
value
.
split
(
'.'
)[
1
].
substring
(
1
)
==
0
){
value
=
Number
(
value
).
toFixed
(
2
);
}
_val
=
value
.
split
(
'.'
);
return
html
=
'¥'
+
_val
[
0
]
+
'.'
+
_val
[
1
];
}
}
},
},
};
};
...
...
pages/index/index.vue
View file @
b0368046
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
@
change=
"changeHandler"
@
change=
"changeHandler"
></u-tabs>
></u-tabs>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
<view
:style=
"item.templateBg"
:key=
"i"
v-
show
=
"active == i"
>
<view
:style=
"item.templateBg"
:key=
"i"
v-
if
=
"active == i"
>
<template
v-for=
"(d, di) in item.template.data"
>
<template
v-for=
"(d, di) in item.template.data"
>
<search
v-if=
"d.id == 'search'"
:styleStr=
"d.data"
:key=
"di"
></search>
<search
v-if=
"d.id == 'search'"
:styleStr=
"d.data"
:key=
"di"
></search>
<swiper
v-if=
"d.id == 'banner'"
:swipers=
"d.data"
:key=
"di"
></swiper>
<swiper
v-if=
"d.id == 'banner'"
:swipers=
"d.data"
:key=
"di"
></swiper>
...
...
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