Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
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
Email Patches
Plain Diff
Browse Files
Authored by
lore-w
9 years ago
Commit
3ac33fe0385c5b953f8118c217ae284d684a39bb
1 parent
d9109d2e
注册bug修改,密码验证规则修改,商品页文字居中显示,code review by chenglong
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
web-static/js/passport/reg.js
web-static/js/product/product.js
web-static/sass/product/_good.scss
web-static/js/passport/reg.js
View file @
3ac33fe
...
...
@@ -198,8 +198,8 @@ function msgCaptchaAjaxFn(page, callback) {
function
validateRule
(
page
,
$element
,
callback
)
{
var
val
=
$
.
trim
(
$element
.
val
()),
regionCode
;
regionCode
,
pwdReg
=
/^
([
a-zA-Z0-9
\-\+
_!@
\#
$%
\^
&
\*\(\)\:\;\.
=
\[\]\\\'
,
\?]){6,20}
$/gi
;
//手机号校验
if
(
$element
.
hasClass
(
'phone-num'
))
{
...
...
@@ -266,6 +266,7 @@ function validateRule(page, $element, callback) {
}
else
{
validateResult
[
2
].
message
=
'短信验证码错误'
;
validateResult
[
2
].
status
=
false
;
callback
();
}
}
...
...
@@ -279,8 +280,8 @@ function validateRule(page, $element, callback) {
validateResult
[
3
].
message
=
'密码只支持6-20位字符'
;
validateResult
[
3
].
status
=
false
;
}
else
if
(
/
\s
/
.
test
(
$element
.
val
()))
{
validateResult
[
3
].
message
=
'密码不能包含空格'
;
}
else
if
(
!
pwdReg
.
test
(
$element
.
val
()))
{
validateResult
[
3
].
message
=
'密码只能包含字母,数字,半角标点符号'
;
validateResult
[
3
].
status
=
false
;
}
else
{
...
...
@@ -420,10 +421,8 @@ exports.init = function(page) {
$
(
'#agree-terms'
).
click
(
function
()
{
if
(
$
(
this
).
attr
(
'notchecked'
))
{
console
.
log
(
1
);
$
(
this
).
removeAttr
(
'notchecked'
);
}
else
{
console
.
log
(
2
);
$
(
this
).
attr
(
'notchecked'
,
'true'
);
}
...
...
web-static/js/product/product.js
View file @
3ac33fe
...
...
@@ -194,11 +194,20 @@ $goodInfoMain.on('click', '.col-btn', function() {
});
// 左侧导航
$productListNav
.
click
(
function
()
{
$productListNav
.
click
(
function
(
event
)
{
if
(
!
$
(
event
.
target
).
hasClass
(
'product-list-nav'
))
{
return
;
}
if
(
$
(
this
).
hasClass
(
'active'
))
{
$
(
this
).
find
(
'.sort-child-list'
).
stop
(
true
,
true
).
slideUp
();
}
else
{
$
(
this
).
find
(
'.sort-child-list'
).
stop
(
true
,
true
).
slideDown
();
}
$
(
this
).
toggleClass
(
'active'
);
});
...
...
web-static/sass/product/_good.scss
View file @
3ac33fe
...
...
@@ -39,7 +39,7 @@
.good-detail-text
{
color
:
#222
;
font-size
:
12px
;
text-align
:
center
;
text-align
:
left
;
overflow
:
hidden
;
>
a
{
...
...
Please
register
or
login
to post a comment