开发工具中 wx.uploadFile 未遵循不校验证书设定
设置了不校验还是会报自签名证书错误
本地开发用的是https://localhost,目前好像只发现在上传文件wx.uploadFile跳不过校验,其他接口是可以跳过校验
开发者工具版本:
this.app.prefix = "https://localhost:3000"this.wxapi .chooseImage({ count: 1 }) .then(res => { let { tempFilePaths } = res; this.wxapi.showLoading({ title: "图片上传中……" }); this.wxapi.uploadFile({ url: this.app.prefix + "/upload", filePath: tempFilePaths[0], name: "file" + new Date(), }).then((res) => { this.wxapi.hideLoading(); let data = JSON.parse(res.data); this.setData({ photoUrl: this.app.prefix + data.picture, picture: data.picture }); }) }); |
