|
@@ -41,7 +41,6 @@ export default class Profile extends Component {
|
41
|
41
|
if (id) {
|
42
|
42
|
|
43
|
43
|
getProfileDetail(id).then(res => {
|
44
|
|
- console.log(res, "res")
|
45
|
44
|
this.setState({
|
46
|
45
|
detail: res,
|
47
|
46
|
imgList: res.imgList,
|
|
@@ -56,7 +55,6 @@ export default class Profile extends Component {
|
56
|
55
|
bindAlbumClick(e) {
|
57
|
56
|
e.stopPropagation()
|
58
|
57
|
Taro.chooseImage({
|
59
|
|
- count: 6,
|
60
|
58
|
sizeType: ['original', 'compressed'], //可选择原图或压缩后的图片
|
61
|
59
|
sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
|
62
|
60
|
success: res => {
|
|
@@ -88,17 +86,16 @@ export default class Profile extends Component {
|
88
|
86
|
|
89
|
87
|
// 提交资料审核
|
90
|
88
|
commitBtn() {
|
91
|
|
- console.log(this.state.auditStatus, "this.state.auditStatus")
|
92
|
89
|
if (this.state.imgList.length == 0) {
|
93
|
90
|
Taro.showToast({ icon: 'none', title: '请先上传图片' });
|
94
|
91
|
} else if (this.state.documentTitle == "") {
|
95
|
92
|
Taro.showToast({ icon: 'none', title: '资料说明不能为空' });
|
96
|
|
- }else {
|
|
93
|
+ } else {
|
97
|
94
|
|
98
|
95
|
const payload = {
|
99
|
96
|
documentTitle: this.state.documentTitle,
|
100
|
97
|
imgList: this.state.imgList,
|
101
|
|
- id:this.state.detail.documentVerifyId
|
|
98
|
+ id: this.state.detail.documentVerifyId
|
102
|
99
|
}
|
103
|
100
|
|
104
|
101
|
editDocumentVerify(payload).then(res => {
|
|
@@ -121,6 +118,19 @@ export default class Profile extends Component {
|
121
|
118
|
documentTitle: e.detail.value
|
122
|
119
|
})
|
123
|
120
|
}
|
|
121
|
+ // 查看大图
|
|
122
|
+ onPreview = (item, e) => {
|
|
123
|
+ let urls = []
|
|
124
|
+ this.state.imgList.map((ele, index) => {
|
|
125
|
+ urls.push(ele.img)
|
|
126
|
+ })
|
|
127
|
+ e.stopPropagation()
|
|
128
|
+ e.preventDefault()
|
|
129
|
+ Taro.previewImage({
|
|
130
|
+ current: item.img,
|
|
131
|
+ urls: urls
|
|
132
|
+ })
|
|
133
|
+ }
|
124
|
134
|
// 上传资料模块
|
125
|
135
|
renderUpImages() {
|
126
|
136
|
return (
|
|
@@ -142,15 +152,15 @@ export default class Profile extends Component {
|
142
|
152
|
return (
|
143
|
153
|
<View className="profile-page" style="background:#f4f4f4">
|
144
|
154
|
<ScrollView scrollY scrollWithAnimation style="height: 100vh">
|
145
|
|
-
|
|
155
|
+
|
146
|
156
|
{
|
147
|
157
|
detail.verifyStatus == 2 &&
|
148
|
158
|
<View>
|
149
|
159
|
<View className="reject-reason" >驳回原因:{detail.rejectReason || ''}</View>
|
150
|
|
-
|
|
160
|
+
|
151
|
161
|
<View className="desc-box">
|
152
|
162
|
资料说明:
|
153
|
|
- <Input className='inputDesc'value={documentTitle||''} onInput={this.onInputText.bind(this)} type='text' placeholder='请填写资料说明' />
|
|
163
|
+ <Input className='inputDesc' value={documentTitle || ''} onInput={this.onInputText.bind(this)} type='text' placeholder='请填写资料说明' />
|
154
|
164
|
</View>
|
155
|
165
|
<View style="padding:10px 20px">
|
156
|
166
|
{this.renderUpImages()}
|
|
@@ -161,7 +171,7 @@ export default class Profile extends Component {
|
161
|
171
|
return (
|
162
|
172
|
<View className="image-con" key={`img-${inx}`}>
|
163
|
173
|
<Image className="close-btn" src={closeImg} onClick={this.deleteImg.bind(this, (inx))} />
|
164
|
|
- <Image className="img" src={item.img} />
|
|
174
|
+ <Image className="img" src={item.img} onClick={this.onPreview.bind(this, (item))} />
|
165
|
175
|
</View>
|
166
|
176
|
)
|
167
|
177
|
})
|
|
@@ -187,7 +197,7 @@ export default class Profile extends Component {
|
187
|
197
|
imgList.map((item, inx) => {
|
188
|
198
|
return (
|
189
|
199
|
<View className="image-con" key={`img-${inx}`}>
|
190
|
|
- <Image className="img" src={item.img} />
|
|
200
|
+ <Image className="img" src={item.img} onClick={this.onPreview.bind(this, (item))} />
|
191
|
201
|
</View>
|
192
|
202
|
)
|
193
|
203
|
})
|