Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
Commits
Go to a project
GitLab
Go to group
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
lore-w
9 years ago
Commit
e5bf87e806543f9e2981fe1d3a6ff65259814d74
2 parents
ce3ba5cb
82a29d9e
code review by kai.bi
Conflicts: static/js/me/suggest.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
static/js/me/suggest.js
static/js/me/suggest.js
View file @
e5bf87e
...
...
@@ -64,11 +64,21 @@ lazyLoad();
headerNavHammer
=
new
Hammer
(
document
.
getElementById
(
'yoho-header'
));
headerNavHammer
.
on
(
'tap'
,
function
(
e
)
{
var
suggestText
=
$
(
'#suggest-textarea'
).
val
();
var
suggestText
=
$
(
'#suggest-textarea'
).
val
(),
textReg
=
/
\S
+/
;
if
(
$
(
e
.
target
).
hasClass
(
'nav-btn'
))
{
if
(
!
textReg
.
test
(
suggestText
))
{
diaLog
.
showDialog
({
autoHide
:
true
,
dialogText
:
'意见不能为空'
});
return
;
}
$
.
ajax
({
method
:
'post'
,
url
:
'/home/savesuggest'
,
...
...
@@ -85,10 +95,18 @@ headerNavHammer.on('tap', function(e) {
setTimeout
(
function
()
{
location
.
pathname
=
'home/suggest'
;
},
2000
);
}
else
{
diaLog
.
showDialog
({
autoHide
:
true
,
dialogText
:
'提交失败~'
});
}
}).
fail
(
function
()
{
//TODO
diaLog
.
showDialog
({
autoHide
:
true
,
dialogText
:
'网络错误~'
});
});
}
});
...
...
Please
register
or
login
to post a comment