Toggle navigation
Toggle navigation
This project
Loading...
Sign in
罗广聪
/
ProtectGod
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
罗广聪
2017-09-14 10:42:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d2b37d68566ff6aa121a4dc559f0668a0526e27a
d2b37d68
1 parent
23ee8271
适配ipad 调整alert
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
ios/ProtectGod.xcodeproj/xcshareddata/xcschemes/ProtectGod.xcscheme
src/pages/Login.js
src/pages/Mine/index.js
ios/ProtectGod.xcodeproj/xcshareddata/xcschemes/ProtectGod.xcscheme
View file @
d2b37d6
...
...
@@ -80,7 +80,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration =
"
Debug
"
buildConfiguration =
"
Release
"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
...
...
src/pages/Login.js
View file @
d2b37d6
...
...
@@ -10,7 +10,9 @@ import {
TextInput
,
KeyboardAvoidingView
,
AsyncStorage
,
Dimensions
Dimensions
,
Alert
,
AlertIOS
,
}
from
"react-native"
;
export
default
class
Login
extends
Component
{
...
...
@@ -195,11 +197,11 @@ export default class Login extends Component {
phone
=
this
.
state
.
phone
,
password
=
this
.
state
.
password
;
if
(
!
/^1
(
3|4|5|7|8
)\d{9}
$/
.
test
(
phone
))
{
alert
(
"请正确输入手机号码"
);
Alert
.
alert
(
"请正确输入手机号码"
);
return
;
}
if
(
password
===
""
)
{
alert
(
"请输入密码"
);
Alert
.
alert
(
"请输入密码"
);
return
;
}
let
formData
=
new
FormData
();
...
...
@@ -272,7 +274,7 @@ export default class Login extends Component {
profession
=
this
.
state
.
profession
,
formData
=
new
FormData
();
if
(
!
phone
||
!
password
||
!
nickname
||
!
profession
)
{
alert
(
"请完整填写信息"
);
Alert
.
alert
(
"请完整填写信息"
);
return
false
;
}
formData
.
append
(
"phone"
,
phone
);
...
...
@@ -304,7 +306,8 @@ export default class Login extends Component {
isRegister
:
!
that
.
state
.
isRegister
,
id
:
respJson
.
data
.
id
});
alert
(
"注册成功!"
);
// alert("注册成功!");
Alert
.
alert
(
"注册成功!"
)
}
})
.
catch
(
err
=>
console
.
error
(
err
));
...
...
src/pages/Mine/index.js
View file @
d2b37d6
...
...
@@ -74,7 +74,7 @@ export default class Mine extends Component {
let
that
=
this
,
formData
=
new
FormData
();
if
(
that
.
state
.
IS_LOGIN
!=
"yes"
)
{
alert
(
"请先登录账号"
);
Alert
.
alert
(
"请先登录账号"
);
return
false
;
}
formData
.
append
(
"user"
,
this
.
state
.
USER_ID
);
...
...
@@ -111,7 +111,7 @@ export default class Mine extends Component {
let
that
=
this
,
formData
=
new
FormData
();
if
(
that
.
state
.
IS_LOGIN
!=
"yes"
)
{
alert
(
"请先登录账号"
);
Alert
.
alert
(
"请先登录账号"
);
return
false
;
}
formData
.
append
(
"user"
,
this
.
state
.
USER_ID
);
...
...
@@ -134,7 +134,7 @@ export default class Mine extends Component {
})
.
then
(
respJson
=>
{
if
(
respJson
.
enmsg
!=
"ok"
)
{
alert
(
respJson
.
cnmsg
);
Alert
.
alert
(
respJson
.
cnmsg
);
}
else
{
AsyncStorage
.
setItem
(
"PROFESSION"
,
d
).
then
(()
=>
{
console
.
log
(
"保存修改成功"
);
...
...
Please
register
or
login
to post a comment