12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- import { AxiosPromise, AxiosResponse } from "axios";
- import request from "./request";
- //用户授权码模式登录
- function loginCode(data?: {
- authorizationCode: string
- }) {
- return request({
- url: "login/code",
- method: "post",
- data: data
- })
- }
- //用户授权码模式登录--测试
- function loginCodeTest() {
- return request({
- url: "login/code/test",
- method: "post",
- })
- }
- //查询模拟考试题库
- function studentQuestionInfoSelectTestQuestionInfo(params: {
- liceBus: string,
- liceCar: string,
- liceMoto: string,
- liceTruck: string,
- subject: number,
- }): AxiosPromise<selectTestQuestionInfo.response> {
- return request({
- url: "student/question/info/selectTestQuestionInfo",
- method: "get",
- params
- })
- }
- //查询模拟考试题库(通用)
- function openApiquestionInfoSelectTestQuestionInfo(params: {
- gs:string,
- subject: number,
- }): AxiosPromise<selectTestQuestionInfo.response> {
- return request({
- url: "https://jpcj-admin.zzxcx.net/jpcj-admin/open-api/question/info/selectTestK14QuestionInfoList",
- method: "get",
- params
- })
- }
- //查询用户信息
- function studentUserInfo(): AxiosPromise<studentUserInfo.response> {
- return request({
- url: "student/qustion/info/selectTestQuestionInfo",
- method: "get",
- })
- }
- //查询202204题库列表
- async function questionTwoList(params: {
- pageNum: number,
- pageSize: number,
- cartype: "0" | "1" | "2" | "3",
- kemu: number,
- explainJs?: string
- }): Promise<AxiosPromise<questionTwoList.response>> {
- let res: AxiosResponse<questionTwoList.response> = await request({
- url: "https://admin.zzxcx.net/zzjs-admin/open-api/question/two/list",
- method: "get",
- params
- })
- //
- return res
- }
- export default {
- loginCode,
- loginCodeTest,
- studentQuestionInfoSelectTestQuestionInfo,
- studentUserInfo,
- openApiquestionInfoSelectTestQuestionInfo,
- questionTwoList
- }
- function AxiosPromise<T>() {
- throw new Error("Function not implemented.");
- }
|