 /*
  * 手太欠
  * 愿这世界都如故事里一样 美好而动人~
*/

import { req } from "../request"

//  提货-前置
const pick = () => req({
    url: "user/stock/pick"
})

//  提货-列表记录
const list = (data) => req({
    url: "user/stock",
    data: data
})

//  提货-账变记录
const logs = (data) => req({
    url: "user/stock/logs",
    data: data
})

//  提货-提交
const pickTake = (data) => req({
    url: "user/stock/pick",
    method: 'POST',
    data: data
})

//  地址-列表
const siteList = () => req({
    url: "mall/addresses"
})

//  地址-新增
const siteAdd = (data) => req({
    url: "mall/addresses",
    method: 'POST',
    data: data
})

//  地址-删除
const siteDel = (address) => req({
    url: "mall/addresses/" + address,
    method: 'DELETE'
})

//  地址-省市区获取
const create = (data) => req({
    url: "mall/addresses/create",
    data: data
})

export default ({
    pick,
    list,
    logs,
    pickTake,
    siteList,
    siteAdd,
    siteDel,
    create
})