"use strict";
const common_js_net_http = require("./http.js");
const apiPath = {
  //获取验证码 operator
  verifyCode: "/api/verify/code/send/{phone}",
  loginVerifyCode: "/api/quick/login/phone",
  //验证吗登录
  loginUrl: "/api/user-wx/login",
  //登录
  registerUrl: "/api/user-wx/register",
  //注册,
  unbindWx: "/api/user-wx/unlock-phone",
  //解绑微信
  updateUserInfo: "/api/user-info/update-self",
  csaNo: "/api/csa/get",
  //获取客服编号
  createContact: "/api/proj-contact/save",
  //创建联系人
  mineAccount: "/api/user-info/get-user-self",
  //获取我的账户余额
  minePackageCount: "/api/proj/servicepkg/packageorder/count/self",
  //我的套餐包剩余
  uploadImg: "/api/file/v2/upload-image",
  //上传图片
  userInfo: "/api/user-info/get-self",
  //获取我的个人信息
  mineOrder: "/api/order/listpage/self",
  //我的订单
  mineContact: "/api/proj-contact/listpage/self",
  //联系人列表
  updateContact: "/api/proj-contact/update/{projContactId}",
  //更新联系人
  delContact: "/api/proj-contact/remove/{ids}",
  //删除联系人
  canClaimsCoupons: "/api/coupon/list-can-claim",
  //获取可以申领的优惠卷
  saveCoupons: "/api/coupon/user/save",
  //领取优惠卷
  minePayRecord: "/api/account/listpage-item/self",
  mineMsgNotice: "/api/user-msg/listpage-simple/self",
  //获取消息通知
  readMsgNotice: "/api/user-msg/update-read/self",
  //标记读取消息
  deleteMsgNotice: "/api/user-msg/remove/self/{ids}",
  //删除消息通知
  minePackageRecord: "/api/proj/servicepkg/packageorder/listpage/self"
  //我充值的套餐包列表
};
class UserApi {
  static doGetVerifyCode(phone) {
    const path = apiPath.verifyCode.replace("{phone}", phone);
    return common_js_net_http.request(path, "GET", null, "operator", false);
  }
  static doLoginVerifyCode(data) {
    return common_js_net_http.request(apiPath.loginVerifyCode, "POST", data, "operator", false);
  }
  static doLogin(data) {
    return common_js_net_http.request(apiPath.loginUrl, "POST", data, "operator", false);
  }
  static doRegister(data) {
    return common_js_net_http.request(apiPath.registerUrl, "POST", data, "operator", false);
  }
  static doUnbindWx() {
    return common_js_net_http.request(apiPath.unbindWx, "GET", null, "operator", true);
  }
  static doUpdateUserInfo(data) {
    return common_js_net_http.request(apiPath.updateUserInfo, "PUT", data);
  }
  static doGetCsaNo() {
    return common_js_net_http.request(apiPath.csaNo, "GET");
  }
  static doCreateContact(data) {
    return common_js_net_http.request(apiPath.createContact, "POST", data);
  }
  static doGetMinePayRecord(data) {
    return common_js_net_http.request(apiPath.minePayRecord, "GET", data);
  }
  //获取我的账户余额
  static doGetMineAccount() {
    return common_js_net_http.request(apiPath.mineAccount, "GET");
  }
  //获取我的套餐包
  static doGetMinePackageCount() {
    return common_js_net_http.request(apiPath.minePackageCount, "GET");
  }
  //上传图片
  static doUploadImg(data) {
    return common_js_net_http.request(apiPath.uploadImg, "POST", data);
  }
  //获取个人信息
  static doGetUserInfo() {
    return common_js_net_http.request(apiPath.userInfo, "GET");
  }
  //获取我的订单
  static doGetMineOrder(data) {
    return common_js_net_http.request(apiPath.mineOrder, "GET", data);
  }
  //获取项目联系人列表
  static doGetMineContactList(data) {
    return common_js_net_http.request(apiPath.mineContact, "GET", data);
  }
  //更新联系人
  static doUpdateContactList(id, data) {
    const path = apiPath.updateContact.replace("{projContactId}", id);
    return common_js_net_http.request(path, "PUT", data);
  }
  //删除联系人
  static doDelContact(id) {
    const path = apiPath.delContact.replace("{ids}", id);
    return common_js_net_http.request(path, "DELETE");
  }
  //获取可以申领的优惠卷
  static doGetClaimsCouponsList() {
    return common_js_net_http.request(apiPath.canClaimsCoupons, "GET");
  }
  //领取优惠卷
  static doSaveCoupons(data) {
    return common_js_net_http.request(apiPath.saveCoupons, "POST", data);
  }
  //获取消息通知
  static doGetMineMsgNotice(data) {
    return common_js_net_http.request(apiPath.mineMsgNotice, "GET", data);
  }
  //标记读取状态
  static doReadMineMsgNotice(data) {
    return common_js_net_http.request(apiPath.readMsgNotice, "PUT", data);
  }
  //删除消息通知
  static doDeleteMineMsgNotice(id) {
    const path = apiPath.deleteMsgNotice.replace("{ids}", id);
    return common_js_net_http.request(path, "DELETE");
  }
  //我的套餐包列表
  static doGetMinePackageRecord(data) {
    return common_js_net_http.request(apiPath.minePackageRecord, "GET", data);
  }
}
exports.UserApi = UserApi;
//# sourceMappingURL=../../../../.sourcemap/mp-baidu/common/js/net/UserApi.js.map
