Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
yyq
9 years ago
Commit
35149447d255607aacc14e30b963f58309d1a7a5
2 parents
02827841
a1717be6
Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
10 deletions
apps/me/controllers/address.js
apps/product/models/helpers.js
apps/shopping/models/order.js
public/js/product/list/list-search.js
public/js/product/shop.page.js
public/js/shopping/order/address.js
apps/me/controllers/address.js
View file @
3514944
...
...
@@ -50,15 +50,15 @@ const index = (req, res, next) => {
}).
catch
(
next
);
};
const
getAddressList
=
(
req
,
res
)
=>
{
addressModel
.
getAddressDataAsync
(
'7566245'
,
20
).
then
(
result
=>
{
const
getAddressList
=
(
req
,
res
,
next
)
=>
{
addressModel
.
getAddressDataAsync
(
req
.
user
.
uid
,
20
).
then
(
result
=>
{
if
(
result
.
data
)
{
let
defaultAd
=
_
.
find
(
result
.
data
,
o
=>
o
.
is_default
===
'Y'
);
defaultAd
&&
(
defaultAd
.
focus
=
true
);
}
res
.
send
(
result
);
});
})
.
catch
(
next
)
;
};
/**
...
...
apps/product/models/helpers.js
View file @
3514944
...
...
@@ -211,11 +211,11 @@ const helpers = {
goodsId
=
goodsList
[
0
].
goodsId
;
goodsList
.
forEach
(
o
=>
{
o
.
url
=
`
$
{
config
.
siteUrl
}
/product/
i
tem
/
$
{
g
.
productId
}
_$
{
o
.
goodsId
}.
html
`
;
o
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
g
.
productId
}
_$
{
o
.
goodsId
}
/${o.cnAlphabet
}.html`
;
});
}
g
.
url
=
`
$
{
config
.
siteUrl
}
/product/
i
tem
/
$
{
g
.
productId
}
_$
{
goodsId
}.
html
`
;
g
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
g
.
productId
}
_$
{
goodsId
}
/${g.cnAlphabet
}.html`
;
});
}
return
list
;
...
...
apps/shopping/models/order.js
View file @
3514944
...
...
@@ -42,7 +42,7 @@ const index = uid => {
// format goods link
theGoods
.
link
=
helper
.
urlFormat
(
`
/
product
/
pro_$
{
theGoods
.
product_id
}
_$
{
theGoods
.
goods_id
}
_
$
{
theGoods
.
cn_alphabet
}.
html
`
);
`
/
product
/
pro_$
{
theGoods
.
product_id
}
_$
{
theGoods
.
goods_id
}
/
${theGoods.cn_alphabet}.html`
)
;
theGoods
.
last_price
=
parseFloat
(
theGoods
.
last_price
,
10
).
toFixed
(
2
);
...
...
public/js/product/list/list-search.js
View file @
3514944
...
...
@@ -4,6 +4,7 @@ var common = require('../../common');
var
query
=
common
.
queryString
();
var
YohoListPage
=
{
rootDoc
:
$
(
'.yoho-product-list'
),
brandsDoc
:
$
(
'.yoho-product-list .brand-list'
),
...
...
@@ -16,7 +17,7 @@ var YohoListPage = {
require
(
'yoho-jquery-nanoscroller'
);
require
(
'../../plugins/check'
);
require
(
'../../common/return-top'
);
require
(
'../../common/header'
);
lazyload
();
$
(
'.nano'
).
nanoScroller
();
$
(
'.yoho-ui-accordion'
,
this
.
rootDoc
).
each
(
function
()
{
...
...
public/js/product/shop.page.js
View file @
3514944
var
lazyload
=
require
(
'yoho-jquery-lazyload'
);
require
(
'../common/header'
);
lazyload
();
...
...
public/js/shopping/order/address.js
View file @
3514944
...
...
@@ -257,9 +257,7 @@ function initAddressContent($el, areaCode) {
function
newAddress
(
isInit
)
{
var
address
;
address
=
addressDialogFactory
({
init
:
isInit
});
address
=
addressDialogFactory
();
if
(
isInit
)
{
address
.
$el
.
addClass
(
'is-init'
);
...
...
Please
register
or
login
to post a comment