ApplyResult.js
5.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//
// ClassName.js
//
// Created by Cheney Mars on 2018/9/26.
// Copyright © 2018年 saygoodlolita. All rights reserved.
//
import React, {Component} from "react";
import {Image, Text, DeviceEventEmitter,TouchableOpacity, View} from "react-native";
import {zoomW,width,height} from "../../utils/getSize";
// import ForumHeader from "../../widget/ForumHeader";
const auditFail = require('../../img/auditfd.png');
const audit = require('../../img/audit.png');
const defaultIcon = require("../../img/defaultIcon.png");
export default class ApplyResult extends Component {
static navigationOptions = ({ navigation, screenProps }) => ({
headerTitle:
!!navigation.state.params && !!navigation.state.params.name ?navigation.state.params.name:"关联商家",
headerLeft: (
<View style={{ flexDirection: "row", flex: 1 }}>
<TouchableOpacity
style={{
flexDirection: "column",
justifyContent: "center",
paddingRight: 15,
paddingLeft: 10
}}
onPress={
navigation.state.params ? navigation.state.params.back : null
}
>
<Image
source={require("../../img/loadBack.png")}
resizeMode="contain"
/>
</TouchableOpacity>
</View>
),
headerRight: (
<View style={{ flexDirection: "row", flex: 1, justifyContent: "center" }}>
<TouchableOpacity
style={{
flexDirection: "column",
justifyContent: "center",
paddingRight: 15,
paddingLeft: 10
}}
>
<Image
style={{ width: 20 / zoomW, height: 20 / zoomW }}
resizeMode="contain"
/>
</TouchableOpacity>
</View>
)
});
constructor(props) {
super(props);
let isApproving = !!this.props.navigation.state.params &&this.props.navigation.state.params.isApproving?this.props.navigation.state.params.isApproving :false;
this.state = {
isApproving :isApproving ,//是否审核中
}
}
componentWillUnmount() {
DeviceEventEmitter.emit('refreshSpamasterInfo');
}
componentDidMount() {
//设置头部
this.props.navigation.setParams({
back: () => {
this.props.navigation.goBack();
}
});
let _this = this;
this.refreshApproving = DeviceEventEmitter.addListener(
"refreshApproving",
function(name) {
_this.props.navigation.setParams({
name: name
});
_this.setState({
isApproving :true
})
}
);
}
render() {
let _this = this;
return (
<View style={{flex: 1,backgroundColor:'white'}}>
{/*<ForumHeader title={ !!this.props.navigation.state.params && !!this.props.navigation.state.params.name ?this.props.navigation.state.params.name:"关联商家"} pop navigation={this.props.navigation}/>*/}
{!this.state.isApproving && <View style = {{flex: 1,justifyContent:'center',alignItems:'center'}}>
<Image style={{width:width/4,height:width/4}} resizeMode={'contain'} source={auditFail} />
<Text style={{marginTop:36,color:'#666666', fontSize:18,fontWeight: 'bold'}}> 信息审核未通过 </Text>
<Text style={{marginTop:9,color:'#999999',marginLeft:15,marginRight:15, fontSize:14,fontWeight: 'bold'}}> {"原因:"+_this.props.navigation.state.params.refusedReason} </Text>
<TouchableOpacity onPress={() => {
_this.props.navigation.navigate("RelateMerchants", { from:'disagreed'
});
}}>
<View style={{width:296, height:44,backgroundColor:'#333333',marginTop:44,borderRadius:4,justifyContent:'center',alignItems:'center'}}>
<Text style={{color:'white',fontWeight:'bold',fontSize:18}}> 重新申请 </Text>
</View>
</TouchableOpacity>
</View>
}
{this.state.isApproving && <View style = {{flex: 1,marginTop:height*0.2,alignItems:'center'}}>
<Image style={{width:width/4,height:width/4}} resizeMode={'contain'} source={audit} />
<Text style={{marginTop:30,color:'#666666', fontSize:18}}> 审核中! </Text>
<Text style={{marginTop:6,color:'#999999', fontSize:14}}> 预计1-3个工作日内完成审核,请耐心等待... </Text>
</View>
}
</View>
);
}
}