import request from '../js/request.js';


export default {
    //当前服务对象
    currServiceInfo(param) {
        return request({
            url: '/business/tech/currServiceInfo',
            method: 'GET',
            data:param
        })
    },
    //下一位
    next(param) {
        return request({
            url: '/business/tech/next',
            method: 'POST',
            data:param
        })
    },

    //开始服务
    start(param) {
        return request({
            url: '/business/tech/start',
            method: 'POST',
            data:param
        })
    },
    //开始服务
    end(param) {
        return request({
            url: '/business/tech/end',
            method: 'POST',
            data:param
        })
    },
    //就位
    takePlace(param) {
        return request({
            url: '/business/tech/takePlace',
            method: 'POST',
            data:param
        })
    },
    //结算
    settle(param) {
        return request({
            url: '/business/tech/settle',
            method: 'POST',
            data:param
        })
    },
    //待服务的订单
    list(param) {
        return request({
            url: '/business/tech/wait/list',
            method: 'GET',
            data:param
        })
    },

    //服务统计
    statics(param) {
        return request({
            url: '/business/tech/statics',
            method: 'GET',
            data:param
        })
    },

    //服务项目列表
    serviceProjectList(param) {
        return request({
            url: '/business/tech/serviceProject/list',
            method: 'GET',
            data:param
        })
    },
    //添加服务项目
    addServiceProject(param) {
        return request({
            url: '/business/tech/addServiceProject',
            method: 'POST',
            data:param
        })
    },

    // get请求 根据门店、排班日期查询技师
    getServicePerson(param) {
        return request({
            url: '/store/uniapp/work-person-ist/'+param.storeId,
            method: 'GET'
        })
    },

    // 移交
    handover(param) {
        return request({
            url: '/business/tech/handover',
            method: 'POST'
        })
    },
    // 报道打卡
    clockIn(param) {
        return request({
            url: '/business/tech/clockIn?storeId='+param.storeId + '&timestamp=' + param.timestamp,
            method: 'POST'
        })
    },
    // 切换服务对象
    switchServiceObject(param) {
        return request({
            url: '/business/tech/switchServiceObject?orderServiceId='+param.orderServiceId+'&serviceObjectId='+param.serviceObjectId,
            method: 'POST'
        })
    },
    // 获取服务对象列表
    getServiceObjectList(param) {
        return request({
            url: '/business/tech/getServiceObjectList',
            method: 'GET',
            data:param
        })
    },
    // 叫号
    call(param) {
        return request({
            url: '/business/tech/call',
            method: 'GET',
            data:param
        })
    },

    //查询服务人员
    serviceUserList(param) {
        return request({
            url: '/business/tech/serviceUser/list',
            method: 'GET',
            data:param
        })
    },

    //获取图片
    getImgUrlByOssId(param) {
        return request({
            url: '/resource/oss/listByIds/' + param.ossId,
            method: 'GET'

        })
    },


    //保存用户偏好
    preference(param) {
        return request({
            url: '/business/tech/save/preference',
            method: 'POST',
            data:param

        })
    },

    // get请求，查询技师业绩
    performanceList(data) {
        return request({
            url: '/business/tech/performanceList',
            method: 'GET',
            data: data
        })
    },

    // get请求，获取手机验证码
    getSmsCode(data) {
        return request({
            url: '/resource/sms/code',
            method: 'GET',
            data: data
        })
    },


}
