Vue请求接口查询条件拼接

var where = [{ disabled: 0 }]
if (parseInt(this.loginUserId) !== 2) {
  where.push(['!=', 'id', 13])
}

请求负载

where: [{disabled: 0}, ["!=", "id", 13]]
posted @ 2024-07-05 11:49  季风时节  阅读(12)  评论(0编辑  收藏  举报