//分页查询用户资产
export const postAssetSelect = {
    url: "/asset/select"
}
//查询我的资产
export const getOwnAsset = {
    url: "/asset/getOwnAsset",
}
//分页查询用户资产记录
export const postAssetRecord = {
    url: "/assetRecord/select"
}
//获取总资产
export const getMallCoin = {
    url: "/user/getMallCoin"
}

//查询链上资产
export const getAssetTran = {
    url: "/asset/getAssetTran"
}
//资产转账
export const postAssetTran = {
    url: "/asset/assetTran"
}
//转赠
export const assetsTransferGift = {
    url: "/transferRecord/save",
    dealReqData: ({ coin, goodsId, num, remark, skuId, toAddress }) => {
        return { coin, goodsId, num, remark, skuId, toAddress }
    }
}
//转让
export const assetsTransfer = {
    url: "/tran/save",
    dealReqData: ({ coin, goodsId, price, note, skuId, number, type }) => {
        return { coin, goodsId, price, note, skuId, number, type }
    }
}

//转让详情
export const getTransferDetail = {
    url: "/tran/without",
    dealUrl: (url, { tranId }) => {
        return url + `/${tranId}`
    },
    dealReqData: (tranId) => {
        return { tranId }
    }
}

// 获取转让列表
export const getTransferList = {
    url: "/tran/list",
    dealReqData: ({ keyword, page, size }) => {
        return { keyword, page, size }
    }
}

// 转让修改价格
export const updateTransferPrice = {
    url: "/tran/update",
    dealReqData: ({ price, tranId, updateTime }) => {
        return { price, tranId, updateTime }
    }
}

// 撤销转让
export const cancelTransfer = {
    url: "/tran/cancle",
    dealUrl: (url, { tranId }) => {
        return url + `/${tranId}`
    },
    dealReqData: (tranId) => {
        return { tranId }
    }
}


// 获取转让市场列表
export const getTransferMarketList = {
    url: "/tran/without/getTranGoods",
    dealReqData: ({ categoryId, searchKey, page, size, price, sale }) => {
        return { categoryId, searchKey, page, size, price, sale }
    }
}