import req from '@/request.js'
const portal = window.context.portal
export default {
  
	//成绩查询
	resultsQuery(data, cb) {
	  req.post(portal + `/exam/user/record/resultsQuery`, data).then(res => {
	    cb(res.data)
	  })
	},
	
    //查看试卷
    getUserRecord(id, cb) {
        req.get(portal + `/exam/imitate/record/getUserRecord/` + id).then(rep => {
            cb(rep.data)
        })
    },
	//错题本
	errorQuestionsList(id, cb) {
	    req.get(portal + `/exam/imitate/record/errorQuestionsList/` + id).then(rep => {
	        cb(rep.data)
	    })
	},
	//我的成绩
	myResultsQuery(data, cb) {
	  req.post(portal + `/exam/user/record/myResultsQuery`, data).then(res => {
	    cb(res.data)
	  })
	},
	//导入
	importExcel(data, cb) {
	    req.post(portal + `/exam/user/record/importExcel`, data).then(res => {
	        cb(res.data)
	    })
	},
	//导出
	export(data, cb){
		req.post(portal + `/exam/user/record/export`, data, 'blob').then(res => {
		    cb(res.data)
		})
	}
}