Commit 2692704e by 修福龙

订单详情页面

parent 4e11f08f
...@@ -40,6 +40,9 @@ export default { ...@@ -40,6 +40,9 @@ export default {
if (data.data && data.data.contact) { if (data.data && data.data.contact) {
yield call(AsyncStorage.setItem, 'CONTACT', data.data.contact); yield call(AsyncStorage.setItem, 'CONTACT', data.data.contact);
} }
if (data.data && data.data.name) {
yield call(AsyncStorage.setItem, 'NAME', data.data.name);
}
if (action.key) { if (action.key) {
yield call(AsyncStorage.setItem, 'KEY', action.key); yield call(AsyncStorage.setItem, 'KEY', action.key);
} }
......
...@@ -6,6 +6,7 @@ import {connect} from 'react-redux'; ...@@ -6,6 +6,7 @@ import {connect} from 'react-redux';
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';
import OrderDetailsModal from '../components/OrderDetailsModal';
import NP from '../utils/np'; import NP from '../utils/np';
import delay from '../utils/delay'; import delay from '../utils/delay';
import config from '../utils/config'; import config from '../utils/config';
...@@ -41,6 +42,8 @@ class FacePage extends Component { ...@@ -41,6 +42,8 @@ class FacePage extends Component {
offsetValue: new Animated.Value(0), offsetValue: new Animated.Value(0),
phoneModal: false, // 显示输入电话号码弹窗 phoneModal: false, // 显示输入电话号码弹窗
verifyCodeModal: false, // 显示输入验证码弹窗 verifyCodeModal: false, // 显示输入验证码弹窗
orderDetailsModal: false, // 显示订单详情弹窗
goodsArr: [],
}; };
async componentWillMount() { async componentWillMount() {
...@@ -118,6 +121,12 @@ class FacePage extends Component { ...@@ -118,6 +121,12 @@ class FacePage extends Component {
}); });
}; };
handleOrderClose = () => {
this.setState({
orderDetailsModal: false,
});
};
listen = async () => { listen = async () => {
while (!window.socket) { while (!window.socket) {
await delay(1000); await delay(1000);
...@@ -170,6 +179,14 @@ class FacePage extends Component { ...@@ -170,6 +179,14 @@ class FacePage extends Component {
if (ret.code === 401) { if (ret.code === 401) {
// 需要验证手机号 // 需要验证手机号
this.setState({phoneModal: true}); this.setState({phoneModal: true});
} else {
let goodsArr = [];
ret.orders.map(v1 => {
v1.goods.map(v2 => {
goodsArr.push(v2);
});
});
this.setState({orderDetailsModal: true, goodsArr});
} }
} else if (ret.msg) { } else if (ret.msg) {
let tipText = ret.msg.replace(/扫码/g, '人脸识别'); let tipText = ret.msg.replace(/扫码/g, '人脸识别');
...@@ -320,6 +337,8 @@ class FacePage extends Component { ...@@ -320,6 +337,8 @@ class FacePage extends Component {
triggerValue, triggerValue,
offsetValue, offsetValue,
phoneModal, phoneModal,
orderDetailsModal,
goodsArr,
} = this.state; } = this.state;
let {store} = this.props; let {store} = this.props;
return ( return (
...@@ -340,6 +359,14 @@ class FacePage extends Component { ...@@ -340,6 +359,14 @@ class FacePage extends Component {
onRequestClose={this.handleCodeClose} onRequestClose={this.handleCodeClose}
onSubmit={this.onCodeSubmit} onSubmit={this.onCodeSubmit}
/> />
<OrderDetailsModal
visible={orderDetailsModal}
transparent
maskClosable
onClose={this.handleOrderClose}
onRequestClose={this.handleOrderClose}
goodsArr={goodsArr}
/>
<View style={{alignItems: 'center', justifyContent: 'center', flex: 1}}> <View style={{alignItems: 'center', justifyContent: 'center', flex: 1}}>
<Touch onPress={this.pressQrcode} style={{flex: 1}}> <Touch onPress={this.pressQrcode} style={{flex: 1}}>
<Image <Image
......
...@@ -5,6 +5,8 @@ export const host = isProd ...@@ -5,6 +5,8 @@ export const host = isProd
: 'http://192.168.1.88:7001'; : 'http://192.168.1.88:7001';
export const login = `https://m${app}.vs-u.com`; export const login = `https://m${app}.vs-u.com`;
export const qrHost = login; export const qrHost = login;
export const imgUrl = 'http://barcod.oss-cn-shenzhen.aliyuncs.com/images/';
export const watermark = '.jpg?x-oss-process=style/zmgo_thumb_watermark';
window.defaultCount = 0; window.defaultCount = 0;
...@@ -13,4 +15,6 @@ export default { ...@@ -13,4 +15,6 @@ export default {
login, login,
qrHost, qrHost,
isProd, isProd,
imgUrl,
watermark,
}; };
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