import request from '../utils/request.js'

class address extends request {


  /**
   * 获取用户地址列表
   */
  static getAdressList(params) {
    return this.postRequest(`${this.BASE_GROUP_URL}open/user/get-address-list`, {
      mobile:params.mobile,
    });
  }

   /**
   * 地址保存  
   */

  static addoreditaddress(params) {
    return this.postRequest(`${this.BASE_GROUP_URL}open/user/add-edit-address`, {
      mobile:params.mobile,
      addressId:params.addressId,
      name:params.name,
      gender:params.gender,
      phone:params.phone,
      address:params.address,
      longitude:params.longitude,
      latitude:params.latitude,
      houseNumber:params.houseNumber,
      tagName:params.tagName,
    });
  }
   /**
   * 地址删除
   */


  static deladdress(params) {
    return this.postRequest(`${this.BASE_GROUP_URL}open/user/delete-address`, {
      mobile:params.mobile,
      addressId:params.addressId
    });
  }


  static getddress(params) {
    return this.postRequest(`${this.BASE_GROUP_URL}open/user/get-address`, {
      mobile:params.mobile,
      addressId:params.addressId
    });
  }
  

}

export default address