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
郭成尧
8 years ago
Commit
435e19925182c67639947f7121920e04f0954de6
1 parent
86d438e8
order-delete-content-code
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
apps/product/controllers/new.js
public/js/product/new-arrival.page.js
public/scss/product/new-arrival.page.css
apps/product/controllers/new.js
View file @
435e199
...
...
@@ -60,9 +60,12 @@ const newGoods = (req, res, next) => {
}).
catch
(
next
);
};
/**
* 重构的新品到着页面
*/
const
_newGoods
=
(
req
,
res
,
next
)
=>
{
const
channel
=
req
.
yoho
.
channel
;
const
uid
=
req
.
user
.
uid
;
let
channel
=
req
.
yoho
.
channel
;
let
uid
=
req
.
user
.
uid
;
newModel
.
indexData
(
uid
,
channel
).
then
(
result
=>
{
let
shopList
=
_
.
get
(
result
,
'shop_list'
,
[]);
...
...
@@ -152,11 +155,9 @@ const recommendShop = (req, res, next) => {
const
channel
=
req
.
yoho
.
channel
;
const
uid
=
req
.
user
.
uid
;
console
.
log
(
channel
)
newModel
.
recommendShops
(
uid
,
channel
).
then
(
data
=>
{
res
.
json
(
data
);
});
})
.
catch
(
next
)
;
};
...
...
public/js/product/new-arrival.page.js
View file @
435e199
...
...
@@ -66,7 +66,6 @@ let searchView = function() {
* see: search-process.js
*/
let
searchParams
=
{
order
:
's_t_desc'
,
filter
:
{
},
page
:
{
...
...
@@ -176,15 +175,16 @@ let searchView = function() {
}
function
renderGoods
(
$container
,
data
)
{
let
html
=
goodsT
({
goods
:
data
});
let
html
=
'<p class="no-result">未找到相关搜索结果</p>'
;
if
(
data
.
length
>
0
)
{
html
=
goodsT
({
goods
:
data
});
}
$container
.
append
(
html
);
lazyLoad
(
html
);
return
html
;
...
...
public/scss/product/new-arrival.page.css
View file @
435e199
...
...
@@ -28,6 +28,16 @@ body {
.goods-container
{
overflow
:
hidden
;
.goods-box
{
.no-result
{
text-align
:
center
;
vertical-align
:
middle
;
color
:
#ccc
;
font-size
:
1.2em
;
margin-top
:
11rem
;
}
}
}
.good-info
{
...
...
Please
register
or
login
to post a comment