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
郝肖肖
8 years ago
Commit
d0bcad3e9c8e54fd1354d2dae4c30817f8519761
1 parent
315d69c2
电子发票默认收货地址手机号
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
4 deletions
apps/me/controllers/address.js
apps/me/models/address.js
apps/shopping/views/action/order.hbs
public/js/shopping/order/invoice.js
public/tpl/shopping/address-list.hbs
apps/me/controllers/address.js
View file @
d0bcad3
...
...
@@ -65,6 +65,8 @@ const getAddressList = (req, res, next) => {
_
.
each
(
result
.
data
,
(
d
)
=>
{
d
.
address_id
=
crypto
.
encryption
(
config
.
crypto
.
common
,
d
.
address_id
+
''
);
d
.
address
=
cleanHtml
.
htmlDecode
(
d
.
address
);
d
.
complete_mobile
=
d
.
mobile
;
d
.
mobile
=
d
.
mobile
.
substr
(
0
,
3
)
+
'****'
+
d
.
mobile
.
substr
(
7
);
});
defaultAd
&&
(
defaultAd
.
focus
=
true
);
...
...
apps/me/models/address.js
View file @
d0bcad3
...
...
@@ -17,7 +17,7 @@ const api = global.yoho.API;
*/
const
getAddressDataAsync
=
(
uid
,
limit
)
=>
{
return
api
.
get
(
''
,
{
method
:
'app.address.get
hidden
'
,
method
:
'app.address.get'
,
uid
:
uid
,
limit
:
limit
}).
then
(
result
=>
{
...
...
apps/shopping/views/action/order.hbs
View file @
d0bcad3
...
...
@@ -272,7 +272,7 @@
</span>
<div class="row-content">
<div class="invoice-content-radio-group">
<
input
value
=
""
class
=
'input invoice-mobile'
type
=
"text"
maxlength
=
"11"
placeholder
=
"请填写收票人手机"
>
<input value="
{{
invoice_mobile
}}
" class='input invoice-mobile' type="
text
" maxlength="
11
" placeholder="
请填写收票人手机
">
<span class="
input
-
tip
invoice
-
mobile
-
tip
blue
hide
">
<span class="
iconfont
"
>&
#
xe60c
;
<
/span
>
请输入正确的手机号
...
...
public/js/shopping/order/invoice.js
View file @
d0bcad3
...
...
@@ -95,6 +95,7 @@ function showInvoiceDialog() {
invoiceContent
=
$
(
'.invoice-content-radio'
).
first
().
data
(
'value'
);
var
title
,
mobile
=
$
(
'#address-list li.address.focus'
).
data
(
'complete-mobile'
)
||
''
,
invoiceTypeName
=
'电子发票'
,
invoiceType
=
2
;
...
...
@@ -134,10 +135,13 @@ function showInvoiceDialog() {
invoiceTypeName
=
'纸质发票'
;
}
else
{
$
(
'.invoice-tab li:eq(0)'
).
trigger
(
'click'
);
$invoiceMobile
.
val
(
$invoceDetail
.
data
(
'mobile'
)
);
mobile
=
$invoceDetail
.
data
(
'mobile'
);
}
}
//设置默认收货地址手机号
$invoiceMobile
.
val
(
mobile
.
toString
().
substr
(
0
,
3
)
+
'****'
+
mobile
.
toString
().
substr
(
7
));
// 设置radio选中
$
(
'[data-value='
+
invoiceTitleType
+
'].invoice-title-radio'
).
find
(
'.radio'
).
addClass
(
'checked'
);
$
(
'[data-value='
+
invoiceContent
+
'].invoice-content-radio'
).
find
(
'.radio'
).
addClass
(
'checked'
);
...
...
public/tpl/shopping/address-list.hbs
View file @
d0bcad3
{{#
each
address
}}
<li
class=
"address
{{#
isY
is_default
}}
default
{{/
isY
}}{{#if
focus
}}
focus
{{/if}}
"
data-id=
"
{{
address_id
}}
"
data-name=
"
{{
consignee
}}
"
data-mobile=
"
{{
mobile
}}
"
data-phone=
"
{{
phone
}}
"
data-areacode=
"
{{
area_code
}}
"
data-area=
"
{{
area
}}
"
data-address=
"
{{
address
}}
"
>
data-phone=
"
{{
phone
}}
"
data-areacode=
"
{{
area_code
}}
"
data-area=
"
{{
area
}}
"
data-address=
"
{{
address
}}
"
data-complete-mobile=
"
{{
complete_mobile
}}
"
>
<div
class=
"address-header"
></div>
<div
class=
"address-content"
>
<p
class=
"default-or-not"
>
...
...
Please
register
or
login
to post a comment