Commit ca2776f5 by zeven

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

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