[已删除]
[已删除]
  • 发布:2020-08-02 20:53
  • 更新:2020-08-03 14:45
  • 阅读:886

feedback反馈信息,必须上传图片才能提交,而且后台不显示图片

分类:uni-app

问题如题:
https://ext.dcloud.net.cn/plugin?id=50#rating
用的是官方模板,

send() { //发送反馈  
                console.log(JSON.stringify(this.sendDate));  
                let imgs = this.imageList.map((value, index) => {  
                    return {  
                        name: "image" + index,  
                        uri: value  
                    }  
                })  
                console.log(imgs);  
                uni.uploadFile({  
                    url: "https://service.dcloud.net.cn/feedback",  
                    files: imgs,  
                    formData: this.sendDate,  
                    success: (res) => {  
                        if (res.statusCode === 200) {  
                            uni.showToast({  
                                title: "问题反馈成功!"  
                            });  
                            this.imageList = [];  
                            this.sendDate = {  
                                score: 0,  
                                content: "",  
                                contact: ""  
                            }  
                        }  
                    },  
                    fail: (res) => {  
                        uni.showToast({  
                            title: "失败",  
                            icon:"none"  
                        });  
                        console.log(res)  
                    }  
                });  
            }

这是执行代码,如果不添加图片,提交反馈报错
[Vue warn]: Error in v-on handler: "TypeError: undefined is not an object (evaluating 'e.indexOf')"
TypeError: undefined is not an object (evaluating 'e.indexOf')
如果添加图片,可以正常反馈,开发者中心能看到用户的反馈信息,但是没有图片

2020-08-02 20:53 负责人:无 分享
已邀请:
DCloud_UNI_HT

DCloud_UNI_HT

确实是有 bug 稍后会更新插件模板,请注意插件更新,感谢您的反馈

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