宿迁网站建设联系电话,现在出入邯郸最新规定,seo推广软件哪个好,国家建设部举报网站问题说明
新创建的服务空间#xff0c;新起的项目#xff0c;运行查询数据库就会报错#xff0c;Uncaught (in promise) Error: Invalid uni-id config file#xff0c;我记得在原来创建项目的时候#xff0c;是不需要进行配置的#xff0c;最近创建新项目出现了这个错误…问题说明
新创建的服务空间新起的项目运行查询数据库就会报错Uncaught (in promise) Error: Invalid uni-id config file我记得在原来创建项目的时候是不需要进行配置的最近创建新项目出现了这个错误。
解决办法
1.找到目录uniCloud - cloudfunctions - common - uni-config-center 下创建uni-id目录并创建config.json文件如下结果所示 2.在config.json中拷贝如下代码不用做任何修改 {passwordSecret: [{type: hmac-sha256,version: 1}], passwordStrength: medium, tokenSecret: 0123456789, requestAuthSecret: 9876543210, tokenExpiresIn: 7200, tokenExpiresThreshold: 3600, maxTokenLength: 10, passwordErrorLimit: 6, passwordErrorRetryTime: 3600, autoSetInviteCode: false, forceInviteCode: false, idCardCertifyLimit: 1, realNameCertifyLimit: 5, sensitiveInfoEncryptSecret: , frvNeedAlivePhoto: false, userRegisterDefaultRole: [], app: { tokenExpiresIn: 2592000,tokenExpiresThreshold: 864000,oauth: {weixin: {appid: ,appsecret: },qq: {appid: ,appsecret: },apple: { bundleId: }}},web: { tokenExpiresIn: 7200,tokenExpiresThreshold: 3600,oauth: {weixin-h5: { appid: ,appsecret: },weixin-web: { appid: ,appsecret: }}},mp-weixin: {tokenExpiresIn: 259200,tokenExpiresThreshold: 86400,oauth: {weixin: {appid: ,appsecret: }}},mp-qq: {tokenExpiresIn: 259200,tokenExpiresThreshold: 86400,oauth: {qq: {appid: ,appsecret: }}},mp-alipay: {tokenExpiresIn: 259200,tokenExpiresThreshold: 86400,oauth: {alipay: {appid: ,privateKey: , keyType: PKCS8 }}},service: {sms: {name: , codeExpiresIn: 180, scene: {bind-mobile-by-sms: { templateId: , codeExpiresIn: 240 }}},univerify: {appid: }}
} 上面这段config.json代码来自于uni-id的配置项如果你懂得如何配置自己根据下面提供的链接去拷贝即可如果不懂uni-id直接按照我的上面两个步骤就可以了。 uni-id的配置项https://doc.dcloud.net.cn/uniCloud/uni-id/summary.html#config
上面即为出现Uncaught (in promise) Error: Invalid uni-id config file报错的解决方案了。