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
Yingchuan
2017-09-14 17:34:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b505e6bf1ee622cc79a98dd8e29a28158266a4c2
b505e6bf
1 parent
29de068e
第二版
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
11 deletions
android/app/build.gradle
android/gradle.properties
src/assets/Mine/headportrait.png
src/pages/InsuranceCircle/details.js
src/pages/InsuranceCircle/index.js
src/pages/Login.js
src/pages/Mine/index.js
android/app/build.gradle
View file @
b505e6b
...
...
@@ -103,6 +103,16 @@ android {
abiFilters
"armeabi-v7a"
,
"x86"
}
}
signingConfigs
{
release
{
storeFile
file
(
MYAPP_RELEASE_STORE_FILE
)
storePassword
MYAPP_RELEASE_STORE_PASSWORD
keyAlias
MYAPP_RELEASE_KEY_ALIAS
keyPassword
MYAPP_RELEASE_KEY_PASSWORD
}
}
splits
{
abi
{
reset
()
...
...
@@ -114,6 +124,7 @@ android {
buildTypes
{
release
{
minifyEnabled
enableProguardInReleaseBuilds
signingConfig
signingConfigs
.
release
proguardFiles
getDefaultProguardFile
(
"proguard-android.txt"
),
"proguard-rules.pro"
}
}
...
...
android/gradle.properties
View file @
b505e6b
...
...
@@ -17,4 +17,9 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
MYAPP_RELEASE_STORE_FILE
=
PGreleasekey.keystore
MYAPP_RELEASE_KEY_ALIAS
=
PGkeyalias
MYAPP_RELEASE_STORE_PASSWORD
=
protectgod
MYAPP_RELEASE_KEY_PASSWORD
=
protectgod
android.useDeprecatedNdk
=
true
...
...
src/assets/Mine/headportrait.png
0 → 100644
View file @
b505e6b
76.4 KB
src/pages/InsuranceCircle/details.js
View file @
b505e6b
...
...
@@ -68,7 +68,7 @@ export default class Details extends Component {
<
View
style
=
{
styles
.
personContainer
}
>
<
Image
style
=
{
styles
.
personImg
}
source
=
{
require
(
"../../assets/Mine/
iconpic1
.png"
)}
source
=
{
require
(
"../../assets/Mine/
headportrait
.png"
)}
/
>
<
View
style
=
{
styles
.
personRightContainer
}
>
<
View
style
=
{
styles
.
personRTContainer
}
>
...
...
@@ -97,7 +97,7 @@ export default class Details extends Component {
<
View
style
=
{
styles
.
itemContainer
}
key
=
{
index
}
>
<
Image
style
=
{
styles
.
itemIcon
}
source
=
{
require
(
"../../assets/Mine/
iconpic1
.png"
)}
source
=
{
require
(
"../../assets/Mine/
headportrait
.png"
)}
/
>
<
View
style
=
{
styles
.
itemRightContainer
}
>
<
View
style
=
{
styles
.
itemRightTop
}
>
...
...
@@ -216,6 +216,7 @@ export default class Details extends Component {
that
.
setState
({
content
:
""
});
Keyboard
.
dismiss
()
}
})
.
catch
(
err
=>
console
.
error
(
err
));
...
...
src/pages/InsuranceCircle/index.js
View file @
b505e6b
...
...
@@ -78,7 +78,7 @@ export default class InsuranceCircle extends Component {
<
View
style
=
{
styles
.
itemInfoWrapper
}
>
<
View
style
=
{
styles
.
itemInfoLeft
}
>
<
Image
source
=
{
require
(
"../../assets/Mine/
iconpic1
.png"
)}
source
=
{
require
(
"../../assets/Mine/
headportrait
.png"
)}
style
=
{[
styles
.
itemInfoIcon
,
{
width
:
26
,
height
:
26
}]}
/
>
<
Text
style
=
{
styles
.
itemInfoName
}
>
{
item
.
name
}
<
/Text
>
...
...
src/pages/Login.js
View file @
b505e6b
...
...
@@ -10,7 +10,8 @@ import {
TextInput
,
KeyboardAvoidingView
,
AsyncStorage
,
Dimensions
Dimensions
,
Alert
,
}
from
"react-native"
;
export
default
class
Login
extends
Component
{
...
...
@@ -55,6 +56,7 @@ export default class Login extends Component {
<
KeyboardAvoidingView
behavior
=
"padding"
style
=
{
styles
.
KAVContainer
}
keyboardVerticalOffset
=
{
200
}
>
<
View
>
<
Text
style
=
{
styles
.
appName
}
>
保护神
<
/Text
>
...
...
@@ -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
();
...
...
@@ -223,7 +225,7 @@ export default class Login extends Component {
})
.
then
(
respJson
=>
{
if
(
respJson
.
enmsg
!=
"ok"
)
{
alert
(
respJson
.
cnmsg
);
Alert
.
alert
(
respJson
.
cnmsg
);
}
else
{
console
.
log
(
"登录后拿到的ID和nickname"
,
respJson
.
data
);
let
id
=
JSON
.
stringify
(
respJson
.
data
.
id
),
...
...
@@ -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
);
...
...
@@ -297,14 +299,14 @@ export default class Login extends Component {
})
.
then
(
respJson
=>
{
if
(
respJson
.
enmsg
!=
"ok"
)
{
alert
(
respJson
.
cnmsg
);
Alert
.
alert
(
respJson
.
cnmsg
);
}
else
{
console
.
log
(
"注册按钮返回的数据"
,
respJson
.
data
);
that
.
setState
({
isRegister
:
!
that
.
state
.
isRegister
,
id
:
respJson
.
data
.
id
});
alert
(
"注册成功!"
);
Alert
.
alert
(
"注册成功!"
);
}
})
.
catch
(
err
=>
console
.
error
(
err
));
...
...
@@ -325,6 +327,7 @@ const styles = StyleSheet.create({
KAVContainer
:
{
flex
:
1
,
justifyContent
:
"center"
,
// backgroundColor:'red'
},
appName
:
{
fontSize
:
26
,
...
...
src/pages/Mine/index.js
View file @
b505e6b
...
...
@@ -148,7 +148,7 @@ export default class Mine extends Component {
<
View
style
=
{
styles
.
header
}
>
{
this
.
state
.
IS_LOGIN
==
"yes"
?
(
<
Image
source
=
{
require
(
"../../assets/Mine/
iconpic1
.png"
)}
source
=
{
require
(
"../../assets/Mine/
headportrait
.png"
)}
style
=
{
styles
.
mineIcon
}
/
>
)
:
(
...
...
Please
register
or
login
to post a comment