Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
banma_credit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hik_rn
project
banma_credit
Commits
f6402e8d
Commit
f6402e8d
authored
Oct 08, 2020
by
leiyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正js showToast名称
parent
300f4e99
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
9 deletions
+12
-9
android
+1
-1
ios
+1
-1
src/pages/ChangeNickname/index.js
+4
-3
src/pages/Equipment/index.js
+1
-1
src/test/CustomerView.js
+1
-1
src/test/RoundedImage.js
+2
-2
src/utils/request.js
+2
-0
No files found.
android
@
1587df5e
Subproject commit
f03772da2d458c0a8286de448f7efd24ebfd3b75
Subproject commit
1587df5e459ddf3c7241bad88cd66613a4347939
ios
@
068d46e2
Subproject commit
c3eceda86cf291fd0cf217b0d7c27a8a75a66b15
Subproject commit
068d46e210861b0b45160b9696df3031527cd46d
src/pages/ChangeNickname/index.js
View file @
f6402e8d
...
@@ -9,7 +9,7 @@ import { TextInput, Text, TouchableHighlight, View, NativeModules, StatusBar, Pl
...
@@ -9,7 +9,7 @@ import { TextInput, Text, TouchableHighlight, View, NativeModules, StatusBar, Pl
import
{
user
as
userServices
}
from
'../../services'
;
import
{
user
as
userServices
}
from
'../../services'
;
import
styles
from
'./style'
;
import
styles
from
'./style'
;
const
{
BMCInfo
:
{
getUserInfo
},
BMCUI
,
BMCAction
:
{
exit
}
}
=
NativeModules
;
const
{
BMCInfo
:
{
getUserInfo
},
BMCUI
,
BMCAction
:
{
exit
,
setNiceName
}
}
=
NativeModules
;
const
Equipment
=
()
=>
{
const
Equipment
=
()
=>
{
const
[
nickname
,
setNickName
]
=
useState
(
''
);
const
[
nickname
,
setNickName
]
=
useState
(
''
);
...
@@ -26,10 +26,11 @@ const Equipment = () => {
...
@@ -26,10 +26,11 @@ const Equipment = () => {
const
handleSave
=
async
()
=>
{
const
handleSave
=
async
()
=>
{
if
(
/^
[
a-zA-Z|0123456789|_
\\
-|
\u
4e00-
\u
9fa5
]
+$/
.
test
(
nickname
))
{
if
(
/^
[
a-zA-Z|0123456789|_
\\
-|
\u
4e00-
\u
9fa5
]
+$/
.
test
(
nickname
))
{
const
data
=
await
userServices
.
setNickName
({
nickname
});
const
data
=
await
userServices
.
setNickName
({
nickname
});
BMCUI
.
show
(
'修改昵称成功!'
);
setNiceName
(
nickname
)
BMCUI
.
showToast
(
'修改昵称成功!'
);
exit
();
exit
();
}
else
{
}
else
{
BMCUI
.
show
(
'请输入1-20个字符作为昵称'
);
BMCUI
.
show
Toast
(
'请输入1-20个字符作为昵称'
);
}
}
};
};
...
...
src/pages/Equipment/index.js
View file @
f6402e8d
...
@@ -22,7 +22,7 @@ const Equipment = () => {
...
@@ -22,7 +22,7 @@ const Equipment = () => {
const
data
=
await
equimentServices
.
getArticleList
();
const
data
=
await
equimentServices
.
getArticleList
();
setEquimentList
(
data
[
0
].
devices
||
[]);
setEquimentList
(
data
[
0
].
devices
||
[]);
}
catch
(
e
)
{
}
catch
(
e
)
{
BMCUI
.
show
(
'e'
);
BMCUI
.
show
Toast
(
'e'
);
}
}
};
};
return
(
return
(
...
...
src/test/CustomerView.js
View file @
f6402e8d
...
@@ -22,7 +22,7 @@ async function choosePic(openCamera, selectPic, callback) {
...
@@ -22,7 +22,7 @@ async function choosePic(openCamera, selectPic, callback) {
}
=
await
ImagePicker
.
choosePic
(
openCamera
,
selectPic
);
}
=
await
ImagePicker
.
choosePic
(
openCamera
,
selectPic
);
console
.
log
(
"path:"
+
path
+
" / paths:"
+
paths
);
console
.
log
(
"path:"
+
path
+
" / paths:"
+
paths
);
BMCUI
.
show
(
"path:"
+
path
+
" / paths:"
+
paths
);
BMCUI
.
show
Toast
(
"path:"
+
path
+
" / paths:"
+
paths
);
if
(
path
)
{
if
(
path
)
{
callback
(
path
)
callback
(
path
)
}
else
if
(
paths
&&
paths
.
length
>
0
)
{
}
else
if
(
paths
&&
paths
.
length
>
0
)
{
...
...
src/test/RoundedImage.js
View file @
f6402e8d
...
@@ -28,7 +28,7 @@ async function choosePic(openCamera, selectPic, callback) {
...
@@ -28,7 +28,7 @@ async function choosePic(openCamera, selectPic, callback) {
}
=
await
ImagePicker
.
choosePic
(
openCamera
,
selectPic
);
}
=
await
ImagePicker
.
choosePic
(
openCamera
,
selectPic
);
console
.
log
(
"path:"
+
path
+
" / paths:"
+
paths
);
console
.
log
(
"path:"
+
path
+
" / paths:"
+
paths
);
BMCUI
.
show
(
"path:"
+
path
+
" / paths:"
+
paths
);
BMCUI
.
show
Toast
(
"path:"
+
path
+
" / paths:"
+
paths
);
if
(
path
)
{
if
(
path
)
{
callback
(
path
)
callback
(
path
)
}
else
if
(
paths
&&
paths
.
length
>
0
)
{
}
else
if
(
paths
&&
paths
.
length
>
0
)
{
...
@@ -61,7 +61,7 @@ export default class CustomRoundImageView extends React.Component {
...
@@ -61,7 +61,7 @@ export default class CustomRoundImageView extends React.Component {
_onChange
(
event
)
{
_onChange
(
event
)
{
console
.
log
(
"onChange props:"
+
this
.
props
+
" / event:"
+
event
);
console
.
log
(
"onChange props:"
+
this
.
props
+
" / event:"
+
event
);
if
(
event
.
nativeEvent
.
message
)
{
if
(
event
.
nativeEvent
.
message
)
{
BMCUI
.
show
(
"get event:"
+
event
.
nativeEvent
.
message
);
BMCUI
.
show
Toast
(
"get event:"
+
event
.
nativeEvent
.
message
);
}
}
imageClick
((
path
)
=>
{
imageClick
((
path
)
=>
{
this
.
setState
({
this
.
setState
({
...
...
src/utils/request.js
View file @
f6402e8d
const
{
BMCUI
}
=
NativeModules
;
import
{
NativeModules
}
from
'react-native'
;
import
{
NativeModules
}
from
'react-native'
;
import
appConfig
from
'../config'
import
appConfig
from
'../config'
...
@@ -28,6 +29,7 @@ const errorProcess = (resp, reject, errorToast) => {
...
@@ -28,6 +29,7 @@ const errorProcess = (resp, reject, errorToast) => {
message
=
ERROR_CODE_MAP
[
status
].
message
message
=
ERROR_CODE_MAP
[
status
].
message
}
}
if
(
errorToast
)
{
if
(
errorToast
)
{
BMCUI
.
showToast
(
'errorToast'
);
}
}
reject
({
message
,
data
:
resData
})
reject
({
message
,
data
:
resData
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment