import http from '@/services/http'
import tradeServer from '@/services/socket/trade'

/**
 * 查询我的收藏
 */
export function queryMyFavorite(params: Ermcp.MyFavoriteReq) {
    return http.commonRequest<Ermcp.MyFavoriteRsp[]>({
        url: '/Guangzuan/QueryMyFavorite',
        params,
    })
}

/**
 * 商品收藏操作
 */
export function goodsFavoriteOperate(params: Proto.GoodsFavoriteOperateReq) {
    return tradeServer.sendMessage<Proto.GoodsFavoriteOperateRsp>({
        params,
        reqName: 'GoodsFavoriteOperateReq',
        rspName: 'GoodsFavoriteOperateRsp',
        marketId: 67201
    })
}