cody_liu
cody_liu
  • 发布:2021-12-04 20:04
  • 更新:2021-12-07 11:52
  • 阅读:1452

通过clientDB,查询数据报错Identifier directly after number (1:11)

分类:uniCloud
代码:```javascript <unicloud-db v-slot:default="{data, loading, error, options}" @error="handleError" collection="user-picture" field="picture" where="user_id==${userId}"> <view v-if="error">{{error.message}}</view>
<view v-else-if="loading">正在加载...</view>
<view v-else class="add-img-box">
<view class="add-img-item" v-for="(item, index) in data" :key="index">
<image class="add-img" :src="item.picture" mode="aspectFill"></image>
<image class="add-img-del" @click="delcloudImg(item.picture)" src="../../static/delete.png">
</image>
</view>
</view>
</unicloud-db> ```
这是报的错:"{"functionTarget":"DCloud-clientDB","functionArgs":{"command":{"$db":[{"$method":"collection","$param":["user-picture"]},{"$method":"where","$param":["user_id==61a8441139bf1000017efb0a"]},{"$method":"field","$param":["picture"]},{"$method":"skip","$param":[0]},{"$method":"limit","$param":[20]},{"$method":"get","$param":[{}]}]},"clientInfo":{"PLATFORM":"mp-weixin","OS":"devtools","APPID":"UNIF150529","LOCALE":"zh-Hans","DEVICEID":"16386150229439362729","CLIENT_SDK_VERSION":"1.0.14"
2021-12-04 20:04 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

where里面少了引号,在另外一个帖子回复了你,user_id=="${userId}"

该问题目前已经被锁定, 无法添加新回复