Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hongweigao
8 years ago
Commit
d5022a3143e998376202870b0536fa05c6dd6261
1 parent
b5d976d4
去掉货到付款提示,过滤电话为null情况
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
apps/home/models/address-service.js
apps/home/views/action/home/address/address.hbs
public/js/home/common-address.js
apps/home/models/address-service.js
View file @
d5022a3
...
...
@@ -25,11 +25,13 @@
let
addressList
=
addressData
.
data
;
for
(
let
i
=
0
;
i
<
addressList
.
length
;
i
++
)
{
let
phone
=
_
.
get
(
addressList
[
i
],
'phone'
)
===
'null'
?
''
:
addressList
[
i
].
phone
;
result
.
push
({
id
:
addressList
[
i
].
address_id
||
''
,
addressee
:
addressList
[
i
].
consignee
||
''
,
address
:
addressList
[
i
].
area
+
addressList
[
i
].
address
+
(
addressList
[
i
].
zip_code
||
''
),
phone
:
(
addressList
[
i
].
mobile
||
''
)
+
(
addressList
[
i
].
phone
||
''
),
address
:
addressList
[
i
].
area
+
addressList
[
i
].
address
+
' '
+
(
addressList
[
i
].
zip_code
||
''
),
phone
:
(
addressList
[
i
].
mobile
||
''
)
+
' '
+
phone
,
isPreferred
:
addressList
[
i
].
is_default
===
'Y'
?
'true'
:
''
// 默认地址
});
}
...
...
@@ -57,7 +59,6 @@
},
{
isSelect
:
true
,
labelText
:
'省份:'
,
tips
:
'注:标"*"的为支持货到付款的地区'
,
tipsUrl
:
'/help/?category_id=48'
,
selects
:
[{
key
:
'province'
...
...
@@ -122,6 +123,7 @@
for
(
let
i
=
0
;
i
<
addressList
.
length
;
i
++
)
{
if
(
addressList
[
i
].
address_id
===
id
)
{
addressList
[
i
].
phone
=
_
.
get
(
addressList
[
i
],
'phone'
)
===
'null'
?
''
:
addressList
[
i
].
phone
;
respData
.
data
=
addressList
[
i
];
break
;
}
...
...
apps/home/views/action/home/address/address.hbs
View file @
d5022a3
...
...
@@ -63,6 +63,7 @@
<label
for=
"
{{
key
}}
"
>
{{
labelText
}}
</label>
<input
type=
"text"
name=
'
{{
key
}}
'
id=
"
{{
key
}}
"
class=
"input-1 width-150"
value=
"
{{
value
}}
"
>
{{/if}}
{{#if
tips
}}
<span
class=
"form-prompt form-info"
id=
"
{{
key
}}
-tip"
>
{{
tips
}}
{{#
isSelect
}}
...
...
@@ -71,6 +72,7 @@
<!--</a>-->
{{/
isSelect
}}
</span>
{{/if}}
</div>
{{/
each
}}
</div>
...
...
public/js/home/common-address.js
View file @
d5022a3
...
...
@@ -43,8 +43,7 @@ var address = {
loadAreaData
:
function
(
pCode
,
toDomId
,
defaultValue
,
allCode
)
{
var
the
=
this
,
$toDom
=
$
(
'#'
+
toDomId
),
i
=
0
,
point
=
''
;
i
=
0
;
var
active
,
val
,
...
...
@@ -76,12 +75,11 @@ var address = {
$toDom
.
append
(
'<option value="0">'
+
defaultValue
+
'</option>'
);
if
(
toDomId
===
the
.
streetsDomId
)
{
allCode
===
pCode
?
selectAll
=
'selected'
:
selectAll
=
''
;
$toDom
.
append
(
'<option value="'
+
pCode
+
'" '
+
selectAll
+
'>
*
全部</option>'
);
$toDom
.
append
(
'<option value="'
+
pCode
+
'" '
+
selectAll
+
'>全部</option>'
);
}
for
(
i
in
jsonData
.
options
)
{
if
(
jsonData
.
options
[
i
])
{
val
=
jsonData
.
options
[
i
];
point
=
(
toDomId
===
the
.
streetsDomId
&&
val
.
is_support
===
'Y'
)
?
'*'
:
''
;
nId
=
val
.
value
;
selecter
=
''
;
...
...
@@ -89,7 +87,7 @@ var address = {
nId
===
allCode
.
substr
(
0
,
nId
.
length
))
{
selecter
=
'selected'
;
}
$toDom
.
append
(
'<option value="'
+
nId
+
'" '
+
selecter
+
'>'
+
point
+
val
.
text
+
'</option>'
);
$toDom
.
append
(
'<option value="'
+
nId
+
'" '
+
selecter
+
'>'
+
val
.
text
+
'</option>'
);
}
}
}
...
...
Please
register
or
login
to post a comment