shop-live/api/api.js

169 lines
2.8 KiB
JavaScript

import request from "@/utils/request.js";
import requesta from "@/utils/requesta.js";
/**
* 直播列表
*/
export function live(data) {
return request.get("zhibo/live" ,data);
}
/**
* 直播详情
*/
export function liveDetail(data) {
return request.get("zhibo/liveDetail" ,data);
}
/**
* 获取直播详情接口
*/
/**
* 创建直播间
*/
export function createPushLive(data) {
return request.post("zhibo/createPushLive", data);
}
/**
* 关闭直播间
*/
export function stopPushLive(data) {
return request.post("zhibo/stopPushLive", data);
}
/**
* 绑定用户client客户
*/
export function bindUser(data) {
return request.post("zhibo/bindUser", data,{});
}
/**
* 加入直播间聊天室
*/
export function joinChatRoom(data) {
return request.post("zhibo/joinChatRoom", data);
}
/**
* 直播间聊天室发言
*/
export function sendGroupMessage(data) {
return request.post("zhibo/sendGroupMessage", data);
}
//商品列表
export function good(data) {
return requesta.get("product/spu/lst", data);
}
/**
* 获取用户信息
*
*/
export function getUserInfo() {
return request.get('user');
}
//关注
export function getfans(id,data) {
return requesta.post('community/fans/'+id,data);
}
//我关注的人
export function getfocuslst(data) {
return requesta.post('community/focus/lst',data);
}
//关注我的人
export function getfanslst(data) {
return requesta.post('community/fans/lst',data);
}
//用户送礼
export function reward(data) {
return request.post('zhibo/reward',data);
}
//获取礼物
export function rewardList(data) {
return requesta.get('zhibo/rewardList',data);
}
//获取礼物
export function giftList(data) {
return request.get('zhibo/giftList',data);
}
//获取房间人数
export function liveAudience(data) {
return request.get('zhibo/liveAudience',data);
}
//获取用户余额
export function getuser(data) {
return requesta.get('user',data);
}
//送礼
export function sendGift(data) {
return request.post('zhibo/sendGift',data);
}
/**
* 充值金额选择
*/
export function getRechargeApi() {
return requesta.get("common/recharge_quota");
}
//历史直播记录
export function playbackList(data) {
return request.get("zhibo/playbackList",data);
}
//获取直播回放详情
export function playbackDetail(data) {
return request.get("zhibo/playbackDetail",data);
}
//获取观众关注主播状态
export function getAjuser(data) {
return requesta.get("community/user/info/"+data);
}
/**
* 滑块信息
* @param {Object} data
*/
export function getAjcaptcha(data) {
return requesta.get("ajcaptcha", data, {
noAuth: true
});
}
/**
* 滑块验证
* @param {Object} data
*/
export function ajcaptchaCheck(data) {
return requesta.post("ajcheck", data, {
noAuth: true
});
}