Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuloulou
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
xuhongyun
9 years ago
Commit
9d6950e38cf32d4b9d5e10fad473a5f87eef8229
2 parents
ecc86147
6852af00
Merge branch 'dev_2.2' into test
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
code/apps/shop/views/Edit.html
code/static/js.jquery/module/shop/Edit.js
code/apps/shop/views/Edit.html
View file @
9d6950e
...
...
@@ -43,6 +43,7 @@
aria-describedby=
"basic-addon2"
required
>
<span
class=
"input-group-addon"
id=
"basic-addon2"
>
.yohobuy.com
</span>
</div>
<p
style=
"margin-top: 10px"
><span
class=
"red"
>
注:1. 1-32个字符;2. 只能填英文和破折号-,不区分大小写,不能以破折号开头或者结尾
</span></p>
</div>
</div>
<div
class=
"form-group"
>
...
...
@@ -85,6 +86,7 @@
</div>
<div
class=
"col-sm-8"
>
<input
type=
"file"
id=
"shopLogo"
name=
"shopLogo"
value=
"<%data.shopLogo%>"
>
<p><span
class=
"red"
style=
"position: absolute; bottom: 0"
>
提示: 请上传像素为150*150的图片,大小小于500KB
</span></p>
</div>
</div>
<div
class=
"form-group"
>
...
...
code/static/js.jquery/module/shop/Edit.js
View file @
9d6950e
...
...
@@ -258,6 +258,22 @@ e.on("validate",function(){
});
// 对域名格式和长度做校验
e
.
on
(
"validate"
,
function
()
{
var
shopDomainVal
=
$
(
"#shopDomain"
).
val
();
if
(
shopDomainVal
)
{
var
shopDomainPattern
=
new
RegExp
(
"^[a-zA-Z]([a-zA-Z-])*[a-zA-Z]$"
);
if
(
shopDomainVal
.
length
<
1
||
shopDomainVal
.
length
>
32
)
{
return
"店铺域名输入有误!"
;
}
if
(
!
shopDomainPattern
.
test
(
shopDomainVal
))
{
return
"店铺域名输入有误!"
;
}
}
});
e
.
init
();
var
submit
=
function
(
callback
){
...
...
Please
register
or
login
to post a comment