Skip to content

只能用1个条件检索,2个就报错invalid json #116

@perfecten

Description

@perfecten

环境:reactNative+bmob
现象:本来在ios16.4sdk都是好的,
换了ios17sdk之后,用find()去检索数据,只能用1个条件检索,2个条件就报错invalid json

错误信息如下:"code": 107,
"error": "invalid json: %7B%22$and%22:[%7B%22userId%22:%22f60f1398f7%22%7D,%7B%22userName%22:%22DebugIOS%22%7D]%7D."

代码示例
const entryQ = Bmob.Query("entry");
entryQ.equalTo("userId", "==", userId);
entryQ.equalTo("userName", "==", userName);
let existUser = await entryQ.find();

为了排除bmob版本的问题,试了所有bmob的js版本
即便换了最新的js库,初期化错误,console有提示:‘Bmob初始化失败,2.0版本SDK请使用API安全码初始化’。即便有这个初始化错误,但是和最初一样,一个条件的find()是可以正确执行的,2个条件一样错‘107 invalid json’
(我确认API安全码是正确的,因为输入错的安全码会报不同的错)

望大神指导,谢谢谢谢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions