Commit 8b721d64 by 修福龙

修复手机号弹窗闪退的问题

parent 1d1a6693
......@@ -3,8 +3,8 @@ import {View, Text, Image, Dimensions} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
import {connect} from 'react-redux';
// import {RtcEngineEvents} from 'react-native-agora/lib/RtcEvents';
// import RtcEngine from 'react-native-agora';
// import {RtcChannel} from 'react-native-agora';
import RtcEngine from 'react-native-agora';
import {RtcChannel} from 'react-native-agora';
import Touch from '../components/Touch';
import PhoneModal from '../components/PhoneModal';
import VerifyCodeModal from '../components/VerifyCodeModal';
......@@ -294,10 +294,10 @@ class FacePage extends Component {
this.wechatFace();
} else if (count === 0) {
// 重力感应归零
// clearInterval(this.noTalkCall);
// if (!this.engine) {
// this.engine.leaveChannel();
// }
clearInterval(this.noTalkCall);
if (!this.engine) {
this.engine.leaveChannel();
}
this.setState({
orderDetailsModal: false,
phoneModal: false,
......@@ -317,7 +317,6 @@ class FacePage extends Component {
if (ret.code === 401) {
// 需要验证手机号
this.setState({phoneModal: true});
this.handleScaleChange({count: 0});
} else if (ret.orders) {
let goodsArr = [];
ret.orders.map(v1 => {
......@@ -394,31 +393,31 @@ class FacePage extends Component {
};
// 语音通话请求
// onCall = async () => {
// // const {data} = await this.props.dispatch({
// // 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,
// });
// };
onCall = async () => {
// const {data} = await this.props.dispatch({
// 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,
});
};
// talkCall = () => {
// this.props.dispatch({
// type: 'store/talkCall',
// });
// };
talkCall = () => {
this.props.dispatch({
type: 'store/talkCall',
});
};
dropUp = () => {
let {current} = this.state;
......@@ -475,7 +474,7 @@ class FacePage extends Component {
maskClosable
onClose={this.handleOrderClose}
onRequestClose={this.handleOrderClose}
// onCall={this.onCall}
onCall={this.onCall}
dropUp={this.dropUp}
dropDown={this.dropDown}
goodsArr={goodsArr}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment