接口地址:https://www.mxnzp.com/api/driver_exam/question/list |
---|
返回格式:json |
请求方式:get |
请求示例:https://www.mxnzp.com/api/driver_exam/question/list?page=1&rank=1&type=1&app_secret=your&app_id=your |
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
app_secret | string | 必填 | app_secret 扫码关注公众号 |
app_id | string | 必填 | app_id 扫码关注公众号 |
rank | int | 必填 | 考题等级,1 - c1/c2/c3 小车 2 - A2/B2 货车 3 - A1/A3/B1 卡车 4 - D/E/F 摩托车 |
type | int | 必填 | 考题类型 1 科目一 2 科目四 |
page | int | 必填 | 当前页码 |
名称 | 类型 | 说明 |
---|---|---|
id | int | 当前试题唯一id,后面查答案需要 |
title | string | 题目内容 |
rank | int | 考题等级,1 - c1/c2/c3 小车 2 - A2/B2 货车 3 - A1/A3/B1 卡车 4 - D/E/F 摩托车 |
type | int | 考题类型 1 科目一 2 科目四 |
op1 | string | 第一个选项内容!如果题目是单选题,那么这个就是正确的选项内容描述 |
op2 | string | 第二个选项内容!如果题目是单选题,那么这个就是错误的选项内容描述 |
op3 | string | 第三个选项内容!如果题目是单选题,这个字段返回空 |
op4 | string | 第四个选项内容!如果题目是单选题,这个字段返回空 |
titleType | string | 题目类型 1 是单选 2 是判断题 3 是多选题 |
titlePic | string | 题干插图 不是一定会有 |
{
"code": 1,
"msg": "数据返回成功!",
"data": {
"page": 1,
"totalCount": 3592,
"totalPage": 360,
"limit": 10,
"list": [{
"type": 1,
"id": 30413,
"rank": 1,
"title": "当驾驶车辆行经两侧有行人且有积水的路面时,按照防御性驾驶技术要求,要引人注意,鸣喇叭示意行人有车辆通过注意避让,要留有余地,预测行人可能做的行动,___。",
"op1": "A、加速通过",
"op2": "B、正常行驶",
"op3": "C、减速慢行",
"op4": "D、连续鸣喇叭",
"titleType": 1,
"titlePic": ""
}, {
"type": 1,
"id": 30408,
"rank": 1,
"title": "如图这种情况下,遇到路口对面有车辆直行,怎么做是正确的?",
"op1": "A、如果已经越过停止线就可以加速向左转弯",
"op2": "B、不用考虑对面车辆直接向左转弯",
"op3": "C、只要不影响对面车辆直行就可以向左转弯",
"op4": "D、等待对面车辆直行通过后再向左转弯",
"titleType": 1,
"titlePic": "https://sucimg.itc.cn/sblog/jd5YYHxo1HE"
}, {
"type": 1,
"id": 30402,
"rank": 1,
"title": "以下哪个步骤目前无法通过“快处易赔”完成?",
"op1": "A、协商定责",
"op2": "B、保险报案",
"op3": "C、线上定损",
"op4": "D、拍照挪车",
"titleType": 1,
"titlePic": ""
}, {
"type": 1,
"id": 30398,
"rank": 1,
"title": "驾驶车辆正常行驶时,按照防御性驾驶技术要求,要放眼远方,对道路情况的处理要有预见性,在接近障碍时能___。",
"op1": "A、紧急制动能停车",
"op2": "B、急转向迅速绕过",
"op3": "C、迅速躲避不发生碰撞",
"op4": "D、平稳停车",
"titleType": 1,
"titlePic": ""
}, {
"type": 1,
"id": 30395,
"rank": 1,
"title": "机动车因故障在高速公路停车时,在后方多远距离放置故障警告标志?",
"op1": "A、150米以内",
"op2": "B、150米以外",
"op3": "C、100米以内",
"op4": "D、50米以内",
"titleType": 1,
"titlePic": ""
}, {
"type": 1,
"id": 30388,
"rank": 1,
"title": "吸毒,也称“药物滥用”,就是出于________ 目的,通过注射、口服、鼻吸或其他方式将毒品摄入人体的行为。",
"op1": "A、非医疗",
"op2": "B、治病",
"op3": "C、麻醉",
"op4": "D、交友",
"titleType": 1,
"titlePic": ""
}, {
"type": 1,
"id": 30387,
"rank": 1,
"title": "雾天驾驶机动车跟车行驶,以下做法错误的是什么?",
"op1": "A、加大两车间的距离",
"op2": "B、时刻注意前车刹车灯的变化",
"op3": "C、降低行车速度",
"op4": "D、鸣喇叭提醒前车提高车速,避免后车追尾",
"titleType": 1,
"titlePic": ""
}, {
"type": 1,
"id": 30381,
"rank": 1,
"title": "关于机动车轮胎胎压过高的危害,以下说法正确的是什么?",
"op1": "A、加速轮胎胎面中央的花纹局部磨损,缩短轮胎的使用寿命",
"op2": "B、耐轧性能下降,导致爆胎",
"op3": "C、轮胎的摩擦力、附着力降低,影响制动效果",
"op4": "D、导致方向盘震动、跑偏,使行驶的舒适性降低",
"titleType": 3,
"titlePic": ""
}, {
"type": 1,
"id": 30377,
"rank": 1,
"title": "行车中超越右侧刚停稳的出租车时,最有效的做法是什么?",
"op1": "A、长鸣喇叭",
"op2": "B、加速通过",
"op3": "C、减速行驶",
"op4": "D、预留横向安全距离",
"titleType": 3,
"titlePic": ""
}, {
"type": 1,
"id": 30374,
"rank": 1,
"title": "夜间驾驶机动车安全起步时,应怎样使用灯光?",
"op1": "A、开启远光灯",
"op2": "B、只能开启左转向灯",
"op3": "C、开启左转向灯、近光灯",
"op4": "D、开启危险报警闪光灯",
"titleType": 1,
"titlePic": ""
}]
}
}
错误码 | 说明 |
---|---|
0 | app_id或者app_secret不合法 |
<?php
/**
* Created by PhpStorm.
* User: FZS
* Time: 2022/11/03 09:56
*/
class freeApi
{
private $apiUrl;
public function __construct()
{
$this->apiUrl = 'https://www.mxnzp.com/api/driver_exam/question/list?page=1&rank=1&type=1&app_secret=your&app_id=your';
}
/**
* 获取结果
* @return array
*/
public function getResult()
{
return file_get_contents($this->apiUrl);
}
}
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
const (
APIURL = "https://www.mxnzp.com/api/driver_exam/question/list?page=1&rank=1&type=1&app_secret=your&app_id=your"
)
func main() {
queryUrl := fmt.Sprintf("%s",APIURL)
resp, err := http.Get(queryUrl)
if err != nil {
log.Println(err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}