22:48:34.310 [本地调试]"检测到当前使用queryField匹配多字段进行登录操作,需要注意:uni-id并未限制用户名不能是手机号或邮箱,需要开发者自行限制。否则可能出现用户输入abc@xx.com会同时匹配到邮箱为此值的用户和用户名为此值的用户,导致登录失败" uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js:1:83410
22:48:34.326 [本地调试]TypeError: Cannot read property 'trim' of undefined
3***@qq.com
- 发布:2022-03-02 22:55
- 更新:2022-07-21 17:36
- 阅读:618
产品分类: uniCloud/App
示例代码:
操作步骤:
const res = await uniID.login({
mobile,
password,
queryField: ['username', 'email', 'mobile']
})
const res = await uniID.login({
mobile,
password,
queryField: ['username', 'email', 'mobile']
})
预期结果:
正常返回
正常返回
实际结果:
正常返回
正常返回
bug描述:
调用uniID.login 返回TypeError: Cannot read property 'trim' of undefined
2 个回复
2***@qq.com
请问解决了吗?我也遇到了这样的问题
DCloud_uniCloud_WYQ
旧版uni-id的login接口不是传mobile的,无论用户名还是手机号还是邮箱,都是在username这个参数里面传递的