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
9f5c4e0eb5b0af9fc9d2ba949daa53b4502ae12b
1 parent
04bc1a08
union_type参数
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
apps/3party/controllers/material.js
apps/3party/models/material.js
public/js/3party/material/controller.js
apps/3party/controllers/material.js
View file @
9f5c4e0
...
...
@@ -19,7 +19,8 @@ exports.list = (req, res, next) => {
let
params
=
{
uid
:
req
.
user
.
uid
,
page
:
1
,
isApp
:
req
.
yoho
.
isApp
isApp
:
req
.
yoho
.
isApp
,
unionType
:
req
.
query
.
union_type
};
req
.
ctx
(
materialModel
).
canLogin
(
params
).
then
(
result
=>
{
...
...
@@ -36,7 +37,8 @@ exports.list = (req, res, next) => {
exports
.
moreGoods
=
(
req
,
res
,
next
)
=>
{
let
params
=
{
page
:
req
.
query
.
page
||
2
,
isApp
:
req
.
yoho
.
isApp
isApp
:
req
.
yoho
.
isApp
,
unionType
:
req
.
query
.
union_type
};
req
.
ctx
(
materialModel
).
list
(
params
).
then
(
result
=>
{
...
...
apps/3party/models/material.js
View file @
9f5c4e0
...
...
@@ -41,6 +41,9 @@ class materialModel extends global.yoho.BaseModel {
if
(
imgUrl
.
split
(
'?'
)[
0
])
{
imgUrl
=
imgUrl
.
split
(
'?'
)[
0
]
+
'?imageView2/0/w/323/h/431'
;
}
if
(
params
.
unionType
)
{
url
=
`
//m.yohobuy.com/product/${val.productSkn}.html?union_type=${params.unionType}`;
}
if
(
params
.
isApp
)
{
url
=
`
http
:
$
{
url
}?
openby
:
yohobuy
=
{
"action"
:
"go.productDetail"
,
"params"
:{
"product_skn"
:
"${val.productSkn}"
}}
`
;
// eslint-disable-line
}
...
...
public/js/3party/material/controller.js
View file @
9f5c4e0
...
...
@@ -35,7 +35,10 @@ class MaterialController extends Controller {
moreGood
(
page
)
{
this
.
loading
=
true
;
$
(
'.material-c'
).
append
(
'<p class="show-more good-more">加载更多...</p>'
);
getMore
(
'//m.yohobuy.com/3party/material/moreGoods'
,
{
page
:
page
}).
then
(
data
=>
{
getMore
(
'//m.yohobuy.com/3party/material/moreGoods'
,
{
page
:
page
,
union_type
:
window
.
queryString
.
union_type
}).
then
(
data
=>
{
if
(
data
.
goods
.
length
>
0
)
{
$
(
'.goods-list'
).
append
(
goodContent
(
data
));
...
...
Please
register
or
login
to post a comment