Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
runner
9 years ago
Commit
7c8507ba481cf33fee9531e4241ddc97efb9f5c4
1 parent
7d3b11b6
商品库存为0等修改
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
3 deletions
apps/product/controllers/outlet.js
doraemon/views/partial/common/goods.hbs
public/css/index.css
public/css/index.css.map
public/js/product/outlet.page.js
public/scss/common/_good.css
utils/product-process.js
apps/product/controllers/outlet.js
View file @
7c8507b
...
...
@@ -21,7 +21,7 @@ exports.index = (req, res) => {
});
let
categoryId
=
req
.
query
.
category_id
;
let
yhChannel
=
req
.
query
.
yh_channel
||
1
;
let
yhChannel
=
req
.
query
.
yh_channel
||
0
;
let
contentcode
=
req
.
query
.
content_code
;
outletModel
.
getContent
(
categoryId
,
yhChannel
,
contentcode
).
then
(
result
=>
{
...
...
doraemon/views/partial/common/goods.hbs
View file @
7c8507b
...
...
@@ -26,6 +26,12 @@
{{#
isSoonSoldOut
}}
<p
class=
"few-tag"
>
即将售罄
</p>
{{/
isSoonSoldOut
}}
{{#if
noStorage
}}
<div
class=
"no-storage"
>
<div
class=
"no-storage-img"
></div>
</div>
{{/if}}
</div>
<div
class=
"good-detail-text"
>
<div
class=
"name"
>
...
...
public/css/index.css
View file @
7c8507b
...
...
@@ -4783,6 +4783,27 @@ a{
font-size: 0.45rem;
line-height: 0.7rem;
}
.good-detail-img .no-storage{
width: 100%;
height: 100%;
overflow: hidden;
background-color: #000;
opacity: 0.4;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
z-index: 10;
position: absolute;
top: 0;
}
.good-detail-img .no-storage .no-storage-img{
display: block;
width: 2.25rem;
height: 2.25rem;
margin-left: 2.325rem;
margin-top: 3.475rem;
background-image: url('
../
img
/
product
/
bag_moren
.
png
');
background-repeat: no-repeat;
background-size: contain;
}
.good-detail-text .name a{
display: block;
margin: 0.5rem 0;
...
...
@@ -5665,7 +5686,7 @@ a{
margin-top: 0;
position: fixed;
width: 16rem;
padding: 0.
12
5rem 0;
padding: 0.
7
5rem 0;
z-index: 9;
background: #000;
}
...
...
@@ -5867,6 +5888,7 @@ a{
}
.star-index-bg{
background: #000;
overflow: hidden;
}
.star-index-bg .star-page{
background: #000;
...
...
public/css/index.css.map
View file @
7c8507b
This diff could not be displayed because it is too large.
public/js/product/outlet.page.js
View file @
7c8507b
...
...
@@ -77,6 +77,7 @@ if ($('.outlet-category-nav').length > 0) {
}).
goto
(
0
);
}
//更多活动按钮
if
(
$
(
'.back-ground-white'
).
length
>
10
)
{
$
(
'.more-activity'
).
show
();
$
(
'.back-ground-white'
).
each
(
function
(
index
,
e
)
{
...
...
public/scss/common/_good.css
View file @
7c8507b
...
...
@@ -94,6 +94,28 @@
font-size
:
18px
;
line-height
:
28px
;
}
.no-storage
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
background-color
:
#000
;
opacity
:
0.4
;
z-index
:
10
;
position
:
absolute
;
top
:
0
;
.no-storage-img
{
display
:
block
;
width
:
90px
;
height
:
90px
;
margin-left
:
93px
;
margin-top
:
139px
;
background-image
:
resolve
(
"product/bag_moren.png"
);
background-repeat
:
no-repeat
;
background-size
:
contain
;
}
}
}
.good-detail-text
{
...
...
utils/product-process.js
View file @
7c8507b
...
...
@@ -43,6 +43,11 @@ exports.processProductList = (list, options) => {
return
;
}
//如果库存为0,显示已抢完
if
(
product
.
storageNum
===
0
){
product
.
noStorage
=
true
;
}
// 市场价和售价一样,则不显示市场价
if
(
product
.
marketPrice
===
product
.
salesPrice
)
{
product
.
marketPrice
=
false
;
...
...
@@ -103,7 +108,7 @@ exports.processProductList = (list, options) => {
pruductList
.
push
(
product
);
});
console
.
log
(
pruductList
);
return
pruductList
;
};
...
...
Please
register
or
login
to post a comment