123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- import { AxiosPromise, AxiosResponse } from "axios";
- import request from "./request";
- //用户授权码模式登录
- function loginCode(data?: {
- authorizationCode: string
- }) {
- return request({
- url: "login/code",
- method: "post",
- data: data
- })
- }
- function studentEmailInfo(data: {
- address: string,
- dictCode:number
- }) {
- return request({
- url:import.meta.env.MODE === "production" ?"https://sdjk-admin.zzxcx.net/prod-api/student/email/info":"https://sdjk-admin1.zzxcx.net/stage-api/student/email/info",
- 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: import.meta.env.MODE === "production" ?"https://mn.zzxcx.net/jpcj-admin/open-api/question/info/selectTestK14QuestionInfoList":"https://jpcj1.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,
- studentEmailInfo
- }
- function AxiosPromise<T>() {
- throw new Error("Function not implemented.");
- }
|