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
2017-05-03 15:03:50 +0800
Commit
04ede35c75aa3e23fd3a6bb4871e51f732850c73
2 parents
38df7e92
b0c5faca
merge
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
50 additions
and
22 deletions
apps/activity/models/trend.js
apps/cart/controllers/index.js
apps/channel/controllers/brand.js
apps/channel/controllers/cate.js
apps/guang/controllers/index.js
apps/home/controllers/index.js
apps/product/controllers/new-shop.js
config/common.js
doraemon/views/partial/order/good.hbs
package.json
public/build/webpack.dev.config.js
public/js/activity/trend/index.js
public/scss/home/_order.css
apps/activity/models/trend.js
View file @
04ede35
...
...
@@ -6,7 +6,7 @@
'use strict'
;
const
service
=
global
.
yoho
.
S
ervic
eAPI
;
const
service
=
global
.
yoho
.
S
tor
eAPI
;
const
moment
=
require
(
'moment'
);
// 格式年月日
...
...
apps/cart/controllers/index.js
View file @
04ede35
...
...
@@ -21,6 +21,9 @@ const index = (req, res) => {
signurl
:
helpers
.
urlFormat
(
'/signin.html'
)
};
// 唤起 APP 的路径
res
.
locals
.
appPath
=
'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.shopcart","params":{}}'
;
res
.
render
(
'index'
,
Object
.
assign
(
pageData
,
{
title
:
'购物车'
,
module
:
'cart'
,
...
...
apps/channel/controllers/brand.js
View file @
04ede35
...
...
@@ -29,6 +29,9 @@ let index = (req, res, next) => {
};
let
channel
;
// 唤起 APP 的路径
res
.
locals
.
appPath
=
'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.attention","params":{"actiontype":"1"}}'
;
if
(
!
req
.
query
.
channel
)
{
channel
=
'1'
;
}
else
if
(
!
typeLib
.
channels
[
req
.
query
.
channel
])
{
...
...
apps/channel/controllers/cate.js
View file @
04ede35
...
...
@@ -7,6 +7,8 @@ const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab
const
helpers
=
global
.
yoho
.
helpers
;
let
index
=
(
req
,
res
,
next
)
=>
{
// 唤起 APP 的路径
res
.
locals
.
appPath
=
'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.attention","params":{"actiontype":"0"}}'
;
cateModel
.
getCateData
(
req
.
yoho
.
channel
).
then
((
result
)
=>
{
res
.
render
(
'cate'
,
{
...
...
apps/guang/controllers/index.js
View file @
04ede35
...
...
@@ -210,6 +210,10 @@ const index = (req, res, next) => {
res
.
set
(
'Cache-Control'
,
'no-cache'
);
}
}
// 唤起 APP 的路径
res
.
locals
.
appPath
=
`
yohobuy
:
//yohobuy.com/goapp?openby:yohobuy= {"action":"go.guangchannel","params":{"id":${param.type}}}`;
res
.
render
(
'guang'
,
Object
.
assign
(
responseData
,
result
,
{
localCss
:
true
}));
...
...
apps/home/controllers/index.js
View file @
04ede35
...
...
@@ -26,6 +26,9 @@ exports.index = (req, res, next) => {
let
studentSwitch
=
!
_
.
get
(
req
.
app
.
locals
.
wap
,
'user.removeStudentIdentification'
,
true
);
// 唤起 APP 的路径
res
.
locals
.
appPath
=
'yohobuy://yohobuy.com/goapp?openby:yohobuy= {"action":"go.mine"}'
;
indexModel
.
index
(
params
).
then
(
result
=>
{
if
(
result
)
{
res
.
render
(
'home'
,
Object
.
assign
(
result
,
{
...
...
apps/product/controllers/new-shop.js
View file @
04ede35
...
...
@@ -69,6 +69,9 @@ const shop = {
params
.
brand
=
brandId
;
// 唤起 APP 的路径
res
.
locals
.
appPath
=
`
yohobuy
:
//yohobuy.com/goapp?openby:yohobuy={"action":"go.brand","params":{"brand_id":"${brandId}"}}`;
let
searchParam
=
Object
.
assign
({
isApp
:
req
.
yoho
.
isApp
,
brand
:
brandId
,
...
...
config/common.js
View file @
04ede35
...
...
@@ -17,6 +17,7 @@ const domains = {
api
:
'http://api-test3.yohops.com:9999/'
,
service
:
'http://service-test3.yohops.com:9999/'
,
global
:
'http://api-global.yohobuy.com'
,
store
:
'http://192.168.102.210:8080/portal-gateway/'
,
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
...
...
@@ -114,6 +115,7 @@ if (isProduction) {
api
:
'http://api.yoho.yohoops.org/'
,
service
:
'http://service.yoho.yohoops.org/'
,
global
:
'http://api-global.yohobuy.com'
,
store
:
''
,
// 线上域名尚未确定
liveApi
:
'http://api.live.yoho.cn/'
,
singleApi
:
'http://single.yoho.cn/'
,
imSocket
:
'wss://imsocket.yohobuy.com:443'
,
...
...
@@ -162,7 +164,8 @@ if (isProduction) {
domains
:
{
api
:
process
.
env
.
TEST_API
||
'http://api-test1.yohops.com:9999/'
,
service
:
process
.
env
.
TEST_SERVICE
||
'http://service-test1.yohops.com:9999/'
,
global
:
process
.
env
.
TEST_GLOBAL
||
'http://global-test-soa.yohops.com:9999'
,
global
:
process
.
env
.
TEST_GLOBAL
||
'http://global-test-soa.yohops.com:9999/'
,
store
:
process
.
env
.
TEST_STORE
||
'http://192.168.102.210:8080/portal-gateway/'
,
liveApi
:
process
.
env
.
TEST_LIVE
||
'http://testapi.live.yohops.com:9999/'
,
singleApi
:
process
.
env
.
TEST_SINGLE
||
'http://api-test1.yohops.com:9999/'
,
imSocket
:
process
.
env
.
TEST_IM_SOCKET
||
'ws://socket.yohobuy.com:10240'
,
...
...
doraemon/views/partial/order/good.hbs
View file @
04ede35
...
...
@@ -22,6 +22,9 @@
</span>
{{/if}}
</p>
{{#if
appearDate
}}
<span
class=
"appear-date"
>
上市期:
{{
appearDate
}}
</span>
{{/if}}
<p
class=
"row price-wrap"
>
<span
class=
"price"
>
¥
{{
price
}}
...
...
@@ -29,9 +32,6 @@
<span
class=
"count"
>
×
{{
count
}}
</span>
{{#if
appearDate
}}
<span
class=
"appear-date"
>
上市期:
{{
appearDate
}}
</span>
{{/if}}
</p>
</div>
</div>
...
...
package.json
View file @
04ede35
{
"name"
:
"m-yohobuy-node"
,
"version"
:
"5.
6.4
"
,
"version"
:
"5.
7.0
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
@@ -26,7 +26,7 @@
"body-parser"
:
"^1.16.1"
,
"captchapng"
:
"0.0.1"
,
"cheerio"
:
"^0.22.0"
,
"client-sessions"
:
"^0.
7
.0"
,
"client-sessions"
:
"^0.
8
.0"
,
"compression"
:
"^1.6.2"
,
"connect-memcached"
:
"^0.2.0"
,
"connect-multiparty"
:
"^2.0.0"
,
...
...
@@ -37,7 +37,7 @@
"lodash"
:
"^4.17.4"
,
"memory-cache"
:
"^0.1.6"
,
"moment"
:
"^2.18.1"
,
"oneapm"
:
"^
1.2.2
0"
,
"oneapm"
:
"^
2.0.
0"
,
"passport"
:
"^0.3.2"
,
"passport-local"
:
"^1.0.0"
,
"passport-qq"
:
"0.0.3"
,
...
...
@@ -45,20 +45,20 @@
"passport-strategy"
:
"^1.0.0"
,
"passport-weixin"
:
"^0.1.0"
,
"request"
:
"^2.81.0"
,
"request-promise"
:
"^
3.0
.0"
,
"request-promise"
:
"^
4.2
.0"
,
"uuid"
:
"^3.0.1"
,
"xml2js"
:
"^0.4.17"
,
"yoho-express-session"
:
"^2.0.0"
,
"yoho-md5"
:
"^2.0.0"
,
"yoho-node-lib"
:
"=0.2.2
2
"
,
"yoho-node-lib"
:
"=0.2.2
5
"
,
"yoho-zookeeper"
:
"^1.0.8"
},
"devDependencies"
:
{
"autoprefixer"
:
"^6.7.4"
,
"babel-core"
:
"^6.24.1"
,
"babel-loader"
:
"^
6.4.1
"
,
"babel-loader"
:
"^
7.0.0
"
,
"babel-polyfill"
:
"^6.23.0"
,
"babel-preset-env"
:
"^1.
3.3
"
,
"babel-preset-env"
:
"^1.
4.0
"
,
"css-loader"
:
"^0.28.0"
,
"cssnano"
:
"^3.10.0"
,
"eslint"
:
"^3.19.0"
,
...
...
@@ -66,7 +66,7 @@
"eslint-loader"
:
"^1.7.1"
,
"eslint-plugin-html"
:
"^2.0.1"
,
"extract-text-webpack-plugin"
:
"^2.1.0"
,
"handlebars-loader"
:
"^1.
4
.0"
,
"handlebars-loader"
:
"^1.
5
.0"
,
"happypack"
:
"^3.0.3"
,
"husky"
:
"^0.13.3"
,
"nodemon"
:
"^1.11.0"
,
...
...
@@ -78,24 +78,24 @@
"postcss-import"
:
"^9.1.0"
,
"postcss-loader"
:
"^1.3.1"
,
"postcss-position"
:
"^0.5.0"
,
"postcss-pxtorem"
:
"^4.0.
0
"
,
"postcss-pxtorem"
:
"^4.0.
1
"
,
"postcss-scss"
:
"^0.4.1"
,
"postcss-short"
:
"^3.0.3"
,
"postcss-sprites"
:
"^4.2.
0
"
,
"postcss-sprites"
:
"^4.2.
1
"
,
"postcss-use"
:
"^2.3.0"
,
"precss"
:
"^1.4.0"
,
"shelljs"
:
"^0.7.6"
,
"style-loader"
:
"^0.1
6.1
"
,
"style-loader"
:
"^0.1
7.0
"
,
"stylelint"
:
"^7.10.1"
,
"stylelint-config-yoho"
:
"^1.2.8"
,
"stylelint-formatter-table"
:
"^1.0.2"
,
"stylelint-processor-html"
:
"^1.0.0"
,
"stylelint-webpack-plugin"
:
"^0.7.0"
,
"vue"
:
"^2.2.6"
,
"vue-loader"
:
"^11.3.4"
,
"vue-template-compiler"
:
"^2.2.6"
,
"webpack"
:
"^2.3.3"
,
"webpack-dev-server"
:
"^2.4.2"
,
"vue"
:
"^2.3.0"
,
"vue-loader"
:
"^12.0.2"
,
"vue-template-compiler"
:
"^2.3.0"
,
"webpack"
:
"^2.4.1"
,
"webpack-dev-server"
:
"^2.4.5"
,
"webpack-uglify-parallel"
:
"^0.1.3"
,
"yoho-cookie"
:
"^1.2.0"
,
"yoho-fastclick"
:
"^1.0.6"
,
...
...
public/build/webpack.dev.config.js
View file @
04ede35
...
...
@@ -27,7 +27,7 @@ _.mergeWith(baseConfig, {
}]
},
devServer
:
{
host
:
'0.0.0.0'
,
host
:
devInfo
.
host
,
port
:
devInfo
.
port
,
publicPath
:
devInfo
.
publicPath
,
contentBase
:
[
path
.
join
(
__dirname
,
'./bundle/'
),
path
.
join
(
__dirname
,
'../'
)],
...
...
public/js/activity/trend/index.js
View file @
04ede35
...
...
@@ -235,7 +235,9 @@ function pullPicBig(cIndex) {
$
(
'.swiper-pagination-bullet:eq('
+
cIndex
+
')'
).
click
();
mySwiper
.
slideTo
(
cIndex
,
1000
,
false
);
$
(
'.big-pic'
).
show
();
if
(
$
(
'.share-photography'
).
length
===
0
)
{
$
(
'.foot-btn'
).
hide
();
}
$
(
'.swiper-slide img'
).
each
(
function
()
{
let
newTop
=
(
w_height
-
$
(
this
).
height
())
/
2
;
...
...
@@ -298,7 +300,10 @@ $(
}
if
(
$
(
'.clearCookie'
).
length
>
0
)
{
$
(
'.foot-btn'
).
on
(
'click'
,
function
()
{
clearCookieArr
(
3
);
chosenDefault
();
});
}
// 默认选中菜单
...
...
public/scss/home/_order.css
View file @
04ede35
...
...
@@ -360,6 +360,8 @@
.appear-date
{
color
:
#f00
;
float
:
right
;
margin-right
:
30px
;
}
}
...
...
Please
register
or
login
to post a comment