add pic upload service
parent
51407930bb
commit
d1d01f0ad1
|
|
@ -248,7 +248,8 @@ Request
|
||||||
{
|
{
|
||||||
"token": "token_test",
|
"token": "token_test",
|
||||||
"id": "id",
|
"id": "id",
|
||||||
"content" : "为什么 PD 不能充电呢?"
|
"content": "为什么 PD 不能充电呢?",
|
||||||
|
"pic": ["https://....jpg"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ export class Comment extends Component {
|
||||||
showAddBtn={this.state.files.length !== 3}
|
showAddBtn={this.state.files.length !== 3}
|
||||||
count={3}
|
count={3}
|
||||||
files={this.state.files}
|
files={this.state.files}
|
||||||
|
sizeType={['compressed']}
|
||||||
onChange={this.handlePicChange.bind(this)}
|
onChange={this.handlePicChange.bind(this)}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,13 @@ export function submitComment(that: Comment) {
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
});
|
});
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: getUrl('/report'),
|
url: getUrl('/ticket/addnote'),
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
token: wechatUser.getToken(),
|
token: wechatUser.getToken(),
|
||||||
comment: that.state.comment,
|
content: that.state.comment,
|
||||||
|
id: that.props.id,
|
||||||
|
pic: that.state.files,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue