/* eslint-disable no-unused-vars */

/* eslint-disable arrow-parens */
import request from '../../service/request';
import { urlConfig } from '../../utils/mock';
/*
 * 查询收货地址
 * */

const queryForAddressList = () => {
  const url = `${urlConfig}/api/v1/mall/address/list`;
  return request.get(url, {
    current: 1,
    pageSize: 999
  }); // return new Promise(v => {
  //   v({
  //     list: [
  //       {
  //         id: 12,
  //         userPhone: 13333333333,
  //         userName: 'userName',
  //         longitude: 'longitude',
  //         latitude: 'latitude',
  //         status: true,
  //         detail: '四川省成都是高新区天府四街银泰城19号楼702四川省成都是高新区天府四街银泰城19号楼702',
  //         addressNumber: '7楼',
  //         provinceName: '省',
  //         provinceCode: 'ttt',
  //         cityName: '市',
  //         cityCode: 'ttt',
  //         districtName: '区',
  //         districtCode: 'ttt',
  //       },
  //       {
  //         id: 13,
  //         userPhone: 13332333333,
  //         userName: 'uuu',
  //         longitude: 'longitude',
  //         latitude: 'latitude',
  //         status: true,
  //         detail: '四川省成都是高新区天府四四川省成都是高新区天府四街银泰城19号楼702街银泰城19号楼702',
  //         provinceName: '省',
  //         addressNumber: '8楼',
  //         provinceCode: 'ttt',
  //         cityName: '市',
  //         cityCode: 'ttt',
  //         districtName: '区',
  //         districtCode: 'ttt',
  //       },
  //     ],
  //   });
  // });
};
/*
 * 删除地址
 * */


const deleteAddressApi = id => {
  const url = `${urlConfig}/api/v1/mall/address/delete`;
  return request.get(url, {
    id
  });
};

export default {
  queryForAddressList,
  deleteAddressApi
};