import request from './request.js'


//获取图形验证码
function getverification(time) {
    return request('/ocLogin/generateValidateCode', "GET", {
        time: time
    })
}
//发送短信验证码
function sendsms(phone, time, imageCode) {
    return request('/ocLogin/getVerificationCode', "POST", {
        phone,
        time,
        imageCode
    })
}
//手机号登录
function loginforphone(phone, code, time, imageCode, type) {
    return request('/ocLogin/loginByVerificationCode', "POST", {
        phone,
        code,
        time,
        imageCode,
        type
    })
}
//观看方式
function roomwatchytype() {
    return request('/LiveRoomWatchType/getInfo', "POST", {
    })
}
//type1免费观看
function roomwatchytypefree() {
    return request('/LiveRoomWatchType/free', "POST", {
    })
}
//type2付费观看
function roomwatchytypepay(stype,url) {
    return request('/LiveRoomWatchType/pay', "POST", {  
        stype,
		url
    })
}
//type3密码观看
function roomwatchytypeencryption(password) {
    return request('/LiveRoomWatchType/encryption', "POST", {
        password
    })
}
//type4账号观看
function roomwatchytypephone(phone) {
    return request('/LiveRoomWatchType/phone', "POST", {
        phone
    })
}
//检查支付状态
function roomwatchytypeverifyPay(orderNum) {
    return request('/LiveRoomWatchType/verifyPay', "POST", {
        orderNum
    })
}
//type5报名观看
function roomwatchytypesubmit(data) {
    return request('/LiveRoomWatchType/submit', "POST", data)
}
//type6邀请码观看
function roomwatchytypeinvite(code) {
    return request('/LiveRoomWatchType/invite', "POST", {
        code
    })
}
//验证观看方式是否认证过
function roomwatchytypeverify() {
    return request('/LiveRoomWatchType/verify', "POST", {
    })
}
//获取房间token
function getusertoken(nickname,userLogin,isUpdate) {
    return request("/room/getUserToken", "POST", {
        nickname,
        userLogin,
        isUpdate
    })
}
//微信支付参数

function createwxorder(price,url) {
    return request('/pay/createWXOrderByReward', "GET", {
		price,
		url
    })
}
//获取房间基础信息
function roomconfig() {
    return request('/roomConfig/getRoomConfig', "GET", {

    })
}
//获取房间自定义菜单信息
function getroomconfigtags() {
    return request('/roomTagConfig/getRoomConfigTags', "GET", {

    })
}
//获取房间视频信息
function getroombindvideos() {
    return request('/roomTagConfig/getRoomBindVideos', "GET", {
    })
}
//获取礼物信息
function getclientgift() {
    return request('/liveGiftConfig/getClientGift', "GET", {
    })
}
//获取二维码
function getwxqrcode(path) {
    return request('/ocLogin/getWxQrCode', "GET", {
        path
    })
}
//检查二维码
function checkwxqrcode(code) {
    return request('/ocLogin/checkWxQrCode', "GET", {
        code
    })
}
//标记二维码已使用
function savewxqrcode(code) {
    return request('/ocLogin/saveWxQrCode', "GET", {
        code
    })
}
//创建礼物支付订单
function createpcorderbygift(id) {
    return request('/pay/createPcOrderByGift', "GET", {
        id
    })
}
//检查礼物订单支付状态
function wxcheckorder(orderNum) {
    return request('/pay/checkOrder', "GET", {
        orderNum
    })
}

//获取房间基本信息
function getwatchroombasevo() {
    return request('/room/getWatchRoomBaseVo', "POST", {
        
    })
}
//获取房间跑马灯
function getroommarquee() {
    return request('/roomMarquee/info', "POST", {
    })
}
//打赏获取支付链接
function createorderbyreward(price) {
    return request('/pay/createPcOrderByReward', "GET", {
        price
    })
}
//设置观看人数
function setwatchlookbase() {
    return request('/roomConfig/setWatchLookBase', "POST", {    
    })
}
//获取累计观看人数
function getwatchlookbase() {
    return request('/roomConfig/getWatchLookBase', "POST", {
        
    })
}
//获取用户连麦信息
function getusertrtcsign(account) {
    return request('/room/getUserTRTCSign', "POST", {
        account
    })
}
//获取商品列表
function getroomcommodity(page,pageSize) {
    return request('/roomConfig/getRoomCommodity', "POST", {
        page,
        pageSize,
    })
}
//支付商品
function createcommodity(id) {
    return request('/pay/createPCOrderByCommodity', "GET", {
        id
    })
}
//上报外部商品点击
function escalation(id) {
    return request('/room/escalationH5Check', "GET", {
        id
    })
}
//获取累计观看人数
function getlookbase() {
    return request('/roomConfig/getWatchLookBase', "POST", {
        
    })
}
//获取客服列表
function getroomcustomer() {
    return request('/roomCustomer/list', "POST", {
        
    })
}
//获取关注信息
function getfollow() {
    return request('/roomConfig/getFollow', "GET", {
        
    })
}
//获取回看地址
function getbackinfo() {
    return request('/roomLookBack/info', "POST", {
        
    })
}
//签到
function signadd(signId) {
    return request('/roomUserSign/add', "POST", {
        signId
    })
}
//续签到
function needsign() {
    return request('/roomUserSign/needSign', "POST", {
        
    })
}
//聊天设置
function livechatinfo() {
    return request('/LiveChat/info', "POST", {
        
    })
}
//校验token
function livechecktoken(token) {
    return request('/ocLogin/checkToken', "GET", {
        token
    })
}
//获取观看地址
function livewatchurl() {
    return request('/room/watchUrl', "POST", {
    })
}
//取消认证
function delwatchtype() {
    return request('/LiveRoomWatchType/delWatchType', "POST", {
    })
}
//获取appid
function getappid() {
    return request('/ocLogin/getAppid', "GET", {
    })
}
//wx登录
function loginbywx(code) {
    return request('/ocLogin/loginByWx', "GET", {
		code
    })
}
export default {
	loginbywx,
    sendsms,
    getverification,
    loginforphone,
    roomwatchytype,
    getusertoken,
    roomconfig,
    getroomconfigtags,
    getroombindvideos,
    getclientgift,
    getwxqrcode,
    checkwxqrcode,
    savewxqrcode,
    createpcorderbygift,
    wxcheckorder,
    roomwatchytypeverify,
    roomwatchytypefree,
    roomwatchytypeencryption,
    getwatchroombasevo,
    getroommarquee,
    roomwatchytypepay,
    roomwatchytypeinvite,
    roomwatchytypeverifyPay,
    roomwatchytypephone,
    createorderbyreward,
    setwatchlookbase,
    getwatchlookbase,
    roomwatchytypesubmit,
    getusertrtcsign,
	createwxorder,
    getroomcommodity,
    createcommodity,
    escalation,
    getlookbase,
    getroomcustomer,
    getfollow,
    getbackinfo,
    signadd,
    needsign,
    livechatinfo,
    livechecktoken,
    livewatchurl,
    delwatchtype,
	getappid
}