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
zhangxiaoru
9 years ago
Commit
2f83e3759d1d1f1f511d7c0dfae8614afe438303
2 parents
04e8d4ce
77f6a836
editorial
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
apps/shopping/views/action/order.hbs
public/js/plugins/cascading-address.js
public/js/shopping/order/address.js
public/scss/shopping/_order.css
apps/shopping/views/action/order.hbs
View file @
2f83e37
...
...
@@ -313,13 +313,13 @@
<em class="required-mark">*</em>
收货人:
</label>
<input class="input address-name" type="text" placeholder="请输入您的姓名" maxlength="1
0
" value="\{{name}}">
<input class="input address-name" type="text" placeholder="请输入您的姓名" maxlength="1
2
" value="\{{name}}">
<span class="blue error-tips">
{{>
icon
/
error-round
}}
<em></em>
</span>
</div>
<div class="form-group">
<div class="form-group
clearfix
">
<label class="label-name">
<em class="required-mark">*</em>
所在区域:
...
...
@@ -327,7 +327,7 @@
<div id="address" class="clearfix"></div>
<span class="blue error-tips">
{{>
icon
/
error-round
}}
所在区域不能为空
请填写完整的省市区信息
</span>
</div>
<div class="form-group">
...
...
public/js/plugins/cascading-address.js
View file @
2f83e37
...
...
@@ -407,6 +407,11 @@ CascadingAddress.prototype.getAreaLabels = function() {
return
result
.
join
(
','
);
};
// 判断是否选择了完整的区域
CascadingAddress
.
prototype
.
hasFullAera
=
function
()
{
return
this
.
getAreaLabels
().
split
(
','
).
length
===
3
;
};
// 获取地址ID
CascadingAddress
.
prototype
.
getAreaIds
=
function
()
{
var
el
=
$
(
this
.
config
.
el
),
...
...
public/js/shopping/order/address.js
View file @
2f83e37
...
...
@@ -69,7 +69,7 @@ function validateAddress($el) {
err
:
'详细地址不能为空'
},
{
regx
:
/
[\u
4e00-
\u
9fa5a-zA-Z
\d
#-()
]
+
/
,
regx
:
/
^
[\u
4e00-
\u
9fa5a-zA-Z
\d
#-()
]
+$
/
,
err
:
'只能包含数字、字母、汉字、#、-、()及其组合'
}
],
...
...
@@ -125,7 +125,7 @@ function validateAddress($el) {
}
// 区域判断
if
(
!
$el
.
address
.
getAreaLabels
())
{
if
(
!
$el
.
address
.
hasFullAera
())
{
pass
=
false
;
$
(
'.cascading-address + .error-tips'
).
show
();
}
else
{
...
...
public/scss/shopping/_order.css
View file @
2f83e37
...
...
@@ -597,6 +597,11 @@
&
.is-init
.cancel-address
{
display
:
none
;
}
.cascading-address
{
float
:
left
;
margin-left
:
0
!important
;
}
}
.yoho-dialog.invoice
{
...
...
Please
register
or
login
to post a comment