秦始皇二一四
秦始皇二一四
  • 发布:2022-09-24 21:33
  • 更新:2022-09-29 13:39
  • 阅读:318

#插件讨论# 【 问题反馈页面模板 - DCloud前端团队 】小程序中无法提交反馈

分类:uni-app
关联插件: 问题反馈页面模板

目前因为需要匿名提交,检查了opendb-feedback.shema.json中代码,调整如下

{  
    "bsonType": "object",  
    "required": ["content"],  
    "permission": {  
        "create": true,  
        "read": true,  
        "delete": false,  
        "update": false  
    },  
    "properties": {  
        "_id": {  
            "description": "ID,系统自动生成"  
        },  
        "user_id": {  
            "description": "留言反馈用户ID\/回复留言用户ID,参考uni-id-users表"  
        },  
        "create_date": {  
            "bsonType": "timestamp",  
            "title": "留言时间\/回复留言时间",  
            "forceDefaultValue": {  
                "$env": "now"  
            }  
        },  
        "content": {  
            "bsonType": "string",  
            "title": "留言内容",  
            "componentForEdit": {  
                "name": "textarea"  
            },  
            "trim": "right"  
        },  
        "imgs": {  
            "bsonType": "array",  
            "arrayType": "file",  
            "maxLength": 6,  
            "fileMediaType": "image",  
            "title": "图片列表"  
        },  
        "is_reply": {  
            "bsonType": "bool",  
            "title": "是否是回复类型"  
        },  
        "feedback_id": {  
            "bsonType": "string",  
            "title": "被回复留言ID"  
        },  
        "contact": {  
            "bsonType": "string",  
            "title": "联系人",  
            "trim": "both"  
        },  
        "mobile": {  
            "bsonType": "string",  
            "title": "联系电话",  
            "pattern": "^\\+?[0-9-]{3,20}$",  
            "trim": "both"  
        },  
        "reply_count": {  
            "permission": {  
                "write": false  
            },  
            "bsonType": "int",  
            "title": "被回复条数",  
            "defaultValue": 0  
        }  
    }  
}

并上传,在h5和安卓app里测试,均没有问题,正常提交;但是在微信小程序真机体验版测试、模拟器中都出现了无法提交,返回的错误是:提交的【‘content’】在数据库中并不存在,不知如何解决。小程序后台的请求白名单已经按照文档添加了域名api.bspapp.com

2022-09-24 21:33 负责人:DCloud_uniAD_HDX 分享
已邀请:
DCloud_uniAD_HDX

DCloud_uniAD_HDX

提供下微信开发者工具版本号

秦始皇二一四

秦始皇二一四 (作者)

这个问题,参考了https://ask.dcloud.net.cn/question/151424,只需要uni-form添加

:rules="rules"

即可

要回复问题请先登录注册