Commit ca2776f5 by zeven

优化重力感应识别加载画面

parent 918bc353
{ {
"name": "zm-face-counter", "name": "zm-face-counter",
"version": "1.0.10", "version": "1.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"android": "react-native run-android", "android": "react-native run-android",
......
src/assets/Face/loading.gif

489 KB | W: | H:

src/assets/Face/loading.gif

262 KB | W: | H:

src/assets/Face/loading.gif
src/assets/Face/loading.gif
src/assets/Face/loading.gif
src/assets/Face/loading.gif
  • 2-up
  • Swipe
  • Onion skin
...@@ -24,7 +24,7 @@ class LoadingModal extends Component { ...@@ -24,7 +24,7 @@ class LoadingModal extends Component {
<View style={styles.modal}> <View style={styles.modal}>
<View style={styles.top}> <View style={styles.top}>
<Image <Image
key={'blurryImage'} tintColor="white"
source={require('../assets/Face/loading.gif')} source={require('../assets/Face/loading.gif')}
style={styles.image} style={styles.image}
/> />
...@@ -42,20 +42,17 @@ class LoadingModal extends Component { ...@@ -42,20 +42,17 @@ class LoadingModal extends Component {
const styles = { const styles = {
modalBackgroundStyle: { modalBackgroundStyle: {
flex: 1, flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)', backgroundColor: 'rgba(0, 0, 0, 0.8)',
// opacity: 0.8, // opacity: 0.8,
}, },
modal: { modal: {
flex: 1,
height: '100%', height: '100%',
width: '100%', width: '100%',
// marginLeft: '10%',
// marginTop: '40%',
// borderRadius: 20,
// backgroundColor: '#fff',
flexDirection: 'column', flexDirection: 'column',
justifyContent: 'center',
}, },
top: { top: {
flex: 0.8,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
...@@ -67,14 +64,14 @@ const styles = { ...@@ -67,14 +64,14 @@ const styles = {
// height: scaleSize(400), // height: scaleSize(400),
}, },
bottom: { bottom: {
flex: 0.2, marginTop: 30,
flexDirection: 'row', flexDirection: 'row',
// alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
}, },
tips: { tips: {
fontSize: setSpText(70), fontSize: setSpText(75),
color: 'red', color: 'white',
}, },
}; };
......
...@@ -91,10 +91,12 @@ class FacePage extends Component { ...@@ -91,10 +91,12 @@ class FacePage extends Component {
this.setState({ this.setState({
verifyCodeModal: false, verifyCodeModal: false,
}); });
this.loading(true);
const ret = await this.props.dispatch({ const ret = await this.props.dispatch({
type: 'store/wxdoor', type: 'store/wxdoor',
userId: res.data, userId: res.data,
}); });
this.loading(false);
this.handleDoorLogin(ret); this.handleDoorLogin(ret);
} else { } else {
Speech.speak(res.msg); Speech.speak(res.msg);
...@@ -138,9 +140,7 @@ class FacePage extends Component { ...@@ -138,9 +140,7 @@ class FacePage extends Component {
}; };
doorOpen = () => { doorOpen = () => {
this.setState({ this.loading(false);
loadingModal: false,
});
this.wakeUp(); this.wakeUp();
}; };
...@@ -298,15 +298,14 @@ class FacePage extends Component { ...@@ -298,15 +298,14 @@ class FacePage extends Component {
if (res.sub_openid) { if (res.sub_openid) {
res.openid = res.sub_openid; res.openid = res.sub_openid;
} }
this.loading(true);
const ret = await this.props.dispatch({ const ret = await this.props.dispatch({
type: 'store/wxdoor', type: 'store/wxdoor',
openid: res.openid, openid: res.openid,
wxtoken: res.token, wxtoken: res.token,
nickname: res.nickname, nickname: res.nickname,
}); });
this.setState({ this.loading(false);
loadingModal: true,
});
this.handleDoorLogin(ret); this.handleDoorLogin(ret);
} }
}; };
...@@ -342,17 +341,22 @@ class FacePage extends Component { ...@@ -342,17 +341,22 @@ class FacePage extends Component {
Toast.show(res.msg); Toast.show(res.msg);
return; return;
} }
this.loading(true);
const ret = await this.props.dispatch({ const ret = await this.props.dispatch({
type: 'store/wxdoor', type: 'store/wxdoor',
alipayUid: res.uid, alipayUid: res.uid,
}); });
this.setState({ this.loading(false);
loadingModal: true,
});
this.handleDoorLogin(ret); this.handleDoorLogin(ret);
} }
}; };
loading = flag => {
this.setState({
loadingModal: flag,
});
};
// 语音通话请求 // 语音通话请求
onCall = async () => { onCall = async () => {
const {talkCall} = this.state; const {talkCall} = this.state;
......
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