import { getUrlParameter } from '@js/utils';
import { get, post } from '../http';

export const getIndex = params =>
  get('/youtui/tempalate/test/answer/index', {
    id: getUrlParameter('id'),
    consumerIdOrder: getUrlParameter('consumerIdOrder'),
    ...params,
  });
export const sendResultAndShare = params =>
  get('/youtui/tempalate/test/answer/share', {
    id: getUrlParameter('id'),
    sourceUserId: getUrlParameter('sourceUserId'),
    consumerIdOrder: getUrlParameter('consumerIdOrder'),
    ...params,
  });
export const testAgain = params =>
  get('/youtui/tempalate/test/answer/testAgain', {
    id: getUrlParameter('id'),
    consumerIdOrder: getUrlParameter('consumerIdOrder'),
    ...params,
  });

export const getDownloadUrl = () =>
  get('/youtui/system/getDownloadUrl', {
    channelString: 'yysc-cc-a-yxgl-97-2',
  });

export const getResult = (params) => {
  console.log(params,"params")
 return post('/youtui/tempalate/test/random/result', {
    id: getUrlParameter('id'),
    list: params
  });
}

export const getBottom = (params) => {
 return get('/youtui/tempalate/banners');
}