1***@qq.com
1***@qq.com
  • 发布:2019-08-23 16:47
  • 更新:2019-08-25 19:57
  • 阅读:770

#插件讨论# 传递参数的时候一直提示应该为字符串类型【 app发布新闻,添加图片,图片批量压缩,新闻列表,新 - 弹一尘 】

分类:uni-app

请问提交的时候一直提示传值应该为字符串类型应该怎么修改```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)  
          }  
      }
2019-08-23 16:47 负责人:无 分享
已邀请:
弹一尘

弹一尘 - app全栈开发

提示什么了,你看下插件,参数类型。是不是你写错了参数类型

该问题目前已经被锁定, 无法添加新回复