请问提交的时候一直提示传值应该为字符串类型应该怎么修改```javascript
send() { //发送提交
console.log(JSON.stringify(this.sendDate));
function requst(imgs,data){
console.log(JSON.stringify(imgs));
uni.uploadFile({
url: "http://localhost:9090/pets_net/servlets/drugsservlet?para=add_discuss_pc",
files: imgs,
formData: data,
success: (res) => {
if (res.statusCode === 200) {
uni.showToast({
title: "反馈成功!"
});
this.imgList = [];
this.sendDate = {
score: 0,
content: "",
contact: "",
}
}
},
fail: (res) => {
// console.log(res)
}
});
}
if(this.isYasuo){
this.$refs.compress.yasuoImg(this.imgList).then(e=>{
// console.log([this.imgList,e])
let imgs = e.map((value, index) => {
//var base64= value.tempFilePath
return {
name: "image" + index,
uri:value.path,
base64:value.tempFilePath
}
})
// console.log(imgs)
requst(imgs,this.sendDate)
})
}else{
let imgs = this.imgList.map((value, index) => {
return {
name: "image" + index,
uri:value.path,
base64:value.tempFilePath
}
})
requst(imgs,this.sendDate)
}
}
1 个回复
弹一尘 - app全栈开发
提示什么了,你看下插件,参数类型。是不是你写错了参数类型