class UserServer {
  async page(row) {
    return window.framework.http.post("/biz_user/page", row);
  }

  async add(row) {
    return window.framework.http.post("/biz_user/add", row);
  }

  async edit(row) {
    return window.framework.http.post("/biz_user/edit", row);
  }

  async del(row) {
    return window.framework.http.post("/biz_user/del", row);
  }

  async detail(id) {
    return window.framework.http.get(`/biz_user/detail?id=${encodeURIComponent(id)}`, {});
  }

  /** 下拉：全部业务用户（与 GET /biz_user/all 对应） */
  async all() {
    return window.framework.http.get('/biz_user/all', {});
  }

  async disable(row) {
    return window.framework.http.post("/biz_user/disable", row);
  }

  async enable(row) {
    return window.framework.http.post("/biz_user/enable", row);
  }

  async exportRows(row) {
    return window.framework.http.post("/biz_user/export", row);
  }

  async revokeAllTokens(row) {
    return window.framework.http.post("/biz_user/revoke_all_tokens", row);
  }
}

export default new UserServer();
