|
@@ -20,7 +20,7 @@ export default class Profile extends Component {
|
20
|
20
|
documentTitle: '',
|
21
|
21
|
verfyList: [], // 审核列表
|
22
|
22
|
descVisible: false,
|
23
|
|
- showWhich: true,
|
|
23
|
+
|
24
|
24
|
|
25
|
25
|
}
|
26
|
26
|
|
|
@@ -33,18 +33,20 @@ export default class Profile extends Component {
|
33
|
33
|
getVerifyList().then(res => {
|
34
|
34
|
this.setState({
|
35
|
35
|
verfyList: res || []
|
36
|
|
- }, () => {
|
37
|
|
- if (this.state.verfyList.length == 0) {
|
38
|
|
- this.setState({
|
39
|
|
- showWhich: true
|
40
|
|
- })
|
41
|
|
- } else {
|
42
|
|
- this.setState({
|
43
|
|
- showWhich: false
|
44
|
|
- })
|
45
|
|
- }
|
|
36
|
+ },
|
|
37
|
+ // () => {
|
|
38
|
+ // if (this.state.verfyList.length == 0) {
|
|
39
|
+ // this.setState({
|
|
40
|
+ // showWhich: true
|
|
41
|
+ // })
|
|
42
|
+ // } else {
|
|
43
|
+ // this.setState({
|
|
44
|
+ // showWhich: false
|
|
45
|
+ // })
|
|
46
|
+ // }
|
46
|
47
|
|
47
|
|
- })
|
|
48
|
+ // }
|
|
49
|
+ )
|
48
|
50
|
Taro.hideLoading()
|
49
|
51
|
}).catch((err) => {
|
50
|
52
|
Taro.hideLoading()
|
|
@@ -59,12 +61,16 @@ export default class Profile extends Component {
|
59
|
61
|
bindAlbumClick(e) {
|
60
|
62
|
this.setState({
|
61
|
63
|
descVisible: true,
|
62
|
|
- showWhich: false
|
|
64
|
+ // showWhich: false
|
63
|
65
|
})
|
64
|
66
|
e.stopPropagation()
|
65
|
|
- Taro.showLoading({
|
66
|
|
- title: '上传中',
|
|
67
|
+ this.setState({
|
|
68
|
+ descVisible: true,
|
|
69
|
+ // showWhich: false
|
67
|
70
|
})
|
|
71
|
+ // Taro.showLoading({
|
|
72
|
+ // title: '上传中',
|
|
73
|
+ // })
|
68
|
74
|
Taro.chooseImage({
|
69
|
75
|
sizeType: ['original', 'compressed'], //可选择原图或压缩后的图片
|
70
|
76
|
sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
|
|
@@ -82,9 +88,9 @@ export default class Profile extends Component {
|
82
|
88
|
})
|
83
|
89
|
})
|
84
|
90
|
},
|
85
|
|
- complete: res => {
|
86
|
|
- Taro.hideLoading()
|
87
|
|
- }
|
|
91
|
+ // complete: res => {
|
|
92
|
+ // Taro.hideLoading()
|
|
93
|
+ // }
|
88
|
94
|
})
|
89
|
95
|
}
|
90
|
96
|
// 删除图片
|
|
@@ -192,13 +198,13 @@ export default class Profile extends Component {
|
192
|
198
|
|
193
|
199
|
|
194
|
200
|
render() {
|
195
|
|
- const { imgList, documentTitle, verfyList, descVisible, showWhich } = this.state
|
|
201
|
+ const { imgList, documentTitle, verfyList, descVisible } = this.state
|
196
|
202
|
|
197
|
203
|
return (
|
198
|
204
|
<View className="profile-page" style={`background: url(${profileBg}) no-repeat top;background-size: 100% 100%;`}>
|
199
|
205
|
<ScrollView scrollY scrollWithAnimation style="height: 100vh">
|
200
|
206
|
|
201
|
|
- {(!verfyList.length && showWhich) &&
|
|
207
|
+ {(!verfyList.length && !descVisible) &&
|
202
|
208
|
<View className="up-images">
|
203
|
209
|
{this.renderUpImages()}
|
204
|
210
|
|
|
@@ -210,7 +216,7 @@ export default class Profile extends Component {
|
210
|
216
|
</View>
|
211
|
217
|
</View>
|
212
|
218
|
}
|
213
|
|
- {(verfyList.length || !showWhich) &&
|
|
219
|
+ {(verfyList.length||descVisible) &&
|
214
|
220
|
<View>
|
215
|
221
|
|
216
|
222
|
{descVisible &&
|