云开发中的callFunction函数使用失败
WAServiceMainContext.js?t=wechat&s=1685707252927&v=2.32.0:1 Error: cloud.callFunction:fail Error: errCode: -504002 functions execute fail | errMsg: Runtime.UserCodeSyntaxError: SyntaxError: Invalid shorthand property initializer
at Object.module.exports.load (:39412/var/runtime/node12/UserFunction.js:32)
at Runtime.handleOnce (:39412/var/runtime/node12/Runtime.engine.js:99)
at Timeout._onTimeout (:39412/var/runtime/node12/Runtime.engine.js:56)
at listOnTimeout (:39412/appservice/internal/timers.js:549)
at processTimers (:39412/appservice/internal/timers.js:492) (callId: 1685739788053-0.30546399757867393) (trace: 5:3:8 start->5:3:8 system error (Error: errCode: -504002 functions execute fail | errMsg: Runtime.UserCodeSyntaxError: SyntaxError: Invalid shorthand property initializer
at Object.module.exports.load (:39412/var/runtime/node12/UserFunction.js:32)
at Runtime.handleOnce (:39412/var/runtime/node12/Runtime.engine.js:99)
at Timeout._onTimeout (:39412/var/runtime/node12/Runtime.engine.js:56)
at listOnTimeout (:39412/appservice/internal/timers.js:549)
at processTimers (:39412/appservice/internal/timers.js:492)), abort)
at R (<anonymous>:1:163208)
at <anonymous>:1:195110(env: Windows,mp,1.06.2303220; lib: 2.32.0)
对象中属性与其对应的值之间使用“=”,
部分代码:
/**3.查询当前用户唯一值是否在数据库中 */
const {
data
} = await userInfo.where({
_openid = OPENID
}).get()
找到对象中属性与其对应的值之间使用“=”的地方,将其改成“:”
部分代码:
/**3.查询当前用户唯一值是否在数据库中 */
const {
data
} = await userInfo.where({
_openid : OPENID
}).get()