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
Plain Diff
Browse Files
Authored by
zhangxiaoru
9 years ago
Commit
bfd69fdb6df91d40d40f57381dca845e34b113c0
2 parents
8948f6b2
39f01631
online
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
26 deletions
apps/home/models/index.js
config/common.js
package.json
apps/home/models/index.js
View file @
bfd69fd
...
...
@@ -17,10 +17,12 @@ const _ = require('lodash');
* 个人详情数据
*/
const
_userData
=
(
params
)
=>
{
return
api
.
get
(
''
,
{
method
:
'app.passport.profile'
,
uid
:
params
.
uid
},
{
code
:
200
});
if
(
params
.
uid
)
{
return
api
.
get
(
''
,
{
method
:
'app.passport.profile'
,
uid
:
params
.
uid
},
{
code
:
200
});
}
};
/**
...
...
@@ -38,21 +40,25 @@ const _noticeData = () => {
* @returns {*|Promise.<TResult>}
*/
const
_favoriteData
=
(
params
)
=>
{
return
singleAPI
.
get
(
'brower'
,
{
method
:
'app.favorite.getFavoriteCount'
,
uid
:
params
.
uid
},
{
code
:
200
});
if
(
params
.
uid
)
{
return
singleAPI
.
get
(
'brower'
,
{
method
:
'app.favorite.getFavoriteCount'
,
uid
:
params
.
uid
},
{
code
:
200
});
}
};
/**
* 个人中心页面优惠券,收藏的商品等的数目数据
*/
const
_infoNum
=
(
params
)
=>
{
return
api
.
get
(
''
,
{
method
:
'app.home.getInfoNum'
,
uid
:
params
.
uid
,
udid
:
params
.
udid
},
{
code
:
200
});
if
(
params
.
uid
)
{
return
api
.
get
(
''
,
{
method
:
'app.home.getInfoNum'
,
uid
:
params
.
uid
,
udid
:
params
.
udid
},
{
code
:
200
});
}
};
/**
...
...
@@ -227,11 +233,13 @@ const getGradeGrade = (channel, uid) => {
};
const
getGradeUser
=
(
channel
,
uid
)
=>
{
return
api
.
get
(
''
,
{
method
:
'app.passport.profile'
,
uid
:
uid
,
channel
:
channel
||
1
},
{
code
:
200
});
if
(
uid
)
{
return
api
.
get
(
''
,
{
method
:
'app.passport.profile'
,
uid
:
uid
,
channel
:
channel
||
1
},
{
code
:
200
});
}
};
const
getGrade
=
(
channel
,
uid
)
=>
{
...
...
config/common.js
View file @
bfd69fd
...
...
@@ -15,19 +15,13 @@ module.exports = {
port
:
6001
,
siteUrl
:
'//m.yohobuy.com'
,
domains
:
{
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// api: 'http://testapi.yoho.cn:28078/',
// service: 'http://testservice.yoho.cn:28077/',
// singleApi: 'http://single.yoho.cn/',
api
:
'http://api-test1.yohops.com:9999/'
,
service
:
'http://service-test1.yohops.com:9999/'
,
singleApi
:
'http://192.168.102.31:8092/'
singleApi
:
'http://api-test1.yohops.com:9999/'
},
subDomains
:
{
host
:
'.m.yohobuy.com'
,
...
...
package.json
View file @
bfd69fd
...
...
@@ -34,6 +34,7 @@
"bluebird"
:
"^3.4.1"
,
"body-parser"
:
"^1.15.2"
,
"connect-memcached"
:
"^0.2.0"
,
"connect-multiparty"
:
"^2.0.0"
,
"cookie-parser"
:
"^1.4.3"
,
"express"
:
"^4.14.0"
,
"express-handlebars"
:
"^3.0.0"
,
...
...
Please
register
or
login
to post a comment