Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bh_face_counter
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄天晨
bh_face_counter
Commits
8b721d64
Commit
8b721d64
authored
Jul 02, 2020
by
修福龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复手机号弹窗闪退的问题
parent
1d1a6693
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
30 deletions
+29
-30
FacePage.js
src/pages/FacePage.js
+29
-30
No files found.
src/pages/FacePage.js
View file @
8b721d64
...
@@ -3,8 +3,8 @@ import {View, Text, Image, Dimensions} from 'react-native';
...
@@ -3,8 +3,8 @@ import {View, Text, Image, Dimensions} from 'react-native';
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
// import {RtcEngineEvents} from 'react-native-agora/lib/RtcEvents';
// import {RtcEngineEvents} from 'react-native-agora/lib/RtcEvents';
//
import RtcEngine from 'react-native-agora';
import
RtcEngine
from
'react-native-agora'
;
//
import {RtcChannel} from 'react-native-agora';
import
{
RtcChannel
}
from
'react-native-agora'
;
import
Touch
from
'../components/Touch'
;
import
Touch
from
'../components/Touch'
;
import
PhoneModal
from
'../components/PhoneModal'
;
import
PhoneModal
from
'../components/PhoneModal'
;
import
VerifyCodeModal
from
'../components/VerifyCodeModal'
;
import
VerifyCodeModal
from
'../components/VerifyCodeModal'
;
...
@@ -294,10 +294,10 @@ class FacePage extends Component {
...
@@ -294,10 +294,10 @@ class FacePage extends Component {
this
.
wechatFace
();
this
.
wechatFace
();
}
else
if
(
count
===
0
)
{
}
else
if
(
count
===
0
)
{
// 重力感应归零
// 重力感应归零
//
clearInterval(this.noTalkCall);
clearInterval
(
this
.
noTalkCall
);
//
if (!this.engine) {
if
(
!
this
.
engine
)
{
//
this.engine.leaveChannel();
this
.
engine
.
leaveChannel
();
//
}
}
this
.
setState
({
this
.
setState
({
orderDetailsModal
:
false
,
orderDetailsModal
:
false
,
phoneModal
:
false
,
phoneModal
:
false
,
...
@@ -317,7 +317,6 @@ class FacePage extends Component {
...
@@ -317,7 +317,6 @@ class FacePage extends Component {
if
(
ret
.
code
===
401
)
{
if
(
ret
.
code
===
401
)
{
// 需要验证手机号
// 需要验证手机号
this
.
setState
({
phoneModal
:
true
});
this
.
setState
({
phoneModal
:
true
});
this
.
handleScaleChange
({
count
:
0
});
}
else
if
(
ret
.
orders
)
{
}
else
if
(
ret
.
orders
)
{
let
goodsArr
=
[];
let
goodsArr
=
[];
ret
.
orders
.
map
(
v1
=>
{
ret
.
orders
.
map
(
v1
=>
{
...
@@ -394,31 +393,31 @@ class FacePage extends Component {
...
@@ -394,31 +393,31 @@ class FacePage extends Component {
};
};
// 语音通话请求
// 语音通话请求
// onCall = async () => {
onCall
=
async
()
=>
{
// // const {data} = await this.props.dispatch({
// const {data} = await this.props.dispatch({
// // type: 'store/agora',
// type: 'store/agora',
// // });
// // const engine = await RtcEngine.create(data.appid);
// // await engine.joinChannel(data.token, data.channel, null, 0);
// // this.noTalkCall = setInterval(async () => {
// // await this.props.dispatch({
// // type: 'store/talkCall',
// // });
// // }, 10000);
// Speech.speak('正在接通中请稍候');
// this.talkCall();
// clearInterval(this.noTalkCall);
// this.noTalkCall = setInterval(() => this.talkCall(), 10000);
// this.setState({
// talkCall: 0,
// });
// });
// }
;
// const engine = await RtcEngine.create(data.appid)
;
// await engine.joinChannel(data.token, data.channel, null, 0);
// talkCall =
() => {
// this.noTalkCall = setInterval(async
() => {
//
this.props.dispatch({
// await
this.props.dispatch({
// type: 'store/talkCall',
// type: 'store/talkCall',
// });
// });
// };
// }, 10000);
Speech
.
speak
(
'正在接通中请稍候'
);
this
.
talkCall
();
clearInterval
(
this
.
noTalkCall
);
this
.
noTalkCall
=
setInterval
(()
=>
this
.
talkCall
(),
10000
);
this
.
setState
({
talkCall
:
0
,
});
};
talkCall
=
()
=>
{
this
.
props
.
dispatch
({
type
:
'store/talkCall'
,
});
};
dropUp
=
()
=>
{
dropUp
=
()
=>
{
let
{
current
}
=
this
.
state
;
let
{
current
}
=
this
.
state
;
...
@@ -475,7 +474,7 @@ class FacePage extends Component {
...
@@ -475,7 +474,7 @@ class FacePage extends Component {
maskClosable
maskClosable
onClose
=
{
this
.
handleOrderClose
}
onClose
=
{
this
.
handleOrderClose
}
onRequestClose
=
{
this
.
handleOrderClose
}
onRequestClose
=
{
this
.
handleOrderClose
}
//
onCall={this.onCall}
onCall
=
{
this
.
onCall
}
dropUp
=
{
this
.
dropUp
}
dropUp
=
{
this
.
dropUp
}
dropDown
=
{
this
.
dropDown
}
dropDown
=
{
this
.
dropDown
}
goodsArr
=
{
goodsArr
}
goodsArr
=
{
goodsArr
}
...
...
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