/*
 * @Author: miaokefu@duiba.com.cn 
 * @Date: 2018-08-08 21:00:54 
 * @Last Modified by: Dec-F (fanxuehui@duiba.com.cn)
 * @Last Modified time: 2018-09-04 16:14:44
 */
import {getUrlParameter} from '@js/utils';
import {get, post} from '../../http';

/**
 * 获取所有题目及其他数据
 */
export const getConfig = () => get('/youtui/questionKing/findQuestionList', {
    consumerIdOrder: getUrlParameter('consumerIdOrder'),
});

/**
 * cdk
 */
export const getCDK = () => get('/youtui/questionKing/getCDK',{
    id: getUrlParameter('id')
});

/**
 * 埋点数据
 */
export const getEmbed = () => {
    return indexedDB({
        
    })
}

export const checkAnswer = (questionId, userAnswerId) => get('/youtui/questionKing/checkAnswer', {
    questionId: questionId,
    userAnswerId: userAnswerId
});

export const getShareInfo = (bonus) => get('/youtui/questionKing/getShareUrl', {
    id: getUrlParameter('id'),
    consumerIdOrder: getUrlParameter('consumerIdOrder'),
    bonus: bonus
});

