Commit 8051c6a8 by 修福龙

刷脸开门系统语音通话

parent 8da6d24e
...@@ -279,43 +279,36 @@ class OrderDetailsModal extends Component { ...@@ -279,43 +279,36 @@ class OrderDetailsModal extends Component {
</View> </View>
</View> </View>
)} )}
{talkCall === 1 ? (
<View style={styles.onCall}> <View style={styles.onCall}>
<Image <Image
source={require('../assets/call.gif')} source={require('../assets/call.gif')}
style={styles.callGif} style={styles.callGif}
/> />
<Text style={styles.onCallText}>正在语音通话中</Text>
</View>
) : talkCall === 0 ? (
<View style={styles.onCall}>
<Image
source={require('../assets/call.gif')}
style={styles.callGif}
/>
<Text style={styles.onCallText}>正在接通中请稍候...</Text>
</View>
) : (
<Touch
onPress={() => onCall()}
style={styles.footer}
feedback={false}>
<View style={styles.call}>
<Image
source={require('../assets/call.gif')}
style={styles.callGif}
/>
<Text style={styles.callText}>呼叫客服</Text> <Text style={styles.callText}>呼叫客服</Text>
</View> </View>
{/*{talkCall === 1 ? (*/} </Touch>
{/* <View style={styles.onCall}>*/} )}
{/* <Image*/}
{/* source={require('../assets/call.gif')}*/}
{/* style={styles.callGif}*/}
{/* />*/}
{/* <Text style={styles.onCallText}>正在语音通话中</Text>*/}
{/* </View>*/}
{/*) : talkCall === 0 ? (*/}
{/* <View style={styles.onCall}>*/}
{/* <Image*/}
{/* source={require('../assets/call.gif')}*/}
{/* style={styles.callGif}*/}
{/* />*/}
{/* <Text style={styles.onCallText}>正在接通中请稍候...</Text>*/}
{/* </View>*/}
{/*) : (*/}
{/* <Touch*/}
{/* onPress={() => onCall()}*/}
{/* style={styles.footer}*/}
{/* feedback={false}>*/}
{/* <View style={styles.call}>*/}
{/* <Image*/}
{/* source={require('../assets/call.gif')}*/}
{/* style={styles.callGif}*/}
{/* />*/}
{/* <Text style={styles.callText}>呼叫客服</Text>*/}
{/* </View>*/}
{/* </Touch>*/}
{/*)}*/}
</View> </View>
</Modal> </Modal>
); );
......
import * as api from '../services/agora';
export default {
namespace: 'agora',
state: {},
reducers: {},
effects: {
*agora(action, {call}) {
const {data} = yield call(api.agora);
return data;
},
*talkCall(action, {call}) {
const {data} = yield call(api.talkCall);
return data;
},
*talkLeave(action, {call}) {
const {data} = yield call(api.talkLeave);
return data;
},
},
};
...@@ -8,6 +8,7 @@ import order from './order'; ...@@ -8,6 +8,7 @@ import order from './order';
import hkvs from './hkvs'; import hkvs from './hkvs';
import user from './user'; import user from './user';
import store from './store'; import store from './store';
import agora from './agora';
const {width: _width, height: _height} = Dimensions.get('window'); const {width: _width, height: _height} = Dimensions.get('window');
...@@ -63,4 +64,15 @@ const app = { ...@@ -63,4 +64,15 @@ const app = {
}, },
}; };
export default [app, admin, goods, alipay, wxpay, order, hkvs, user, store]; export default [
app,
admin,
goods,
alipay,
wxpay,
order,
hkvs,
user,
store,
agora,
];
...@@ -140,14 +140,6 @@ export default { ...@@ -140,14 +140,6 @@ export default {
const {data} = yield call(api.verifysms, action); const {data} = yield call(api.verifysms, action);
return data; return data;
}, },
*agora(action, {call}) {
const {data} = yield call(api.agora);
return data;
},
*talkCall(action, {call}) {
const {data} = yield call(api.talkCall);
return data;
},
}, },
}; };
......
import axios from 'axios';
export function agora() {
return axios.post('/store/agora/token');
}
export function talkCall() {
return axios.post('/store/agora/call');
}
export function talkLeave() {
return axios.post('/store/agora/leave');
}
...@@ -53,11 +53,3 @@ export function sendsms({phone}) { ...@@ -53,11 +53,3 @@ export function sendsms({phone}) {
export function verifysms({phone, code, userId}) { export function verifysms({phone, code, userId}) {
return axios.post('/store/verifysms', qs.stringify({phone, code, userId})); return axios.post('/store/verifysms', qs.stringify({phone, code, userId}));
} }
export function agora() {
return axios.post('/store/agora/token');
}
export function talkCall() {
return axios.post('/store/agora/call');
}
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