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
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
d27a6a0544b645ae82191915e4b8c0acb8fb3fcb
1 parent
9457be73
address
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
apps/me/controllers/address.js
apps/shopping/models/order.js
public/js/shopping/order/address.js
apps/me/controllers/address.js
View file @
d27a6a0
...
...
@@ -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/shopping/models/order.js
View file @
d27a6a0
...
...
@@ -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/shopping/order/address.js
View file @
d27a6a0
...
...
@@ -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