RONG 2 vuotta sitten
vanhempi
commit
b739ec3f46
91 muutettua tiedostoa jossa 8333 lisäystä ja 0 poistoa
  1. 459 0
      jiaPei/Vendor/FMDBMigrationManager/1_FJ_QUESTION_UPDATE.sql
  2. 23 0
      jiaPei/Vendor/FMDBMigrationManager/2_FJ_QUESTION_UPDATE.sql
  3. 293 0
      jiaPei/Vendor/FMDBMigrationManager/FMDBMigrationManager.h
  4. 379 0
      jiaPei/Vendor/FMDBMigrationManager/FMDBMigrationManager.m
  5. 31 0
      jiaPei/Vendor/FMDBMigrationManager/Migration.h
  6. 46 0
      jiaPei/Vendor/FMDBMigrationManager/Migration.m
  7. 454 0
      jiaPei/Vendor/LCActionSheet/LCActionSheet.h
  8. 935 0
      jiaPei/Vendor/LCActionSheet/LCActionSheet.m
  9. 55 0
      jiaPei/Vendor/LCActionSheet/LCActionSheetCell.h
  10. 102 0
      jiaPei/Vendor/LCActionSheet/LCActionSheetCell.m
  11. 150 0
      jiaPei/Vendor/LCActionSheet/LCActionSheetConfig.h
  12. 86 0
      jiaPei/Vendor/LCActionSheet/LCActionSheetConfig.m
  13. 42 0
      jiaPei/Vendor/LCActionSheet/LCActionSheetViewController.h
  14. 36 0
      jiaPei/Vendor/LCActionSheet/LCActionSheetViewController.m
  15. 15 0
      jiaPei/Vendor/LCActionSheet/MH_MODIFY_LC.h
  16. 42 0
      jiaPei/Vendor/LCActionSheet/UIImage+LCActionSheet.h
  17. 45 0
      jiaPei/Vendor/LCActionSheet/UIImage+LCActionSheet.m
  18. 40 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomBaseCell.h
  19. 176 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomBaseCell.m
  20. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCardCell.h
  21. 142 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCardCell.m
  22. 29 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCellFactory.h
  23. 33 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCellFactory.m
  24. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomFileCell.h
  25. 232 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomFileCell.m
  26. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomIframeCell.h
  27. 64 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomIframeCell.m
  28. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomImageCell.h
  29. 141 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomImageCell.m
  30. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomInvestigateCell.h
  31. 190 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomInvestigateCell.m
  32. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomMp3Cell.h
  33. 283 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomMp3Cell.m
  34. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomNoteCell.h
  35. 56 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomNoteCell.m
  36. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRichTextCell.h
  37. 173 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRichTextCell.m
  38. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRobotCell.h
  39. 342 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRobotCell.m
  40. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomTextCell.h
  41. 162 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomTextCell.m
  42. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomVoiceCell.h
  43. 244 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomVoiceCell.m
  44. 21 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMLeaveMessageCell.h
  45. 83 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMLeaveMessageCell.m
  46. 19 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileCollectionCell.h
  47. 56 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileCollectionCell.m
  48. 18 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileTableCell.h
  49. 97 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileTableCell.m
  50. 19 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMItemCollectionCell.h
  51. 42 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMItemCollectionCell.m
  52. 19 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMVideoTableCell.h
  53. 124 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMVideoTableCell.m
  54. 27 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileManager.h
  55. 72 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileManager.m
  56. 18 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileModel.h
  57. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileModel.m
  58. 38 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMProfileManager.h
  59. 169 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMProfileManager.m
  60. 17 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/View/QMFileTabbarView.h
  61. 42 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/View/QMFileTabbarView.m
  62. 17 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMFileManagerController.h
  63. 119 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMFileManagerController.m
  64. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedAudioViewController.h
  65. 146 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedAudioViewController.m
  66. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedDocViewController.h
  67. 148 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedDocViewController.m
  68. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedOtherViewController.h
  69. 144 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedOtherViewController.m
  70. 17 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedPhotoViewController.h
  71. 150 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedPhotoViewController.m
  72. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedVideoViewController.h
  73. 296 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedVideoViewController.m
  74. 15 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/NSAttributedString+QMEmojiExtension.h
  75. 31 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/NSAttributedString+QMEmojiExtension.m
  76. 17 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAlert.h
  77. 67 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAlert.m
  78. 23 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioAnimation.h
  79. 68 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioAnimation.m
  80. 27 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioPlayer.h
  81. 76 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioPlayer.m
  82. 36 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioRecorder.h
  83. 187 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioRecorder.m
  84. 15 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMDateManager.h
  85. 41 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMDateManager.m
  86. 17 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMManager.h
  87. 22 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMManager.m
  88. 21 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTapGestureRecognizer.h
  89. 14 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTapGestureRecognizer.m
  90. 17 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTextAttachment.h
  91. 13 0
      jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTextAttachment.m

+ 459 - 0
jiaPei/Vendor/FMDBMigrationManager/1_FJ_QUESTION_UPDATE.sql

@@ -0,0 +1,459 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : miaxis
+ Source Server Type    : SQLite
+ Source Server Version : 3026000
+ Source Schema         : main
+
+ Target Server Type    : SQLite
+ Target Server Version : 3026000
+ File Encoding         : 65001
+
+ Date: 11/03/2021 17:48:19
+*/
+
+PRAGMA foreign_keys = false;
+
+
+
+-- ----------------------------
+-- Records of question
+-- ----------------------------
+UPDATE question SET answer = 32 ,explain = '在暂住地初次申领机动车驾驶证的,是可以直接申领大型货车驾驶证的。\n根据2016年4月1日起开始实行的驾驶证新规,取消了异地考驾照对A/B证的限制,A/B也可以在暂住地申领了,但是需要有当地的居住证或者暂住证。' WHERE _id = 501;
+UPDATE question SET question = '驾驶人在一个记分周期内累积记分达到12分的,交通警察依法扣留驾驶证。', explain = '《道路交通安全法实施条例》第二十三条:对在一个记分周期内记分达到12分的,由公安机关交通管理部门扣留其机动车驾驶证。' WHERE _id = 307;
+UPDATE question SET answer = 32 , option_b = '18周岁以上,无最高年龄限制。' ,explain = '据公安部交通管理局发布的新措施,自2020年11月20日起,放宽小型汽车驾驶证申请年龄,取消申请小型汽车、小型自动挡汽车、轻便摩托车驾驶证70周岁的年龄上限。' WHERE _id = 316;
+UPDATE question SET answer = 32 ,explain = '据公安部交通管理局发布的新措施,自2020年11月20日起,放宽小型汽车驾驶证申请年龄,取消申请小型汽车、小型自动挡汽车、轻便摩托车驾驶证70周岁的年龄上限。' WHERE _id = 318;
+INSERT INTO "question" VALUES (11535, 0, 1, 2, NULL, '驾驶机动车在这种情况下不能直行和左转弯。', '5eb4d75agw1e28ysiziofj.webp', 16, '正确', '错误', NULL, NULL, '直行和左转都是红灯,所以不能直行和左转。', 0, 1, 0, 0, '信号灯', 'C1', 1);
+INSERT INTO "question" VALUES (11534, 0, NULL, 3, NULL, '设有安全带装置的车辆,驾驶人应要求车内乘员系安全带。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第五十一条:机动车行驶时,驾驶人、乘坐人员应当按规定使用安全带,摩托车驾驶人及乘坐人员应当按规定戴安全头盔。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11533, 0, NULL, 3, NULL, '夜间通过没有路灯或路灯照明不良的路段时,应将近光灯转换为远光灯,但同向行驶的后车不得使用远光灯。', NULL, 16, '正确', '错误', NULL, NULL, '通过没有路灯或路灯照明不良的路段(非路口)时可以开启远光灯,但是前方有车或行人时,为了不影响他人视线,应关闭远光,改用近光。                                ', 0, 1, 0, 0, '灯光', 'C1', 1);
+INSERT INTO "question" VALUES (11532, 0, 1, 4, NULL, '打开示廓灯开关,(如图所示)亮起。', '5eb4d75agw1e291u1ygk5j.webp', 16, '正确', '错误', NULL, NULL, '该指示灯是用来显示车辆示宽灯的工作状态,平时为熄灭状态,当示宽灯打开时,该指示灯随即点亮。当示宽灯关闭或者关闭示宽灯打开大灯时,该指示灯自动熄灭。', 0, 1, 0, 0, '灯光', 'C1', 1);
+INSERT INTO "question" VALUES (11531, 0, 1, 4, NULL, '上下扳动这个开关前风窗玻璃刮水器开始工作。', '5eb4d75agw1e291w4cnq5j.webp', 16, '正确', '错误', NULL, NULL, '风窗玻璃刮水器开关,是控制刮水器的操作装置,大多安装在方向盘右下方转向柱上,用右手操纵,将开关手柄向下拉或向上推,可选择不同的刮刷挡位。                                ', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11530, 1, NULL, 1, NULL, '佟某驾驶一辆大客车(乘载54人,核载55人)行至太原境内以45公里的时速通过一处泥泞路段时,机动车侧滑驶出路外坠入深沟,导致14人死亡、40人受伤。佟某的主要违法行为是什么?', NULL, 32, '客车超员', '超速行驶', '酒后驾驶', '疲劳驾驶', '《道路交通安全法实施条例》第四十六条: 机动车行驶中遇有下列情形之一的,最高行驶速度不得超过每小时30公里,其中拖拉机、电瓶车、轮式专用机械车不得超过每小时15公里:(一)进出非机动车道,通过铁路道口、急弯路、窄路、窄桥时;(二)掉头、转弯、下陡坡时;(三)遇雾、雨、雪、沙尘、冰雹,能见度在50米以内时;(四)在冰雪、泥泞的道路上行驶时;(五)牵引发生故障的机动车时。', 0, 4, 0, 0, '速度', 'C1', 1);
+INSERT INTO "question" VALUES (11529, 0, 1, 3, NULL, '右侧标志提醒前方路口向右100米是渡口。', '5eb4d75agw1e2949p9jkij.webp', 16, '正确', '错误', NULL, NULL, '渡口:用以提醒车辆驾驶人谨慎驾驶。设在车辆渡口以前适当位置。', 0, 4, 0, 0, '标志', 'C1', 1);
+INSERT INTO "question" VALUES (11528, 0, 1, 3, NULL, '路中两条双黄虚线并列组成的双黄虚线车道指示潮汐车道的位置。', '5eb4d75agw1e294ujiubfj.webp', 16, '正确', '错误', NULL, NULL, '所谓“潮汐车道”,是指根据早晚交通流量不同情况,对有条件的道路,通过车道灯的指示方向变化,控制主干道车道行驶方向,来调整车道数。 例如,左转车道很拥堵,但直行车道却车少畅通;交警通过遥控装置,在很短的时间,直行车道就变为左转车道,左转车龙就“消化”了,车道可随车流量随时变化。', 0, 4, 0, 0, '标线', 'C1', 1);
+INSERT INTO "question" VALUES (11527, 0, 1, 3, NULL, '路缘石的黄色实线指示路边允许临时停放车辆。', '5eb4d75agw1e294wgur3dj.webp', 32, '正确', '错误', NULL, NULL, '黄色虚线是允许临时停车,黄色实线是禁止停车。', 0, 4, 0, 0, '标线', 'C1', 1);
+INSERT INTO "question" VALUES (11526, 2, NULL, 5, NULL, '冰雪路面对行车有哪些不利影响?', NULL, 240, '车辆操控难度增大', '制动距离延长', '易产生车轮滑转', '极易发生侧滑', '冰雪路面对行车的不利影响有【车辆操控难度增大】【制动距离延长】【易产生车轮滑转】【极易发生侧滑】容易发生交通事故。                                ', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11525, 1, NULL, 6, NULL, '当机动车转向失控行驶方向偏离,事故已经无可避免时,要采取什么措施?', NULL, 16, '紧急制动', '迅速转向进行调整', '迅速向无障碍一侧转向躲避', '迅速向有障碍一侧转向躲避', '除了“紧急制动”之外,三个选项都有可能因躲避或转向而造成另外的事故,比如与其他车辆擦碰或是撞到障碍物等。另外注意本题中“事故已经无可避免”这一句,也就是说事故是肯定会发生的,那么接下来要做的就是如何不让事故造成的损伤和损害变大,因此只有“紧急制动”是唯一的选择。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11524, 0, NULL, 6, NULL, '制动时后车轮抱死可能会出现侧滑甩尾的情况。', NULL, 16, '正确', '错误', NULL, NULL, '所谓“侧滑”就是车辆急加速、突然制动或启动时扭矩过大而产生的侧向甩动的现象,俗称“甩尾”。造成车辆侧滑的因素很多。雪天,雨天、冰面上行车时突然抬起油门或突然加速;采取紧急制动,制动时后轮比前轮先抱死;都极易发生车辆侧滑而造成事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11523, 1, NULL, 50, NULL, '火柴、硫磺和赤磷属于哪类危险化学品?', NULL, 128, '爆炸品', '氧化性物质', '自燃物品', '易燃固体', '易燃固体是指在常温下以固态形式存在,燃点较低,遇火受热、撞击、摩擦或接触氧化剂能引起燃烧的物质。这三类物质正好符合,因此选“易燃固体”。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11522, 0, 1, 1, NULL, '如图所示,在这种道路上行驶,应在道路中间通行的主要原因是在道路中间通行速度快。', '11123.webp', 32, '正确', '错误', NULL, NULL, '图中是没有中心线的道路,在中间行驶是为了给两侧的非机动车和行人留出充足的通行空间。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11521, 1, 1, 1, NULL, '如图所示,以下哪种情况可以超车?(图50a.50b. 50c. 50d)', '2590-1601344153463.webp', 64, '50a', '50b', '50c', '50d', '大家都知道的,实线一侧是不可以跨越的,只有虚线的一侧才可以,所以只有50c具备超车条件。                                                                ', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11520, 1, 1, 1, NULL, '如图所示,以下哪种情况可以超车?(图51a.51b. 51c. 51d)', '11151.webp', 16, '51a', '51b', '51c', '51d', '如图所示,能够超车的必须满足两个条件:一是必须在虚线的一侧,二是对向没有来车。满足这个两个条件的就只有51a了。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11519, 1, NULL, 1, NULL, '牵引发生事故的机动车时,最高车速不得超过多少?', NULL, 32, '20公里/小时', '30公里/小时', '40公里/小时', '50公里/小时', '《道路交通安全法实施条例》第四十六条:机动车行驶中遇有下列情形之一的,最高行驶速度不得超过每小时30公里,其中拖拉机、电瓶车、轮式专用机械车不得超过每小时15公里:(一)进出非机动车道,通过铁路道口、急弯路、窄路、窄桥时;(二)掉头、转弯、下陡坡时;(三)遇雾、雨、雪、沙尘、冰雹,能见度在50米以内时;(四)在冰雪、泥泞的道路上行驶时;(五)牵引发生故障的机动车时。                                ', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11518, 0, 1, 1, NULL, '如图所示,这种情况下只要后方、对向无来车,可以掉头。', '11196.webp', 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十九条:机动车在没有禁止掉头或者没有禁止左转弯标志、标线的地点可以掉头,但不得妨碍正常行驶的其他车辆和行人的通行。图中路面标线是黄色虚线,可以跨越虚线掉头。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11517, 0, 1, 2, NULL, '如图所示,起步时此灯亮起表示驻车制动(手刹)放下。', '43313.webp', 32, '正确', '错误', NULL, NULL, '此灯亮起是在提醒我们驻车制动没有放下,先放下它才能开车!', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11516, 0, 1, 2, NULL, '如图所示,驾驶机动车在路口遇黄灯亮时,应停车等待。', '43358.webp', 16, '正确', '错误', NULL, NULL, '黄灯亮时,已越过停止线的车辆可以继续通行;其它情况需要停车等待。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11515, 2, NULL, 1, NULL, '张某驾驶车辆在高速公路上发生故障不能移动,开启危险报警闪光灯后下车,联系朋友李某驾驶私家车帮忙拖拽到应急车道。李某拖拽故障车的过程中,刘某驾驶货运车辆以每小时110公里的速度驶来,导致三车相撞。这起事故中的违法行为有哪些?', NULL, 224, '张某疲劳驾驶', '李某用私家车拖曳故障车辆', '刘某超速行驶', '未在故障车辆后设置警示标志', '题中所示的违法行为主要有:张某未在故障车辆后设置警示标志、李某用私家车拖曳故障车辆、刘某超速行驶等。高速公路上发生故障,正确的做法是,开启危险报警闪光灯后下车,在故障车辆后设置警示标志,联系保险公司或者维修店进行拖曳维修。货运车辆在高速上最高车速不得超过100公里/小时。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11514, 1, NULL, 1, NULL, '假如您在高速公路上不小心错过了准备驶出的路口,正确的操作应该是?', NULL, 32, '紧急刹车,倒车至想要驶出的路口', '继续前行,到下一路口驶离高速公路掉头', '在应急停车道上停车,等待车辆较少的时候再伺机倒车', '借用应急车道进行掉头,逆向行驶', '《中华人民共和国道路交通安全法》规定:如果在高速公路上倒车、逆行、穿越中央分隔带掉头等严重交通违法行为,200元处罚、一次性记12分。所以应该继续向前行驶,寻找下一个出口。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11513, 0, 1, 1, NULL, '车辆在高速公路发生故障不能移动时,驾驶人这种尝试排除故障的做法是否正确?', '1241.webp', 32, '正确', '错误', NULL, NULL, '三处错误:1.应立即开启危险警报闪光灯,利用车辆惯性,将车驶入紧急停车带或右侧路肩停下,尽量不要占用行车道;2.车辆停放好后,驾驶人和乘车人从路外侧的车门尽快离开车辆,转移到右侧的路肩或者应急车道内,如需到车内或车下进行维修,也应由外侧的车门出入;3.要把故障车警告标志放置在来车方向150米处,并立即报警,如果是夜间,还必须开启示宽灯和尾灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11512, 1, 1, 1, NULL, '下列哪个交通标志表示不能停车?', '1255.webp', 32, '图1', '图2', '图3', '图4', '图一为禁止长时间停车;图二为禁止停车;图三为停车检查;图四为停车让行。所以不能停车的是图二,图一只是不能长时间停车,临时停车还是可以的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11511, 1, 1, 2, NULL, '以下交通标志表示的含义是什么', '1268.webp', 16, '禁止机动车驶入', '禁止小客车驶入', '禁止所有车辆驶入', '禁止非机动车驶入', '图为禁止机动车驶入标志。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11510, 0, 1, 2, NULL, '以下交通标志表示除小客车和货车外,其他车辆可以直行。', '1270.webp', 16, '正确', '错误', NULL, NULL, '上图为禁止直行标志,下图为小客车和货车标志,整体意思为禁止小客车和货车直行。                                ', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11509, 1, 1, 2, NULL, '下列哪个标志提示驾驶人连续弯路', '1278.webp', 32, '图1', '图2', '图3', '图4', '图1是向左急转弯,图2是连续弯路,图3是反向转弯,图4是环形交叉。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11508, 1, 1, 4, NULL, '行驶至这种上坡路段时,以下做法正确的是什么?', '1285.webp', 16, '换低挡位,踏加速踏板', '换低挡位,松开加速踏板', '换高挡位,踏加速踏板', '换高挡位,松开加速踏板', '图中这样的陡坡,挂低挡是为了获得更多的发动机牵引力,如果松开加速踏板,会导致发动机失去动力造成车辆溜坡。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11507, 1, 1, 4, NULL, '行车中下列哪个灯亮,提示驾驶人车辆制动系统出现异常?', '1302.webp', 64, '图1', '图2', '图3', '图4', '图1是油量指示灯,图2是水温指示灯,图3是手刹指示灯,图4是发动机指示灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11506, 2, NULL, 1, NULL, '贾某驾车在高速公路上行驶,遇到大雾,能见度小于50米,贾某开启了雾灯、 示廓灯、危险警报灯,以时速40公里行驶,并与同车道保持50米距离,经过三个出口驶离高速公路。贾某的主要违法行为是什么?', NULL, 176, '未按规定开启相应的灯光', '超速行驶', '与同车道前车距离不足', '未及时从最近的出口驶离高速公路', '能见度小于50米时,开启雾灯、近光灯、示廓灯、前后位灯和危险警报灯,车速不得超过每小时20公里,并从最近的出口尽快驶离高速公路。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11505, 0, 1, 2, NULL, '如图所示,驾驶机动车直行通过路口,遇对向车辆左转,让已在路口内的左转车辆优先通过路口。', '1101.webp', 16, '正确', '错误', NULL, NULL, '提高通行效率的要求,将原《道路交通管理条例》第43条的让行规则作了修改,删除了“支路车让干路车先行”的规定,将“相对方向同类车相遇,左转弯的车让直行或右转弯的车先行”,修改为“没有交通标志标线控制的路口,在进入路口前停车瞭望,让右方道路的车辆先行;转弯的机动车让直行的车辆先行;相对方向行驶的右转弯的机动车让左转弯的车辆先行”(实施条例第52条)', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11504, 1, NULL, 2, NULL, '驾驶汽车频繁变更车道的危害以下选项错误的是?', NULL, 32, '扰乱交通秩序', '易导致爆胎', '影响正常通行', '易引发交通事故', '请注意审题,题目要求选择错误选项,频繁变更车道与爆胎关系不大。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11503, 0, NULL, 5, NULL, '驾驶机动车通过短而陡的上坡坡道时,采用加速冲坡的方法,在接近坡顶时应提前松开加速踏板,利用惯性冲过坡顶。', NULL, 16, '正确', '错误', NULL, NULL, '不要临到坡前才加速冲坡,而应先对坡度的大小,长短作出适当估计,提前加速,充分利用汽车的惯性冲坡,做到“高速档不硬撑,低速档不硬冲”,以利节油。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11502, 0, NULL, 5, NULL, '驾驶机动车遇浓雾或沙尘暴时,行驶速度不要过慢,避免后方来车追尾。', NULL, 32, '正确', '错误', NULL, NULL, '驾驶机动车遇浓雾或沙尘暴时,必须打开前后雾灯或者危险警报闪光灯,减速慢行甚至靠边停车以保证行车安全。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11501, 0, NULL, 5, NULL, '驾驶机动车在高速公路意外碰撞护栏时,应迅速向相反的方向转向修正。', NULL, 32, '正确', '错误', NULL, NULL, '这样做可能会让车子发生侧翻,因此应当握紧方向盘,适当修正。                                ', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11500, 0, NULL, 5, NULL, '雾天行车开启雾灯是因为雾灯放射的灯光具有更好的穿透力,更容易让道路中其他车辆驾驶员注意到自己的车辆。', NULL, 16, '正确', '错误', NULL, NULL, '在雾天行驶时,应将前后雾灯全部开启,如果雾气非常大,还可以将双闪灯打开。开启雾灯和双闪灯的主要作用,是为了让其他车辆的司机可以更好地观察到你,避免追尾和刮擦事故的发生。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11499, 0, NULL, 5, NULL, '浓雾中行车听到对方车辆鸣喇叭时,只要在视野中看不到,可不必理会。', NULL, 32, '正确', '错误', NULL, NULL, '雾天行车听到对方鸣喇叭,也应该鸣喇叭回应,已提示对方车辆。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11498, 0, NULL, 5, NULL, '在泥泞路段行车,要平稳地转动方向盘,避免由快速转动方向盘而引起侧滑。', NULL, 16, '正确', '错误', NULL, NULL, '行车过程中根据车辆的转向与滑动情况,平稳地转动方向盘、灵活调整。快速的转动方向只会加剧车辆的滑动程度。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11497, 0, NULL, 5, NULL, '车辆在泥泞路段起步或者陷住时,切忌选择急加速。', NULL, 16, '正确', '错误', NULL, NULL, '泥泞路面行驶尽量不换挡,当车陷入泥泞路面后,大多数司机是想通过踩油门来提高车速通过,其实这样更不容易通过泥泞路面。发动机的扭矩变化是一条曲线,随着转速的提高扭矩呈上升趋势,当到了一定转速后,扭矩随着车速的提高而降低。因此,泥泞路面反而要中低速行驶,这样发动机可以输出更大的扭矩。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11496, 0, NULL, 5, NULL, '车辆在泥泞路段发生侧滑时,要向车尾侧滑方向缓打方向盘修正。', NULL, 16, '正确', '错误', NULL, NULL, '这题可以这么理解,后轮发生侧滑,当然要向侧滑的一侧转动转向轮来使前轮与之对应,否则不就原地打转了嘛。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11495, 0, 1, 1, NULL, '允许自学直考人员使用图中小型客车教练车,在学车专用标识签注的指导人员随车指导下学习驾驶。', '22670-1561968327494.webp', 32, '正确', '错误', NULL, NULL, '自学人员使用学车专用标识签注的自学用车学习驾驶时,应当在公安机关交通管理部门指定的线路、时间进行,并随身携带实习驾驶证明。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11494, 0, 1, 1, NULL, '驾驶人在实习期内可以驾驶这辆小型客车独立进入高速公路行驶。', '22671-1561968328090.webp', 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》第七十五条:驾驶人在实习期内驾驶机动车上高速公路行驶,应当由持相应或者更高准驾车型驾驶证三年以上的驾驶人陪同。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11493, 0, 1, 1, NULL, '图中小型客车驾驶人这种发生事故逃逸的违法行为,会被记12分。', '22672-1561968328275.webp', 16, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:造成交通事故后逃逸,尚不构成犯罪的,一次记12分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11492, 0, 1, 1, NULL, '图中所示驾驶人的这种违法行为是非常严重的,会被记12分。', '22673-1561968328541.webp', 16, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:上道路行驶的机动车未悬挂机动车号牌的,或者故意遮挡、污损、不按规定安装机动车号牌的,一次记12分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11491, 0, 1, 1, NULL, '图中黄色小型客车驾驶人违法占用高速公路应急车道行驶,会被记12分。', '22674-1561968328688.webp', 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:驾驶机动车在高速公路或者城市快速路上违法占用应急车道行驶的,一次记6分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11490, 0, 1, 1, NULL, '图中黄色小客车驾驶人在高速公路逆向行驶,会被记6分。', '22675-1561968328853.webp', 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:驾驶机动车在高速公路上倒车、逆行、穿越中央分隔带掉头的,一次记12分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11489, 0, 1, 3, NULL, '在图中所示的这种天气行车,由于能见度较低,需要开启远光灯告知对向来车。', '22676-1561968329190.webp', 32, '正确', '错误', NULL, NULL, '因为雨天视线受阻,所以雨天与车辆近距离行驶时不能使用远光灯,应当开启近光灯、示廓灯和后位灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11488, 0, 1, 3, NULL, '在图中这种环境超车时,要先变换远近光灯告知前车,待前车让行后,开启远光灯超越。', '22677-1561968329369.webp', 32, '正确', '错误', NULL, NULL, '根据道路交通安全法规,应开启近光灯超越。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11487, 0, 1, 3, NULL, '图中所示的情形超车时,要提前开启左转向灯,连续鸣喇叭或开启远光灯提示,催促前车让行。', '22678-1561968329652.webp', 32, '正确', '错误', NULL, NULL, '安全文明行车守则,应该安全文明礼让。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11486, 0, 1, 3, NULL, '夜间行车遇到图中所示的交叉路口,不管有没有车辆和行人横过路口,都要开启远光灯提示。', '22679-1561968329833.webp', 32, '正确', '错误', NULL, NULL, '夜间行车在通过交叉路口时,应在距路口50到100米处减速,并将远光灯变为近光灯,如果路口没有信号灯指示,则通过路口前还应变换远近光灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11485, 0, 1, 3, NULL, '在图中这种环境下会车前,要先与对面来车交替变换远近光灯观察前方道路情况,会车时两车都要关闭前大灯交汇。', '22680-1561968330216.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第四十八条:夜间会车应当在距相对方向来车150米以外改用近光灯。题干中说交替变换远近光灯并关闭前大灯,所以本题错误。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11484, 0, 1, 3, NULL, '在图中所示的铁路道口,如果没有看到列车驶来就要加速横过道口。', '22681-1561968330326.webp', 32, '正确', '错误', NULL, NULL, '驾驶车辆通过无人看守的铁路道口的时候,需要做到一停、二看、三通过。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11483, 0, 1, 3, NULL, '驶近一个图中所示的铁路道口时,只要看到栏杆还没放下来,就可以加速通过道口。', '22682-1561968330456.webp', 32, '正确', '错误', NULL, NULL, '注意图中是红灯,红灯停。安全通过铁路道口要减速减档。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11482, 0, 1, 3, NULL, '驶近图中所示的路段时,只要没有车辆和行人在人行横道上通过,就可以加速通过。', '22683-1561968330717.webp', 32, '正确', '错误', NULL, NULL, '这里注意,路过人行横道,应该减速慢行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11481, 0, 1, 3, NULL, '在路口直行看到图中这种情况,要在停止线以外停车等待对面直行车通过后再起步。', '22684-1561968330842.webp', 32, '正确', '错误', NULL, NULL, '两边都是直行车辆,互不影响。绿灯可以直行过路口。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11480, 0, 1, 3, NULL, '在路口右转弯看到图中信号灯亮时,要在停止线以外停车等待绿灯亮后再向右转弯。', '22685-1561968331241.webp', 32, '正确', '错误', NULL, NULL, '绿灯表示可以直行,左转或右转的车辆可以在不妨碍其他车辆、非机动车、行人通行的情况下通行。红灯时,如果不妨碍其他车辆行人通行的情况下,可以右转。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11479, 0, 1, 3, NULL, '在路口直行看到图中所示信号灯亮时,要尽快加速通过路口,不得停车等待。', '22686-1561968331399.webp', 32, '正确', '错误', NULL, NULL, '黄灯亮时,已越过停止线的车辆可以继续通行。车身在安全线里边的,请停车等待。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11478, 0, 1, 3, NULL, '在路口看到图中所示信号灯不断闪烁时,要减速或停车瞭望,确认安全后通过。', '22687-1561968331649.webp', 16, '正确', '错误', NULL, NULL, '路口黄灯持续闪烁,警示驾驶人要注意瞭望,确认安全通过。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11477, 0, 1, 3, NULL, '如果遇到图中这种情况需要超车时,可以在不影响公交车通行的前提下借公交车道超越。', '22688-1561968331820.webp', 32, '正确', '错误', NULL, NULL, '超车只能从左侧超车,并且车道内已经注明“公交车专用车道”,则此车道为公交车专用,其他车辆一般情况下不准占用。仅当发生事故、正常道路封闭有标示注明允许借用或者交警指示等特殊情况允许借道行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11476, 0, 1, 3, NULL, '图中这辆红色小型客车选择的行车道是正确的。', '22689-1561968332002.webp', 32, '正确', '错误', NULL, NULL, '左右侧车道红灯表示左右侧车道禁止通行,因此红色轿车不可以在右侧车道行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11475, 0, 1, 2, NULL, '遇到图中这种有车道信号灯的路段,应该选择右侧或者左侧车道行驶。', '22690-1561968332409.webp', 16, '正确', '错误', NULL, NULL, '中间车道是红灯,禁止行驶;左右两侧车道绿灯,可通行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11474, 0, 1, 2, NULL, '图中这个标志提示前方道路有Y型交叉路口,会有横向来车。', '22691-1561968332540.webp', 16, '正确', '错误', NULL, NULL, '警告标志,图中Y形路口说明前方路口左侧会有车辆汇入。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11473, 0, 1, 2, NULL, '图中这个标志提示前方道路有环形交叉路口,前方路口可以掉头行驶。', '22692-1561968332810.webp', 16, '正确', '错误', NULL, NULL, '警告标志,前方是环形交叉路口,是可以掉头的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11472, 0, 1, 2, NULL, '图中这个标志提示前方道路是向右急转弯。', '22693-1561968332942.webp', 32, '正确', '错误', NULL, NULL, '警告标志,图中标志表示前方路口向左急转弯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11471, 0, 1, 2, NULL, '图中这个标志提示前方路段是易发生车辆追尾的路段。', '22694-1561968333091.webp', 32, '正确', '错误', NULL, NULL, '警告标志,提示此路段为事故多发路段。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11470, 0, 1, 2, NULL, '图中这个标志提示前方路段在限定的范围内,禁止一切车辆长时间停放,临时停车不受限制。', '22695-1561968333546.webp', 32, '正确', '错误', NULL, NULL, '禁令标志,表示此路段禁止停车,包括临时和长时间停车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11469, 0, 1, 2, NULL, '图中这个标志提示前方路段禁止一切车辆驶入。', '22696-1561968333800.webp', 32, '正确', '错误', NULL, NULL, '禁令标志,表示此路段禁止一切车辆和行人进入。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11468, 0, 1, 2, NULL, '图中这个标志提示前方路口只允许直行。', '22697-1561968334006.webp', 16, '正确', '错误', NULL, NULL, '禁令标志,前方路段不允许左转或者右转,左右方向箭头被禁止,只能直行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11467, 0, 1, 2, NULL, '图中这个标志提示前方道路的最高车速限制在每小时50公里以下。', '22698-1561968334424.webp', 32, '正确', '错误', NULL, NULL, '指示标志,最低限速50公里每小时。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11466, 0, 1, 2, NULL, '图中这辆蓝色小型客车行驶的车道是慢速车道。', '22699-1561968334635.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第四十四条:在道路同方向划有2条以上机动车道的,左侧为快速车道,右侧为慢速车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11465, 0, 1, 2, NULL, '驶近一个图中所示的路口时,必须先停车再重新起步通过路口。', '22700-1561968334896.webp', 32, '正确', '错误', NULL, NULL, '右侧标志表示停车让行,车辆必须在停止线以外停车观察,确认安全后,才可通行。题中说停车再起步,但是没有观察确认安全,所以是错误的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11464, 0, 1, 3, NULL, '图中所示的情形中,造成事故的责任是橘黄色小客车倒车没有避让正常行驶的车辆,绿色小客车看到前车掉头时没有停车等待。', '22701-1561968335097.webp', 16, '正确', '错误', NULL, NULL, '掉头时应注意避让前后来车,正常行驶时遇前车掉头也应注意避让,都做到文明礼让才能保证行车安全。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11463, 0, 1, 2, NULL, '遇到一个图中所示的漫水桥路段时,要提前减速,谨慎慢行进入水区,在涉水路段行驶,一定要低速缓慢行驶,涉水途中禁止停车。', '22702-1561968335534.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第六十四条:机动车行经漫水路或者漫水桥时,应当停车察明水情,确认安全后,低速通过。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11462, 0, 1, 1, NULL, '在城市道路上,遇到图中情况需要超车时,只要专用车道上没有公交车通过,就可以开启右转向灯,借公交车道行驶。', '22703-1561968335863.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第三十七条:道路划设专用车道的,在专用车道内,只准许规定的车辆通行,其他车辆不得进入专用车道内行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11461, 0, 1, 2, NULL, '在图中所示的高速公路行车道跟随前车行驶时,最小的跟车距离不得少于100米。', '22704-1561968336011.webp', 16, '正确', '错误', NULL, NULL, '机动车在高速公路上行驶,车速超过每小时100公里时,应当与同车道前车保持100米以上的距离。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11460, 1, 1, 1, NULL, '驾驶图中这辆小型客车能否进入高速公路行驶?', '22707-1561968336632.webp', 32, '由取得该车型驾驶证的驾驶人随车指导可以进入', '由持该车型驾驶证3年以上的驾驶人陪同允许进入', '取得准驾该车型驾驶证的驾驶人可以独立驾驶进入', '在高速公路收费人员许可的前提下通过收费口进入', '实习期上高速公路行驶,需要持有相应或者更高准驾车型驾驶证三年以上的驾驶人陪同。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11459, 1, 1, 1, NULL, '符合什么条件可以驾驶图中这辆自学直考小型客车上路学习驾驶?', '22708-1561968336726.webp', 64, '有随车人员指导', '取得学习驾驶证明', '符合自学直考规定', '没有条件限制', '自学直考允许个人使用加装安全辅助装置的自备车辆。但自学驾驶所用自备车辆,不得用于经营性的驾驶学习活动。自学人员上道路学习驾驶前应到公安机关免费领取学车专用标识和学习驾驶证明,在具备安全驾驶经历等条件的随车人员指导下,按照指定的路线、时间学习驾驶,并直接申请考试。所以本题选符合自学直考规定。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11458, 1, 1, 1, NULL, '请判断图中上路学习驾驶的自学直考小客车有什么违法行为?', '22709-1561968336991.webp', 16, '搭载随车指导人员以外的其他人员', '学车专用标识粘贴的位置不符合规定', '自学人员和随车指导人员都没有系安全带', '没有使用教练车在道路进行训练', '自学直考车上只能有一名自学人员和随车指导人员,自学直考的自备车辆必须是非营运性质的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11457, 1, 1, 1, NULL, '驾驶人驾驶图中小型客车上路行驶,会被记多少分?', '22710-1561968337114.webp', 128, '记2分', '记3分', '记6分', '记12分', '故意遮挡机动车号牌的一次记12分,罚款200元。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11456, 1, 1, 1, NULL, '请判断一下图中这辆深色小型客车有几种违法行为?', '22713-1561968338034.webp', 32, '两种违法行为', '三种违法行为', '四种违法行为', '五种违法行为', '1、打电话;2、未系安全带;3、占用应急车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11455, 1, 1, 1, NULL, '请判断一下图中这辆黄色小型客车有几种违法行为?', '22714-1561968338299.webp', 64, '一种违法行为', '两种违法行为', '三种违法行为', '四种违法行为', '1、变道超车压黄实线;2、路口超车;3、超车未开转向灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11454, 1, 1, 1, NULL, '请判断一下图中这辆黄色小型客车的违法行为是什么?', '22716-1561968338833.webp', 64, '强行从右侧超车', '越黄线行驶', '占用专用车道', '未开启右转向灯', '最右车道上写有公交字样,占用公交专用道属于违法行为。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11453, 1, 1, 2, NULL, '看到路口这种信号灯亮时,怎样做是正确的?', '22717-1561968339090.webp', 64, '在不妨碍被放行车辆、行人的情况下,可以通行', '在不妨碍被放行车辆、行人的情况下,可以直行', '在不妨碍被放行车辆、行人通行的情况下可以右转弯', '在不妨碍被放行车辆、行人通行的情况下可以直行通过', '绿灯表示可以直行,左转或右转的车辆可以在不妨碍其他车辆、非机动车、行人通行的情况下通行。红灯时,如果在不妨碍其他车辆行人通行的情况下,可以右转。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11452, 1, 1, 2, NULL, '在路口看到这种信号灯亮时,怎样做是正确的?', '22718-1561968339248.webp', 16, '不能妨碍直行车辆通行', '加速通过', '无需避让对向来车', '抢在对面来车前转弯', '三个先行原则:转弯的机动车让直行的车辆先行,右方道路来车先行,右转弯车让左转弯车先行。我方为左转,对方为直行,故我方不能妨碍对方直行车辆通行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11451, 1, 1, 2, NULL, '在路口看到路口这种信号灯亮时,怎样做是正确的?', '22719-1561968339697.webp', 32, '在确保通行安全的情况下加速通过路口', '停在路口停车线以外等待下一个绿灯信号', '不妨碍被放行车辆、行人通行也不能右转弯', '不妨碍被放行车辆、行人通行可以直行通过', '黄灯亮时,已越过停止线的车辆可以继续通行。车身在安全线里边的,请停车等待。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11450, 1, 1, 2, NULL, '在路口遇到图中这种黄灯不断闪烁时,说明什么情况?', '22720-1561968339875.webp', 128, '路口禁止一切车辆通行', '路口发生道路交通事故', '路口交通管制需要清空', '路口交通信号暂时解除', '图中红绿灯的黄灯闪烁是表示此路口不受红绿灯控制,过往车辆经过此路口时,需自行观察周围情况决定是否停车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11449, 1, 1, 2, NULL, '看到图中所示道路信号灯不断闪烁时,说明前方发生了什么情况?', '22721-1561968340191.webp', 16, '前方路口或道路是危险路段', '前方道路交通信号暂时解除', '前方路段发生道路交通事故', '必须在停止线以外停车等待', '图中单独一个黄灯闪烁,表示前方路口需要减速观察路况,是危险路段。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11448, 1, 1, 2, NULL, '在图中所示有车道信号灯的路段,请判断哪辆机动车行驶的车道是正确的?', '22722-1561968340339.webp', 128, '红色小型客车(E)行驶车道是正确的', '灰色小型客车(A)行驶车道是正确的', '黄色小型客车(B)行驶车道是正确的', '蓝色小型客车(C)行驶车道是正确的', '箭头灯都显示所有车辆要在中间车道行驶,图中只有蓝色小型客车(C)行驶车道是正确的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11447, 1, 1, 2, NULL, '遇到图中这种有车道信号灯的路段,应该选择哪条车道行驶?', '22723-1561968340690.webp', 32, '选择左侧车道行驶', '选择中间车道行驶', '选择右侧车道行驶', '选择任一车道行驶', '箭头灯中绿灯都指向中间车道,明显应该选择中间车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11446, 1, 1, 2, NULL, '遇到图中这种情况,哪种驾驶行为是正确的?', '22724-1561968340839.webp', 64, '直行通过路口', '向左转弯通过路口', '向右转弯通过路口', '在路口掉头行驶', '此处信号灯只有右转是绿灯,其他的方向显示为红灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11445, 1, 1, 2, NULL, '驶近图中所示的铁路道口,怎样做才是正确的?', '22725-1561968341720.webp', 32, '换入空档,滑行通过', '一停、二看、三通过', '加速、观察、快通过', '减速、观察、慢通过', '由图可知,前方是没有管理人员看守的铁路道口,在这样的情况下若想要通过,就要一停二看三通过,以确保安全。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11444, 1, 1, 1, NULL, '请判断前面这辆小型客车提示了什么?', '22742-1561968346154.webp', 32, '准备直行通过路口', '准备向右转弯', '准备在路口停车', '准备向左转弯', '前方车辆右方向灯亮起,提示前方准备右转。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11443, 1, 1, 1, NULL, '请判断前面这辆小型客车在提示什么?', '22743-1561968346392.webp', 64, '准备向左转弯', '前方有障碍物', '准备向左变道', '超越前方车辆', '前车左转向灯亮,提示准备向左变道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11442, 1, 1, 1, NULL, '在这种环境中行车,怎样使用灯光是符合规定的?', '22746-1561968347245.webp', 64, '变换远近光灯', '关闭前照灯', '开启近光灯', '开启远光灯', '夜间车辆通过有路灯的路段时使用近光灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11441, 1, 1, 1, NULL, '如果想超越前方图中这辆慢速度行驶的小客车,怎样做是正确的?', '22747-1561968347528.webp', 128, '连续鸣喇叭提示前车', '从前车的左侧直接超越', '在条件具备时从右侧超越', '开启左转向灯等待让超', '安全行车切记,超车前需要开启左转向灯,并观察前后车车速,待合适的时机实施超车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11440, 1, 1, 1, NULL, '驶近一个没有信号灯的路口,遇到图中所示的情况,怎么做是正确的?', '22748-1561968347699.webp', 16, '停车让行人先通过', '减速缓慢行驶通过', '连续鸣喇叭告知行人', '加速从行人的前方通过', '道路上安全第一,机动车应该礼让行人。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11439, 1, 1, 1, NULL, '看到路边有一个黄灯闪烁时,正确的做法是什么?', '22749-1561968348136.webp', 32, '只要没有行人横过就可以加速通过', '提前减速观察确认是否能安全通过', '鸣喇叭告知两边的行人和非机动车', '如果来不及减速就直接按常速通过', '黄灯闪烁是提示减速注意行人车辆,待确认安全后通过。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11438, 1, 1, 1, NULL, '在一个绿灯亮的路口右转,遇到图中所示的情况,怎么做是正确的?', '22750-1561968348419.webp', 64, '加速在第一个行人的前方右转弯', '绕到第一个行人的后方向右转弯', '等待两个行人都通过路口再右转弯', '鸣喇叭让行人停止通行后向右转弯', '交通安全法规定,机动车应该礼让行人。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11437, 1, 1, 1, NULL, '在一个没有信号灯的路口右转弯时,遇到图中所示的对面车辆发出左转信号,怎么做是正确的?', '22751-1561968348600.webp', 64, '只要不影响对面车辆左转就可以向右转弯', '不用考虑对面车辆直接向右转弯', '等待对面车辆向左转后再向右转弯', '如果已经越过停止线就可以加速向右转弯', '车辆行驶中右转车辆让行左转车辆,转弯让直行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11436, 1, 1, 1, NULL, '在一个没有信号灯的路口右转弯时,遇到图中所示的左侧路口有车辆直行,怎么做是正确的?', '22752-1561968348735.webp', 128, '如果已经越过停止线就可以加速向右转弯', '不用考虑左侧车辆直接向右转弯', '只要不影响左侧车辆直行就可以向右转弯', '等待左侧车辆直行通过后再向右转弯', '车辆行驶过程中,转弯车辆让行直行车辆。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11435, 1, 1, 1, NULL, '在一个没有信号灯的路口左转弯时,遇到图中所示的路口对面有车辆直行,怎么做是正确的?', '22753-1561968349155.webp', 128, '如果已经越过停止线就可以加速向左转弯', '不用考虑对面车辆直接向左转弯', '只要不影响对面车辆直行就可以向左转弯', '等待对面车辆直行通过后再向左转弯', '车辆行驶过程中,转弯车辆让行直行车辆。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11434, 1, 1, 1, NULL, '驶近一个设有信号灯路口,遇到图中所示的信号灯亮着,但有行人通过,怎么做是正确的?', '22754-1561968349312.webp', 32, '从行人的前方绕行通过路口', '在停止线以外停车等待行人通过', '鸣喇叭告知行人停止通过路口', '可从两个行人中间低速缓慢穿过', '相关道路法律法规有规定,机动车应当礼让行人。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11433, 1, 1, 1, NULL, '驶近一个设有信号灯和栏杆的铁路道口,遇到图中所示信号灯亮着,但栏杆还没落下,怎么做是正确的?', '22755-1561968349553.webp', 64, '只要栏杆还没落下就继续行驶', '如果没有看到列车驶来,可以快速横过道口', '在道口的停止线以外停车等待', '如果已过道口停止线,就可以急速通过', '前方红灯亮起,表示火车接近道口,禁止通行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11432, 1, 1, 1, NULL, '在车辆拥堵的路段,遇到图中所示车辆停车等待的情形,怎么做是正确的?', '22756-1561968349720.webp', 32, '穿插到红色小型客车前停车', '依次在红色小型客车后停车等待', '向前直行至不能继续行驶为止', '鸣喇叭催促红色小型客车向前移', '在拥堵路段,驾驶人应当依次排队等候通过,这才是正确处理方法。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11431, 1, 1, 1, NULL, '在辅路上行驶,遇到图中所示有一辆小型客车从主路进入辅路时,怎么做是正确的?', '22757-1561968350185.webp', 16, '减速或停车让主路驶出的车辆先进入辅路', '鸣喇叭告知进入辅路的车辆停车让行', '只要不影响主路驶出的车辆正常行驶就可加速通过', '在辅路行驶的车辆有优先通行权,不用减速行驶', '根据道路交通安全法,辅路车应当让主路车先行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11430, 1, 1, 2, NULL, '跟车进入一段如图所示的漫水路段时,怎么样是正确的?', '22758-1561968350341.webp', 32, '如果感到跟车距离太近,可停车等待', '增加与前车的距离,谨慎跟车慢行', '紧跟前车,沿前车留下的痕迹行驶', '如果前车速度太慢,可适当鸣喇叭示意', '通过漫水路面时,因为道路视线受阻,应当谨慎慢行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11429, 1, 1, 1, NULL, '在一所小学校门前,遇到图中所示的情景,怎么做是正确的?', '22759-1561968350619.webp', 64, '借左侧车道超越校车', '变换远近光灯催促校车离开', '停在校车后面等待', '鸣喇叭催促校车离开', '校车在道路上停靠时,与校车同一车道的后方及相邻机动车道上的车辆就得停车等待,其他车道上的机动车也应减速通过。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11428, 1, 1, 1, NULL, '行车中遇到图中所示的停在路边的校车时,怎么做是正确的?', '22760-1561968350766.webp', 32, '提前变更到中间车道超越', '提前变更到最左侧车道超越', '停在校车后方使用灯光催促', '适当鸣喇叭低速从左侧超越', '校车在同方向有两条以上的机动车道的道路上停靠时,校车停靠车道后方和相邻机动车道上的机动车应当停车等待,其他机动车道上的机动车应当减速通过。此路三条车道,可以提前变更到最左侧车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11427, 1, 1, 2, NULL, '在如图所示的道路上需要停车时,怎么选择停放位置的是正确的?', '22761-1561968351237.webp', 128, '选择在路边不妨碍通行的地方停放', '选择在标志前方安全的位置停车', '只要没有禁止停车标线的路段都能停车', '在这段道路上的任何地方都不能停车', '注意图中右侧的禁令标志,此路段禁止停车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11426, 1, 1, 1, NULL, '驾驶小型客车,在如图所示的能见度小于200米的高速公路上以60KM/h速度行驶时,与同车道前车安全距离是多少?', '22762-1561968351424.webp', 16, '保持100米以上的距离', '保持100米以内的距离', '保持与车速相同数据的距离', '保持不小于50米的安全距离', '驾驶机动车在高速公路上行驶,遇见低能见度气象条件时,能见度在200米以下,车速不得超过每小时60公里,与同车道前车至少保持100米以上的距离。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11425, 1, 1, 3, NULL, '驾驶小型客车在高速公路上行驶,遇到图中所示情形,怎么做是正确的?', '22763-1561968351627.webp', 32, '可以借右侧应急车道行驶', '与前车保持安全距离跟车行驶', '紧跟右侧车道红色小客车行驶', '鸣喇叭或变换远近光灯催促', '保持安全车距,是行车的基本要求。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11424, 1, 1, 1, NULL, '驶近一个图中所示的路口时,怎么做是正确的?', '22764-1561968351780.webp', 128, '如果路口没有车辆和行人,就可以加速通过', '只要不影响车辆和行人通行,就可以减速通过', '在路口停车后向左转头观察,确认安全后通过', '在路口减速后向左转头观察,确认安全后通过', '1、请注意,图中右前方有减速让行标志。表示车辆驾驶员必须减速慢行,观察干路行车情况,在确保干道车辆优先的前提下,认为安全时方可续行。 2、其次,图中路口并无信号灯,因此并无红灯亮起强制要求我方车辆停车。3、综上,正确的做法是在路口减速后向左转头观察,确认安全后通过。 ', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11423, 1, 1, 1, NULL, '遇到图中所示的车辆无法继续行驶的情况时,怎样按规定放置危险警告标志?', '22765-1561968351954.webp', 64, '在车后50米处放置警告标志', '在车后50米至100米处放置警告标志', '在车后150米以外放置警告标志', '根据道路交通情况在适当位置放置警告标志', '高速公路上设置警告标志应当在150米以外,同时按照规定开启危险报警闪光灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11422, 1, 1, 1, NULL, '图中黄色小客车驾驶人这种违法占用应急车道的行为会被记多少分?', '22766-1561968352745.webp', 64, '记2分', '记3分', '记6分', '记12分', '违法占用应急车道记6分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11421, 1, 1, 3, NULL, '在图中所示的道路跟车行驶时,为什么要保持较大的跟车距离?', '22767-1561968352965.webp', 128, '因为不能正确判断水的深度', '因为路面积水的反光会影响距离的判断', '因为前车驾驶人的反应会变得迟缓', '因为溅起来的水会影响视线', '这里需要注意到,与前车距离较小时,溅起来的水会影响视线。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11420, 1, 1, 2, NULL, '在图中所示的这段道路行驶需要注意什么?', '22768-1561968353349.webp', 32, '只要有逆向行驶的车辆就不能越线行驶', '既不能越中心线也不能压中心线行驶', '如果没有逆向行驶的车辆允许越中心线行驶', '只有在超车的时候才能越中心线行驶', '中心线是黄实线不可跨越。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11419, 1, NULL, 1, NULL, '对驾驶人开展日常教育是增强____意识,提高安全文明素质的重要手段。', NULL, 16, '驾驶人社会责任', '文明礼貌', '得与失', '优先发展交通', NULL, 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11418, 0, NULL, 1, NULL, '停车时,应观察前后交通环境确保安全后,再打开机动车车门。', NULL, 16, '正确', '错误', NULL, NULL, '按照防御性驾驶技术要求,机动车驾驶人停车后下车时,应先观察前后交通环境情况,确认安全后再打开车门下车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11417, 0, NULL, 1, NULL, '驾驶机动车遇到后方有执行任务的紧急车辆时,可以借用无人通行的非机动车道让行。', NULL, 16, '正确', '错误', NULL, NULL, '机动车在让行执行任务的紧急车辆时,可以借用无人通行的非机动车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11416, 1, NULL, 3, NULL, '机动车在山区冰雪覆盖的道路上行驶,应当采取在什么上安装防滑链等安全措施。', NULL, 16, '驱动轮', '被动轮', '备胎', '驱动轮和被动轮', '《中华人民共和国道路交通安全法》:机动车在未划设中心线和划分机动车道与非机动车道的道路上行驶,遇弯道时应当减速、靠右通行。机动车在山区冰雪覆盖的道路上行驶,应当采取在驱动轮上安装防滑链等安全防范措施。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11415, 0, NULL, 3, NULL, '机动车驾驶人驾驶车辆前可以饮用少量啤酒。', NULL, 32, '正确', '错误', NULL, NULL, '驾驶人血液中的酒精含量大于(等于)20毫克/100毫升、小于80毫克/100毫升的行为属于饮酒驾车。饮酒后驾驶机动车的,处暂扣六个月机动车驾驶证,并处一千元以上二千元以下罚款。因饮酒后驾驶机动车被处罚,再次饮酒后驾驶机动车的,处十日以下拘留,并处一千元以上二千元以下罚款,吊销机动车驾驶证。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11414, 0, NULL, 3, NULL, '安全驾驶、文明驾驶是机动车驾驶人必备的素质。', NULL, 16, '正确', '错误', NULL, NULL, NULL, 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11413, 1, 1, 1, NULL, '在路口遇这种情形怎样通行?', '5eb4d75agw1e28ypk3xyjj.webp', 128, '鸣喇叭告知让行', '直接加速转弯', '减速缓慢转弯', '让左方来车先行', '《道路交通安全法》第五十二条:机动车通过没有交通信号灯控制也没有交通警察指挥的交叉路口,有交通标志、标线控制的,让优先通行的一方先行。如图我方车道有减速让行标志,所以应让左方先行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11412, 0, NULL, 1, NULL, '违反交通管制规定不听劝阻强行通行的,由公安机关交通管理部门处两百元以上两千元以下罚款,可以并处十五日以下拘留。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第九十九条:违反交通管制的规定强行通行,不听劝阻的,由公安机关交通管理部门处200元以上2000元以下罚款,可以并处15日以下拘留。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11411, 0, NULL, 1, NULL, '在路口准备右转弯,遇同车道前车等候放行信号时,要依次停车等候。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十一条:机动车通过有交通信号灯控制的交叉路口,向右转弯遇有同车道前车正在等候放行信号时,依次停车等候。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11410, 0, NULL, 3, NULL, '雾天行车时,可多鸣按喇叭催促前车提速,避免发生追尾事故。', NULL, 32, '正确', '错误', NULL, NULL, '大雾天气能见度低,鸣喇叭是为了提醒对方自己的位置,而不是催促对方加速。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11409, 1, NULL, 1, NULL, '车辆在一般道路上发生故障后,应开启危险报警闪光灯,并在车后50-100米处设置警告标志,如不按规定使用灯光和设置警告标志的,一次将被记多少分处罚?', NULL, 64, '1分', '2分', '3分', '6分', '《道路交通安全违法行为记分分值》第三条:机动车驾驶人有下列违法行为之一,一次记3分:在道路上车辆发生故障、事故停车后,不按规定使用灯光和设置警告标志的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11408, 1, NULL, 1, NULL, '准驾车型为C1驾驶证的,还可以驾驶下列哪种车型?', NULL, 128, 'C2小型自动挡汽车', 'C3低速载货汽车', 'C4三轮汽车', '以上都可', '准驾车型为小型汽车的,可以驾驶:小型、微型载客汽车以及轻型、微型载货汽车,轻型、微型专项作业车,小型、微型自动挡载客汽车以及轻型、微型自动挡载货汽车,低速载货汽车,三轮汽车。提示:C1准予驾驶C2、C3、C4准驾车型。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11407, 0, NULL, 1, NULL, '有醉酒驾驶机动车行为的,五年内不得重新取得机动车驾驶证。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第九十一条: 醉酒驾驶机动车的,由公安机关交通管理部门约束至酒醒,吊销机动车驾驶证,依法追究刑事责任;五年内不得重新取得机动车驾驶证。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11406, 0, NULL, 1, NULL, '驾驶机动车在高速公路上遇到能见度低于200米的气象条件时,最高车速不能超过每小时60公里,与同车道前车保持100米以上的距离。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第八十一条:机动车在高速公路上行驶,遇有雾、雨、雪、沙尘、冰雹等低能见度气象条件,能见度小于200米时,开启雾灯、近光灯、示廓灯和前后位灯,车速不得超过每小时60公里,与同车道前车保持100米以上的距离。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11405, 0, NULL, 1, NULL, '驾驶机动车在同方向只有1条机动车道的城市道路行驶时,最高车速不能超过每小时70公里。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第四十五条:同方向只有1条机动车道的道路,城市道路最高行驶速度不得超过每小时50公里,公路最高行驶速度不得超过每小时70公里。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11404, 0, NULL, 1, NULL, '机动车在一般道路上发生故障并难以移动时,应提前开启危险报警闪光灯,并在车后50-100米处设置警告标志。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第六十条:机动车在道路上发生故障或者发生交通事故,妨碍交通又难以移动的,应当按照规定开启危险报警闪光灯并在车后50米至100米处设置警告标志,夜间还应当同时开启示廓灯和后位灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11403, 1, NULL, 1, NULL, '机动车发生财产损失交通事故,对应当自行撤离现场而未撤离的,交通警察应该如何处置?', NULL, 16, '责令当事人撤离现场', '拘留', '扣留机动车', '处以200元罚款', '《道路交通事故处理程序规定》第十三条:对应当自行撤离现场而未撤离的,交通警察应当责令当事人撤离现场;造成交通堵塞的,对驾驶人处以200元罚款;驾驶人有其他道路交通安全违法行为的,依法一并处罚。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11402, 0, NULL, 1, NULL, '驾驶机动车在经过交通流量大的城市路段时,只要交通信号灯不是红灯就可以随时超车。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十三条:行经铁路道口、交叉路口、窄桥、弯道、陡坡、隧道、人行横道、市区交通流量大的路段等没有超车条件的,不得超车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11401, 0, 1, 1, NULL, '这个标志表示前方注意双向行驶。', '24278-1586428270658.webp', 32, '正确', '错误', NULL, NULL, '此标志为注意潮汐车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11400, 0, NULL, 1, NULL, '驾驶机动车在高速公路上行驶,遇到能见度低于200米的气象条件时,车速不得超过60公里/小时,如不按规定行驶,将被一次记6分。', NULL, 16, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:低能见度气象条件下,驾驶机动车在高速公路上不按规定行驶的,一次记6分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11399, 0, NULL, 5, NULL, '在泥泞道路上制动时,车辆容易发生侧滑或甩尾,导致交通事故。', NULL, 16, '正确', '错误', NULL, NULL, '泥泞道路软滑,摩擦系数低,车轮易发生侧滑或甩尾,引发交通事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11398, 0, 1, 3, NULL, '路中两条双黄虚线表示禁止压线或越线。', '24285-1586428275483.webp', 32, '正确', '错误', NULL, NULL, '路中两条双黄虚线是“潮汐车道”,是指根据早晚交通流量不同情况,对有条件的道路,通过车道灯的指示方向变化,控制主干道车道行驶方向,来调整车道数。行车时允许压线或越线。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11397, 0, NULL, 4, NULL, '驾驶机动车经过两侧有行人,且有积水的路面时,应连续鸣喇叭提醒行人。', NULL, 32, '正确', '错误', NULL, NULL, '通过有行人且有积水的路段,应该减速慢行,防止积水溅到行人身上,连续鸣喇叭会使行人受到惊吓。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11396, 0, NULL, 4, NULL, '驾驶人一边驾车,一边吸烟对安全行车有影响。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶车辆吸烟不仅对车上乘客有害,烟雾也会使驾驶员视线迷糊,对安全行车是有影响的。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11395, 0, 1, 1, NULL, '车辆出现故障后可以在图中位置进行维修。', '24423-1587721220959.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第六十八条:机动车在高速公路上发生故障时,应当在故障车来车方向一百五十米以外设置警告标志,车上人员应当迅速转移到右侧路肩上或者应急车道内,并且迅速报警。不得在行车道上维修车辆。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11394, 0, 1, 1, NULL, '图中路口可以直接通过。', '24424-1587721221055.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第三十八条:车辆、行人遇有交通警察现场指挥时,应当按照交通警察的指挥通行。图中交通警察手势为停止信号,当交通警察指挥与信号灯不一致时,以交通警察的指挥为准。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11393, 0, NULL, 1, NULL, '遇前方道路发生交通事故时,在交通警察的指挥下可以从应急车道绕行。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第三十八条:车辆、行人遇有交通警察现场指挥时,应当按照交通警察的指挥通行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11392, 1, 1, 2, NULL, '下面哪个标志表示注意驼峰桥?', '24426-1587721221131.webp', 16, '图①', '图②', '图③', '图④', ' 一个坡是高突,一个坑是低洼,一个凸中间有空间是驼峰桥,两个凸是不平。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11391, 1, 1, 2, NULL, '下面哪个标志表示注意路面低洼?', '24427-1587721221171.webp', 128, '图①', '图②', '图③', '图④', ' 一个坡是高突,一个坑是低洼,一个凸中间有空间是驼峰桥,两个凸是不平。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11390, 1, 1, 2, NULL, '下面哪个标志表示注意路面不平?', '24428-1587721221208.webp', 32, '图①', '图②', '图③', '图④', ' 一个坡是高突,一个坑是低洼,一个凸中间有空间是驼峰桥,两个凸是不平。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11389, 1, NULL, 1, NULL, '以70公里/小时的速度在没有限速标志的同向3车道的高速公路上行驶,应该走哪个车道?', NULL, 64, '最左侧车道', '中间车道', '最右侧车道', '以上均可', ' 《道路交通安全法实施条例》第七十八条:同方向有2条车道的,左侧车道的最低车速为每小时100公里;同方向有3条以上车道的,最左侧车道的最低车速为每小时110公里,中间车道的最低车速为每小时90公里。道路限速标志标明的车速与上述车道行驶车速的规定不一致的,按照道路限速标志标明的车速行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11388, 1, 1, 2, NULL, '下面哪个信号灯闪烁表示前方路口或道路是危险路段?', '24432-1587721221478.webp', 16, '图①', '图②', '图③', '图④', NULL, 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11387, 0, NULL, 1, NULL, '无证驾驶可构成危险驾驶罪。', NULL, 32, '正确', '错误', NULL, NULL, '根据《刑法》第一百三十三条,危险驾驶罪有以下情形:(一)追逐竞驶,情节恶劣的;(二)醉酒驾驶机动车的;(三)从事校车业务或者旅客运输,严重超过额定乘员载客,或者严重超过规定时速行驶的;(四)违反危险化学品安全管理规定运输危险化学品,危及公共安全的。危险驾驶罪不包括无证驾驶,题目描述有误,因此本题答案为错。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11386, 2, NULL, 5, NULL, '驾驶机动车在长距离的隧道群路段行驶时,影响安全驾驶的因素主要有哪些?', NULL, 240, '在单一的环境下长时间驾驶会对速度变化产生错觉,易超速行驶', '驾驶环境单一,长时间易出现视觉疲劳', '环境狭窄密封,驾驶人易产生急躁情绪', '通风不良导致驾驶人疲劳,容易反应迟缓', '驾驶机动车在长距离隧道群路段行驶时,影响安全驾驶的主要原因有:在单一的环境下长时间驾驶会对速度变化产生错觉,易超速行驶;驾驶环境单一,长时间易出现视觉疲劳;环境狭窄密封,驾驶人易产生急躁情绪;通风不良导致驾驶人疲劳,容易反应迟缓。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11385, 0, NULL, 5, NULL, '当隧道内发生火灾时,驾乘人员不能弃车逃生。', NULL, 32, '正确', '错误', NULL, NULL, '隧道内发生火灾时,驾乘人员应第一时间弃车逃生,如果人员被困在车厢内,应果断地用车内消防锤、高跟鞋等尖利物体敲碎车窗,逃离车辆。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11384, 0, NULL, 50, NULL, '机动车载运爆炸物品、易燃易爆化学物品以及剧毒、放射性等危险物品,应当经公安机关批准后,按指定的时间、路线、速度行驶,悬挂警示标志并采取必要的安全措施。', NULL, 16, '正确', '错误', NULL, NULL, '《中华人民共和国安全生产法》规定机动车载运爆炸物品、易燃易爆化学物品以及剧毒、放射性等危险物品,应当经公安机关批准后,按指定的时间、路线、速度行驶,悬挂警示标志并采取必要的安全措施。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11383, 1, NULL, 5, NULL, '当车辆在隧道内发生事故无法驶出隧道时,应开启什么灯光?', NULL, 128, '远光灯', '近光灯', '交替使用远近光灯', '危险报警闪光灯', '当车辆无法驶出隧道时,要打开危险报警闪光灯,在车后方设警告标志,并及时报警。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11382, 0, 1, 5, NULL, '在道路上遇到这种情况时要开启近光灯,靠右侧行驶。', '24439-1587721221687.webp', 16, '正确', '错误', NULL, NULL, '车辆进入双向行驶隧道,一般都应该开启近光灯,而不要开启远光灯,同时车辆应注意靠右侧行驶,注意对向来车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11381, 1, NULL, 5, NULL, '在逃离隧道火灾现场时,应向哪个方向逃跑?', NULL, 16, '烟雾流相反方向', '烟雾流相同方向', '人多的方向', '原地等待救援', '当在隧道内发生火灾时,向火势、烟雾飘散的反方向(上风向处)寻找逃生通道,不要顺风逃跑,否则很容易会被毒烟雾气追上造成伤亡!', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11380, 0, NULL, 3, NULL, '驾驶机动车在高速公路上行驶时,应尽可能避免与其他车辆长时间并行。', NULL, 16, '正确', '错误', NULL, NULL, '车辆并行,容易发生交通事故,尤其是和大型车辆并行是非常危险的事情。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11379, 0, 1, 3, NULL, '如图所示,驾驶机动车驶出匝道后可以直接驶入行车道。', '24553-1589352091465.webp', 32, '正确', '错误', NULL, NULL, '机动车进入高速后,必须经过加速车道加速后。打开左转向灯,确认后方无车辆通过后再进入行车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11378, 1, 1, 3, NULL, '如图所示,A车若想左转,以下做法正确的是什么?', '24554-1589352091637.webp', 16, '直行通过,重新选择行驶路线', '从直行车道左转', '直接变更到左转车道', '向右转弯,重新选择行驶路线', 'A车所在车道是直行车道,若想左转弯,只能通过左转弯车道进行转弯。A车已错过转弯机会,只能直行通过后,重新选择行驶路线。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11377, 0, 1, 3, NULL, '如图所示,A车的行为是正确的。', '24555-1589352091934.webp', 32, '正确', '错误', NULL, NULL, 'A车即将错过下高速的出口了,这时候压实线通过是非常危险的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11376, 1, NULL, 3, NULL, '驾驶机动车在高速公路上遇前方车流缓行时,以下做法正确的是什么?', NULL, 16, '跟随车流行驶,保持安全车距', '进入应急车道行驶', '可以倒车', '立即停车', '高速路车流很慢说明前方发生状况,一定不要超车,要跟随车流,保持安全车距行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11375, 0, NULL, 3, NULL, '驾驶机动车驶出地下车库时,应按照导向箭头的方向行驶,不得逆行。', NULL, 16, '正确', '错误', NULL, NULL, '出地下车库,应该按照导向箭头行驶,如果逆行很容易和对向车发生事故。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11374, 0, 1, 2, NULL, '如图所示,驾驶机动车在路口遇到这种信号灯亮时,确认安全后通过。', '24558-1589352092154.webp', 16, '正确', '错误', NULL, NULL, '信号灯是绿灯,对面有来车,确认对面绿车不是左转弯,不影响自己直行,可以安全通过。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11373, 0, 1, 2, NULL, '如图所示,驾驶机动车在这种情况下可以左转弯。', '24559-1589352092203.webp', 16, '正确', '错误', NULL, NULL, '左转信号灯是绿色,不管对向车是直行还是右转,我们可以左转;如果对向车是直行,我们必须让对向车辆先行;如果对向车是右转,他必须让我们先行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11372, 0, 1, 1, NULL, '如图所示,前车在行驶过程中存在违法行为。', '24560-1589352092239.webp', 16, '正确', '错误', NULL, NULL, '由路边的路牌可知,这是条高速公路。车牌显示XX学说明是教练车,教练车不能上高速。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11371, 0, NULL, 1, NULL, '机动车之间发生的造成财产损失、尚未造成人员伤亡,且车辆可以移动的交通事故,双方驾驶人对交通事故无争议,但其中一方使用伪造、变造的号牌,不可以自行协商解决。', NULL, 16, '正确', '错误', NULL, NULL, '一方使用伪造、变造的车辆是违法行为,另一方不管是不是自己的责任,一律按对方车的责任算。这时候不要协商了,最好报警。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11370, 2, NULL, 2, NULL, '开车之前绕车一周检查时,遇到以下哪些情况,需要及时检查或更换轮胎?', NULL, 240, '轮胎上有鼓包或脱皮', '胎压过低', '轮胎花纹厚度过浅', '轮胎侧壁有裂痕', '轮胎作为汽车的四只”脚”,对行车安全起到很重要的作用,如果轮胎出现鼓包或脱皮、侧壁有裂痕、轮胎花纹厚度过浅、胎压过低这四种情况时就应该及时修理或更换。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11369, 1, NULL, 2, NULL, '下长坡时,控制车速除了刹车制动以外,还有什么有效的辅助方法?', NULL, 32, '挂入空挡滑行', '利用发动机制动', '踏下离合器滑行', '关闭发动机熄火滑行', '发动机制动就是挂低挡,让车利用低挡位的惯性制动。你可以试一下,你在3挡的速度,直接挂1挡,记住不要踩刹车,直接挂挡,你看效果如何,车身会震一下,速度下降的很快。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11368, 1, NULL, 2, NULL, '驾驶机动车遇团雾时,以下做法正确的是什么?', NULL, 128, '提高行驶速度尽快通过', '开启远光灯', '缩短跟车距离,保持通行效率', '开启雾灯', '团雾一般都是突然发生的,无法预测。遇到团雾一定要减速慢行,开启雾灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11367, 1, 1, 2, NULL, '夜间驾驶机动车准备超越右侧非机动车时,以下做法正确的是什么?', '24568-1589352092450.webp', 16, '交替变换远近光灯示意,保持足够的横向安全距离,从其左侧超越', '加速从左侧超越', '鸣喇叭示意后,从左侧超越', '缓慢行驶,从右侧超越', '夜间超越右侧非机动车,交替变换灯光提醒骑车人注意后,加大横向安全距离,从左侧超越。单纯鸣喇叭对方不一定能听到(戴耳机),并且也没说要加大安全距离超越。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11366, 1, NULL, 2, NULL, '机动车轮胎的胎压标识表示的含义是什么?', NULL, 64, '正常情况下充气压力参考值', '全车所有轮胎充气压力的平均值', '正常情况下最大安全充气压力值', '正常情况下最小安全充气压力值', '胎压就相当于轮胎的生命,如果过高或过低都会使轮胎的寿命变短,甚至爆胎。轮胎胎压标识就是指轮胎在正常情况下的最大充气压力值。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11365, 1, NULL, 2, NULL, '夜间驾驶机动车右转弯之前要稍微向右后方回头观察,主要目的是为了确认以下哪种情况?', NULL, 32, '确认本车是否在右转车道内', '观察右后方盲区内是否有其他车辆或行人', '确认本车是否开启右转向灯', '确认前方直行信号灯是否为绿灯', '夜间在路口右转弯时,一定要通过后视镜往右后方观察,主要是看看有没有车辆或行人。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11364, 0, 1, 5, NULL, '如图所示,以下交通标志提示驾驶人进入隧道应开启前照灯。', '24571-1589352092553.webp', 16, '正确', '错误', NULL, NULL, '进入隧道前一定要开启前照灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11363, 0, NULL, 5, NULL, '夜间机动车灯光照射距离由远及近,说明机动车可能已驶到坡顶。', NULL, 32, '正确', '错误', NULL, NULL, '在平直的路面时,灯光距离不变;出现一般的弯道时,灯光也跟着转弯,从路中移至路侧;当上坡时,灯光随着车的上下导致灯光也由高变低;当出现急弯或大坑时,灯光随着车的颠簸也离开路面。因此本题选择错误。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11362, 1, NULL, 5, NULL, '夜间机动车灯光照射距离由近及远,可能是什么原因?', NULL, 16, '由弯道进入直线道', '进入连续弯道', '前方出现大坑', '前方出现弯道', '夜间开灯驾驶对道路与地形的判断方法:(1)如果发现行驶时汽车灯光的照射距离在由远变近,前方路况可能是:进入一侧有山体或屏障的弯道、到达坡道的低谷地段、驶近或驶入上坡道。(2)如果发现行驶时灯光的照射距离在由近变远,前方路况可能是:弯道变为直路、进入下坡道、缓下坡变为陡下坡或由下坡道驶入平路。(3)若行驶中发现灯光离开了路面,前方路况可能是:急转弯、路面有大坑或到达坡顶。(4)当灯光由路中间移向路侧,前方路况可能是:一般弯道或连续弯道,当是连续弯道时灯光会随之从道路的一侧移到另一侧。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11361, 0, NULL, 5, NULL, '夜间机动车灯光照射距离由远及近,说明机动车可能已到达坡道的低谷。', NULL, 16, '正确', '错误', NULL, NULL, '在平直的路面时,灯光距离不变;出现一般的弯道时,灯光也跟着转弯,从路中移至路侧;当上坡时,灯光随着车的上下导致灯光也由高变低;当出现急弯或大坑时,灯光随着车的颠簸也离开路面。因此本题选择正确。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11360, 0, NULL, 5, NULL, '夜间机动车灯光照射距离由近及远,说明机动车可能已驶入一侧有山体的弯道。', NULL, 32, '正确', '错误', NULL, NULL, '夜间开灯驾驶对道路与地形的判断方法: (1)如果发现行驶时汽车灯光的照射距离在由远变近,前方路况可能是:进入一侧有山体或屏障的弯道、到达坡道的低谷地段、驶近或驶入上坡道。(2)如果发现行驶时灯光的照射距离在由近变远,前方路况可能是:弯道变为直路、进入下坡道、缓下坡变为陡下坡或由下坡道驶入平路。(3)若行驶中发现灯光离开了路面,前方路况可能是:急转弯、路面有大坑或到达坡顶。(4)当灯光由路中间移向路侧,前方路况可能是:一般弯道或连续弯道,当是连续弯道时灯光会随之从道路的一侧移到另一侧。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11359, 2, NULL, 5, NULL, '白天驾驶机动车进入隧道前,以下做法正确的是什么?', NULL, 240, '在照明不足、影响视距的隧道前鸣喇叭示意', '与前车保持充足的安全距离', '按照限速标志控制车速', '进入隧道前开启前照灯', '进入隧道前要鸣喇叭、开启前照灯,在隧道要与前车保持足够的安全距离,不要超过隧道限制的车速行驶。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11358, 2, NULL, 5, NULL, '机动车在隧道内遇本车发动机舱起火时,以下做法正确的是什么?', NULL, 224, '将发动机罩完全打开灭火', '在起火初期用灭火器灭火', '立即停车、熄火', '如果无法自行灭火,果断弃车逃生', '发动机舱发生火灾一定不要打开发动机罩,否则容易发生更多危害。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11357, 2, NULL, 5, NULL, '驾驶机动车在隧道中行驶,以下做法正确的是什么?', NULL, 48, '注意和前车保持安全距离', '按照规定限速行驶', '提高车速,尽快驶离', '在隧道内紧急停车带停车休息', '隧道内要按照隧道标明的车速行驶,严禁停车、超车、超速行驶。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11356, 0, NULL, 5, NULL, '驾驶机动车在隧道内行驶,遇前方车速过慢时,可选择合适的时机超车通过。', NULL, 32, '正确', '错误', NULL, NULL, '隧道内严禁停车、超车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11355, 0, NULL, 5, NULL, '在隧道内驾驶时,如果前方发生突发情况,与前车保持足够车距可以让驾驶人有足够的反应时间和避让空间。', NULL, 16, '正确', '错误', NULL, NULL, '不管发不发生情况,任何时候都要与前车保持足够的安全距离。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11354, 0, NULL, 5, NULL, '驾驶机动车在双向行驶的隧道内遇到其他车辆发生交通事故时,应减速注意避让,不得停车围观。', NULL, 16, '正确', '错误', NULL, NULL, '隧道内严禁停车、超车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11353, 0, NULL, 5, NULL, '驾驶机动车遇隧道内发生火灾时,应留在车内等待救援。', NULL, 32, '正确', '错误', NULL, NULL, '隧道内发生火灾,留在车内是非常不安全的,逃命要紧。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11352, 0, NULL, 5, NULL, '夜间在照明不好的路段驾驶机动车,除开启前照灯外还应开启危险报警闪光灯,以便其他交通参与者注意到本车,保证驾驶安全。', NULL, 32, '正确', '错误', NULL, NULL, '照明不好的路段不用开启危险报警闪光灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11351, 0, NULL, 5, NULL, '机动车在隧道内发生故障,车辆无法移动时,驾驶人可在车内等候救援。', NULL, 32, '正确', '错误', NULL, NULL, '驾驶机动车在隧道发生故障,车辆无法移动时,很容易造成后车追尾,这个时候一定要下车找个安全的地方待着。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11350, 0, NULL, 5, NULL, '冬季隧道出口路面可能结冰,此时应降低车速行驶,但不得紧急制动。', NULL, 16, '正确', '错误', NULL, NULL, '冬天隧道出口有可能路面结冰,道路很滑,出隧道之前应该降低车速,不要急刹车,否则容易发生交通事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11349, 0, NULL, 5, NULL, '驾驶机动车驶入隧道前,为防止进入后暗适应过程中,与前车发生事故,应降低行驶速度,与前车保持充足的安全距离。', NULL, 16, '正确', '错误', NULL, NULL, '进入隧道前光线充足,进入隧道后视线变暗,这时眼睛有个适应过程,这个过程就是暗适应过程。所以进入隧道前一定要减速慢行,保持充足的安全距离。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11348, 2, NULL, 6, NULL, '关于机动车轮胎胎压过高的危害,以下说法正确的是什么?', NULL, 240, '加速轮胎胎面中央的花纹磨损,缩短轮胎的使用寿命', '导致爆胎', '轮胎的摩擦力、附着力降低,影响制动效果', '导致转向盘震动、跑偏', '胎压不足或者过大都没好处,不仅会带来轮胎损耗,严重时还有危险。胎压不足会降低胎体耐久性,还会提高轮胎的滚动阻力,导致燃油经济性能降低;胎压过高则会降低抓地性能,导致不规则磨损、爆胎。因此,建议至少一个月检查一次胎压,如果是要出远门跑长途,最好在出发前再次确认胎压处于正常范围内。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11347, 1, NULL, 1, NULL, '驾驶机动车从匝道驶入高速公路时,应当开启什么灯?', NULL, 16, '左转向灯', '右转向灯', '危险报警闪光灯', '前照灯', '《道路交通安全法实施条例》第七十九条:机动车从匝道驶入高速公路,应当开启左转向灯,在不妨碍已在高速公路内的机动车正常行驶的情况下驶入车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11346, 1, NULL, 1, NULL, '下列驾驶情形中,需要使用转向灯的是?
+①准备超车  ②路口转弯  ③靠边停车  ④变更车道', NULL, 128, '只有①', '只有①②', '只有①②③', '①②③④', '《道路交通安全法实施条例》第五十七条:机动车应当按照下列规定使用转向灯:向左转弯、向左变更车道、准备超车、驶离停车地点或者掉头时,应当提前开启左转向灯;向右转弯、向右变更车道、超车完毕驶回原车道、靠路边停车时,应当提前开启右转向灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11345, 0, NULL, 1, NULL, '夜间驾驶机动车在有路灯照明的路段起步,应开启远光灯。', NULL, 32, '正确', '错误', NULL, NULL, '夜间驾驶机动车在有路灯照明的路段起步,应开启近光灯和左转向灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11344, 0, NULL, 1, NULL, '驾驶机动车在雾天行车应开启雾灯、近光灯、示廓灯和前后位灯,能见度较低时,还应开启危险报警闪光灯。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十八条:机动车在夜间没有路灯、照明不良或者遇有雾、雨、雪、沙尘、冰雹等低能见度情况下行驶时,应当开启前照灯、示廓灯和后位灯,但同方向行驶的后车与前车近距离行驶时,不得使用远光灯。机动车雾天行驶应当开启雾灯和危险报警闪光灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11343, 1, NULL, 2, NULL, '黄昏时分,光线若明若暗,容易产生视觉误差,驾驶机动车应提前打开什么灯以便被其他驾驶人发现?', NULL, 16, '示廓灯', '远光灯', '近光灯', '前雾灯', '黄昏时分容易产生视觉误差,驾驶机动车应提前打开示廓灯以便被其他驾驶人发现。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11342, 0, NULL, 2, NULL, '合理使用灯光能够保证行车安全,因此,驾驶人在出行前应该确保车辆灯光完好齐备,工作状态正常。', NULL, 16, '正确', '错误', NULL, NULL, '合理使用灯光能够保证行车安全,驾驶人在出行前应检查灯光设备,确保工作状态正常。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11341, 0, NULL, 2, NULL, '驾驶机动车在路口转弯过程中,应当持续开启转向灯,以提醒周围车辆和行人。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶机动车在路口转弯过程中,应当持续开启转向灯,以提醒周围车辆和行人。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11340, 0, NULL, 2, NULL, '驾驶机动车需改变车辆行驶轨迹时,如变更车道、掉头、靠边停车等,在车流量较少的路段,可以不提前开启转向灯提示其他交通参与者。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十七条:机动车应当按照下列规定使用转向灯:向左转弯、向左变更车道、准备超车、驶离停车地点或者掉头时,应当提前开启左转向灯;向右转弯、向右变更车道、超车完毕驶回原车道、靠路边停车时,应当提前开启右转向灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11339, 1, NULL, 5, NULL, '某个周末,司机赵某驾驶机动车前往市郊老家探亲,当行驶在某高速公路途中,车辆右后轮突然发生爆胎。赵某凭借多年驾驶经验,终于将车辆停下,但车辆停在高速公路的行车道上,此时赵某应该怎么办?', NULL, 128, '站在机动车前方', '留在车上等待救援', '站在机动车后方', '迅速转移至右侧路肩上或应急车道内', '当车辆发生故障时,打开双闪警示灯,应将车辆停放在最右侧的应急车道或紧急停车带内,夜间打开尾灯示宽灯,司乘人员应立即下车,在路沿下护坡内等候(尽量远离高速公路路面、护栏)救援车辆、人员来,由一个人在车辆尾部150米左右放置三角警示牌或警示物(最好隔十米左右放置一个警示物),切记不能在高速公路内走动、追逐、等候!不能在故障车辆内等候!一般情况禁止在高速公路上修理车辆。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11338, 1, NULL, 1, NULL, '机动车驾驶证损毁无法辨认的要在多长时间内申请换证?', NULL, 128, '60日', '50日', '40日', '30日', '《机动车驾驶证申领和使用规定》第六十条 具有下列情形之一的,机动车驾驶人应当在三十日内到机动车驾驶证核发地或者核发地以外的车辆管理所申请换证:(一)在车辆管理所管辖区域内,机动车驾驶证记载的机动车驾驶人信息发生变化的;(二)机动车驾驶证损毁无法辨认的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11337, 1, NULL, 1, NULL, '对道路交通安全违法行为的处罚种类不包括以下哪项?', NULL, 128, '警告', '罚款', '暂扣', '训诫', '《中华人民共和国道路交通安全法》第八十八条:对道路交通安全违法行为的处罚种类包括:警告、罚款、暂扣或者吊销机动车驾驶证、拘留。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11336, 0, NULL, 2, NULL, '夜间驾驶机动车,应开启前照灯,谨慎选择行驶速度,以便能够在灯光有限的范围内及时发现潜在的危险,保证行车安全。', NULL, 16, '正确', '错误', NULL, NULL, '夜间视野受限,开启前照灯可以看清路况并让其他交通参与者能够观察到我方车辆,同时控制车速可以察觉并规避潜在的危险。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11335, 0, NULL, 2, NULL, '夜间驾驶机动车会车时,若对方车辆不关闭远光灯,可变换灯光提示对向车辆,同时减速靠右侧行驶或停车。', NULL, 16, '正确', '错误', NULL, NULL, '夜间会车应当在距对方来车150米以外改用近光灯,若对方车辆不关闭远光灯,可连续变换灯光提示对向车辆。当遇对面来车仍不关闭远光灯时,应及时减速靠右侧行驶或停车让行。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11334, 1, NULL, 1, NULL, '非法安装警报器、标志灯具的,由公安机关交通管理部门__________,予以收缴,并处200元以上2000元以下罚款。', NULL, 128, '扣留行驶证', '扣留驾驶证', '收缴号牌', '强制拆除', '《道路交通安全法》第九十七条:非法安装警报器、标志灯具的,由公安机关交通管理部门强制拆除,予以收缴,并处二百元以上二千元以下罚款。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11333, 0, NULL, 1, NULL, '驾驶机动车上路行驶,驾驶员应当随车携带驾驶证与行驶证,否则会被扣留车辆。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第九十五条:上道路行驶的机动车未悬挂机动车号牌,未放置检验合格标志、保险标志,或者未随车携带行驶证、驾驶证的,公安机关交通管理部门应当扣留机动车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11332, 1, NULL, 1, NULL, '驾驶人在实习期内单独驾驶机动车上高速公路行驶,会受到什么处罚?', NULL, 16, '二十元以上二百元以下罚款', '记3分', '记6分', '吊销驾驶证', '《机动车驾驶证申领和使用规定》第九十四条: 机动车驾驶人在实习期内驾驶机动车上高速公路行驶,无持相应或者更高准驾车型驾驶证三年以上的驾驶人陪同的,由公安机关交通管理部门处二十元以上二百元以下罚款。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11331, 1, NULL, 1, NULL, '机动车购买后尚未登记,需要临时上道路行驶的,应当如何做?', NULL, 16, '取得临时通行牌证', '带上身份证', '直接上路行驶', '在车窗上张贴合格证', '《中华人民共和国道路交通安全法》第八条:国家对机动车实行登记制度。机动车经公安机关交通管理部门登记后,方可上道路行驶。尚未登记的机动车,需要临时上道路行驶的,应当取得临时通行牌证。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11330, 1, NULL, 1, NULL, '当事人有下列哪种行为,要承担交通事故全部责任?', NULL, 128, '在高速公路上撞伤行人的', '在路口直行与转弯车辆刮碰的', '在快车道与摩托车刮碰的', '发生事故后故意损坏、伪造现场、毁灭证据的', '《道路交通安全法实施条例》第九十二条:发生交通事故后当事人逃逸的,逃逸的当事人承担全部责任。但是,有证据证明对方当事人也有过错的,可以减轻责任。当事人故意破坏、伪造现场、毁灭证据的,承担全部责任。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11329, 0, NULL, 1, NULL, '驾驶人在驾驶证核发地车辆管理所管辖区以外居住的,可以向政务大厅申请换证。', NULL, 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》第四十九条:机动车驾驶人户籍迁出原车辆管理所管辖区的,应当向迁入地车辆管理所申请换证。机动车驾驶人在核发地车辆管理所管辖区以外居住的,可以向居住地车辆管理所申请换证。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11328, 0, NULL, 1, NULL, '驾驶达到报废标准的机动车上道路行驶的,公安交通管理部门将予以收缴,主要原因是不美观,影响城市形象。', NULL, 32, '正确', '错误', NULL, NULL, '驾驶报废机动车上路,公安部门依法收缴,是因为达到报废标准的机动车由于报废车机械老化,不符合安全技术标准,容易发生交通事故,并非不美观,影响城市形象,强制报废的主要目的是为了保障道路交通安全。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11327, 0, NULL, 1, NULL, '醉驾可构成危险驾驶罪。', NULL, 16, '正确', '错误', NULL, NULL, '在道路上驾驶机动车,有下列情形之一的,构成危险驾驶罪:(一)追逐竞驶,情节恶劣的;(二)醉酒驾驶机动车的;(三)从事校车业务或者旅客运输,严重超过额定乘员载客,或者严重超过规定时速行驶的;(四)违反危险化学品安全管理规定运输危险化学品,危及公共安全的。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11326, 2, NULL, 2, NULL, '驾驶机动车在以下哪些路段不能倒车?', NULL, 240, '交叉路口', '隧道', '急弯', '陡坡', '《道路交通安全法实施条例》第五十条:机动车倒车时,应当察明车后情况,确认安全后倒车。不得在铁路道口、交叉路口、单行路、桥梁、急弯、陡坡或者隧道中倒车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11325, 0, NULL, 4, NULL, '装运易燃易爆、有毒化学危险物品的车辆通过市区和城镇时,事前要向当地公安交通管理部门办理准运证,申请行车路线和时间,运输途中不得随便停车。', NULL, 16, '正确', '错误', NULL, NULL, '根据《道路危险货物运输从业人员从业资格培训教材》相关规定,装运易燃易爆、有毒化学危险物品的车辆通过市区和城镇时,事前要向当地公安交通管理部门办理准运证,申请行车路线和时间,运输途中不得随便停车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11324, 2, NULL, 5, NULL, '驾驶机动车由加速车道进入高速公路行驶,以下做法正确的是什么?', NULL, 112, '在加速车道上加速,同时要开启左转向灯', '密切注意左侧行车道的车流状态,同时用后视镜观察后方的情况', '充分利用加速车道的长度加速,确认安全后,平顺地进入行车道', '经加速车道充分加速后,可直接驶入最左侧车道', '驾驶机动车由加速车道进入高速公路行驶,提前开启左转向灯,进入加速车道,密切注意左侧行车道的车流状态,确认安全后平顺的进入行车道行驶,不可以直接驶入。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11323, 2, NULL, 5, NULL, '长下坡禁止挂空挡的原因,下列说法正确的是什么?', NULL, 112, '长下坡挂低速挡可以借助发动机控制车速', '避免因刹车失灵发生危险', '长下坡空挡滑行导致车速过高时,难以抢挂低速挡控制车速', '下坡挂空挡,省油', '《道路交通安全法》规定:驾驶机动车长下坡时不得熄火或挂空挡滑行,以免因难以抢挂低速挡控制车速,引起刹车失灵;挡位越低,发动机制动力越强,因此下坡时必须挂低挡位,以保持一定的发动机制动,避免长时间使用刹车来控制车速发生危险。因此长下坡挂低速挡可以借助发动机控制车速、避免因刹车失灵发生危险、长下坡空挡滑行导致车速过高时,难以抢挂低速挡控制车速说法正确。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11322, 0, NULL, 2, NULL, '行车中变更车道时,不可一次连续变更两条以上机动车道。', NULL, 16, '正确', '错误', NULL, NULL, '车辆变更车道不得影响其他车辆、行人的正常通行,并应遵守下列规定:(一)让所借车道内行驶的车辆或者行人先行;(二)按顺序依次行驶,不得频繁变更机动车道;(三)不得一次连续变更两条以上机动车道;(四)左右两侧车道的车辆向同一车道变更时,左侧车道的车辆让右侧车道的车辆先行。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11321, 1, NULL, 5, NULL, '驾驶机动车通过立交桥时,应该怎样右转弯?', NULL, 16, '过桥前向右转弯', '过桥后向右转弯', '过桥前向左转弯', '过桥后向左转弯', '右转弯时,应按照交通标志、标线的指示减速行驶,不过桥进入右转弯匝道完成右转。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11320, 1, NULL, 5, NULL, '驾驶机动车通过立交桥时,应该怎样左转弯?', NULL, 32, '过桥前向右转弯', '过桥后向右转弯', '过桥前向左转弯', '过桥后向左转弯', '驾驶机动车通过立交桥左转弯时,必须驶过跨线桥才能转弯,不能直接左转弯。应打开右转向灯,过桥后经一次右转弯再一次左转弯或者两次右转弯后,便达到左转弯的目的。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11319, 0, NULL, 6, NULL, '下坡路制动突然失效后,在不得已的情况下,可用车身侧面擦撞山坡,迫使机动车减速停车。', NULL, 16, '正确', '错误', NULL, NULL, '下坡路脚刹失灵,情况十分紧急,要利用一切可利用的外部条件,可用车前保险杠、车厢等钢性部位与路边岩石、大树或者土坡摩擦、碰撞,在不威胁乘车人安全的情况下强行停车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11318, 2, NULL, 6, NULL, '关于机动车轮胎胎压过低的危害,以下说法正确的是什么?', NULL, 240, '与路面的摩擦系数将会增大,油耗上升', '造成方向盘沉重、跑偏', '导致爆胎', '导致轮胎接地面积增大,加速胎肩磨损', '胎压过低的危害:(1)与路面的磨损系数将增加,燃油消耗将增加;(2)方向盘很重,容易滑落以及其他不利于行车安全的因素;(3)轮胎各部分的运动量增加,过度滚动会导致轮胎异常发热;(4)帘线和橡胶的功能降低,导致帘线和轮绸之间分层或过度摩擦,从而损坏胎圈部分和异常磨损;(5)轮胎与地面之间的摩擦力倍增,轮胎温度急剧上升,轮胎变软,强度急剧下降。车辆高速行驶时,可能会导致爆胎。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11317, 2, NULL, 6, NULL, '行车中当驾驶人意识到车辆爆胎时,下列做法正确的是?', NULL, 224, '紧急制动', '轻踩制动踏板', '缓慢减速', '控制方向', '行车中当驾驶人意识到爆胎时,应在控制方向的情况下,轻踏制动踏板,使车辆缓慢减速,逐渐平稳地停靠于路边,紧急制动容易造成翻车事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11316, 1, NULL, 6, NULL, '驾驶机动车需要从车窗逃生时,要用安全锤敲击玻璃的哪个部位?', NULL, 16, '四个角落', '中心部位', '任意部位', '中下部位', '要从车窗逃生时,用安全锤敲击安全玻璃的四角部位容易击碎玻璃。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11315, 1, NULL, 1, NULL, '驾驶机动车不按规定使用灯光的,将被一次记多少分?', NULL, 16, '1分', '2分', '3分', '6分', '《机动车驾驶证申领和使用规定》中:机动车驾驶人驾驶机动车不按规定使用灯光的,一次记1分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11314, 0, NULL, 1, NULL, '因交通信号指示不一致造成的违法行为,经核实后应当予以消除。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全违法行为处理程序规定》第二十一条:交通技术监控设备记录或者录入道路交通违法信息管理系统的违法行为信息,有因交通信号指示不一致造成违法的情形并经核实的,应当予以消除。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11313, 1, NULL, 2, NULL, '机动车驾驶人有下列哪种行为,会被吊销驾驶证,终生不得重新取得驾驶证?', NULL, 128, '饮酒后驾驶机动车', '使用伪造、变造的号牌', '醉酒驾驶机动车', '饮酒后或者醉酒驾驶机动车发生重大交通事故并构成犯罪', '《道路交通安全法》第九十一条:饮酒后或者醉酒驾驶机动车发生重大交通事故,构成犯罪的,依法追究刑事责任,并由公安机关交通管理部门吊销机动车驾驶证,终生不得重新取得机动车驾驶证。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11312, 0, NULL, 2, NULL, '潮汐车道是可变车道,会根据早晚车流量调整车道行驶方向。', NULL, 16, '正确', '错误', NULL, NULL, '所谓“潮汐车道”,是指根据早晚交通流量不同情况,对有条件的道路,通过车道灯的指示方向变化,控制主干道车道行驶方向,来调整车道数。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11311, 0, NULL, 2, NULL, '左右两侧车道的车辆向同一车道变更时,右侧车道车辆让左侧车道车辆先行。', NULL, 32, '正确', '错误', NULL, NULL, '车辆变更车道不得影响其他车辆、行人正常通行,并应当遵守下列规定:左右两侧车道的车辆向同一车道变更时,左侧车道的车辆让右侧车道的车辆先行。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11310, 0, NULL, 5, NULL, '驾驶未安装制动防抱死装置(ABS)的机动车,在冰雪路面制动时,应轻踏或间歇踩踏制动踏板。', NULL, 16, '正确', '错误', NULL, NULL, '未安装制动防抱死装置的车辆,在冰雪、湿滑、砾石路面或者比较光滑的路面上制动时,轻踏或间歇踩踏制动踏板才是最安全最合适的。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11309, 0, NULL, 2, NULL, '夜间驾驶机动车距离前车较近时,应使用近光灯,避免远光灯发出的灯光经前车后视镜反射后造成前车驾驶人眩目,影响安全。', NULL, 16, '正确', '错误', NULL, NULL, '夜间驾驶机动车与同方向行驶的前车距离较近时,禁止使用远光灯,避免灯光照射至前车后视镜造成前车驾驶人眩目。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11308, 0, NULL, 2, NULL, '雨天驾驶机动车,光线会受到雨点的散射,照明效能降低,应降低车速,使用近光灯、谨慎驾驶。', NULL, 16, '正确', '错误', NULL, NULL, '夜间雨中行车,汽车的远光灯会受到雨点的散射,大大降低照明效能。遇到这种情况就应降低车速,改用近光灯,细心观察,谨慎驾驶。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11307, 1, NULL, 1, NULL, '当事人未在道路交通事故现场报警,事后请求公安机关交通管理部门处理的,公安机关交通管理部门应当按照相关规定予以记录,并在()内作出是否受理的决定。', NULL, 16, '三日', '五日', '二日', '十日', '《道路交通事故处理程序规定》第十八条:发生道路交通事故后当事人未报警,在事故现场撤除后,当事人又报警请求公安机关交通管理部门处理的,公安机关交通管理部门应当按照本规定第十六条规定的记录内容予以记录,并在三日内作出是否接受案件的决定。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11306, 0, NULL, 1, NULL, '在道路上车辆发生故障、事故停车后,不按规定设置警告标志,一次记1分。', NULL, 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:机动车驾驶人在道路上车辆发生故障、事故停车后,不按规定使用灯光和设置警告标志的,一次记3分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11305, 1, NULL, 1, NULL, '上道路行驶的机动车不按规定年检,将被一次记多少分?', NULL, 32, '2分', '3分', '6分', '12分', '《机动车驾驶证申领和使用规定》中:机动车驾驶人上道路行驶的机动车未按规定定期进行安全技术检验的,一次记3分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11304, 2, NULL, 2, NULL, '驾驶机动车行经下列哪种路段不得临时停车?', NULL, 240, '施工路段', '人行横道', '在设有禁停标线的路段', '在设有禁停标志的路段', '《道路交通安全法实施条例》第六十三条:在设有禁停标志、标线的路段,在机动车道与非机动车道、人行道之间设有隔离设施的路段以及人行横道、施工地段,不得停车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11303, 1, NULL, 4, NULL, '牵引发生故障的机动车,最高时速不得超过多少?', NULL, 32, '20km/h', '30km/h', '40km/h', '50km/h', '《道路交通安全法》第四十六条:机动车行驶中遇有下列情形之一的,最高行驶速度不得超过每小时30公里: (一)进出非机动车道,通过铁路道口、急弯路、窄路、窄桥时; (二)掉头、转弯、下陡坡时; (三)遇雾、雨、雪、沙尘、冰雹,能见度在50米以内时; (四)在冰雪、泥泞的道路上行驶时; (五)牵引发生故障的机动车时。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11302, 0, NULL, 2, NULL, '变更车道时,从后视镜中看到后方来车快速变大,说明后方来车没有减速。', NULL, 16, '正确', '错误', NULL, NULL, '当车辆越靠近我们的时候,后视镜中看到车子变大,表示更加接近我方,可能加速或者没有减速,若变小则说明后车远离己车,可能减速。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11301, 1, NULL, 1, NULL, '驾驶机动车在夜间通过人行横道时怎样使用灯光?', NULL, 16, '变换远、近光灯', '开启雾灯', '开启远光灯', '关闭前大灯', '《道路交通安全法实施条例》第五十九条 :机动车在夜间通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,应当交替使用远近光灯示意。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11300, 1, NULL, 1, NULL, '驾驶机动车有拨打、接听手持电话,一次记多少分?', NULL, 16, '2分', '3分', '6分', '12分', '《机动车驾驶证申领和使用规定》中:机动车驾驶人驾驶机动车有拨打、接听手持电话等妨碍安全驾驶的行为的,一次记2分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11299, 1, NULL, 1, NULL, '造成交通事故后逃逸,尚不构成犯罪的,公安机关交通管理部门会处以何种处罚?', NULL, 16, '200元以上2000元以下罚款', '1000元以上3000元以下罚款', '5000元以上10000元以下罚款', '一次记6分', '《道路交通安全法》第九十九条:造成交通事故后逃逸,尚不构成犯罪的,由公安机关交通管理部门处二百元以上二千元以下罚款。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11298, 0, NULL, 1, NULL, '夜间驾驶机动车在路口遇前方绿灯亮起时,如果人行道上仍有行人通过,应开启远光灯催促其尽快通过。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十七条:机动车行经人行横道时,应当减速行驶;遇行人正在通过人行横道,应当停车让行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11297, 1, NULL, 3, NULL, '驾驶人在上车前,应首先做什么?', NULL, 16, '观察机动车周围情况', '开启车窗通风', '开启车门直接上车', '注意观察天气情况', '注意前提“上车前”,肯定是观察车周围情况。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11296, 1, NULL, 3, NULL, '出车前,驾驶人应该如何绕车一周进行安全检查?', NULL, 32, '顺时针绕车一周', '逆时针绕车一周', '任意方向绕车一周均可', '可直接上车', '出车前,驾驶人应该逆时针绕车一周进行安全检查。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11295, 1, NULL, 2, NULL, '通过环岛时应在距离环岛多少米处减速慢行?', NULL, 16, '50-100米', '100米', '150米', '150米以上', '环岛是交通事故多发地点,通过时应在距环岛50-100米处减速慢行,适时控制车速,以逆时针方向进入环岛。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11294, 1, NULL, 2, NULL, '驾驶机动车安全变更车道时,以下做法先后顺序正确的是?①通过车内后视镜观察后方情况②通过左侧或右侧外后视镜观察后方车辆行驶情况③扭头观察后视镜盲区的情况④确认安全后变更车道。', NULL, 128, '①③②④', '②①③④', '②③①④', '①②③④', '安全变更车道的方法:1.通过车内后视镜观察后方情况;2.通过左侧或右侧外后视镜观察后方车辆行驶情况;3.扭头观察后视镜盲区的情况;4.确认安全后变更车道。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11293, 2, NULL, 5, NULL, '驾驶机动车在高速公路上遇到雨雪天气时,需要降低车速、保持安全距离的原因,以下说法正确的是什么?', NULL, 112, '能见度下降,驾驶人难以及时发现前方车辆', '此类天气条件下的道路上,车辆的制动距离变长', '为车辆安全行驶提供足够的安全距离', '降低恶劣天气对车辆造成的损害', '驾驶机动车在高速公路上遇到雨雪天气时能见度下降,驾驶人难以及时发现前方车辆,在此类天气条件下的道路上,车辆的制动距离变长,需要降低车速,为车辆安全行驶提供足够的安全距离。而降低车速、保持安全距离,与降低恶劣天气对车辆造成的损害并无直接关系。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11292, 1, NULL, 4, NULL, '行车中遇鸣警笛的警车从本车道逆向驶来时,要怎样做?', NULL, 128, '临时占用其他车道行驶', '加速变更车道避让', '在原车道内继续行驶', '靠边减速或停车让行', '遇到正在执行任务的特种车辆,应当予以让行。题目说是鸣警笛表示正在执行任务,所以其他车辆要给予方便,靠边减速或停车让行。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11291, 0, NULL, 2, NULL, '保持安全跟车距离是避免发生追尾、刮碰等事故的前提。', NULL, 16, '正确', '错误', NULL, NULL, '跟车行驶,不能将注视点固定在前车上,要随时观察前方两到三辆车的动态。控制好与前车的安全距离,这是避免发生追尾、刮碰等事故的前提。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11290, 0, NULL, 1, NULL, '交通警察手势信号是所有交通信号(信号灯、标志、标线等)当中法律效力最强的一种信号。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第三十八条:车辆、行人遇有交通警察现场指挥时,应当按照交通警察的指挥通行。所以交通警察的指挥具有优先权。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11289, 0, NULL, 3, NULL, '山区狭窄坡路会车时,下坡路的车辆先行,因为下坡速度不好控制更加危险。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第四十八条第三款规定:在狭窄的坡路,上坡的一方先行;但下坡的一方已行至中途而上坡的一方未上坡时,下坡的一方先行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11288, 0, NULL, 1, NULL, '机动车驾驶人补领机动车驾驶证后,继续使用原机动车驾驶证的,处20元以上200元以下罚款。', NULL, 16, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》第九十四条 :机动车驾驶人补领机动车驾驶证后,继续使用原机动车驾驶证的,由公安机关交通管理部门处二十元以上二百元以下罚款。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11287, 2, NULL, 4, NULL, '酒后驾驶会对驾驶人哪些方面产生影响?', NULL, 240, '注意力', '判断力', '操作能力', '驾驶心理', '酒后驾驶会对驾驶人的注意力、判断力、操作能力和驾驶心理都产生不利影响,而且酒后驾驶触犯刑法,是会受到刑事处罚的。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11286, 2, NULL, 6, NULL, '机动车燃油着火时,可以用于灭火的是什么?', NULL, 112, '路边沙土', '棉衣', '工作服', '水', '只有水是不可用于燃油着火灭火,其他都是燃油着火时可以用来灭火的辅助工具。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11285, 2, NULL, 2, NULL, '行车中看到前方车辆行驶线路左右摆动,以下说法错误的是什么?', NULL, 224, '车内驾驶人可能为酒后驾车,应当保持距离', '车内驾驶人可能为酒后驾车,可以加速超过', '车内驾驶人可能为吸毒后驾车,可以加速超过', '此情况较为安全,可以紧密跟随', '前方车辆情况不明,行驶路线左右摆动,可能是酒驾、吸毒后驾车,应保持距离,注意行车安全,加速超过和紧密跟随都是十分危险的。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11284, 1, NULL, 1, NULL, '机动车驾驶人在一个记分周期内累积记分达到12分的,要在多少日内参加道路交通安全法律、法规和相关知识学习?', NULL, 64, 3, 10, 15, 20, '《机动车驾驶证申领和使用规定》第六十八条:机动车驾驶人在一个记分周期内累积记分达到12分的,公安机关交通管理部门应当扣留其机动车驾驶证。 机动车驾驶人应当在十五日内到机动车驾驶证核发地或者违法行为地公安机关交通管理部门参加为期七日的道路交通安全法律、法规和相关知识学习。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11283, 1, NULL, 1, NULL, '机动车驾驶人逾期不参加审验仍驾驶机动车的,会受到什么处罚?', NULL, 32, '20元以上200元以下', '200元以上500元以下', '1000元以上2000元以下', '吊销驾驶证', '《机动车驾驶证申领和使用规定》第九十五条:机动车驾驶人逾期不参加审验仍驾驶机动车的,由公安机关交通管理部门处二百元以上五百元以下罚款。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11282, 2, NULL, 5, NULL, '驾驶机动车在高速公路行驶,雨天发生“水滑”现象时,以下做法错误的是什么?', NULL, 192, '逐渐降低车速', '双手握稳转向盘', '迅速转向调整', '急踏制动踏板减速', '所谓“水滑”现象就是雨天汽车在积水路面上高速行驶时,轮胎与路面间的存水不能排除,水的压力使轮胎上浮,形成汽车在积水路面上滑行的现象,应双手握紧方向盘并逐渐降低车速。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11281, 0, NULL, 2, NULL, '倒车时转向盘的转动方向与倒车方向一致。', NULL, 16, '正确', '错误', NULL, NULL, '倒车时,方向盘向左打,车尾向左,方向盘向右打,车尾向右,方向盘往哪个方向打,车尾便往哪个方向走。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11280, 0, NULL, 3, NULL, '驾驶机动车在高速公路上发生车辆故障或事故时,应做到“车靠边、人撤离、即报警”,避免发生二次事故。', NULL, 16, '正确', '错误', NULL, NULL, '发生车辆故障或事故后,车辆能移动的,应迅速将车辆移至右侧的应急车道,打开危险报警闪光灯并在150米处放置警告标志;发生事故后,无论车辆能否移动,驾乘人员不要留在车内,也不要在高速公路上逗留,应迅速转移至护栏外等安全地带;驾乘人员撤离到安全地带后,立即拨打12122高速公路报警电话报警。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11279, 1, NULL, 1, NULL, '机动车之间发生的造成车物损失且车辆能移动的交通事故,有以下哪种情形的,驾驶人可自行协商解决?', NULL, 128, '车辆无号牌的', '驾驶人无驾驶证的', '驾驶人饮酒的', '驾驶人未携带身份证的', '机动车之间发生的造成车物损失且车辆能移动的交通事故,遇到车辆无号牌的、驾驶人无驾驶证的、驾驶人饮酒的情形,驾驶人不得自行协商解决,需要报警处理。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11278, 0, NULL, 2, NULL, '在进入环形交叉路口前,要注意来自左方将驶入环岛的车辆;进入环岛后,则应将注意力转到右侧向环岛内驶来的车辆;出路口时,应注意右侧直行的非机动车,以确保安全。', NULL, 16, '正确', '错误', NULL, NULL, '在进入环形交叉路口前,应将车速控制在15km/h左右,并注意来自左方将驶入环岛的车辆;进入环岛后,则应将注意力转到右侧向环岛内驶来的车辆;出路口时,应注意右侧直行的非机动车,以确保安全。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11277, 0, NULL, 2, NULL, '进入环形交叉路口的机动车和驶出路口的机动车相遇时,驶出路口的机动车享有先行权。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十一条:准备进入环形路口的让已在路口内的机动车先行。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11276, 0, NULL, 1, NULL, '驾驶机动车碰撞建筑物等设施后,如果无人员伤亡,可即行撤离现场。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第八十八条:机动车发生交通事故,造成道路、供电、通讯等设施损毁的,驾驶人应当报警等候处理,不得驶离。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11275, 1, NULL, 3, NULL, '在大风天气条件下驾驶机动车,突然感觉到方向盘难以控制时,以下做法正确的是什么?', NULL, 128, '逆风向转动方向盘', '顺风向转动方向盘', '采取紧急制动', '双手握稳方向盘', '驾驶机动车在行驶中遇到横风时,应紧握方向盘,减速行驶。防止横风让方向发生偏移造成危险。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11274, 0, NULL, 2, NULL, 'ABS起作用时不可松抬制动踏板。', NULL, 16, '正确', '错误', NULL, NULL, 'ABS起作用时,制动踏板会出现振动现象,此时不可松抬制动踏板,应持续用力踩踏。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11273, 0, NULL, 2, NULL, '驾驶机动车在下坡路段停车制动要比平路时提前。', NULL, 16, '正确', '错误', NULL, NULL, '下坡行驶时,在重力的作用下速度会逐渐提高,因而下坡路段停车制动距离会比平路时长,所以要比在平路时提前。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11272, 1, NULL, 1, NULL, '机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处以下哪种处罚?', NULL, 16, '15日以下拘留', '吊销驾驶证', '扣留车辆', '5年不得重新取得新驾驶证', '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处200元以上2000元以下罚款,可以并处15日以下拘留。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11271, 0, NULL, 1, NULL, '驾驶人未取得驾驶资格证或者醉酒驾驶机动车,发生道路交通事故的,造成受害人的财产损失,保险公司不承担赔偿责任。', NULL, 16, '正确', '错误', NULL, NULL, '《机动车交通事故责任强制保险条例》第二十二条:驾驶人未取得驾驶资格或者醉酒的,保险公司在机动车交通事故责任强制保险责任限额范围内垫付抢救费用,并有权向致害人追偿。发生道路交通事故的,造成受害人的财产损失,保险公司不承担赔偿责任。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11270, 0, NULL, 2, NULL, '行车中感觉方向盘有向左或向右偏移时,要及时控制方向盘,向右或向左适量修正,以消除车辆偏离现象。', NULL, 16, '正确', '错误', NULL, NULL, '行车中感觉方向盘有向左或向右偏移时,要及时控制方向盘,向右或向左适量修正,以消除车辆偏离现象。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11269, 0, NULL, 2, NULL, '上车前绕车检查时,要以顺时针方向绕车检查车辆,确认安全后方可上车。', NULL, 32, '正确', '错误', NULL, NULL, '我国实行右侧通行原则,一般车辆是靠路右侧停放。驾驶人需从左侧进入驾驶室,此时从前车门处逆时针绕车检查,可以保证驾驶人看到后方来车及交通情况,这样更加安全。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11268, 1, NULL, 3, NULL, '停车视距不包括以下哪个距离?', NULL, 16, '启动距离', '反应距离', '制动距离', '安全距离', '停车视距指的是同一车道上,车辆行驶时遇到前方障碍物而必须采取制动停车时所需要最短行车距离。停车视距由反应距离、制动距离和安全距离三个方面组成。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11267, 0, NULL, 3, NULL, '驾驶人在进入驾驶室前,首先要观察机动车周围情况,确认安全后再上车。', NULL, 16, '正确', '错误', NULL, NULL, '注意“进入驾驶室前”,也就是上车前。上车前,要从驾驶室车门外开始,逆时针绕车一周,检查车辆及周边情况,查看车底、车后有无异常情况,如玩耍的小孩,确认安全后再上车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11266, 2, NULL, 2, NULL, '不宜跟车行驶的车辆有哪些?', NULL, 240, '不跟大型车', '不跟出租车', '不跟外埠车', '不跟实习车', '大型车易遮挡视线、出租车因乘客上下车可能会随时停车、外埠车辆会因路线不熟悉突然停车、实习期驾驶人开车上路对路况、车况或操作等方面不熟悉,容易引发事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11265, 2, NULL, 4, NULL, '驾驶机动车遇下列哪种情形,最高行驶速度不得超过30公里/小时?', NULL, 240, '窄路、窄桥', '掉头、转弯', '下坡路', '泥泞道路', '《道路交通安全法实施条例》第四十六条 :机动车行驶中遇有下列情形之一的,最高行驶速度不得超过每小时30公里,其中拖拉机、电瓶车、轮式专用机械车不得超过每小时15公里: (一)进出非机动车道,通过铁路道口、急弯路、窄路、窄桥时;(二)掉头、转弯、下陡坡时;(三)遇雾、雨、雪、沙尘、冰雹,能见度在50米以内时;(四)在冰雪、泥泞的道路上行驶时;(五)牵引发生故障的机动车时。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11264, 0, NULL, 3, NULL, '变更车道时,提前打开转向灯后,就可以立即变更车道。', NULL, 32, '正确', '错误', NULL, NULL, '变更车道时需要提前开启转向灯提醒后车,然后观察周围交通环境,确认安全后再驶入要变更的车道。题目说立即,没有观察确认安全,所以错误。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11263, 1, NULL, 1, NULL, '驾驶机动车遇前方机动车停车排队或者缓慢行驶时,借道超车或者占用对面车道、穿插等候车辆的,将被一次记多少分?', NULL, 16, '2分', '3分', '6分', '12分', '《机动车驾驶证申领和使用规定》中:机动车驾驶人驾驶机动车遇前方机动车停车排队或者缓慢行驶时,借道超车或者占用对面车道、穿插等候车辆的,一次记2分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11262, 0, NULL, 6, NULL, '驾驶机动车频繁变更车道易导致爆胎。', NULL, 32, '正确', '错误', NULL, NULL, '频繁变更车道是种陋习,驾驶汽车频繁变更车道,直接影响其他车辆正常通行,从而扰乱交通秩序,影响正常通行、易引发交通事故,跟爆胎关系不大。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11261, 0, NULL, 2, NULL, '驶近坡道顶端无法看清前方路口时,要加速冲过坡顶,尽快通过。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十九条:机动车驶近急弯、坡道顶端等影响安全视距的路段以及超车或者遇有紧急情况时,应当减速慢行,并鸣喇叭示意。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11260, 0, NULL, 54, NULL, '伤员骨折处出血时,首先要对伤口进行止血和包扎,再固定肢体。', NULL, 16, '正确', '错误', NULL, NULL, '伤员骨折处出血时,应先止血和消毒,然后再固定。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11259, 0, NULL, 1, NULL, '机动车在公路上运载超限的不可解体的物品,只要不影响交通安全,就可以上路行驶。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十八条:机动车载物应当符合核定的载质量,严禁超载;载物的长、宽、高不得违反装载要求,不得遗洒、飘散载运物。机动车运载超限的不可解体的物品,影响交通安全的,应当按照公安机关交通管理部门指定的时间、路线、速度行驶,悬挂明显标志。在公路上运载超限的不可解体的物品,并应当依照公路法的规定执行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11258, 1, NULL, 2, NULL, '机动车在道路上临时停车时,车身右侧距道路边缘不得超过多少厘米?', NULL, 64, 10, 20, 30, 50, '机动车不得在设有禁停标志、标线和依法禁止停车的路段临时停车。机动车在道路上临时停车应当遵守下列规定:按顺行方向停车,车身距道路边缘不超过30厘米。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11257, 2, NULL, 2, NULL, '驶近坡道顶端无法看清前方路口时,正确的做法是什么?', NULL, 96, '加速冲过坡顶', '减速慢行', '鸣喇叭示意', '快速通过', '《道路交通安全法实施条例》第五十九条:机动车驶近急弯、坡道顶端等影响安全视距的路段以及超车或者遇有紧急情况时,应当减速慢行,并鸣喇叭示意。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11256, 0, NULL, 54, NULL, '对于烫伤进行处理时,应首先考虑用常温清水持续冲洗烫伤部位。', NULL, 16, '正确', '错误', NULL, NULL, '烫伤处理时要首先考虑尽快降温,用流动干净清水持续冲洗烫伤部位直到不红、不疼、不起泡为准。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11255, 1, NULL, 1, NULL, '驾驶机动车在高速公路行驶,超过规定时速10%以上未达20%的,一次记多少分?', NULL, 32, '2分', '3分', '6分', '12分', '《机动车驾驶证申领和使用规定》中:驾驶中型以上载客载货汽车、危险物品运输车辆在高速公路、城市快速路以外的道路上行驶或者驾驶其他机动车行驶超过规定时速未达20%的,一次记3分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11254, 0, NULL, 50, NULL, '对于没有救护知识或经验的人员,不得盲目施救,这样是为了避免二次伤害。', NULL, 16, '正确', '错误', NULL, NULL, '现场救护遵循避免二次伤害原则,在没有把握的时候,应当保护好现场,等待医护人员到来。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11253, 0, NULL, 2, NULL, '汽车的制动距离,会随着车速的升高而变短。', NULL, 32, '正确', '错误', NULL, NULL, '汽车的制动距离,会随着车速的升高而加长。车速是原来的两倍时,制动距离就会达到原来的4倍。车速越高,车辆惯性越大,发生事故时造成的冲击力就越大,容易加重事故后果。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11252, 1, NULL, 1, NULL, '机动车驾驶人在一个记分周期内两次以上达到12分的,车辆管理所还应当在科目一考试合格后多少日内对其进行科目三考试?', NULL, 64, 5, 7, 10, 15, '《机动车驾驶证申领和使用规定》第六十八条:机动车驾驶人在一个记分周期内有两次以上达到12分或者累积记分达到24分以上的,车辆管理所还应当在道路交通安全法律、法规和相关知识考试合格后十日内对其进行道路驾驶技能考试。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11251, 0, NULL, 3, NULL, '驾驶机动车在道路上行驶,欲变更车道时,应提前开启转向灯,在确认安全的前提下,平稳变更车道。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶机动车在道路上行驶,如想要变更车道,应提前开启转向灯,在确认安全的前提下,平稳变更车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11250, 2, NULL, 2, NULL, '驾驶机动车应使用转向灯的情形有哪些?', NULL, 240, '路口转弯', '驶离停车地点', '靠路边停车', '准备变更车道', '《道路交通安全法实施条例》第五十七条:机动车应当按照下列规定使用转向灯:向左转弯、向左变更车道、准备超车、驶离停车地点或者掉头时,应当提前开启左转向灯;向右转弯、向右变更车道、超车完毕驶回原车道、靠路边停车时,应当提前开启右转向灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11249, 2, NULL, 2, NULL, '夜间驾驶机动车,不得在下列哪种情况下使用远光灯?', NULL, 224, '无路灯或照明不良的道路上', '与其他车辆交会时', '通过有交通信号控制的交叉路口', '跟车较近时', '夜间驾驶机动车,与其他车辆交会时、通过有交通信号控制的交叉路口、跟车较近时不得使用远光灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11248, 0, NULL, 1, NULL, '在没有交通信号灯的路口遇停车等待时,可以临时占用对面车道,避免造成更大的拥堵。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十五条:机动车遇有前方车辆停车排队等候或者缓慢行驶时,不得借道超车或者占用对面车道,不得穿插等候的车辆。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11247, 1, NULL, 1, NULL, '驾驶机动车在高速公路或者城市快速路以外的道路上行驶时,未按规定系安全带的,会受到什么处罚?', NULL, 16, '50元罚款', '2分', '3分', '6分', '1、在高速公路与城市快速路上行驶时,驾驶人未按规定使用安全带的,罚款50元,扣2分;2、在高速公路与城市快速路以外的道路上行驶时,驾驶人未按规定使用安全带的,罚款50元,不扣分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11246, 1, NULL, 3, NULL, '交叉路口有两条平行的白色虚线是什么标线?', NULL, 64, '停车让行线', '停车线', '减速让行线', '车道分界线', '交叉路口最前端的平行的双白虚线是减速让行线。它通常设置在距离人行斑马线100cm-300cm处或视线良好的交叉道路次要道路路口,用以告示驾驶人在此路口应注意减速让干道车辆先行。减速让行线一般与减速让行标志共同使用。减速让行线表示车辆在此路口应减速让干道车辆先行,经过施划有减速让行线的路口车辆驾驶员必须慢行或停车,观察干路行车情况。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11245, 1, NULL, 2, NULL, '驾驶机动车在距离急弯路前多少米内不得停车?', NULL, 32, '30米', '50米', '80米', '100米', '《道路交通安全法实施条例》第六十三条:交叉路口、铁路道口、急弯路、宽度不足4米的窄路、桥梁、陡坡、隧道以及距离上述地点50米以内的路段,不得停车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11244, 1, NULL, 2, NULL, '免费停车位的停车标线是什么颜色?', NULL, 32, '白色', '蓝色', '黄色', '红色', '颜色为白色的泊位,表示此停车位为收费停车位,多位于人行道及退缩线上,适用于交投公司停车收费管理;颜色为黄色的泊位,表示此停车位为专属停车位,适用于承租的车位或有关单位申请设置的,供办公、方便群众车辆停放的车位;颜色为蓝色的泊位,表示此停车位为免费停车位,适用于政府部门办公场地周边规划的泊位。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11243, 0, NULL, 2, NULL, '禁止标线的作用是告知道路使用者道路交通的遵行、禁止、限制等特殊规定。', NULL, 16, '正确', '错误', NULL, NULL, '道路交通禁止标线,是指由标划于路面的各种线条、箭头、文字以及立体标记、突起路标和路边线轮廓标记等构成的交通信号设施。用于告知道路使用者道路交通的遵行、禁止、限制等特殊规定。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11242, 2, NULL, 2, NULL, '机动车在道路上变更车道时需要注意什么?', NULL, 176, '提前开启转向灯', '仔细观察后变更车道', '随意并线', '不能影响其他车辆正常行驶', '机动车在道路上变更车道需要注意在变道前开启转向灯,并仔细观察注意后方来车,在不能影响其他车辆正常行驶的情况下进行变道。在变道时要平稳转向,再驶往所需车道,完成后关闭转向指示灯即可。不得随意并线、不得频繁变更车道。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11241, 0, NULL, 5, NULL, '上陡坡时,要在坡底提前减挡。', NULL, 16, '正确', '错误', NULL, NULL, '汽车上坡时,由于受重力影响,前进阻力加大,当前挡位所提供的扭矩不足以继续维持车辆速度,所以需要降低挡位来换取更大的扭矩输出,以防止车速降低,甚至熄火。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11240, 1, NULL, 1, NULL, '驾驶机动车行经交叉路口不按规定行车或者停车的,将被一次记多少分?', NULL, 32, '1分', '2分', '3分', '6分', '《机动车驾驶证申领和使用规定》中:驾驶机动车行经交叉路口不按规定行车或者停车的,一次记2分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11239, 1, NULL, 1, NULL, '非法拦截、扣留机动车辆,不听劝阻,造成交通严重阻塞或者较大财产损失的,交警会处多少元罚款?', NULL, 32, '20元以上200元以下', '200元以上2000元以下', '1000元以上2000元以下', '2000元以上5000元以下', '《道路交通安全法》第九十九条:非法拦截、扣留机动车辆,不听劝阻,造成交通严重阻塞或者较大财产损失的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11238, 1, NULL, 1, NULL, '驾驶机动车违反禁令标志、禁止标线指示的,将被一次记多少分?', NULL, 64, '1分', '2分', '3分', '6分', '《机动车驾驶证申领和使用规定》中:驾驶机动车违反禁令标志、禁止标线指示的,一次记3分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11237, 1, NULL, 1, NULL, '驾驶人驾驶机动车在高速公路或者城市快速路上行驶时,未按规定系安全带的,一次记几分?', NULL, 16, '2分', '3分', '6分', '12分', '1、在高速公路与城市快速路上行驶时,驾驶人未按规定使用安全带的,罚款50元,扣2分;2、在高速公路与城市快速路以外的道路上行驶时,驾驶人未按规定使用安全带的,罚款50元,不扣分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11236, 0, NULL, 5, NULL, '雨天机动车在高速公路行驶发生“水滑”现象时,应急踏制动踏板减速。', NULL, 32, '正确', '错误', NULL, NULL, '所谓“水滑”现象就是雨天汽车在积水路面上高速行驶时,轮胎与路面间的存水不能排除,水的压力使轮胎上浮,形成汽车在积水路面上滑行的现象。遭遇水滑时,切记不能采取紧急制动,否则容易侧翻,要首先稳住方向,缓抬油门,缓慢降低速度,以保证安全。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11235, 1, 1, 1, NULL, '如图所示,夜间在没有照明的路段,驾驶机动车从路边停车位起步时,应怎样使用灯光?', '5eb4d75agw1e293sbj98gj.webp', 64, '只能开启远光灯', '只能开启左转向灯', '开启左转向灯、近光灯', '只能开启危险报警闪光灯', '《道路交通安全法实施条例》第五十七条:向左转弯、向左变更车道、准备超车、驶离停车地点或者掉头时,应当提前开启左转向灯;第五十八条:机动车在夜间没有路灯、照明不良或者遇有雾、雨、雪、沙尘、冰雹等低能见度情况下行驶时,应当开启前照灯、示廓灯和后位灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11234, 1, 1, 1, NULL, '如图所示,夜间驾驶机动车即将通过没有信号灯控制的交叉路口时,应如何使用灯光?', '44125.webp', 128, '关闭远光灯', '使用危险报警闪光灯', '使用远光灯', '交替使用远、近光灯', '《道路交通安全法实施条例》第五十九条:机动车在夜间通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,应当交替使用远近光灯示意。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11233, 1, NULL, 1, NULL, '夜间驾驶机动车驶近上坡坡顶路段时,应如何使用车辆灯光?', NULL, 128, '开启危险报警闪光灯', '开启远光灯', '只需使用近光灯', '交替变换远、近光灯', '《道路交通安全法实施条例》第五十九条:机动车在夜间通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,应当交替使用远近光灯示意。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11232, 0, 1, 1, NULL, '驾驶机动车驶出环岛时,应先驶入最右侧车道,无需开启转向灯即可驶离。', '43376.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十七条:机动车应当按照下列规定使用转向灯:向左转弯、向左变更车道、准备超车、驶离停车地点或者掉头时,应当提前开启左转向灯;向右转弯、向右变更车道、超车完毕驶回原车道、靠路边停车时,应当提前开启右转向灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11231, 0, 1, 1, NULL, '如图所示,夜间驾驶机动车在没有照明的路段,当跟车行驶距离较近时,应当开启远光灯照明。', '5eb4d75agw1e4ftgh9zo7j20i506yjs7.webp', 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十八条:机动车在夜间没有路灯、照明不良或者遇有雾、雨、雪、沙尘、冰雹等低能见度情况下行驶时,应当开启前照灯、示廓灯和后位灯,但同方向行驶的后车与前车近距离行驶时,不得使用远光灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11230, 1, NULL, 1, NULL, '驾驶机动车因故障或事故在高速公路行车道上紧急停车时,驾乘人员应怎么办?', NULL, 128, '站在机动车前方', '留在车上等待救援', '站在机动车后方', '迅速转移至右侧路肩上或应急车道内', '当车辆发生故障时,打开双闪警示灯,应将车辆停放在最右侧的应急车道或紧急停车带内,夜间打开尾灯示宽灯,司乘人员应立即下车,在路沿下护坡内等候(尽量远离高速公路路面、护栏)救援车辆、人员来,由一个人在车辆尾部150米左右放置三角警示牌或警示物(最好隔十米左右放置一个警示物),切记不能在高速公路内走动、追逐、等候!不能在故障车辆内等候!一般情况禁止在高速公路上修理车辆。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11229, 0, NULL, 1, NULL, '机动车发生财产损失交通事故,对应当自行撤离现场而未撤离的,交通警察可以责令当事人撤离现场。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通事故处理程序规定》第十三条:对应当自行撤离现场而未撤离的,交通警察应当责令当事人撤离现场。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11228, 1, NULL, 1, NULL, '以下说法正确的是什么?', NULL, 64, '服用国家管制的精神药品可以短途驾驶机动车', '饮酒后只要不影响驾驶操作可以短距离驾驶机动车', '饮酒后不得驾驶机动车', '服用任何药物都不会影响驾驶', '服用国家管制的精神药品、饮酒后、服用的药物对驾驶行为可能有影响时,都不应驾驶机动车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11227, 0, NULL, 1, NULL, '出现晕厥、恶心、乏力、幻象等影响安全驾驶的现象时,不应驾驶机动车。', NULL, 16, '正确', '错误', NULL, NULL, '出现晕厥、恶心、乏力、幻象等影响安全驾驶的现象时,不应驾驶机动车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11226, 0, NULL, 1, NULL, '当驾驶人服用的药物对驾驶行为可能有影响时,驾驶人不应驾驶机动车。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶员服用对神经系统有影响的药物时,会导致反应及操控能力下降,听力、视力、注意力减退,动作协调性降低,动作准确性下降。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11225, 0, NULL, 1, NULL, '道路划设专用车道的,在专用车道内,只准许规定的车辆通行。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第三十七条:道路划设专用车道的,在专用车道内,只准许规定的车辆通行,其他车辆不得进入专用车道内行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11224, 1, 1, 3, NULL, '如图所示,驾驶机动车遇这种情形时,以下做法正确的是什么?', '5eb4d75agw1e2947f2hdkj.webp', 32, '鸣笛并继续直行', '减速并随时准备停车', '转向道路左侧并继续行驶', '匀速驶过该区域', '看到前方有皮球,就要联想到可能会有儿童跑出来捡球,而且距离较近,因此要停车避让。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11223, 1, NULL, 4, NULL, '检查机动车机油时,以下做法正确的是什么?', NULL, 16, '停在平坦的地方,在启动前检查', '停在平坦的地方,在怠速状态下检查', '无需停在平坦的地方,在启动前检查', '无需停在平坦的地方,在怠速状态下检查', '只有“停在平坦的地方,在启动前检查”是正确的做法,怠速下不要检查,以防机油喷出来受伤;停在平坦的地方,才能准确的检查机油高度。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11222, 0, NULL, 4, NULL, '汽车的专用备胎可作为正常轮胎长期使用。', NULL, 32, '正确', '错误', NULL, NULL, '专用备胎,说明是用来作为备用轮胎的,因此不能作为正常轮胎长期使用。所以本题选择错误。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11221, 0, NULL, 3, NULL, '驾驶机动车行经交通流量较大的路段,是否保持足够的跟车距离不重要,只需要低速行驶即可。', NULL, 32, '正确', '错误', NULL, NULL, '跟车距离很重要,不同的道路对跟车距离要求是不一样的,保持安全距离,才能确保行车安全。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11220, 0, NULL, 1, NULL, '驾驶机动车上路行驶,后排乘车人可不系安全带。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第五十一条:机动车行驶时,驾驶人、乘坐人员应当按规定使用安全带,摩托车驾驶人及乘坐人员应当按规定戴安全头盔。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11219, 1, 1, 3, NULL, '如图所示,驾驶机动车在这种天气及道路条件下跟车行驶时,以下做法正确的是什么?', '5eb4d75agw1e4ftgru8x0j20ha06y76m.webp', 16, '保持较大的跟车距离', '开启危险报警闪光灯', '不断变换远、近光灯', '持续鸣喇叭提示前车', '冰雪路面易滑,制动距离延长,保持较大的跟车距离更安全。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11218, 1, NULL, 3, NULL, '雾天驾驶机动车在道路上行驶时的注意事项,以下说法错误的是什么?', NULL, 128, '减速慢行', '保持安全车距', '正确使用灯光', '高速行驶', '雾天开车,能见度低,视野不良,因此车速要放慢,同时和其他车辆保持安全距离,正确使用灯光。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11217, 1, 1, 3, NULL, '如图所示,关于驾驶机动车在大雾天气会车时的注意事项,以下说法错误的是什么?', '44066.webp', 128, '应适当降低车速', '靠道路右侧行驶', '集中注意力驾驶', '使用远光灯,提醒对方车辆', '浓雾天气中驾驶机动车两车交会,应当适当集中注意力驾驶、降低行驶车速、靠右行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11216, 1, NULL, 3, NULL, '驾驶机动车在雾天跟车行驶时,以下做法错误的是什么?', NULL, 128, '加大两车间的距离', '时刻注意前车刹车灯的变化', '降低行驶速度', '鸣喇叭提醒前车提高车速,避免后车追尾', '雾天尽量保持安全距离和车速,不要鸣喇叭催促。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11215, 0, 1, 3, NULL, '驾驶机动车在雨天起步时要使用雨刮器。', '5eb4d75agw1e4ftdq7p2nj20hc06ydhw.webp', 16, '正确', '错误', NULL, NULL, '驾驶汽车在雨天起步前要使用刮水器,增加视线区域。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11214, 0, NULL, 3, NULL, '在能见度较低的雪天,驾驶机动车起步时,应开启近光灯。', NULL, 16, '正确', '错误', NULL, NULL, '在能见度较低的雪天,驾驶机动车起步时,应开启近光灯。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11213, 0, 1, 3, NULL, '如图所示,驾驶机动车遇这种情形,应加大跟车距离,但可以不控制车速。', '44063.webp', 32, '正确', '错误', NULL, NULL, '雨天行车路滑,制动距离变长,应当加大跟车距离保证安全。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11212, 0, NULL, 3, NULL, '雨天驾驶机动车需超车时,应开启前照灯,连续鸣喇叭迅速超越。', NULL, 32, '正确', '错误', NULL, NULL, '这种天气里面能见度低,车辆应该慢行,就算要超车,也不能连续鸣喇叭,而且要确保安全的情况下超车。所以此题的关键在“迅速”两字。 因此本题错误。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11211, 1, 1, 2, NULL, '如图所示,驾驶机动车在夜间有照明的路段跟随前车行驶时,不能使用远光灯,其原因是什么?', '14001.webp', 64, '不利于看清远方的路况', '不利于看清车前的路况', '会影响前车驾驶人的视线', '会影响自己的视线', '驾驶机动车在夜间有照明的路段跟随前车行驶时,使用远光灯会影响前车驾驶人的视线。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11210, 1, NULL, 2, NULL, '夜间驾驶机动车通过无信号灯控制的交叉路口时,应当交替使用远、近光灯,其目的是什么?', NULL, 16, '提示其他交通参与者注意来车', '检查灯光是否能正常使用', '准备变更车道', '超车前提示前车', '夜间驾驶机动车通过无信号灯控制的交叉路口时,应当交替使用远、近光灯,是为了提示其他交通参与者注意来车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11209, 2, NULL, 2, NULL, '以下关于机动车刹车灯的说法,正确的是什么?', NULL, 240, '主要用来提醒后面的车辆,本车要减速或停车', '刹车灯若使用错误或者出问题,很容易造成追尾撞车事故', '在踩下制动踏板时,刹车灯会自动亮起', '行车前应检查刹车灯是否正常工作', '机动车刹车灯主要用来提醒后面的车辆本车要减速或停车;刹车灯若使用错误或者出问题,很容易造成追尾撞车事故;在踩下制动踏板时,刹车灯会自动亮起;行车前应检查刹车灯是否正常工作。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11208, 0, NULL, 2, NULL, '夜间在照明良好的路段,驾驶人可以借助环境照明行车,无需开启车辆灯光。', NULL, 32, '正确', '错误', NULL, NULL, '夜间使用近光灯可以让开车的双方看到彼此,且不会互相干扰视线,同时也可以提醒周围人员,所以在照明良好的路段也要使用近光灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11207, 0, NULL, 6, NULL, '驾驶机动车在高速公路上发生故障,驾驶人应开启危险报警闪光灯增大警示范围。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第五十二条:机动车在道路上发生故障,需要停车排除故障时,驾驶人应当立即开启危险报警闪光灯,将机动车移至不妨碍交通的地方停放;难以移动的,应当持续开启危险报警闪光灯,并在来车方向设置警告标志等措施扩大示警距离,必要时迅速报警。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11206, 0, NULL, 6, NULL, '机动车在高速公路上发生故障或事故,情况紧急时,可以沿所在车道逆行至来车方向150米外放置警告标志。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第六十八条:机动车在高速公路上发生故障时,驾驶人应当立即开启危险报警闪光灯,将机动车移至不妨碍交通的地方停放;难以移动的,应当持续开启危险报警闪光灯,并在来车方向设置警告标志等措施扩大示警距离,必要时迅速报警。警告标志应当设置在故障车来车方向一百五十米以外,车上人员应当迅速转移到右侧路肩上或者应急车道内,并且迅速报警。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11205, 2, NULL, 6, NULL, '驾驶机动车在道路上发生故障或发生事故,妨碍交通又难以移动的,应该如何处置?', NULL, 112, '按照规定开启危险报警闪光灯', '在车后50米至100米处设置警告标志', '夜间还应当同时开启示廓灯和后位灯', '驾乘人员在车上等待救援', '《道路交通安全法实施条例》第六十条:机动车在道路上发生故障或者发生交通事故,妨碍交通又难以移动的,应当按照规定开启危险报警闪光灯并在车后50米至100米处设置警告标志,夜间还应当同时开启示廓灯和后位灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11204, 2, NULL, 6, NULL, '驾驶机动车发生交通事故后,下列防止二次事故的措施中,正确的是什么?', NULL, 112, '迅速疏散人员至安全地带', '打开危险报警闪光灯', '正确放置警告标志', '坐在车内等待救援', '发生车辆故障或事故后,车辆能移动的,应迅速将车辆移至右侧的应急车道,打开危险报警闪光灯并在150米处放置警告标志;发生事故后,无论车辆能否移动,驾乘人员不要留在车内,也不要在高速公路上逗留,应迅速转移至护栏外等安全地带;驾乘人员撤离到安全地带后,立即拨打12122高速公路报警电话报警。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11203, 2, NULL, 6, NULL, '机动车在道路上发生故障,需要停车排除故障时,以下做法正确的是哪些?', NULL, 240, '立即开启危险报警闪光灯', '将机动车移至不妨碍交通的地方停放', '难以移动的,应当持续开启危险报警闪光灯', '在来车方向设置警告标志等措施扩大示警距离,必要时迅速报警', '《道路交通安全法》第五十二条:机动车在道路上发生故障,需要停车排除故障时,驾驶人应当立即开启危险报警闪光灯,将机动车移至不妨碍交通的地方停放;难以移动的,应当持续开启危险报警闪光灯,并在来车方向设置警告标志等措施扩大示警距离,必要时迅速报警。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11202, 1, NULL, 6, NULL, '道路交通事故的损失是由受害人故意造成的,保险公司是否予以赔偿?', NULL, 16, '不予赔偿', '应当赔偿', '可以赔偿', '应当补偿', '《道路交通安全法》第七十六条:交通事故的损失是由非机动车驾驶人、行人故意碰撞机动车造成的,机动车一方不承担赔偿责任。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11201, 0, NULL, 6, NULL, '驾驶机动车发生交通事故造成人员重伤,但一方驾驶人愿意承担全部责任的,可以自行协商处理。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第七十条:在道路上发生交通事故,车辆驾驶人应当立即停车,保护现场;造成人身伤亡的,车辆驾驶人应当立即抢救受伤人员,并迅速报告执勤的交通警察或者公安机关交通管理部门。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11200, 2, NULL, 6, NULL, '驾驶机动车发生可以自行协商处理的财产损失事故,当事人可以通过下列哪些方式协商处理?', NULL, 112, '当场口头协商处理', '当场通过互联网在线进行处理', '在离开现场后通过互联网在线进行协商处理', '必须等保险公司人员到场鉴定后再协商处理', '驾驶机动车发生可以自行协商处理的财产损失事故,当事人可以当场口头协商处理、当场通过互联网在线进行处理、在离开现场后通过互联网在线进行协商处理。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11199, 1, NULL, 6, NULL, '驾驶机动车在高速公路发生故障,需要停车排除故障时,以下做法先后顺序正确的是?①放置警告标志,转移乘车人员至安全处,迅速报警;②开启危险报警闪光灯;③将车辆移至不妨碍交通的位置;④等待救援', NULL, 128, '④③①②', '①②③④', '③②①④', '②③①④', '驾驶机动车在高速公路发生故障,需要停车排除故障时,应当进行如下顺序的操作:开启危险报警闪光灯;将车辆移至不妨碍交通的位置;放置警告标志,转移乘车人员至安全处,迅速报警;等待救援。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11198, 1, NULL, 6, NULL, '机动车因车辆故障等原因需被牵引时,以下说法正确的是什么?', NULL, 16, '牵引车和被牵引车均应打开报警灯', '所有车辆都应让行', '牵引车与被牵引车尽量快速行驶', '行驶过程中不受交通信号限制', '《道路交通安全法实施条例》第五十六条:机动车牵引挂车时,牵引车和被牵引车均应当开启危险报警闪光灯。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11197, 0, NULL, 6, NULL, '机动车在高速公路上发生故障后,开启危险报警闪光灯和摆放警告标志的作用是警告后续车辆注意避让。', NULL, 16, '正确', '错误', NULL, NULL, '开启危险报警灯光和摆放警告标志,是为了让后车注意避让,避免发生事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11196, 1, NULL, 6, NULL, '在道路上发生无人员伤亡的、财产轻微损失的交通事故后,下列做法中正确的是?', NULL, 64, '必须报警,等候警察处理', '开车离开现场', '确保安全的情况下,设置警告标志,对现场拍照或标划事故车辆现场位置后,将车辆移至路边等不妨碍交通的地点', '停在现场保持不动', '《道路交通安全法实施条例》第八十六条:机动车与机动车、机动车与非机动车在道路上发生未造成人身伤亡的交通事故,当事人对事实及成因无争议的,在记录交通事故的时间、地点、对方当事人的姓名和联系方式、机动车牌号、驾驶证号、保险凭证号、碰撞部位,并共同签名后,撤离现场,自行协商损害赔偿事宜。当事人对交通事故事实及成因有争议的,应当迅速报警。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11195, 1, 1, 6, NULL, '如图所示,发生这种单方交通事故,应当如何处理?', '1230.webp', 32, '如果车辆可以移动,可自行离开', '报警', '直接联系路政部门进行理赔', '直接联系绿化部门', '《道路交通安全法实施条例》第八十八条:机动车发生交通事故,造成道路、供电、通讯等设施损毁的,驾驶人应当报警等候处理,不得驶离。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11194, 1, NULL, 6, NULL, '驾驶机动车发生交通事故,仅造成财产损失的,但是对交通事故事实及成因有争议的,以下做法正确的是什么?', NULL, 16, '迅速报警', '占道继续和对方争辩', '找中间人帮忙解决', '自行协商损害赔偿事宜', '《道路交通安全法实施条例》第八十六条:机动车与机动车、机动车与非机动车在道路上发生未造成人身伤亡的交通事故,当事人对事实及成因无争议的,在记录交通事故的时间、地点、对方当事人的姓名和联系方式、机动车牌号、驾驶证号、保险凭证号、碰撞部位,并共同签名后,撤离现场,自行协商损害赔偿事宜。当事人对交通事故事实及成因有争议的,应当迅速报警。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11193, 0, NULL, 6, NULL, '驾驶机动车发生责任明确的轻微剐蹭事故,能够自行撤离现场而未自行撤离,坚持在原地等待警察来处理,造成路面堵塞,该行为会受到罚款的处罚。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通事故处理程序规定》第十三条:对应当自行撤离现场而未撤离的,交通警察应当责令当事人撤离现场;造成交通堵塞的,对驾驶人处以200元罚款;驾驶人有其他道路交通安全违法行为的,依法一并处罚。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11192, 0, NULL, 6, NULL, '驾驶机动车发生轻微财产损失交通事故后,当事人对事实及成因无争议,移动车辆时需要对现场拍照或者标划停车位置。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通事故处理程序规定》第十三条:机动车与机动车、机动车与非机动车发生财产损失事故,当事人对事实及成因无争议的,可以自行协商处理损害赔偿事宜。车辆可以移动的,当事人应当在确保安全的原则下对现场拍照或者标划事故车辆现场位置后,立即撤离现场,将车辆移至不妨碍交通的地点,再进行协商。非机动车与非机动车或者行人发生财产损失事故,基本事实及成因清楚的,当事人应当先撤离现场,再协商处理损害赔偿事宜。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11191, 0, NULL, 6, NULL, '两辆机动车发生轻微剐蹭事故后,为保证理赔,必须等保险公司人员到场鉴定后才能撤离现场。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第七十条:在道路上发生交通事故,仅造成轻微财产损失,并且基本事实清楚的,当事人应当先撤离现场再进行协商处理。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11190, 0, NULL, 6, NULL, '事故报警时,要向交警提供事故地点、人员伤情、车辆号牌等信息,协助交警快速定位到达现场。', NULL, 16, '正确', '错误', NULL, NULL, '事故报警时,要向交警提供事故地点、人员伤情、车辆号牌等信息,协助交警快速定位到达现场。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11189, 1, NULL, 6, NULL, '驾驶机动车出车前,驾驶人应检查轮胎状态,以下说法不正确的是什么?', NULL, 16, '应检查轮胎是否需要清洗', '应检查轮胎是否镶嵌异物', '应检查轮胎磨损情况', '应检查轮胎的紧固度和气压情况', '对轮胎的检查是为了确保在行车过程中能安全行驶,应该检查的是轮胎的磨损、紧固、气压情况和轮胎侧面的磨损标记;轮胎标记处的沟槽磨损小于1.6毫米,要立即更换;检查轮胎是否镶嵌异物;发现螺栓松动,要进行紧固;气压不足,要找出原因,采取适当措施予以处理。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11188, 1, NULL, 4, NULL, '上车后,驾驶人应当在驾驶座上进行适当调整,关于调整的方法和目的,下列说法中不正确的有哪些?', NULL, 128, '调整驾驶座椅,保证踩踏踏板舒适', '调整安全带的松紧与高低', '调整适合驾驶的方向盘位置', '调整安全头枕高度,使头枕正对驾驶人的颈椎', '上车后驾驶人应当调整驾驶座椅,保证踩踏踏板舒适,调整安全带的松紧与高低,调整适合驾驶的方向盘位置。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11187, 0, NULL, 1, NULL, '车速超过规定时速的20%但不到50%的一次记2分。', NULL, 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:驾驶中型以上载客载货汽车、校车、危险物品运输车辆在高速公路、城市快速路以外的道路上行驶或者驾驶其他机动车行驶超过规定时速20%以上未达到50%的,一次记6分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11186, 0, NULL, 1, NULL, '申请小型汽车、三轮汽车驾驶证的,年龄段在18周岁以上70周岁以下。', NULL, 32, '正确', '错误', NULL, NULL, '1、据公安部交通管理局发布的新措施,自2020年11月20日起,放宽小型汽车驾驶证申请年龄,取消申请小型汽车、小型自动挡汽车、轻便摩托车驾驶证70周岁的年龄上限。2、《机动车驾驶证申领和使用规定》第十一条:申请低速载货汽车、三轮汽车等准驾车型的,在18周岁以上,60周岁以下。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11185, 1, NULL, 6, NULL, '在高速公路上发生碰撞前,驾驶人要采取什么措施?', NULL, 16, '先制动,后转向', '边制动边转向', '先转向后制动', '立即停车', '在高速公路上发生碰撞前一定要先制动,然后再考虑转向躲避。在机动车与非机动车、行人混杂的城市快速路或国道上,由于车速比较慢,可以采取边转向躲避边制动的方式避免碰撞。在城市道路中车速相对比较慢,车辆距障碍物很近时,为了避免发生碰撞,一般先转向躲避后制动。这种情况下一般没有减速的时间和空间。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11184, 0, NULL, 5, NULL, '大雨过后的路面比刚开始下雨时的路面更容易打滑。', NULL, 32, '正确', '错误', NULL, NULL, '刚下雨的路面,粉尘混合雨水造成泥巴路,容易滑。下雨的时间久了,雨水把这些粉尘冲走了,就不滑了。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11183, 0, NULL, 1, NULL, '机动车所有人将机动车作为抵押物抵押的,机动车所有人应当向居住地车辆管理所申请抵押登记。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第八条:机动车所有人将机动车作为抵押物抵押的,机动车所有人应当向登记该机动车的公安机关交通管理部门申请抵押登记。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11182, 0, NULL, 1, NULL, '机动车驾驶证遗失的,机动车驾驶人应当向机动车驾驶证核发地或者核发地以外的车辆管理所申请补发。', NULL, 16, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》第六十三条:机动车驾驶证遗失的,机动车驾驶人应当向机动车驾驶证核发地或者核发地以外的车辆管理所申请补发。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11181, 1, NULL, 5, NULL, '驾驶人通过仅能单车通行且无信号灯控制的窄隧道时,要注意什么?', NULL, 128, '加速通过', '开启危险报警闪光灯', '开启远光灯', '提前减速,开启前照灯,确认安全后再通过', '通过仅能单车通行且无信号灯控制的窄隧道时,应提前减速,开启前照灯,观察有无对向来车,确认安全后方可通过。如发现对向有来车时,应在隧道口外靠右停车让行,待来车通过后再驶入隧道。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11180, 0, NULL, 1, NULL, '在道路上驾驶机动车追逐竞驶、情节恶劣的,可构成危险驾驶罪。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶机动车在道路上追逐竞驶,情节恶劣的,构成危险驾驶罪,处拘役并处罚金。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11179, 0, NULL, 1, NULL, '夜间驾驶机动车驶近上坡坡顶路段时,应开启远光灯加速冲过坡顶。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十九条:机动车在夜间通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,应当交替使用远近光灯示意。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11178, 0, NULL, 5, NULL, '高速公路长时间行车,驾驶人容易出现注意力分散、知觉减弱、反应迟钝、放松警惕、昏昏欲睡的“高速催眠”现象,因此要间歇到服务区休息调整。', NULL, 16, '正确', '错误', NULL, NULL, '当司机目不转睛地盯着高速公路前方时,由于大脑对开车这个事情的参与度降低,更进一步促使大脑活动水平下降,从而令人感觉昏昏欲睡,并发生一种意识障碍,这就是所谓的高速公路上的心理杀手---“高速催眠”现象。每驾驶2小时车辆应该前往服务区或者加油站稍作休息,连续驾驶时间不得超过4小时,停车休息时间建议不少于20分钟,以便保持头脑清醒。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11177, 0, NULL, 5, NULL, '车辆行至隧道出口遭遇横风时,应当立即紧急制动停车,避免因横风导致车辆跑偏。', NULL, 32, '正确', '错误', NULL, NULL, '遇到横风时,应紧握方向盘,减速行驶,紧急制动容易发生追尾事故,要逐渐减速停车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11176, 0, NULL, 5, NULL, '机动车驶近急弯、坡道顶端等影响安全视距的路段时,要减速慢行鸣喇叭提醒其他交通参与者我方有来车。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十九条:机动车驶近急弯、坡道顶端等影响安全视距的路段以及超车或者遇有紧急情况时,应当减速慢行,并鸣喇叭示意。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11175, 0, NULL, 1, NULL, '驾驶机动车倒车时,应当察明车后情况,确认安全后倒车。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十条:机动车倒车时,应当察明车后情况,确认安全后倒车。不得在铁路道口、交叉路口、单行路、桥梁、急弯、陡坡或者隧道中倒车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11174, 0, NULL, 3, NULL, '直线行驶时,车速越快,转向盘操作量应越小,转动转向盘的速度也应越慢。', NULL, 16, '正确', '错误', NULL, NULL, '直线行驶时,车速越快,转向盘操作量就应越小,转动转向盘的速度也应越慢。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11173, 0, NULL, 2, NULL, '作业区标志的作用是通告道路交通阻断、绕行等情况。', NULL, 16, '正确', '错误', NULL, NULL, '作业区标志的作用是通告道路交通阻断、绕行等情况,用于作业区的标志为警告、禁令、指示及指路标志。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11172, 1, NULL, 6, NULL, '夜间驾驶机动车在普通道路上发生故障后,应如何放置警告标志?', NULL, 32, '到达车后40米处,打开警告标志后放置好', '手持警告标志并将反光面面向来车方向,靠路边行走,放在车后50米外的位置', '放在车后20米的位置', '迎着来车方向在车道内行走,放在车后50米的位置', '夜间车辆在普通道路上发生故障,要在车后50米以外放置警告标志,将警告标志反光面面向来车方向,提醒来车方向的车辆注意我方故障车辆。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11171, 0, NULL, 1, NULL, '夜间驾驶机动车驶近上坡坡顶路段时,要使用远光灯。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十九条:机动车在夜间通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,应当交替使用远近光灯示意。机动车驶近急弯、坡道顶端等影响安全视距的路段以及超车或者遇有紧急情况时,应当减速慢行,并鸣喇叭示意。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11170, 0, NULL, 4, NULL, '驾驶人疲劳时,判断能力下降、反应迟钝和操作失误增加,容易引发交通事故。', NULL, 16, '正确', '错误', NULL, NULL, '疲劳驾驶会导致判断能力下降、反应迟钝、操作失误增加,甚至会出现下意识操作或短时间睡眠情况,严重时会失去对车辆的操控能力,极易引发交通事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11169, 0, NULL, 3, NULL, '在道路上驾驶机动车与对向来车会车时,可以不注意两车横向间距。', NULL, 32, '正确', '错误', NULL, NULL, '会车时要注意保持足够的安全横向距离,做到先让、先慢、先停,并注意非机动车和来往行人。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11168, 0, NULL, 1, NULL, '驾驶机动车驶近急弯、坡道顶端等影响安全视距的路段时,应当减速慢行并鸣喇叭示意。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十九条:机动车驶近急弯、坡道顶端等影响安全视距的路段以及超车或者遇有紧急情况时,应当减速慢行,并鸣喇叭示意。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11167, 0, NULL, 6, NULL, '在机动车与非机动车、行人混杂的城市快速路或国道上,可采取边转向躲避边制动的方式避免碰撞。', NULL, 16, '正确', '错误', NULL, NULL, '在交通情况复杂的城市快速路或国道上,可采取边转向躲避边制动的方式避免碰撞。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11166, 1, NULL, 4, NULL, '行车中遇到被超车辆明显要再次超越,且带有斗气情绪时,应采取的正确做法是什么?', NULL, 64, '挡住道路不让他超车', '加速行驶甩掉他', '减速礼让', '并列行驶', '驾驶机动车在超车过程中,遇到被超车辆明显要再次超越,且带有斗气情绪时,一定要保持平和心态,不要与其争斗,而是减速礼让,与其拉开距离。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11165, 0, NULL, 1, NULL, '机动车所有人将机动车作为抵押物抵押的,应当向登记地车辆管理所申请抵押登记。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第八条:机动车所有人将机动车作为抵押物抵押的,机动车所有人应当向登记该机动车的公安机关交通管理部门申请抵押登记。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11164, 0, NULL, 3, NULL, '驾驶机动车通过学校门口的人行横道,只要没有行人经过,就可以加速通过。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十七条:机动车行经人行横道时,应当减速行驶;遇行人正在通过人行横道,应当停车让行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11163, 0, NULL, 4, NULL, '跟随大型车行驶时,应当加大跟车距离。', NULL, 16, '正确', '错误', NULL, NULL, '前方有大型车时会导致视线不佳,会挡住路口的信号灯或路边交通标志。可以通过加大跟车距离来扩大视野范围,预防跟随大型车辆通过时,信号灯突然变化,同时还可以避免大型车紧急制动时与其追尾。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11162, 1, NULL, 2, NULL, '驾驶机动车掉头时,最高时速不准超过多少?', NULL, 32, '40公里', '30公里', '20公里', '10公里', '《道路交通安全法实施条例》第四十六条:机动车掉头、转弯、下陡坡时,最高行驶速度不得超过每小时30公里。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11161, 0, NULL, 1, NULL, '机动车驾驶人在一个记分周期内有两次以上达到12分或者累积记分达到24分以上的,在道路交通安全法律、法规和相关知识考试合格后即可发还机动车驾驶证。', NULL, 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》第六十八条:机动车驾驶人在一个记分周期内有两次以上达到12分或者累积记分达到24分以上的,车辆管理所还应当在道路交通安全法律、法规和相关知识考试合格后十日内对其进行道路驾驶技能考试。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11160, 0, NULL, 1, NULL, '因饮酒后驾驶机动车被处罚,再次饮酒后驾驶机动车的处十日以下拘留,并处1000元以上2000元以下罚款,吊销机动车驾驶证。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第九十一条:因饮酒后驾驶机动车被处罚,再次饮酒后驾驶机动车的,处10日以下拘留,并处1000元以上2000元以下罚款,吊销机动车驾驶证。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11159, 0, NULL, 2, NULL, '行车时应随时注意各种机动车的动向,尤其注意转向灯、制动灯等信号灯的变化,随时调整行车路线和行驶速度。', NULL, 16, '正确', '错误', NULL, NULL, '行车时应随时注意各种机动车的动向,尤其注意转向灯、制动灯等信号灯的变化,随时调整行车路线和行驶速度。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11158, 0, NULL, 5, NULL, '雾天跟车,不能以前车尾灯作为判断安全距离的依据。', NULL, 16, '正确', '错误', NULL, NULL, '迷雾笼罩,方向难辨,视距缩短,易发生交通事故,为确保安全,雾天行车安全车距应尽量加大。在浓雾中行车千万记住:不能以前车尾灯作为判断安全距离的依据。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11157, 1, NULL, 2, NULL, '驾驶机动车在窄路直线行驶时,下列说法错误的是?', NULL, 128, '注意观察车辆前方的动态', '注意观察前方路段是否有对向车辆,提前做好判断', '前方路段有对向来车时要注意礼让', '前方路段有对向来车时要迅速交会', '驾驶机动车通过窄路直线行驶最重要的就是慢,只有慢我们才能应对各种情况;行车时注意观察前方动态,在观察的基础上就可以做出合理的预判;前方路段有对向来车时应注意放慢车速拉开与车的距离,避免与其他车辆发生刮蹭。作为驾驶员,在窄路直行行驶不单单要放眼自己的车道,还要将目光放远,也不能紧紧盯着来车,最主要的还是放慢车速,提前准备,必要时也可以停车让对方通过。驾驶机动车在窄路直线行驶时前方路段有对向来车时要迅速交会的说法错误。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11156, 1, NULL, 4, NULL, '驾驶员过度疲劳时,正确的做法是什么?', NULL, 16, '不准驾驶车辆', '可以选择宽阔空闲的道路行驶', '可以低速驾驶车辆', '可以高速行驶车辆', '《道路交通安全法》第二十二条:饮酒、服用国家管制的精神药品或者麻醉药品,或者患有妨碍安全驾驶机动车的疾病,或者过度疲劳影响安全驾驶的,不得驾驶机动车。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11155, 1, NULL, 2, NULL, '机动车要连续转弯时应控制车速,尽可能避免紧急制动,以防引起车辆发生怎样的危险?', NULL, 16, '侧滑和甩尾', '发动机熄火', '制动失灵', '加速失灵', '汽车在高速行驶的过程中,要想在短时间内改变速度的方向,需要很大的牵引力,而牵引力和轮胎与地面的摩擦力是相互的。连续转弯时,如果车速过快紧急制动,汽车得不到足够多的牵引力,摩擦力就会变小,再加上汽车的惯性,极易造成车辆的侧滑和甩尾。因此,即使机动车要连续转弯时,一定要控制车速,避免紧急制动,以防引起车辆的侧滑和甩尾。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11154, 0, NULL, 1, NULL, '属于申请增加准驾车型的,应当收回原机动车驾驶证。', NULL, 16, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》第五十五条:申请人考试合格后,应当接受不少于半小时的交通安全文明驾驶常识和交通事故案例警示教育,并参加领证宣誓仪式。车辆管理所应当在申请人参加领证宣誓仪式的当日核发机动车驾驶证。属于申请增加准驾车型的,应当收回原机动车驾驶证。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11153, 0, NULL, 5, NULL, '在潮湿路面,安装ABS的机动车制动时,制动距离会延长,因此要拉开与前车的安全距离。', NULL, 16, '正确', '错误', NULL, NULL, '安装防抱死系统的车辆在急刹车时不会发生失控现象,会缩短制动距离。但不是所有路况下制动都会缩短制动距离,如冰雪、潮湿路面,制动距离会延长,因此在特殊路面要减速注意保持车距。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11152, 0, NULL, 1, NULL, '驾驶机动车闯红灯一次扣6分。', NULL, 16, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:驾驶机动车违反道路交通信号灯通行的,一次记6分 。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11151, 0, NULL, 2, NULL, '为提高机动车的安全性和可靠性,应定期对车辆设备进行检查,更换和补充车辆机油等运行材料,确保车辆器件及性能完好。', NULL, 16, '正确', '错误', NULL, NULL, '为提高机动车的安全性和可靠性,应定期对车辆设备进行检查,更换和补充车辆机油等运行材料,确保车辆器件及性能完好。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11150, 0, NULL, 2, NULL, '行车前应逆时针绕车一周,检查车底或附近有无儿童等人员及障碍物、轮胎气压是否正常、车底是否漏油漏水等。', NULL, 16, '正确', '错误', NULL, NULL, '行车前应逆时针绕车一周,检查车底或附近有无儿童等人员及障碍物、轮胎气压是否正常、车底是否漏油漏水等。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11149, 2, NULL, 2, NULL, '驾驶机动车出车前,驾驶人应进行安全检查,其目的是什么?', NULL, 240, '确认机动车轮胎是否状态良好', '确认周围是否有障碍物或儿童', '确认在车辆附近是否存在安全隐患', '确认车底是否有液体渗漏现象', '驾驶人在出车前进行安全检查的目的是:确认机动车轮胎是否状态良好,确认周围是否有障碍物或儿童,确认在车辆附近是否存在安全隐患,确认车底是否有液体渗漏现象。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11148, 1, NULL, 4, NULL, '关于酒精对驾驶人的影响,以下说法不正确的是什么?', NULL, 128, '导致驾驶人的判断能力下降', '导致驾驶人反应速度变慢', '影响驾驶人对车辆的操纵能力', '会使驾驶人亢奋,开车更警觉', '酒精会导致驾驶人的判断能力下降、反应速度变慢,影响对车辆的操纵能力。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11147, 0, NULL, 2, NULL, '驾驶机动车在路口掉头时,应提前开启左转向灯进入导向车道,不得妨碍行人和其他车辆正常通行。', NULL, 16, '正确', '错误', NULL, NULL, '在路口掉头时,应提前开启左转向灯进入导向车道,不得妨碍行人和其他车辆正常通行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11146, 0, NULL, 2, NULL, '儿童安全座椅能够在汽车发生碰撞或突然减速的情况下,通过减缓对儿童的冲击力和限制儿童的身体移动来减少对他们的伤害。', NULL, 16, '正确', '错误', NULL, NULL, '儿童安全座椅能够在汽车发生碰撞或突然减速的情况下,通过减缓对儿童的冲击力和限制儿童的身体移动来减少对他们的伤害。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11145, 0, NULL, 1, NULL, '机动车行经视线受阻的急弯路段会车时,如遇对方车辆鸣喇叭示意,也应当及时鸣喇叭进行回应。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十九条:机动车驶近急弯、坡道顶端等影响安全视距的路段以及超车或者遇有紧急情况时,应当减速慢行,并鸣喇叭示意。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11144, 0, NULL, 2, NULL, '系好安全带可以减轻机动车驾乘人员在碰撞时受到的伤害。', NULL, 16, '正确', '错误', NULL, NULL, '系好安全带可以减轻机动车驾乘人员在碰撞时受到的伤害。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11143, 0, NULL, 1, NULL, '驾驶机动车倒车时,后方道路条件较好的,应在确认安全的情况下尽快完成倒车操作。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第五十条:机动车倒车时,应当察明车后情况,确认安全后倒车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11142, 0, NULL, 3, NULL, '驾驶机动车在冰雪路面行驶,遇紧急情况时不宜使用紧急制动,可采取猛打方向盘的方法躲避。', NULL, 32, '正确', '错误', NULL, NULL, '冰雪路面行驶过程中不能采取紧急制动或是急转方向的方法,这是因为冰雪路面易滑,这样做容易造成车子侧滑或侧翻。因此本题错误。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11141, 0, NULL, 3, NULL, '驾驶机动车遇沙尘暴天气时,应打开雾灯和危险报警闪光灯。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶机动车遇浓雾或沙尘暴时,必须打开前后雾灯或者危险报警闪光灯,减速慢行甚至靠边停车以保证行车安全。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11140, 0, NULL, 1, NULL, '当发现前车正在超车时,驾驶人可以选择合适的时机超越前车。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十三条:前车正在左转弯、掉头、超车时,不得超车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11139, 0, NULL, 2, NULL, '驾驶机动车遇对向车辆突然强行超车,占据本车道时,可不避让,迫使对方让路。', NULL, 32, '正确', '错误', NULL, NULL, '行车要始终记得安全文明驾驶,对方要强行超车,我们就要让行,以免发生交通事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11138, 0, NULL, 2, NULL, '驾驶机动车在城市道路行车,应尽量避免紧跟悬挂外地号牌的车辆行驶,因为外地车可能对本地道路不熟,会出现因错过出口而急刹车等情况。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶机动车在城市道路行车,应尽量避免紧跟悬挂外地号牌的车辆行驶,因为外地车可能对本地道路不熟,会出现因错过出口而急刹车等情况。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11137, 0, NULL, 2, NULL, '驾驶机动车应尽量避免与大型车辆并排行驶,当车流量大无法避免并排行驶时,应注意与大型车辆保持横向安全距离。', NULL, 16, '正确', '错误', NULL, NULL, '驾驶机动车应尽量避免与大型车辆并排行驶,当车流量大无法避免并排行驶时,应注意与大型车辆保持横向安全距离。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11136, 0, NULL, 1, NULL, '驾驶机动车行驶速度超过规定时速达到50%的一次记6分。', NULL, 32, '正确', '错误', NULL, NULL, '《机动车驾驶证申领和使用规定》中:驾驶中型以上载客载货汽车、校车、危险物品运输车辆在高速公路、城市快速路上行驶超过规定时速20%以上或者在高速公路、城市快速路以外的道路上行驶超过规定时速50%以上,以及驾驶其他机动车行驶超过规定时速50%以上的,一次记12分。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11135, 0, NULL, 1, NULL, '在道路同方向划有2条以上机动车道的,左侧为快速车道,右侧为慢速车道。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第四十四条:在道路同方向划有2条以上机动车道的,左侧为快速车道,右侧为慢速车道。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11134, 0, NULL, 1, NULL, '驾驶中型载客汽车以90公里/小时的车速在高速公路上行驶时,不得在高速公路最左侧车道行驶。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第七十八条:同方向有2条车道的,左侧车道的最低车速为每小时100公里;同方向有3条以上车道的,最左侧车道的最低车速为每小时110公里,中间车道的最低车速为每小时90公里。本题中载客汽车车速为90公里/小时且不在最左侧车道行驶,所以本题正确。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11133, 0, NULL, 1, NULL, '驾驶机动车通过路面条件较好的窄路、窄桥时的最高速度可以超过每小时30公里。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第四十六条:机动车行驶中遇到进出非机动车道,通过铁路道口、急弯路、窄路、窄桥时最高行驶速度不得超过每小时30公里。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11132, 0, NULL, 1, NULL, '驾驶机动车进入居民小区,应降低车速,注意观察,车辆行驶速度不能超过限速标志限定的速度。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第六十七条:在单位院内、居民居住区内,机动车应当低速行驶,避让行人;有限速标志的,按照限速标志行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11131, 0, NULL, 1, NULL, '驾驶机动车驶离高速公路进入匝道后,应将车速降到限定速度以下。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第七十九条:机动车驶离高速公路时,应当开启右转向灯,驶入减速车道,降低车速后驶离。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11130, 0, NULL, 1, NULL, '夜间驾驶机动车行经没有行人通过的人行横道时可加速通过。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十七条:机动车行经没有交通信号的道路时,遇行人横过道路,应当避让。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11129, 0, NULL, 1, NULL, '驾驶机动车可骑轧可跨越车道分界线行驶,便于根据前方道路情况选择车道。', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法实施条例》第八十二条中:车辆不可骑、轧车行道分界线或者在路肩上行驶。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11128, 1, NULL, 1, NULL, '小张为图行驶便利擅自在私家车安装警报器,某日上路行驶时被交警查获,报警器被强制拆除,予以收缴。此外,小张将被处以多少元罚款?', NULL, 128, '20元以上200元以下', '200元以上500元以下', '1000元以上2000元以下', '200元以上2000元以下', '《道路交通安全法》第九十七条:非法安装警报器、标志灯具的,由公安机关交通管理部门强制拆除、予以收缴,并处200元以上2000元以下罚款。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11127, 1, NULL, 3, NULL, '吴某在雨天驾车出行,由于雨天车速慢导致车辆拥堵。行驶至一桥下时,发现前方低洼道路已被雨水淹没,但积水量未到积水警告线。这时,吴某应该如何跟车行驶?', NULL, 32, '停车等待', '加大与前车的安全距离', '紧跟前车', '鸣喇叭催促前车', '雨天路面湿滑,视线受阻,路面附着力减小,制动距离增大,跟车或会车应尽量保持较大的间距,跟车要与前车保持干燥路面的1.5倍以上的跟车距离。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11126, 0, NULL, 3, NULL, '小王开车带着一家人去郊游,路上行经一隧道时,发现前方车辆行驶速度缓慢,在鸣喇叭催促前车无效后,小王开启左转向灯超过了前车。小王的做法是否正确?', NULL, 32, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十三条:行经铁路道口、交叉路口、窄桥、弯道、陡坡、隧道、人行横道、市区交通流量大的路段等没有超车条件的,不得超车。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11125, 0, NULL, 3, NULL, '周某驾驶机动车在路上行驶,突然遇到爆胎。周某在更换完备胎后,自我感觉与使用正常轮胎无差别,便一直使用。周某的做法是否正确?', NULL, 32, '正确', '错误', NULL, NULL, '专用备胎,说明是用来作为备用轮胎的,因此不能作为正常轮胎长期使用。所以本题选择错误。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11124, 1, NULL, 54, NULL, '小李驾车与小张一同出行,在城市道路上以80公里/小时的速度行驶,行经拐弯路段时没有控制车速造成翻车,导致小李呈昏迷状态、小张轻伤。面对昏迷的小李,小张应该怎么做?', NULL, 32, '使劲掐伤员的人中', '抢救前先检查呼吸', '连续拍打伤员面部', '马上实施心肺复苏', '检查呼吸的目的是为了了解伤员的生命体征,而小李呈昏迷状态必须是要先确认是否还有呼吸。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11123, 1, NULL, 2, NULL, '王某驾驶机动车行驶在城市道路上,发现前方十字路口发生严重拥堵,并有交通警察现场进行指挥。行近十字路口处前方交通指示灯红灯亮起,此时,交通警察指挥王某可以通行并要求迅速通过,请问王某应当怎样操作处理?', NULL, 32, '等待交通指示灯绿灯亮起通过十字路口', '按照交通警察的指挥通行', '停在原地不做任何操作', '熄火下车观察', '《道路交通安全法》第三十八条:车辆、行人应当按照交通信号通行;遇有交通警察现场指挥时,应当按照交通警察的指挥通行;在没有交通信号的道路上,应当在确保安全、畅通的原则下通行。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11122, 1, NULL, 2, NULL, '付某驾驶机动车在光华路行驶时,遇对向车道行驶的李某强行占道,付某不予让行。下列做法正确的是?', NULL, 64, '加速从右侧超越', '鸣喇叭示意', '主动给对方让行', '逼对方靠右行驶', '虽然对方占道不文明,但是为保证行车安全,应文明礼让。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11121, 2, NULL, 5, NULL, '暴雨天气季某驾驶机动车经过产业园区门前,园区附近全是撑雨伞和穿雨衣的行人,经过这些行人时,季某不正确的做法是?', NULL, 192, '注意观察行人动态', '保持安全距离', '连续鸣喇叭使其让行', '鸣笛并继续直行', '雨天遇到撑雨伞和穿雨衣的行人在路边行走时,应注意观察行人动态、适当降低车速、保持安全距离、提前轻按喇叭提醒,避免交通事故。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11120, 0, NULL, 6, NULL, '刘某在雨雪天气上高速路行驶时,突然车子向右发生侧滑,刘某急中生智紧急向左打方向盘,使其车子稳定,这一做法是正确的吗?', NULL, 32, '正确', '错误', NULL, NULL, '向右侧滑分前后轮,若是前轮侧滑需向侧滑相反方向微打转向,若是后轮侧滑需向侧滑相同方向微打转向。题目没有说明是前轮还是后轮,向左打方向盘不适合后轮侧滑的情况,所以是错的。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11119, 1, NULL, 50, NULL, '吴某驾驶车辆以90公里/小时速度在高速公路行驶时,连续开车10小时以上中间未休息,造成疲劳乏困,车子撞到围栏翻车,路过的机动车发现吴某身上大量出血时,首先应采取什么措施?', NULL, 64, '观察伤员', '包扎伤员', '止血', '询问', '既然是有出血伤员,首先要做的当然是止血。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11118, 1, 1, 3, NULL, '小福某日开车外出送货,在标有双黄虚线的城市道路上行驶,因着急送货且前方车辆行驶缓慢,小福应如何做?', '26750-1605062861034.webp', 64, '持续鸣喇叭催促', '逼对方让行', '在保证安全的前提下压虚线超车', '利用非机动车道超车', '路中两条双黄虚线是“潮汐车道”,是指根据早晚交通流量不同情况,对有条件的道路,通过车道灯的指示方向变化,控制主干道车道行驶方向,来调整车道数。行车时允许压线或越线。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11117, 1, 1, 4, NULL, '某日11时30分马某驾车经过某个交叉路口,前方车多人多,马某欲强行右转,前方有孩童放学经过,正确的做法是什么?', '26751-1605065876211.webp', 32, '鸣笛并继续直行', '停车让行', '连续鸣喇叭使其让行', '在孩童通过前加速通过', '《道路交通安全法》第四十七条:机动车行经人行横道时,应当减速行驶;遇行人正在通过人行横道,应当停车让行。 机动车行经没有交通信号的道路时,遇行人横过道路,应当避让。 图中孩童正在通过人行横道,应停车让行人先行。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11116, 2, NULL, 1, NULL, '某日15时30分,张某驾驶一辆载货汽车(搭载10人)行至阳信县境内永莘路以47公里/小时的时速通过急弯路段时,机动车侧滑翻在道路一侧山沟,导致3人死亡、7人受伤。张某的主要违法行为是什么?', NULL, 160, '疲劳驾驶', '超速行驶', '客车超员', '载货车载客', '第一,急弯路段上以47公里/小时的速度行驶,属于超速行驶;第二,张某载货汽车(搭载10人),属于载货车载客。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11115, 0, NULL, 2, NULL, '行车中,制动报警灯亮,应试踩一下制动,发现制动依然有效的情况下可正常行车。', NULL, 32, '正确', '错误', NULL, NULL, '应该立刻停车检查制动,否则可能影响行车安全。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11114, 0, NULL, 2, NULL, '机动车启动后,如果有黄色或者红色的报警灯持续亮时,驾驶人应意识到车辆可能存在故障,应及时排除故障。', NULL, 16, '正确', '错误', NULL, NULL, '机动车启动后,如果有黄色或者红色的报警灯持续亮时,驾驶人应意识到车辆可能存在故障,应及时排除故障。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11113, 0, 1, 2, NULL, '机动车仪表盘上这个(如图所示)符号的开关控制的是儿童安全锁。', '5eb4d75agw1e291uxs3ygj.webp', 16, '正确', '错误', NULL, NULL, '小孩被保护在圈里,是儿童安全锁标志。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11112, 0, NULL, 1, NULL, '王大爷今年已满75周岁,自觉身体硬朗,想考领小型汽车驾驶证。在现有考试的基础上,王大爷还需通过记忆力、判断力、反应力等能力测试。', NULL, 16, '正确', '错误', NULL, NULL, '据公安部交通管理局发布的新措施,自2020年11月20日起,放宽小型汽车驾驶证申请年龄,取消申请小型汽车、小型自动挡汽车、轻便摩托车驾驶证70周岁的年龄上限。对70周岁以上人员考领驾驶证的,增加记忆力、判断力、反应力等能力测试,保证身体条件符合安全驾驶要求。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11111, 1, NULL, 1, NULL, '申请小型自动挡汽车驾驶证的人年龄条件是多少?', NULL, 32, '18周岁以上60周岁以下', '18周岁以上,无年龄上限', '21周岁以上50周岁以下', '24周岁以上70周岁以下', '据公安部交通管理局发布的新措施,自2020年11月20日起,放宽小型汽车驾驶证申请年龄,取消申请小型汽车、小型自动挡汽车、轻便摩托车驾驶证70周岁的年龄上限。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11110, 0, NULL, 1, NULL, '对于持有三轮汽车驾驶证的人员,可以驾驶上肢残疾人专用小型自动挡载客汽车。', NULL, 32, '正确', '错误', NULL, NULL, '1、据公安部交通管理局发布的新措施,自2020年11月20日起,对于持有小型自动挡汽车驾驶证(C2)以上的人员,可以驾驶上肢残疾人专用小型自动挡载客汽车。2、C2以上的驾驶证有C1(小型汽车)、B1(中型客车)、B2(大型货车)、A1(大型客车)、A2(牵引车)、A3(城市公交车)。', 0, 1, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11109, 0, NULL, 5, NULL, '夜间行驶在容易发生危险的路段时,遇有雨、雪、雾、结冰等气象条件时,应当降低行驶速度。', NULL, 16, '正确', '错误', NULL, NULL, '《道路交通安全法》第四十二条:夜间行驶或者在容易发生危险的路段行驶,以及遇有沙尘、冰雹、雨、雪、雾、结冰等气象条件时,应当降低行驶速度。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11108, 2, NULL, 1, NULL, '某日夜间,王某驾车在城市道路以30公里每小时的时速,由南向北直行,途经路口时与时速20公里每小时,由东向北右转驾车的李某发生碰撞,事故后李某没有停留直接驾车逃离现场。请问以下说法正确的有哪些?', NULL, 80, '李某右转行驶没有让直行', '王某超速行驶', '李某肇事逃逸', '王某未按规定使用灯光', '《道路交通安全法》第一百零一条:违反道路交通安全法律、法规的规定,发生重大交通事故,构成犯罪的,依法追究刑事责任,并由公安机关交通管理部门吊销机动车驾驶证。造成交通事故后逃逸的,由公安机关交通管理部门吊销机动车驾驶证,且终生不得重新取得机动车驾驶证。三个先行:转弯让直行,右方道路来车先行,右转让左转先行。城市道路行驶最低限速为30公里每小时,题中王某和李某均没有超速。', 0, 4, 0, 0, NULL, 'C1', 1);
+INSERT INTO "question" VALUES (11107, 1, NULL, 1, NULL, '贾某在同学聚会上饮酒后驾驶机动车以30公里/小时的速度行驶在弯道上,经信号灯路口时被执行任务的交警拦截,检查结果为贾某的酒精含量为95mg/ml,贾某的行为会受到什么处罚?', NULL, 16, '吊销机动车驾驶证', '暂扣驾照', '3年内不得重新取得驾驶证', '判处3年以上7年以下徒刑', '贾某属于醉酒驾驶机动车(血液酒精含量高于80mg/ml),根据《道路交通安全法》的规定:醉酒驾驶,由公安机关约束至酒醒。吊销机驾驶证,依法追究刑事责任,5年内不得重新取得驾驶证。', 0, 4, 0, 0, NULL, 'C1', 1);
+
+PRAGMA foreign_keys = true;
+

+ 23 - 0
jiaPei/Vendor/FMDBMigrationManager/2_FJ_QUESTION_UPDATE.sql

@@ -0,0 +1,23 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : miaxis
+ Source Server Type    : SQLite
+ Source Server Version : 3026000
+ Source Schema         : main
+
+ Target Server Type    : SQLite
+ Target Server Version : 3026000
+ File Encoding         : 65001
+
+ Date: 11/03/2021 17:48:19
+*/
+
+PRAGMA foreign_keys = false;
+
+-- ----------------------------
+-- Records of question
+-- ----------------------------
+UPDATE question SET answer = 32 , option_b = '18周岁以上,无最高年龄限制' ,explain = '据公安部交通管理局发布的新措施,自2020年11月20日起,放宽小型汽车驾驶证申请年龄,取消申请小型汽车、小型自动挡汽车、轻便摩托车驾驶证70周岁的年龄上限。' WHERE _id = 316;
+PRAGMA foreign_keys = true;
+

+ 293 - 0
jiaPei/Vendor/FMDBMigrationManager/FMDBMigrationManager.h

@@ -0,0 +1,293 @@
+//
+//  FMDBMigrationManager.h
+//  FMDBMigrationManager
+//
+//  Created by Blake Watters on 6/4/14.
+//  Copyright (c) 2014 Layer Inc. All rights reserved.
+//
+//  Licensed under the Apache License, Version 2.0 (the "License");
+//  you may not use this file except in compliance with the License.
+//  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+#import <fmdb/FMDatabase.h>
+#import <fmdb/FMDatabaseQueue.h>
+
+@protocol FMDBMigrating;
+
+/**
+ @abstract The `FMDBMigrationManager` class provides a simple, flexible interface for managing migrations for
+ a SQLite database that is accessed via FMDB.
+ */
+@interface FMDBMigrationManager : NSObject
+
+///-----------------------------------
+/// @name Creating a Migration Manager
+///-----------------------------------
+
+/**
+ @abstract Creates a new migration manager with a given database and migrations bundle.
+ @param database The database with which to initialize the migration manager.
+ @param bundle The bundle containing the migrations.
+ @return A new migration manager.
+ */
++ (instancetype)managerWithDatabase:(FMDatabase *)database migrationsBundle:(NSBundle *)bundle;
+
+/**
+ @abstract Creates a new migration manager with a database for the given database and migrations bundle.
+ @param path The path to a database with which to initialize the migration manager.
+ @param bundle The bundle containing the migrations.
+ @return A new migration manager.
+ */
++ (instancetype)managerWithDatabaseAtPath:(NSString *)path migrationsBundle:(NSBundle *)bundle;
+
+/**
+ @abstract Determines whether the receiver will perform a search for dynamically defined migrations. Default: `YES`.
+ @discussion When `YES` all classes will be enumerated to search for any that conform to the `FMDBMigrating` protocol.
+ */
+@property (nonatomic, assign) BOOL dynamicMigrationsEnabled;
+
+///--------------------------------------------------
+/// @name Accessing Database Path & Migrations Bundle
+///--------------------------------------------------
+
+/**
+ @abstract Returns the database of the receiver.
+ */
+@property (nonatomic, readonly) FMDatabase *database;
+
+/**
+ @abstract Returns the migrations bundle for the receiver.
+ */
+@property (nonatomic, readonly) NSBundle *migrationsBundle;
+
+///-----------------------------
+/// @name Accessing Version Info
+///-----------------------------
+
+/**
+ @abstract Returns the current version of the database managed by the receiver or `0` if the
+ migrations table is not present.
+ */
+@property (nonatomic, readonly) uint64_t currentVersion;
+
+/**
+ @abstract Returns the origin version of the database managed by the receiver or `0` if the
+ migrations table is not present.
+ */
+@property (nonatomic, readonly) uint64_t originVersion;
+
+///---------------------------
+/// @name Accessing Migrations
+///---------------------------
+
+/**
+ @abstract Returns all migrations discovered by the receiver. Each object returned conforms to the `FMDBMigrating` protocol. The
+ array is returned in ascending order by version.
+ @discussion The manager discovers migrations by analyzing all files that end in a .sql extension in the `migrationsBundle`
+ and accumulating all classes that conform to the `FMDBMigrating` protocol. These migrations can then be sorted and applied
+ to the target database.
+ @note The list of migrations is memoized for efficiency.
+ */
+@property (nonatomic, readonly) NSArray *migrations;
+
+/**
+ @abstract Returns the version numbers of the subset of `migrations` that have already been applied to the database
+ managed by the receiver in ascending order.
+ */
+@property (nonatomic, readonly) NSArray *appliedVersions;
+
+/**
+ @abstract Returns the version numbers of the subset of `migrations` that have not yet been applied to the database
+ managed by the receiver in ascending order.
+ */
+@property (nonatomic, readonly) NSArray *pendingVersions;
+
+/**
+ @abstract Returns a migration object with a given version number or `nil` if none could be found.
+ @param version The version of the desired migration.
+ @return A migration with the specified version or `nil` if none could be found.
+ */
+- (id<FMDBMigrating>)migrationForVersion:(uint64_t)version;
+
+/**
+ @abstract Returns a migration object with a given name or `nil` if none could be found.
+ @param name The name of the desired migration.
+ @return A migration with the specified named or `nil` if none could be found.
+ */
+- (id<FMDBMigrating>)migrationForName:(NSString *)name;
+
+///-------------------------
+/// @name Adding a Migration
+///-------------------------
+
+/**
+ @abstract Adds a migration to the receiver's list.
+ @discussion This method can be used to append code based migrations to the set if you do not wish to use dynamic migration discovery. If
+ the migration last has been previously computed, adding a migration will recompute the list.
+ @param migration The migration to add.
+ */
+- (void)addMigration:(id<FMDBMigrating>)migration;
+
+/**
+ @abstract Adds migrations from the array to the receiver's list.
+ @discussion This method can be used to append code based migrations to the set if you do not wish to use dynamic migration discovery. If
+ the migration last has been previously computed, adding migrations will recompute the list.
+ @param migrations An array of objects conforming to `FMDBMigrating` protocol.
+ */
+- (void)addMigrations:(NSArray *)migrations;
+
+///------------------------------------
+/// @name Managing the Migrations Table
+///------------------------------------
+
+/**
+ @abstract Returns a Boolean value that indicates if the `schema_migrations` table
+ is present in the database.
+ */
+@property (nonatomic, readonly) BOOL hasMigrationsTable;
+
+/**
+ @abstract Creates the `schema_migrations` table used by `FMDBMigrationManager` to maintain an index of applied migrations.
+ @param error A pointer to an error object that is set upon failure to create the migrations table.
+ @return A Boolean value that indicates if the creation of the migrations table was successful.
+ */
+- (BOOL)createMigrationsTable:(NSError **)error;
+
+///--------------------------
+/// @name Migrating Databases
+///--------------------------
+
+/**
+ @abstract Returns a Boolean value that indicates if the database managed by the receiver is in need of migration.
+ */
+@property (nonatomic, readonly) BOOL needsMigration;
+
+/**
+ @abstract Migrates the database managed by the receiver to the specified version, optionally providing progress via a block.
+ @discussion Migration is performed within a transaction that is rolled back if any errors occur during migration.
+ @param version The target version to migrate the database to. Pass `UINT64_MAX` to migrate to the latest version.
+ @param progressBlock An optional block to be invoked each time a migration is applied. The block has no return value and accepts a single `NSProgress` argument. The
+ progress object can be used to cancel a migration in progress.
+ @param error A pointer to an error object that is set upon failure to complete the migrations.
+ @return `YES` if migration was successful, else `NO`.
+ */
+- (BOOL)migrateDatabaseToVersion:(uint64_t)version progress:(void (^)(NSProgress *progress))progressBlock error:(NSError **)error;
+
+@end
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ @abstract The `FMDBMigrating` protocol is adopted by classes that wish to provide migration of SQLite databases accessed via FMDB. The
+ `FMDBMigrationManager` project ships with a single concrete implementation in the `FMDBFileMigration` class. Non file backed 
+ migrations can be implemented by conforming to the `FMDBMigrating` protocol.
+ */
+@protocol FMDBMigrating <NSObject>
+
+///-------------------------------------
+/// @name Accessing Migration Properties
+///-------------------------------------
+
+/**
+ @abstract The name of the migration.
+ */
+@property (nonatomic, readonly) NSString *name;
+
+/**
+ @abstract The numeric version of the migration. 
+ @discussion While monotonically incremented versions are fully supported, it is recommended that to use a timestamp format such as
+ 201406063106474. Timestamps avoid unnecessary churn in a codebase that is heavily branched.
+ */
+@property (nonatomic, readonly) uint64_t version;
+
+///--------------------------
+/// @name Migrating Databases
+///--------------------------
+
+/**
+ @abstract Tells the receiver to apply its changes to the given database and return a Boolean value indicating success or failure.
+ @discussion The `FMDBMigrationManager` manages a transaction while migrations are being applied. Should any call to `migrateDatabase:error` return `NO`,
+ then the transaction is rolled back.
+ @param database The database on which to apply the migration.
+ @param error A pointer to an error object to set should the transaction fail.
+ @return A Boolean value indicating if the
+ */
+- (BOOL)migrateDatabase:(FMDatabase *)database error:(out NSError *__autoreleasing *)error;
+
+@end
+
+/**
+ @abstract The `FMDBFileMigration` class provides a concrete implementation of the `FMDBMigrating` protocol that models
+ a migration stored on disk a SQL file. The filename encodes the name and version of the migration. Conformant filenames are
+ of the form `[version]_[name].sql`. 
+ */
+@interface FMDBFileMigration : NSObject <FMDBMigrating>
+
+///--------------------------------
+/// @name Creating a File Migration
+///--------------------------------
+
+/**
+ @abstract Creates and returns a new migration with the file at the given path.
+ @discussion Conformance of filenames can be evaluated with the `FMDBIsMigrationAtPath` utility function.
+ @param path The path to a file containing a SQL migration with a conformant filename.
+ */
++ (instancetype)migrationWithPath:(NSString *)path;
+
+/**
+ @abstract The path to the SQL migration file on disk.
+ */
+@property (nonatomic, readonly) NSString *path;
+
+/**
+ @abstract A convenience accessor for retrieving the SQL from the receiver's path.
+ */
+@property (nonatomic, readonly) NSString *SQL;
+
+@end
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ @abstract The domain for errors created by `FMDBMigrationManager`.
+ */
+extern NSString *const FMDBMigrationManagerErrorDomain;
+
+/**
+ @abstract A key for an `NSNumber` object in the `userInfo` of an `NSProgress` object specifying the version 
+ that the database was just migrated to.
+ @see `migrateDatabase:error:`
+ */
+extern NSString *const FMDBMigrationManagerProgressVersionUserInfoKey;
+
+/**
+ @abstract A key for an `id<FMDBMigrating>` object in the `userInfo` of an `NSProgress` object that identifies
+ the migration that was just applied to the database.
+ @see `migrateDatabase:error:`
+ */
+extern NSString *const FMDBMigrationManagerProgressMigrationUserInfoKey;
+
+/**
+ @abstract Enumerates the errors returned by FMDBMigrationManager
+ */
+typedef NS_ENUM(NSUInteger, FMDBMigrationManagerError) {
+    /// Indicates that migration was halted due to cancellation
+    FMDBMigrationManagerErrorMigrationCancelled  = 1
+};
+
+/**
+ @abstract Returns a Boolean value that indicates if the file at the given path is an FMDB Migration.
+ @discussion This function evaluates the last path component of the input string against the regular expression `/\d{1,15}_.+sql$/`.
+ @param path The path to inspect.
+ @return `YES` if the path could be identified as a migration, else `NO`.
+ */
+BOOL FMDBIsMigrationAtPath(NSString *path);

+ 379 - 0
jiaPei/Vendor/FMDBMigrationManager/FMDBMigrationManager.m

@@ -0,0 +1,379 @@
+//
+//  FMDBMigrationManager.m
+//  FMDBMigrationManager
+//
+//  Created by Blake Watters on 6/4/14.
+//  Copyright (c) 2014 Layer Inc. All rights reserved.
+//
+//  Licensed under the Apache License, Version 2.0 (the "License");
+//  you may not use this file except in compliance with the License.
+//  You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+
+#import "FMDBMigrationManager.h"
+#import <objc/runtime.h>
+
+// Public Constants
+NSString *const FMDBMigrationManagerErrorDomain = @"com.layer.FMDBMigrationManager.errors";
+NSString *const FMDBMigrationManagerProgressVersionUserInfoKey = @"version";
+NSString *const FMDBMigrationManagerProgressMigrationUserInfoKey = @"migration";
+
+// Private Constants
+static NSString *const FMDBMigrationFilenameRegexString = @"^(\\d+)_?((?<=_)[\\w\\s-]+)?(?<!_)\\.sql$";
+
+BOOL FMDBIsMigrationAtPath(NSString *path)
+{
+    static NSRegularExpression *migrationRegex;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        migrationRegex = [NSRegularExpression regularExpressionWithPattern:FMDBMigrationFilenameRegexString options:0 error:nil];
+    });
+    NSString *filename = [path lastPathComponent];
+    return [migrationRegex rangeOfFirstMatchInString:filename options:0 range:NSMakeRange(0, [filename length])].location != NSNotFound;
+}
+
+static NSArray *FMDBClassesConformingToProtocol(Protocol *protocol)
+{
+    NSMutableArray *conformingClasses = [NSMutableArray new];
+    Class *classes = NULL;
+    int numClasses = objc_getClassList(NULL, 0);
+    if (numClasses > 0 ) {
+        classes = (Class *)malloc(sizeof(Class) * numClasses);
+        numClasses = objc_getClassList(classes, numClasses);
+        for (int index = 0; index < numClasses; index++) {
+            Class nextClass = classes[index];
+            if (class_conformsToProtocol(nextClass, protocol)) {
+                [conformingClasses addObject:nextClass];
+            }
+        }
+        free(classes);
+    }
+    return conformingClasses;
+}
+
+@interface FMDBMigrationManager ()
+@property (nonatomic) FMDatabase *database;
+@property (nonatomic, assign) BOOL shouldCloseOnDealloc;
+@property (nonatomic) NSArray *migrations;
+@property (nonatomic) NSMutableArray *externalMigrations;
+@end
+
+@implementation FMDBMigrationManager
+
++ (instancetype)managerWithDatabaseAtPath:(NSString *)path migrationsBundle:(NSBundle *)bundle
+{
+    FMDatabase *database = [FMDatabase databaseWithPath:path];
+    return [[self alloc] initWithDatabase:database migrationsBundle:bundle];
+}
+
++ (instancetype)managerWithDatabase:(FMDatabase *)database migrationsBundle:(NSBundle *)bundle
+{
+    return [[self alloc] initWithDatabase:database migrationsBundle:bundle];
+}
+
+// Designated initializer
+- (id)initWithDatabase:(FMDatabase *)database migrationsBundle:(NSBundle *)migrationsBundle
+{
+    if (!database) [NSException raise:NSInvalidArgumentException format:@"Cannot initialize a `%@` with nil `database`.", [self class]];
+    if (!migrationsBundle) [NSException raise:NSInvalidArgumentException format:@"Cannot initialize a `%@` with nil `migrationsBundle`.", [self class]];
+    self = [super init];
+    if (self) {
+        _database = database;
+        _migrationsBundle = migrationsBundle;
+        _dynamicMigrationsEnabled = YES;
+        _externalMigrations = [NSMutableArray new];
+        if (![database goodConnection]) {
+            self.shouldCloseOnDealloc = YES;
+            [database open];
+        }
+    }
+    return self;
+}
+
+- (id)init
+{
+    @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Failed to call designated initializer." userInfo:nil];
+}
+
+- (void)dealloc
+{
+    if (self.shouldCloseOnDealloc) [_database close];
+}
+
+- (BOOL)hasMigrationsTable
+{
+    FMResultSet *resultSet = [self.database executeQuery:@"SELECT name FROM sqlite_master WHERE type='table' AND name=?", @"schema_migrations"];
+    if ([resultSet next]) {
+        [resultSet close];
+        return YES;
+    }
+    return NO;
+}
+
+- (BOOL)needsMigration
+{
+    return !self.hasMigrationsTable || [self.pendingVersions count] > 0;
+}
+
+- (BOOL)createMigrationsTable:(NSError **)error
+{
+    BOOL success = [self.database executeStatements:@"CREATE TABLE schema_migrations(version INTEGER UNIQUE NOT NULL)"];
+    if (!success && error) *error = self.database.lastError;
+    return success;
+}
+
+- (uint64_t)currentVersion
+{
+    if (!self.hasMigrationsTable) return 0;
+    
+    uint64_t version = 0;
+    FMResultSet *resultSet = [self.database executeQuery:@"SELECT MAX(version) FROM schema_migrations"];
+    if ([resultSet next]) {
+        version = [resultSet unsignedLongLongIntForColumnIndex:0];
+    }
+    [resultSet close];
+    return version;;
+}
+
+- (uint64_t)originVersion
+{
+    if (!self.hasMigrationsTable) return 0;
+    
+    uint64_t version = 0;
+    FMResultSet *resultSet = [self.database executeQuery:@"SELECT MIN(version) FROM schema_migrations"];
+    if ([resultSet next]) {
+        version = [resultSet unsignedLongLongIntForColumnIndex:0];
+    }
+    [resultSet close];
+    return version;
+}
+
+- (NSArray *)appliedVersions
+{
+    if (!self.hasMigrationsTable) return nil;
+    
+    NSMutableArray *versions = [NSMutableArray new];
+    FMResultSet *resultSet = [self.database executeQuery:@"SELECT version FROM schema_migrations"];
+    while ([resultSet next]) {
+        uint64_t version = [resultSet unsignedLongLongIntForColumnIndex:0];
+        [versions addObject:@(version)];
+    }
+    [resultSet close];
+    return [versions sortedArrayUsingSelector:@selector(compare:)];
+}
+
+- (NSArray *)pendingVersions
+{
+    if (!self.hasMigrationsTable) return [[self.migrations valueForKey:@"version"] sortedArrayUsingSelector:@selector(compare:)];
+    
+    NSMutableArray *pendingVersions = [[[self migrations] valueForKey:@"version"] mutableCopy];
+    [pendingVersions removeObjectsInArray:self.appliedVersions];
+    return [pendingVersions sortedArrayUsingSelector:@selector(compare:)];
+}
+
+- (void)addMigration:(id<FMDBMigrating>)migration
+{
+    NSParameterAssert(migration);
+    [self addMigrationsAndSortByVersion:@[ migration ]];
+}
+
+- (void)addMigrations:(NSArray *)migrations
+{
+    NSParameterAssert(migrations);
+    if (![migrations isKindOfClass:[NSArray class]]) {
+        @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Failed to add migrations because `migrations` argument is not an array." userInfo:nil];
+    }
+    for (id<NSObject> migration in migrations) {
+        if (![migration conformsToProtocol:@protocol(FMDBMigrating)]) {
+            @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Failed to add migrations because an object in `migrations` array doesn't conform to the `FMDBMigrating` protocol." userInfo:nil];
+        }
+    }
+    [self addMigrationsAndSortByVersion:migrations];
+}
+
+- (NSArray *)migrations
+{
+    // Memoize the migrations list
+    if (_migrations) return _migrations;
+    
+    NSArray *migrationPaths = [self.migrationsBundle pathsForResourcesOfType:@"sql" inDirectory:nil];
+    NSRegularExpression *migrationRegex = [NSRegularExpression regularExpressionWithPattern:FMDBMigrationFilenameRegexString options:0 error:nil];
+    NSMutableArray *migrations = [NSMutableArray new];
+    for (NSString *path in migrationPaths) {
+        NSString *filename = [path lastPathComponent];
+        if ([migrationRegex rangeOfFirstMatchInString:filename options:0 range:NSMakeRange(0, [filename length])].location != NSNotFound) {
+            FMDBFileMigration *migration = [FMDBFileMigration migrationWithPath:path];
+            [migrations addObject:migration];
+        }
+    }
+    
+    // Find all classes implementing FMDBMigrating
+    if (self.dynamicMigrationsEnabled) {
+        NSArray *conformingClasses = FMDBClassesConformingToProtocol(@protocol(FMDBMigrating));
+        for (Class migrationClass in conformingClasses) {
+            if ([migrationClass isSubclassOfClass:[FMDBFileMigration class]]) continue;
+            id<FMDBMigrating> migration = [migrationClass new];
+            [migrations addObject:migration];
+        }
+    }
+    
+    // Append any externally added migrations
+    [migrations addObjectsFromArray:self.externalMigrations];
+    
+    // Sort into our final set
+    _migrations = [migrations sortedArrayUsingDescriptors:@[ [NSSortDescriptor sortDescriptorWithKey:@"version" ascending:YES] ]];
+    return _migrations;
+}
+
+- (id<FMDBMigrating>)migrationForVersion:(uint64_t)version
+{
+    for (id<FMDBMigrating>migration in [self migrations]) {
+        if (migration.version == version) return migration;
+    }
+    return nil;
+}
+
+- (id<FMDBMigrating>)migrationForName:(NSString *)name
+{
+    for (id<FMDBMigrating>migration in [self migrations]) {
+        if ([migration.name isEqualToString:name]) return migration;
+    }
+    return nil;
+}
+
+- (BOOL)migrateDatabaseToVersion:(uint64_t)version progress:(void (^)(NSProgress *progress))progressBlock error:(NSError **)error
+{
+    BOOL success = YES;
+    NSArray *pendingVersions = self.pendingVersions;
+    NSProgress *progress = [NSProgress progressWithTotalUnitCount:[pendingVersions count]];
+    for (NSNumber *migrationVersionNumber in pendingVersions) {
+        [self.database beginTransaction];
+        
+        uint64_t migrationVersion = [migrationVersionNumber unsignedLongLongValue];
+        if (migrationVersion > version) {
+            [self.database commit];
+            break;
+        }
+        id<FMDBMigrating> migration = [self migrationForVersion:migrationVersion];
+        success = [migration migrateDatabase:self.database error:error];
+        if (!success) {
+            [self.database rollback];
+            break;
+        }
+        success = [self.database executeUpdate:@"INSERT INTO schema_migrations(version) VALUES (?)", @(migration.version)];
+        if (!success) {
+            [self.database rollback];
+            break;
+        }
+        
+        // Emit progress tracking and check for cancellation
+        progress.completedUnitCount++;
+        if (progressBlock) {
+            [progress setUserInfoObject:@(migrationVersion) forKey:FMDBMigrationManagerProgressVersionUserInfoKey];
+            [progress setUserInfoObject:migration forKey:FMDBMigrationManagerProgressMigrationUserInfoKey];
+            progressBlock(progress);
+            if (progress.cancelled) {
+                success = NO;
+                
+                NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: @"Migration was halted due to cancellation." };
+                if (error) *error = [NSError errorWithDomain:FMDBMigrationManagerErrorDomain code:FMDBMigrationManagerErrorMigrationCancelled userInfo:userInfo];
+                [self.database rollback];
+                break;
+            }
+        }
+        
+        [self.database commit];
+    }
+    return success;
+}
+
+- (void)addMigrationsAndSortByVersion:(NSArray *)migrations
+{
+    [self.externalMigrations addObjectsFromArray:migrations];
+    
+    // Append to the existing list if already computed
+    if (_migrations) {
+        NSMutableArray *currentMigrations = [_migrations mutableCopy];
+        [currentMigrations addObjectsFromArray:migrations];
+        _migrations = [currentMigrations sortedArrayUsingDescriptors:@[ [NSSortDescriptor sortDescriptorWithKey:@"version" ascending:YES] ]];
+    }
+}
+
+@end
+
+static BOOL FMDBMigrationScanMetadataFromPath(NSString *path, uint64_t *version, NSString **name)
+{
+    NSError *error = nil;
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:FMDBMigrationFilenameRegexString options:0 error:&error];
+    if (!regex) {
+        NSLog(@"[FMDBMigration] Failed constructing regex: %@", error);
+        return NO;
+    }
+    NSString *migrationName = [path lastPathComponent];
+    NSTextCheckingResult *result = [regex firstMatchInString:migrationName options:0 range:NSMakeRange(0, [migrationName length])];
+    if ([result numberOfRanges] != 3) {
+        return NO;
+    }
+    NSString *versionString = [migrationName substringWithRange:[result rangeAtIndex:1]];
+    if (!versionString) {
+        return NO;
+    }
+    *version = strtoull([versionString UTF8String], NULL, 10);
+    NSRange range = [result rangeAtIndex:2];
+    *name = (range.length) ? [migrationName substringWithRange:[result rangeAtIndex:2]] : nil;
+    return YES;
+}
+
+@interface FMDBFileMigration ()
+@property (nonatomic, readwrite) NSString *name;
+@property (nonatomic, readwrite) uint64_t version;
+@end
+
+@implementation FMDBFileMigration
+
++ (instancetype)migrationWithPath:(NSString *)path
+{
+    return [[self alloc] initWithPath:path];
+}
+
+- (id)initWithPath:(NSString *)path
+{
+    NSString *name;
+    uint64_t version;
+    if (!FMDBMigrationScanMetadataFromPath(path, &version, &name)) return nil;
+    
+    self = [super init];
+    if (self) {
+        _path = path;
+        _version = version;
+        _name = name;
+    }
+    return self;
+}
+
+- (id)init
+{
+    @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Failed to call designated initializer." userInfo:nil];
+}
+
+- (NSString *)SQL
+{
+    return [NSString stringWithContentsOfFile:self.path encoding:NSUTF8StringEncoding error:nil];
+}
+
+- (BOOL)migrateDatabase:(FMDatabase *)database error:(out NSError *__autoreleasing *)error
+{
+    BOOL success = [database executeStatements:self.SQL];
+    if (!success && error) *error = database.lastError;
+    return success;
+}
+
+@end

+ 31 - 0
jiaPei/Vendor/FMDBMigrationManager/Migration.h

@@ -0,0 +1,31 @@
+//
+//  Migration.h
+//  jiaPei
+//
+//  Created by 张嵘 on 2021/1/8.
+//  Copyright © 2021 JCZ. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "FMDBMigrationManager.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface Migration : NSObject <FMDBMigrating>
+
+@property (nonatomic, readonly) NSString *name;
+@property (nonatomic, readonly) uint64_t version;
+
+/**
+ @param name 数据库升级描述
+ @param version 当前版本号
+ @param updateArray 数据库操作,由于可能有多个,所以使用数组
+ @return  Migration
+ */
+- (instancetype)initWithName:(NSString *)name andVersion:(uint64_t)version andExecuteUpdateArray:(NSArray *)updateArray;
+ 
+- (BOOL)migrateDatabase:(FMDatabase *)database error:(out NSError *__autoreleasing *)error;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 46 - 0
jiaPei/Vendor/FMDBMigrationManager/Migration.m

@@ -0,0 +1,46 @@
+//
+//  Migration.m
+//  jiaPei
+//
+//  Created by 张嵘 on 2021/1/8.
+//  Copyright © 2021 JCZ. All rights reserved.
+//
+
+#import "Migration.h"
+#import "FMDB.h"
+
+@interface Migration()
+ 
+@property (nonatomic, copy) NSString *myName;
+@property (nonatomic, assign) uint64_t myVersion;
+@property (nonatomic, strong) NSArray *updateArray;
+ 
+@end
+
+@implementation Migration
+
+- (instancetype)initWithName:(NSString *)name andVersion:(uint64_t)version andExecuteUpdateArray:(NSArray *)updateArray {
+	if (self = [super init]) {
+		_myName = name;
+		_myVersion = version;
+		_updateArray = updateArray;
+	}
+	return self;
+}
+ 
+- (NSString *)name {
+	return _myName;
+}
+ 
+- (uint64_t)version {
+	return _myVersion;
+}
+ 
+- (BOOL)migrateDatabase:(FMDatabase *)database error:(out NSError *__autoreleasing *)error {
+	for (NSString *updateStr in _updateArray) {
+		[database executeUpdate:updateStr];
+	}
+	return YES;
+}
+
+@end

+ 454 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheet.h

@@ -0,0 +1,454 @@
+//
+//  LCActionSheet.h
+//  LCActionSheet
+//
+//  Created by Leo on 2015/4/27.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import <UIKit/UIKit.h>
+#import "LCActionSheetConfig.h"
+
+
+@class LCActionSheet;
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - LCActionSheet Block
+
+/**
+ Handle click button.
+ */
+typedef void(^LCActionSheetClickedHandler)(LCActionSheet *actionSheet, NSInteger buttonIndex);
+
+/**
+ Handle action sheet will present.
+ */
+typedef void(^LCActionSheetWillPresentHandler)(LCActionSheet *actionSheet);
+/**
+ Handle action sheet did present.
+ */
+typedef void(^LCActionSheetDidPresentHandler)(LCActionSheet *actionSheet);
+
+/**
+ Handle action sheet will dismiss.
+ */
+typedef void(^LCActionSheetWillDismissHandler)(LCActionSheet *actionSheet, NSInteger buttonIndex);
+/**
+ Handle action sheet did dismiss.
+ */
+typedef void(^LCActionSheetDidDismissHandler)(LCActionSheet *actionSheet, NSInteger buttonIndex);
+
+
+#pragma mark - LCActionSheet Delegate
+
+@protocol LCActionSheetDelegate <NSObject>
+
+@optional
+
+/**
+ Handle click button.
+ */
+- (void)actionSheet:(LCActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
+
+/**
+ Handle action sheet will present.
+ */
+- (void)willPresentActionSheet:(LCActionSheet *)actionSheet;
+/**
+ Handle action sheet did present.
+ */
+- (void)didPresentActionSheet:(LCActionSheet *)actionSheet;
+
+/**
+ Handle action sheet will dismiss.
+ */
+- (void)actionSheet:(LCActionSheet *)actionSheet willDismissWithButtonIndex:(NSInteger)buttonIndex;
+/**
+ Handle action sheet did dismiss.
+ */
+- (void)actionSheet:(LCActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex;
+
+@end
+
+
+#pragma mark - LCActionSheet
+
+@interface LCActionSheet : UIView
+
+
+#pragma mark - Properties
+
+/**
+ Title.
+ */
+@property (nullable, nonatomic, copy) NSString *title;
+
+/**
+ Cancel button's title.
+ */
+@property (nullable, nonatomic, copy) NSString *cancelButtonTitle;
+
+/**
+ Cancel button's index.
+ */
+@property (nonatomic, assign, readonly) NSInteger cancelButtonIndex;
+
+/**
+ LCActionSheet's delegate.
+ */
+@property (nullable, nonatomic, weak) id<LCActionSheetDelegate> delegate;
+
+/**
+ Deprecated, use `destructiveButtonIndexSet` instead.
+ */
+@property (nullable, nonatomic, strong) NSIndexSet *redButtonIndexSet __deprecated_msg("Property deprecated. Use `destructiveButtonIndexSet` instead.");
+
+/**
+ All destructive buttons' set. You should give it the `NSNumber` type items.
+ */
+@property (nullable, nonatomic, strong) NSIndexSet *destructiveButtonIndexSet;
+
+/**
+ Destructive button's color. Default is RGB(254, 67, 37).
+ */
+@property (nonatomic, strong) UIColor *destructiveButtonColor;
+
+/**
+ Title's color. Default is `[UIColor blackColor]`.
+ */
+@property (nonatomic, strong) UIColor *titleColor;
+/**
+ Buttons' color, without destructive buttons. Default is `[UIColor blackColor]`.
+ */
+@property (nonatomic, strong) UIColor *buttonColor;
+/**
+ Title's font. Default is `[UIFont systemFontOfSize:14.0f]`.
+ */
+@property (nonatomic, strong) UIFont *titleFont;
+/**
+ All buttons' font. Default is `[UIFont systemFontOfSize:18.0f]`.
+ */
+@property (nonatomic, strong) UIFont *buttonFont;
+/**
+ All buttons' height. Default is 49.0f;
+ */
+@property (nonatomic, assign) CGFloat buttonHeight;
+
+/**
+ If buttons' bottom view can scrolling. Default is NO.
+ */
+@property (nonatomic, assign, getter=canScrolling) BOOL scrolling;
+
+/**
+ Visible buttons' count. You have to set `scrolling = YES` if you want to set it.
+ */
+@property (nonatomic, assign) CGFloat visibleButtonCount;
+
+/**
+ Animation duration. Default is 0.3 seconds.
+ */
+@property (nonatomic, assign) CGFloat animationDuration;
+
+/**
+ Opacity of dark background. Default is 0.3f.
+ */
+@property (nonatomic, assign) CGFloat darkOpacity;
+
+/**
+ If you can tap darkView to dismiss. Defalut is NO, you can tap dardView to dismiss.
+ */
+@property (nonatomic, assign) BOOL darkViewNoTaped;
+
+/**
+ Clear blur effect. Default is NO, don't clear blur effect.
+ */
+@property (nonatomic, assign) BOOL unBlur;
+
+/**
+ Style of blur effect. Default is `UIBlurEffectStyleExtraLight`. iOS 8.0 +
+ */
+@property (nonatomic, assign) UIBlurEffectStyle blurEffectStyle;
+
+/**
+ Title's edge insets. Default is `UIEdgeInsetsMake(15.0f, 15.0f, 15.0f, 15.0f)`.
+ */
+@property (nonatomic, assign) UIEdgeInsets titleEdgeInsets;
+
+/**
+ Cell's separator color. Default is `RGBA(170/255.0f, 170/255.0f, 170/255.0f, 0.5f)`.
+ */
+@property (nonatomic, strong) UIColor *separatorColor;
+
+/**
+ Auto hide when the device rotated. Default is NO, won't auto hide.
+ */
+@property (nonatomic, assign) BOOL autoHideWhenDeviceRotated;
+
+
+/**
+ LCActionSheet clicked handler.
+ */
+@property (nullable, nonatomic, copy) LCActionSheetClickedHandler     clickedHandler;
+/**
+ LCActionSheet will present handler.
+ */
+@property (nullable, nonatomic, copy) LCActionSheetWillPresentHandler willPresentHandler;
+/**
+ LCActionSheet did present handler.
+ */
+@property (nullable, nonatomic, copy) LCActionSheetDidPresentHandler  didPresentHandler;
+/**
+ LCActionSheet will dismiss handler.
+ */
+@property (nullable, nonatomic, copy) LCActionSheetWillDismissHandler willDismissHandler;
+/**
+ LCActionSheet did dismiss handler.
+ */
+@property (nullable, nonatomic, copy) LCActionSheetDidDismissHandler  didDismissHandler;
+
+
+#pragma mark - Methods
+
+#pragma mark Delegate
+
+/**
+ Initialize an instance of LCActionSheet (Delegate).
+
+ @param title             title
+ @param delegate          delegate
+ @param cancelButtonTitle cancelButtonTitle
+ @param otherButtonTitles otherButtonTitles
+ 
+ @return An instance of LCActionSheet.
+ */
++ (instancetype)sheetWithTitle:(nullable NSString *)title
+                      delegate:(nullable id<LCActionSheetDelegate>)delegate
+             cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+             otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ Initialize an instance of LCActionSheet with title array (Delegate).
+
+ @param title                 title
+ @param delegate              delegate
+ @param cancelButtonTitle     cancelButtonTitle
+ @param otherButtonTitleArray otherButtonTitleArray
+ 
+ @return An instance of LCActionSheet.
+ */
++ (instancetype)sheetWithTitle:(nullable NSString *)title
+                      delegate:(nullable id<LCActionSheetDelegate>)delegate
+             cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+         otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
+
+/**
+ Initialize an instance of LCActionSheet (Delegate).
+
+ @param title             title
+ @param delegate          delegate
+ @param cancelButtonTitle cancelButtonTitle
+ @param otherButtonTitles otherButtonTitles
+ 
+ @return An instance of LCActionSheet.
+ */
+- (instancetype)initWithTitle:(nullable NSString *)title
+                     delegate:(nullable id<LCActionSheetDelegate>)delegate
+            cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+            otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ Initialize an instance of LCActionSheet with title array (Delegate).
+
+ @param title                 title
+ @param delegate              delegate
+ @param cancelButtonTitle     cancelButtonTitle
+ @param otherButtonTitleArray otherButtonTitleArray
+ 
+ @return An instance of LCActionSheet.
+ */
+- (instancetype)initWithTitle:(nullable NSString *)title
+                     delegate:(nullable id<LCActionSheetDelegate>)delegate
+            cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+        otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
+
+
+#pragma mark Block
+
+/**
+ Initialize an instance of LCActionSheet (Block).
+
+ @param title             title
+ @param cancelButtonTitle cancelButtonTitle
+ @param clickedHandler    clickedHandler
+ @param otherButtonTitles otherButtonTitles
+ 
+ @return An instance of LCActionSheet.
+ */
++ (instancetype)sheetWithTitle:(nullable NSString *)title
+             cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                       clicked:(nullable LCActionSheetClickedHandler)clickedHandler
+             otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ Initialize an instance of LCActionSheet with title array (Block).
+
+ @param title                 title
+ @param cancelButtonTitle     cancelButtonTitle
+ @param clickedHandler        clickedHandler
+ @param otherButtonTitleArray otherButtonTitleArray
+ 
+ @return An instance of LCActionSheet.
+ */
++ (instancetype)sheetWithTitle:(nullable NSString *)title
+             cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                       clicked:(nullable LCActionSheetClickedHandler)clickedHandler
+         otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
+
+/**
+ Initialize an instance of LCActionSheet (Block).
+
+ @param title             title
+ @param cancelButtonTitle cancelButtonTitle
+ @param clickedHandler    clickedHandler
+ @param otherButtonTitles otherButtonTitles
+ 
+ @return An instance of LCActionSheet.
+ */
+- (instancetype)initWithTitle:(nullable NSString *)title
+            cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                      clicked:(nullable LCActionSheetClickedHandler)clickedHandler
+            otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ Initialize an instance of LCActionSheet with title array (Block).
+
+ @param title                 title
+ @param cancelButtonTitle     cancelButtonTitle
+ @param clickedHandler        clickedHandler
+ @param otherButtonTitleArray otherButtonTitleArray
+ 
+ @return An instance of LCActionSheet.
+ */
+- (instancetype)initWithTitle:(nullable NSString *)title
+            cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                      clicked:(nullable LCActionSheetClickedHandler)clickedHandler
+        otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
+
+
+
+/**
+ Initialize an instance of LCActionSheet (Block).
+ 
+ @param title             title
+ @param cancelButtonTitle cancelButtonTitle
+ @param didDismissHandler didDismissHandler
+ @param otherButtonTitles otherButtonTitles
+ 
+ @return An instance of LCActionSheet.
+ */
++ (instancetype)sheetWithTitle:(nullable NSString *)title
+             cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                    didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
+             otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ Initialize an instance of LCActionSheet with title array (Block).
+ 
+ @param title                 title
+ @param cancelButtonTitle     cancelButtonTitle
+ @param didDismissHandler     didDismissHandler
+ @param otherButtonTitleArray otherButtonTitleArray
+ 
+ @return An instance of LCActionSheet.
+ */
++ (instancetype)sheetWithTitle:(nullable NSString *)title
+             cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                    didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
+         otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
+
+/**
+ Initialize an instance of LCActionSheet (Block).
+ 
+ @param title             title
+ @param cancelButtonTitle cancelButtonTitle
+ @param didDismissHandler didDismissHandler
+ @param otherButtonTitles otherButtonTitles
+ 
+ @return An instance of LCActionSheet.
+ */
+- (instancetype)initWithTitle:(nullable NSString *)title
+            cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                   didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
+            otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ Initialize an instance of LCActionSheet with title array (Block).
+ 
+ @param title                 title
+ @param cancelButtonTitle     cancelButtonTitle
+ @param didDismissHandler     didDismissHandler
+ @param otherButtonTitleArray otherButtonTitleArray
+ 
+ @return An instance of LCActionSheet.
+ */
+- (instancetype)initWithTitle:(nullable NSString *)title
+            cancelButtonTitle:(nullable NSString *)cancelButtonTitle
+                   didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler
+        otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray;
+
+
+#pragma mark Append & Show
+
+/**
+ Append buttons with titles.
+
+ @param titles titles
+ */
+- (void)appendButtonsWithTitles:(nullable NSString *)titles, ... NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ Append button at index with title.
+
+ @param title title
+ @param index index
+ */
+- (void)appendButtonWithTitle:(nullable NSString *)title atIndex:(NSInteger)index;
+
+/**
+ Append buttons at indexSet with titles.
+
+ @param titles  titles
+ @param indexes indexes
+ */
+- (void)appendButtonsWithTitles:(NSArray<NSString *> *)titles atIndexes:(NSIndexSet *)indexes;
+
+/**
+ Show the instance of LCActionSheet.
+ */
+- (void)show;
+
+@end
+
+NS_ASSUME_NONNULL_END
+

+ 935 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheet.m

@@ -0,0 +1,935 @@
+//
+//  LCActionSheet.m
+//  LCActionSheet
+//
+//  Created by Leo on 2015/4/27.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import "LCActionSheet.h"
+#import "LCActionSheetCell.h"
+#import "LCActionSheetViewController.h"
+#import "UIImage+LCActionSheet.h"
+#import "Masonry.h"
+
+#import "MH_MODIFY_LC.h"
+
+
+/// 取消按钮顶部的间隙 : 系统默认:5.0f  Custom By RQ :10.0f
+static CGFloat const LCCancelButtonTopMargin = 10.0f;
+
+
+@interface LCActionSheet () <UITableViewDataSource, UITableViewDelegate, UIScrollViewDelegate>
+
+@property (nonatomic, strong) NSArray<NSString *> *otherButtonTitles;
+
+@property (nonatomic, assign) CGSize titleTextSize;
+
+@property (nonatomic, weak) UIView *bottomView;
+@property (nonatomic, weak) UIVisualEffectView *blurEffectView;
+@property (nonatomic, weak) UIView *darkView;
+@property (nonatomic, weak) UILabel *titleLabel;
+@property (nonatomic, weak) UITableView *tableView;
+@property (nonatomic, weak) UIView *divisionView;
+@property (nonatomic, weak) UIButton *cancelButton;
+
+@property (nonatomic, weak) UIView *whiteBgView;
+
+@property (nonatomic, weak) UIView *lineView;
+
+@property (nullable, nonatomic, strong) UIWindow *window;
+
+@end
+
+@implementation LCActionSheet
+
+- (void)dealloc {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
++ (instancetype)sheetWithTitle:(NSString *)title delegate:(id<LCActionSheetDelegate>)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... {
+    id eachObject;
+    va_list argumentList;
+    NSMutableArray *tempOtherButtonTitles = nil;
+    if (otherButtonTitles) {
+        tempOtherButtonTitles = [[NSMutableArray alloc] initWithObjects:otherButtonTitles, nil];
+        va_start(argumentList, otherButtonTitles);
+        while ((eachObject = va_arg(argumentList, id))) {
+            [tempOtherButtonTitles addObject:eachObject];
+        }
+        va_end(argumentList);
+    }
+    return [[self alloc] initWithTitle:title
+                              delegate:delegate
+                     cancelButtonTitle:cancelButtonTitle
+                 otherButtonTitleArray:tempOtherButtonTitles];
+}
+
++ (instancetype)sheetWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle clicked:(LCActionSheetClickedHandler)clickedHandler otherButtonTitles:(NSString *)otherButtonTitles, ... {
+    id eachObject;
+    va_list argumentList;
+    NSMutableArray *tempOtherButtonTitles = nil;
+    if (otherButtonTitles) {
+        tempOtherButtonTitles = [[NSMutableArray alloc] initWithObjects:otherButtonTitles, nil];
+        va_start(argumentList, otherButtonTitles);
+        while ((eachObject = va_arg(argumentList, id))) {
+            [tempOtherButtonTitles addObject:eachObject];
+        }
+        va_end(argumentList);
+    }
+    return [[self alloc] initWithTitle:title
+                     cancelButtonTitle:cancelButtonTitle
+                               clicked:clickedHandler
+                 otherButtonTitleArray:tempOtherButtonTitles];
+}
+
++ (instancetype)sheetWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle didDismiss:(LCActionSheetDidDismissHandler)didDismissHandler otherButtonTitles:(NSString *)otherButtonTitles, ... {
+    id eachObject;
+    va_list argumentList;
+    NSMutableArray *tempOtherButtonTitles = nil;
+    if (otherButtonTitles) {
+        tempOtherButtonTitles = [[NSMutableArray alloc] initWithObjects:otherButtonTitles, nil];
+        va_start(argumentList, otherButtonTitles);
+        while ((eachObject = va_arg(argumentList, id))) {
+            [tempOtherButtonTitles addObject:eachObject];
+        }
+        va_end(argumentList);
+    }
+    return [[self alloc] initWithTitle:title
+                     cancelButtonTitle:cancelButtonTitle
+                            didDismiss:didDismissHandler
+                 otherButtonTitleArray:tempOtherButtonTitles];
+}
+
++ (instancetype)sheetWithTitle:(NSString *)title delegate:(id<LCActionSheetDelegate>)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitleArray:(NSArray<NSString *> *)otherButtonTitleArray {
+    
+    return [[self alloc] initWithTitle:title
+                              delegate:delegate
+                     cancelButtonTitle:cancelButtonTitle
+                 otherButtonTitleArray:otherButtonTitleArray];
+}
+
++ (instancetype)sheetWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle clicked:(LCActionSheetClickedHandler)clickedHandler otherButtonTitleArray:(NSArray<NSString *> *)otherButtonTitleArray {
+    
+    return [[self alloc] initWithTitle:title
+                     cancelButtonTitle:cancelButtonTitle
+                               clicked:clickedHandler
+                 otherButtonTitleArray:otherButtonTitleArray];
+}
+
++ (instancetype)sheetWithTitle:(NSString *)title cancelButtonTitle:(nullable NSString *)cancelButtonTitle didDismiss:(nullable LCActionSheetDidDismissHandler)didDismissHandler otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray {
+    
+    return [[self alloc] initWithTitle:title
+                     cancelButtonTitle:cancelButtonTitle
+                            didDismiss:didDismissHandler
+                 otherButtonTitleArray:otherButtonTitleArray];
+}
+
+- (instancetype)initWithTitle:(NSString *)title delegate:(id<LCActionSheetDelegate>)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... {
+    if (self = [super init]) {
+        [self config:LCActionSheetConfig.config];
+        
+        id eachObject;
+        va_list argumentList;
+        NSMutableArray *tempOtherButtonTitles = nil;
+        if (otherButtonTitles) {
+            tempOtherButtonTitles = [[NSMutableArray alloc] initWithObjects:otherButtonTitles, nil];
+            va_start(argumentList, otherButtonTitles);
+            while ((eachObject = va_arg(argumentList, id))) {
+                [tempOtherButtonTitles addObject:eachObject];
+            }
+            va_end(argumentList);
+        }
+        
+        self.title             = title;
+        self.delegate          = delegate;
+        self.cancelButtonTitle = cancelButtonTitle;
+        self.otherButtonTitles = tempOtherButtonTitles;
+        
+        [self setupView];
+    }
+    return self;
+}
+
+- (instancetype)initWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle clicked:(LCActionSheetClickedHandler)clickedHandler otherButtonTitles:(NSString *)otherButtonTitles, ... {
+    if (self = [super init]) {
+        [self config:LCActionSheetConfig.config];
+        
+        id eachObject;
+        va_list argumentList;
+        NSMutableArray *tempOtherButtonTitles = nil;
+        if (otherButtonTitles) {
+            tempOtherButtonTitles = [[NSMutableArray alloc] initWithObjects:otherButtonTitles, nil];
+            va_start(argumentList, otherButtonTitles);
+            while ((eachObject = va_arg(argumentList, id))) {
+                [tempOtherButtonTitles addObject:eachObject];
+            }
+            va_end(argumentList);
+        }
+        
+        self.title             = title;
+        self.cancelButtonTitle = cancelButtonTitle;
+        self.clickedHandler    = clickedHandler;
+        self.otherButtonTitles = tempOtherButtonTitles;
+        
+        [self setupView];
+    }
+    return self;
+}
+
+- (instancetype)initWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle didDismiss:(LCActionSheetDidDismissHandler)didDismissHandler otherButtonTitles:(NSString *)otherButtonTitles, ... {
+    if (self = [super init]) {
+        [self config:LCActionSheetConfig.config];
+        
+        id eachObject;
+        va_list argumentList;
+        NSMutableArray *tempOtherButtonTitles = nil;
+        if (otherButtonTitles) {
+            tempOtherButtonTitles = [[NSMutableArray alloc] initWithObjects:otherButtonTitles, nil];
+            va_start(argumentList, otherButtonTitles);
+            while ((eachObject = va_arg(argumentList, id))) {
+                [tempOtherButtonTitles addObject:eachObject];
+            }
+            va_end(argumentList);
+        }
+        
+        self.title             = title;
+        self.cancelButtonTitle = cancelButtonTitle;
+        self.didDismissHandler = didDismissHandler;
+        self.otherButtonTitles = tempOtherButtonTitles;
+        
+        [self setupView];
+    }
+    return self;
+}
+
+- (instancetype)initWithTitle:(NSString *)title delegate:(id<LCActionSheetDelegate>)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitleArray:(NSArray<NSString *> *)otherButtonTitleArray {
+    if (self = [super init]) {
+        [self config:LCActionSheetConfig.config];
+        
+        self.title             = title;
+        self.delegate          = delegate;
+        self.cancelButtonTitle = cancelButtonTitle;
+        self.otherButtonTitles = otherButtonTitleArray;
+        
+        [self setupView];
+    }
+    return self;
+}
+
+- (instancetype)initWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle clicked:(LCActionSheetClickedHandler)clickedHandler otherButtonTitleArray:(NSArray<NSString *> *)otherButtonTitleArray {
+    if (self = [super init]) {
+        [self config:LCActionSheetConfig.config];
+        
+        self.title             = title;
+        self.cancelButtonTitle = cancelButtonTitle;
+        self.clickedHandler    = clickedHandler;
+        self.otherButtonTitles = otherButtonTitleArray;
+        
+        [self setupView];
+    }
+    return self;
+}
+
+- (instancetype)initWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle didDismiss:(LCActionSheetDidDismissHandler)didDismissHandler otherButtonTitleArray:(NSArray<NSString *> *)otherButtonTitleArray {
+    if (self = [super init]) {
+        [self config:LCActionSheetConfig.config];
+        
+        self.title             = title;
+        self.cancelButtonTitle = cancelButtonTitle;
+        self.didDismissHandler = didDismissHandler;
+        self.otherButtonTitles = otherButtonTitleArray;
+        
+        [self setupView];
+    }
+    return self;
+}
+
+- (instancetype)config:(LCActionSheetConfig *)config {
+    _title                     = config.title;
+    _cancelButtonTitle         = config.cancelButtonTitle;
+    _destructiveButtonIndexSet = config.destructiveButtonIndexSet;
+    _destructiveButtonColor    = config.destructiveButtonColor;
+    _titleColor                = config.titleColor;
+    _buttonColor               = config.buttonColor;
+    _titleFont                 = config.titleFont;
+    _buttonFont                = config.buttonFont;
+    _buttonHeight              = config.buttonHeight;
+    _scrolling                 = config.canScrolling;
+    _visibleButtonCount        = config.visibleButtonCount;
+    _animationDuration         = config.animationDuration;
+    _darkOpacity               = config.darkOpacity;
+    _darkViewNoTaped           = config.darkViewNoTaped;
+    _unBlur                    = config.unBlur;
+    _blurEffectStyle           = config.blurEffectStyle;
+    _titleEdgeInsets           = config.titleEdgeInsets;
+    _separatorColor            = config.separatorColor;
+    _autoHideWhenDeviceRotated = config.autoHideWhenDeviceRotated;
+    
+    return self;
+}
+
+- (void)setupView {
+    @weakify(self)
+    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
+    [notificationCenter addObserver:self
+                           selector:@selector(handleDidChangeStatusBarOrientation)
+                               name:UIApplicationDidChangeStatusBarOrientationNotification
+                             object:nil];
+    
+    UIView *bottomView = [[UIView alloc] init];
+    
+
+    [self addSubview:bottomView];
+    [bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.left.right.equalTo(self);
+        
+        CGFloat height =
+        (self.title.length > 0 ? self.titleTextSize.height + 2.0f + (self.titleEdgeInsets.top + self.titleEdgeInsets.bottom) : 0) +
+        (self.otherButtonTitles.count > 0 ? (self.canScrolling ? MIN(self.visibleButtonCount, self.otherButtonTitles.count) : self.otherButtonTitles.count) * self.buttonHeight : 0) +
+        (self.cancelButtonTitle.length > 0 ? LCCancelButtonTopMargin + self.buttonHeight + RQ_APPLICATION_SAFEAREA_BOTTOM_HEIGHT: 0);
+        
+        make.height.equalTo(@(height));
+        make.bottom.equalTo(self).offset(height);
+    }];
+    self.bottomView = bottomView;
+    
+    UIView *darkView                = [[UIView alloc] init];
+    darkView.alpha                  = 0;
+    darkView.userInteractionEnabled = NO;
+#if USER_MODIFY_LC_BY_RQ
+    darkView.backgroundColor        = LC_ACTION_SHEET_COLOR(0, 0, 0);
+#else
+    darkView.backgroundColor        = LC_ACTION_SHEET_COLOR(46, 49, 50);
+#endif
+    
+    [self addSubview:darkView];
+    [darkView mas_makeConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.left.right.equalTo(self);
+        make.top.equalTo(self).priorityLow();
+        make.bottom.equalTo(bottomView.mas_top);
+    }];
+    self.darkView = darkView;
+    
+    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self
+                                                                          action:@selector(darkViewClicked)];
+    [darkView addGestureRecognizer:tap];
+    
+    UIView *whiteBgView         = [[UIView alloc] init];
+    whiteBgView.backgroundColor = [UIColor whiteColor];
+    [bottomView addSubview:whiteBgView];
+    [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(bottomView);
+    }];
+    self.whiteBgView = whiteBgView;
+    
+    if (!self.unBlur) {
+        [self blurBottomBgView];
+    } else {
+        whiteBgView.hidden = NO;
+    }
+    
+    UILabel *titleLabel      = [[UILabel alloc] init];
+    titleLabel.text          = self.title;
+    titleLabel.font          = self.titleFont;
+    titleLabel.numberOfLines = 0;
+    titleLabel.textColor     = self.titleColor;
+    titleLabel.textAlignment = NSTextAlignmentCenter;
+    [bottomView addSubview:titleLabel];
+    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.top.equalTo(bottomView).offset(self.title.length > 0 ? self.titleEdgeInsets.top : 0);
+        make.left.equalTo(bottomView).offset(self.titleEdgeInsets.left);
+        make.right.equalTo(bottomView).offset(-self.titleEdgeInsets.right);
+        
+        CGFloat height = self.title.length > 0 ? self.titleTextSize.height + 2.0f : 0;  // Prevent omit
+        make.height.equalTo(@(height));
+    }];
+    self.titleLabel = titleLabel;
+    
+    UITableView *tableView    = [[UITableView alloc] init];
+    tableView.backgroundColor = [UIColor clearColor];
+    tableView.dataSource      = self;
+    tableView.delegate        = self;
+    [bottomView addSubview:tableView];
+    [tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.left.right.equalTo(bottomView);
+        make.top.equalTo(titleLabel.mas_bottom).offset(self.title.length > 0 ? self.titleEdgeInsets.bottom : 0);
+        
+        CGFloat height = self.otherButtonTitles.count * self.buttonHeight;
+        make.height.equalTo(@(height));
+    }];
+    tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+    self.tableView = tableView;
+    
+
+    UIView *lineView  = [[UIView alloc] init];
+    lineView.backgroundColor = self.separatorColor;
+    lineView.contentMode   = UIViewContentModeBottom;
+    lineView.clipsToBounds = YES;
+    [bottomView addSubview:lineView];
+    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.equalTo(bottomView);
+        make.bottom.equalTo(tableView.mas_top);
+        make.height.equalTo(@0.5f);
+    }];
+    self.lineView = lineView;
+    
+    self.lineView.hidden = !self.title || self.title.length == 0;
+    
+    
+    UIView *divisionView         = [[UIView alloc] init];
+    divisionView.alpha           = 0.3f;
+    divisionView.backgroundColor = self.separatorColor;
+    [bottomView addSubview:divisionView];
+    [divisionView mas_makeConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.left.right.equalTo(bottomView);
+        make.top.equalTo(tableView.mas_bottom);
+        
+        CGFloat height = self.cancelButtonTitle.length > 0 ? LCCancelButtonTopMargin : 0;
+        make.height.equalTo(@(height));
+    }];
+    self.divisionView = divisionView;
+
+    UIButton *cancelButton       = [UIButton buttonWithType:UIButtonTypeCustom];
+    cancelButton.backgroundColor = [UIColor clearColor];
+    cancelButton.titleLabel.font = self.buttonFont;
+    [cancelButton setTitle:self.cancelButtonTitle forState:UIControlStateNormal];
+    [cancelButton setTitleColor:self.buttonColor forState:UIControlStateNormal];
+#if USER_MODIFY_LC_BY_RQ
+    /// fix 掉通过 LCActionSheetConfig 配置actionsheet的bug
+    if ([self.destructiveButtonIndexSet containsIndex:0]) {
+        [cancelButton setTitleColor:self.destructiveButtonColor forState:UIControlStateNormal];
+    }
+#endif
+    [cancelButton setBackgroundImage:[UIImage lc_imageWithColor:self.separatorColor]
+                            forState:UIControlStateHighlighted];
+    [cancelButton addTarget:self
+                     action:@selector(cancelButtonClicked)
+           forControlEvents:UIControlEventTouchUpInside];
+    [bottomView addSubview:cancelButton];
+    [cancelButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.left.right.equalTo(bottomView);
+        make.top.equalTo(divisionView.mas_bottom);
+        
+        CGFloat height = self.cancelButtonTitle.length > 0 ? self.buttonHeight : 0;
+        make.height.equalTo(@(height));
+    }];
+    self.cancelButton = cancelButton;
+}
+
+- (void)appendButtonsWithTitles:(NSString *)titles, ... {
+    id eachObject;
+    va_list argumentList;
+    NSMutableArray *tempButtonTitles = nil;
+    if (titles) {
+        tempButtonTitles = [[NSMutableArray alloc] initWithObjects:titles, nil];
+        va_start(argumentList, titles);
+        while ((eachObject = va_arg(argumentList, id))) {
+            [tempButtonTitles addObject:eachObject];
+        }
+        va_end(argumentList);
+    }
+    
+    self.otherButtonTitles = [self.otherButtonTitles arrayByAddingObjectsFromArray:tempButtonTitles];
+    
+    [self.tableView reloadData];
+    [self updateBottomView];
+    [self updateTableView];
+}
+
+- (void)appendButtonWithTitle:(NSString *)title atIndex:(NSInteger)index {
+#ifdef DEBUG
+    NSAssert(index != 0, @"Index 0 is cancel button");
+    NSAssert(index <= self.otherButtonTitles.count + 1, @"Index crossed");
+#endif
+    
+    NSMutableArray<NSString *> *arrayM = [NSMutableArray arrayWithArray:self.otherButtonTitles];
+    [arrayM insertObject:title atIndex:index - 1];
+    self.otherButtonTitles = [NSArray arrayWithArray:arrayM];
+    
+    [self.tableView reloadData];
+    [self updateBottomView];
+    [self updateTableView];
+}
+
+- (void)appendButtonsWithTitles:(NSArray<NSString *> *)titles atIndexes:(NSIndexSet *)indexes {
+#ifdef DEBUG
+    NSAssert(titles.count == indexes.count, @"Count of titles differs from count of indexs");
+#endif
+    
+    NSMutableIndexSet *indexSetM = [[NSMutableIndexSet alloc] init];
+    [indexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) {
+#ifdef DEBUG
+        NSAssert(idx != 0, @"Index 0 is cancel button");
+        NSAssert(idx <= self.otherButtonTitles.count + indexes.count, @"Index crossed");
+#endif
+        
+        [indexSetM addIndex:idx - 1];
+    }];
+    
+    NSMutableArray<NSString *> *arrayM = [NSMutableArray arrayWithArray:self.otherButtonTitles];
+    [arrayM insertObjects:titles atIndexes:indexSetM];
+    self.otherButtonTitles = [NSArray arrayWithArray:arrayM];
+    
+    [self.tableView reloadData];
+    [self updateBottomView];
+    [self updateTableView];
+}
+    
+- (void)handleDidChangeStatusBarOrientation {
+    if (self.autoHideWhenDeviceRotated) {
+        [self hideWithButtonIndex:self.cancelButtonIndex];
+    }
+}
+
+- (void)blurBottomBgView {
+    @weakify(self)
+    self.whiteBgView.hidden = YES;
+    
+    if (!self.blurEffectView) {
+        UIBlurEffect *blurEffect           = [UIBlurEffect effectWithStyle:self.blurEffectStyle];
+        UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
+        [self.bottomView addSubview:blurEffectView];
+        [blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
+            @strongify(self)
+            make.edges.equalTo(self.bottomView);
+        }];
+        self.blurEffectView = blurEffectView;
+        
+        [self.bottomView sendSubviewToBack:blurEffectView];
+    }
+}
+
+- (void)unBlurBottomBgView {
+    self.whiteBgView.hidden = NO;
+    
+    if (self.blurEffectView) {
+        [self.blurEffectView removeFromSuperview];
+        self.blurEffectView = nil;
+    }
+}
+
+#pragma mark - Setter & Getter
+
+- (void)setTitle:(NSString *)title {
+    @weakify(self)
+    _title = [title copy];
+    
+    self.titleLabel.text = title;
+    
+    [self updateTitleLabel];
+    
+    [self.tableView mas_updateConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.top.equalTo(self.titleLabel.mas_bottom).offset(self.title.length > 0 ? self.titleEdgeInsets.bottom : 0);
+    }];
+    
+    self.lineView.hidden = !self.title || self.title.length == 0;
+}
+
+- (void)setCancelButtonTitle:(NSString *)cancelButtonTitle {
+    _cancelButtonTitle = [cancelButtonTitle copy];
+    
+    [self.cancelButton setTitle:cancelButtonTitle forState:UIControlStateNormal];
+    [self updateCancelButton];
+}
+
+- (void)setDestructiveButtonIndexSet:(NSIndexSet *)destructiveButtonIndexSet {
+    _destructiveButtonIndexSet = destructiveButtonIndexSet;
+    
+    if ([destructiveButtonIndexSet containsIndex:0]) {
+        [self.cancelButton setTitleColor:self.destructiveButtonColor forState:UIControlStateNormal];
+    } else {
+        [self.cancelButton setTitleColor:self.buttonColor forState:UIControlStateNormal];
+    }
+    
+    [self.tableView reloadData];
+}
+
+- (void)setRedButtonIndexSet:(NSIndexSet *)redButtonIndexSet {
+    self.destructiveButtonIndexSet = redButtonIndexSet;
+}
+
+- (NSIndexSet *)redButtonIndexSet {
+    return self.destructiveButtonIndexSet;
+}
+
+- (void)setUnBlur:(BOOL)unBlur {
+    _unBlur = unBlur;
+    
+    if (unBlur) {
+        [self unBlurBottomBgView];
+    } else {
+        [self blurBottomBgView];
+    }
+}
+
+- (void)setBlurEffectStyle:(UIBlurEffectStyle)blurEffectStyle {
+    _blurEffectStyle = blurEffectStyle;
+    
+    [self unBlurBottomBgView];
+    [self blurBottomBgView];
+}
+
+- (void)setTitleFont:(UIFont *)aTitleFont {
+    _titleFont = aTitleFont;
+    
+    self.titleLabel.font = aTitleFont;
+    [self updateBottomView];
+    [self updateTitleLabel];
+}
+
+- (void)setButtonFont:(UIFont *)aButtonFont {
+    _buttonFont = aButtonFont;
+    
+    self.cancelButton.titleLabel.font = aButtonFont;
+    [self.tableView reloadData];
+}
+
+- (void)setDestructiveButtonColor:(UIColor *)aDestructiveButtonColor {
+    _destructiveButtonColor = aDestructiveButtonColor;
+    
+    if ([self.destructiveButtonIndexSet containsIndex:0]) {
+        [self.cancelButton setTitleColor:self.destructiveButtonColor forState:UIControlStateNormal];
+    } else {
+        [self.cancelButton setTitleColor:self.buttonColor forState:UIControlStateNormal];
+    }
+    
+    [self.tableView reloadData];
+}
+
+- (void)setTitleColor:(UIColor *)aTitleColor {
+    _titleColor = aTitleColor;
+    
+    self.titleLabel.textColor = aTitleColor;
+}
+
+- (void)setButtonColor:(UIColor *)aButtonColor {
+    _buttonColor = aButtonColor;
+    
+    [self.cancelButton setTitleColor:aButtonColor forState:UIControlStateNormal];
+    [self.tableView reloadData];
+}
+
+- (void)setButtonHeight:(CGFloat)aButtonHeight {
+    _buttonHeight = aButtonHeight;
+    
+    [self.tableView reloadData];
+    [self updateBottomView];
+    [self updateTableView];
+    [self updateCancelButton];
+}
+
+- (NSInteger)cancelButtonIndex {
+    return 0;
+}
+
+- (void)setScrolling:(BOOL)scrolling {
+    _scrolling = scrolling;
+    
+    [self updateBottomView];
+    [self updateTableView];
+}
+
+- (void)setVisibleButtonCount:(CGFloat)visibleButtonCount {
+    _visibleButtonCount = visibleButtonCount;
+    
+    [self updateBottomView];
+    [self updateTableView];
+}
+
+- (void)setTitleEdgeInsets:(UIEdgeInsets)titleEdgeInsets {
+    _titleEdgeInsets = titleEdgeInsets;
+    
+    [self updateBottomView];
+    [self updateTitleLabel];
+    [self updateTableView];
+}
+
+- (void)setSeparatorColor:(UIColor *)separatorColor {
+    _separatorColor = separatorColor;
+    
+    self.lineView.backgroundColor = separatorColor;
+    self.divisionView.backgroundColor = separatorColor;
+    [self.cancelButton setBackgroundImage:[UIImage lc_imageWithColor:separatorColor]
+                                 forState:UIControlStateHighlighted];
+    [self.tableView reloadData];
+}
+
+- (CGSize)titleTextSize {
+    CGSize size = CGSizeMake([UIScreen mainScreen].bounds.size.width -
+                             (self.titleEdgeInsets.left + self.titleEdgeInsets.right),
+                             MAXFLOAT);
+    
+    NSStringDrawingOptions opts =
+    NSStringDrawingUsesLineFragmentOrigin |
+    NSStringDrawingUsesFontLeading;
+    
+    NSDictionary *attrs = @{NSFontAttributeName : self.titleFont};
+    
+    _titleTextSize =
+    [self.title boundingRectWithSize:size
+                             options:opts
+                          attributes:attrs
+                             context:nil].size;
+    
+    return _titleTextSize;
+}
+
+#pragma mark - Update Views
+
+- (void)updateBottomView {
+    @weakify(self)
+    [self.bottomView mas_updateConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        CGFloat height = (self.title.length > 0 ? self.titleTextSize.height + 2.0f + (self.titleEdgeInsets.top + self.titleEdgeInsets.bottom) : 0) + (self.otherButtonTitles.count > 0 ? (self.canScrolling ? MIN(self.visibleButtonCount, self.otherButtonTitles.count) : self.otherButtonTitles.count) * self.buttonHeight : 0) + (self.cancelButtonTitle.length > 0 ? LCCancelButtonTopMargin + self.buttonHeight : 0);
+        make.height.equalTo(@(height));
+    }];
+}
+
+- (void)updateTitleLabel {
+    @weakify(self)
+    [self.titleLabel mas_updateConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        make.top.equalTo(self.bottomView).offset(self.title.length > 0 ? self.titleEdgeInsets.top : 0);
+        make.left.equalTo(self.bottomView).offset(self.titleEdgeInsets.left);
+        make.right.equalTo(self.bottomView).offset(-self.titleEdgeInsets.right);
+        
+        CGFloat height = self.title.length > 0 ? self.titleTextSize.height + 2.0f : 0;  // Prevent omit
+        make.height.equalTo(@(height));
+    }];
+}
+
+- (void)updateTableView {
+    @weakify(self)
+    if (!self.canScrolling) {
+        [self.tableView mas_updateConstraints:^(MASConstraintMaker *make) {
+            @strongify(self)
+            make.height.equalTo(@(self.otherButtonTitles.count * self.buttonHeight));
+            make.top.equalTo(self.titleLabel.mas_bottom).offset(self.title.length > 0 ? self.titleEdgeInsets.bottom : 0);
+        }];
+    } else {
+        [self.tableView mas_updateConstraints:^(MASConstraintMaker *make) {
+            @strongify(self)
+            make.height.equalTo(@(MIN(self.visibleButtonCount, self.otherButtonTitles.count) * self.buttonHeight));
+            make.top.equalTo(self.titleLabel.mas_bottom).offset(self.title.length > 0 ? self.titleEdgeInsets.bottom : 0);
+        }];
+    }
+}
+
+- (void)updateCancelButton {
+    @weakify(self)
+    [self.divisionView mas_updateConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        CGFloat height = self.cancelButtonTitle.length > 0 ? LCCancelButtonTopMargin : 0;
+        make.height.equalTo(@(height));
+    }];
+    
+    [self.cancelButton mas_updateConstraints:^(MASConstraintMaker *make) {
+        @strongify(self)
+        CGFloat height = self.cancelButtonTitle.length > 0 ? self.buttonHeight : 0;
+        make.height.equalTo(@(height));
+    }];
+}
+
+#pragma mark - Show & Hide
+
+- (void)show {
+    if ([self.delegate respondsToSelector:@selector(willPresentActionSheet:)]) {
+        [self.delegate willPresentActionSheet:self];
+    }
+    
+    if (self.willPresentHandler) {
+        self.willPresentHandler(self);
+    }
+    
+    LCActionSheetViewController *viewController = [[LCActionSheetViewController alloc] init];
+    viewController.statusBarStyle = [UIApplication sharedApplication].statusBarStyle;
+    
+    UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
+    window.windowLevel = UIWindowLevelStatusBar;
+    window.rootViewController = viewController;
+    [window makeKeyAndVisible];
+    self.window = window;
+    
+    [viewController.view addSubview:self];
+    [self mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(viewController.view);
+    }];
+    
+    [self.window layoutIfNeeded];
+    
+    __weak typeof(self) weakSelf = self;
+    [UIView animateWithDuration:self.animationDuration delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
+        __strong typeof(weakSelf) strongSelf = weakSelf;
+        
+        strongSelf.darkView.alpha = strongSelf.darkOpacity;
+        strongSelf.darkView.userInteractionEnabled = !strongSelf.darkViewNoTaped;
+        
+        [strongSelf.bottomView mas_updateConstraints:^(MASConstraintMaker *make) {
+            make.bottom.equalTo(strongSelf);
+        }];
+        
+        [strongSelf layoutIfNeeded];
+        
+    } completion:^(BOOL finished) {
+        __strong typeof(weakSelf) strongSelf = weakSelf;
+        
+        if ([strongSelf.delegate respondsToSelector:@selector(didPresentActionSheet:)]) {
+            [strongSelf.delegate didPresentActionSheet:strongSelf];
+        }
+        
+        if (strongSelf.didPresentHandler) {
+            strongSelf.didPresentHandler(strongSelf);
+        }
+    }];
+}
+
+- (void)hideWithButtonIndex:(NSInteger)buttonIndex {
+    if ([self.delegate respondsToSelector:@selector(actionSheet:willDismissWithButtonIndex:)]) {
+        [self.delegate actionSheet:self willDismissWithButtonIndex:buttonIndex];
+    }
+    
+    if (self.willDismissHandler) {
+        self.willDismissHandler(self, buttonIndex);
+    }
+    
+    __weak typeof(self) weakSelf = self;
+    [UIView animateWithDuration:self.animationDuration delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
+        __strong typeof(weakSelf) strongSelf = weakSelf;
+        
+        strongSelf.darkView.alpha = 0;
+        strongSelf.darkView.userInteractionEnabled = NO;
+        
+        [strongSelf.bottomView mas_updateConstraints:^(MASConstraintMaker *make) {
+            CGFloat height = (strongSelf.title.length > 0 ? strongSelf.titleTextSize.height + 2.0f + (strongSelf.titleEdgeInsets.top + strongSelf.titleEdgeInsets.bottom) : 0) + (strongSelf.otherButtonTitles.count > 0 ? (strongSelf.canScrolling ? MIN(strongSelf.visibleButtonCount, strongSelf.otherButtonTitles.count) : strongSelf.otherButtonTitles.count) * strongSelf.buttonHeight : 0) + (strongSelf.cancelButtonTitle.length > 0 ? LCCancelButtonTopMargin + strongSelf.buttonHeight : 0);
+            make.bottom.equalTo(strongSelf).offset(height);
+        }];
+        
+        [strongSelf layoutIfNeeded];
+        
+    } completion:^(BOOL finished) {
+        __strong typeof(weakSelf) strongSelf = weakSelf;
+        
+        [strongSelf removeFromSuperview];
+        
+        strongSelf.window.rootViewController = nil;
+        strongSelf.window.hidden = YES;
+        strongSelf.window = nil;
+        
+        if ([strongSelf.delegate respondsToSelector:@selector(actionSheet:didDismissWithButtonIndex:)]) {
+            [strongSelf.delegate actionSheet:strongSelf didDismissWithButtonIndex:buttonIndex];
+        }
+        
+        if (strongSelf.didDismissHandler) {
+            strongSelf.didDismissHandler(strongSelf, buttonIndex);
+        }
+    }];
+}
+
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
+    if (!self.canScrolling) {
+        scrollView.contentOffset = CGPointMake(0, 0);
+    }
+}
+
+#pragma mark - LCActionSheet & UITableView Delegate
+
+- (void)darkViewClicked {
+    [self cancelButtonClicked];
+}
+
+- (void)cancelButtonClicked {
+    if ([self.delegate respondsToSelector:@selector(actionSheet:clickedButtonAtIndex:)]) {
+        [self.delegate actionSheet:self clickedButtonAtIndex:0];
+    }
+    
+    if (self.clickedHandler) {
+        self.clickedHandler(self, 0);
+    }
+    
+    [self hideWithButtonIndex:0];
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+    if ([self.delegate respondsToSelector:@selector(actionSheet:clickedButtonAtIndex:)]) {
+        [self.delegate actionSheet:self clickedButtonAtIndex:indexPath.row + 1];
+    }
+    
+    if (self.clickedHandler) {
+        self.clickedHandler(self, indexPath.row + 1);
+    }
+    
+    [self hideWithButtonIndex:indexPath.row + 1];
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.otherButtonTitles.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *cellID = @"LCActionSheetCell";
+    LCActionSheetCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
+    if (!cell) {
+        cell = [[LCActionSheetCell alloc] initWithStyle:UITableViewCellStyleDefault
+                                        reuseIdentifier:cellID];
+    }
+    
+    cell.titleLabel.font      = self.buttonFont;
+    cell.titleLabel.textColor = self.buttonColor;
+    
+    cell.titleLabel.text = self.otherButtonTitles[indexPath.row];
+    
+    cell.cellSeparatorColor = self.separatorColor;
+    
+//    cell.lineView.hidden = indexPath.row == MAX(self.otherButtonTitles.count - 1, 0);
+    
+    if (indexPath.row == MAX(self.otherButtonTitles.count - 1, 0)) {
+        cell.tag = LC_ACTION_SHEET_CELL_HIDDE_LINE_TAG;
+    } else {
+        cell.tag = LC_ACTION_SHEET_CELL_NO_HIDDE_LINE_TAG;
+    }
+    
+    if (self.destructiveButtonIndexSet) {
+        if ([self.destructiveButtonIndexSet containsIndex:indexPath.row + 1]) {
+            cell.titleLabel.textColor = self.destructiveButtonColor;
+        } else {
+            cell.titleLabel.textColor = self.buttonColor;
+        }
+    }
+    
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return self.buttonHeight;
+}
+
+@end

+ 55 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheetCell.h

@@ -0,0 +1,55 @@
+//
+//  LCActionSheetCell.h
+//  LCActionSheet
+//
+//  Created by Leo on 2016/7/15.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import <UIKit/UIKit.h>
+
+
+#define LC_ACTION_SHEET_CELL_NO_HIDDE_LINE_TAG  100
+#define LC_ACTION_SHEET_CELL_HIDDE_LINE_TAG     101
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LCActionSheetCell : UITableViewCell
+
+/**
+ Title label.
+ */
+@property (nonatomic, weak) UILabel *titleLabel;
+
+/**
+ Line.
+ */
+@property (nonatomic, weak) UIView *lineView;
+
+/**
+ Cell's separator color.
+ */
+@property (nonatomic, strong) UIColor *cellSeparatorColor;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 102 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheetCell.m

@@ -0,0 +1,102 @@
+//
+//  LCActionSheetCell.m
+//  LCActionSheet
+//
+//  Created by Leo on 2016/7/15.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import "LCActionSheetCell.h"
+#import "Masonry.h"
+#import "LCActionSheetConfig.h"
+
+@interface LCActionSheetCell ()
+
+/**
+ *  Highlighted View.
+ */
+@property (nonatomic, weak) UIView *highlightedView;
+
+@end
+
+@implementation LCActionSheetCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
+        @weakify(self)
+        self.clipsToBounds = YES;
+        self.backgroundColor = [UIColor clearColor];
+        
+        UIView *highlightedView  = [[UIView alloc] init];
+        highlightedView.backgroundColor = self.cellSeparatorColor;
+        highlightedView.clipsToBounds   = YES;
+        highlightedView.hidden          = YES;
+        [self.contentView addSubview:highlightedView];
+        self.highlightedView = highlightedView;
+        [highlightedView mas_makeConstraints:^(MASConstraintMaker *make) {
+            @strongify(self)
+            make.edges.equalTo(self.contentView);
+        }];
+        
+        UILabel *titleLabel = [[UILabel alloc] init];
+        titleLabel.textAlignment = NSTextAlignmentCenter;
+        titleLabel.adjustsFontSizeToFitWidth = YES;
+        [self.contentView addSubview:titleLabel];
+        self.titleLabel = titleLabel;
+        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            @strongify(self)
+            make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 10.0f, 0, 10.0f));
+        }];
+        
+        UIView *lineView  = [[UIView alloc] init];
+        lineView.backgroundColor = self.cellSeparatorColor;
+        lineView.contentMode   = UIViewContentModeBottom;
+        lineView.clipsToBounds = YES;
+        [self.contentView addSubview:lineView];
+        self.lineView = lineView;
+        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
+            @strongify(self)
+            make.left.right.bottom.equalTo(self.contentView);
+            make.height.equalTo(@0.5f);
+        }];
+    }
+    return self;
+}
+
+- (void)setCellSeparatorColor:(UIColor *)cellSeparatorColor {
+    _cellSeparatorColor = cellSeparatorColor;
+    
+    self.highlightedView.backgroundColor = cellSeparatorColor;
+    self.lineView.backgroundColor = cellSeparatorColor;
+}
+
+- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
+    if (self.tag == LC_ACTION_SHEET_CELL_HIDDE_LINE_TAG) {
+        self.lineView.hidden = YES;
+    } else {
+        self.lineView.hidden = highlighted;
+    }
+    
+    self.highlightedView.hidden = !highlighted;
+}
+
+@end

+ 150 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheetConfig.h

@@ -0,0 +1,150 @@
+//
+//  LCActionSheetConfig.h
+//  LCActionSheet
+//
+//  Created by Leo on 2016/11/29.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import <UIKit/UIKit.h>
+
+
+#define LC_ACTION_SHEET_COLOR(r, g, b)      LC_ACTION_SHEET_COLOR_A(r, g, b, 1.0f)
+#define LC_ACTION_SHEET_COLOR_A(r, g, b, a) [UIColor colorWithRed:(r)/255.0f\
+                                                            green:(g)/255.0f\
+                                                             blue:(b)/255.0f\
+                                                            alpha:a]
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LCActionSheetConfig : NSObject
+
+/**
+ Title.
+ */
+@property (nullable, nonatomic, copy) NSString *title;
+
+/**
+ Cancel button's title.
+ */
+@property (nullable, nonatomic, copy) NSString *cancelButtonTitle;
+
+/**
+ Cancel button's index.
+ */
+@property (nonatomic, assign, readonly) NSInteger cancelButtonIndex;
+
+/**
+ All destructive buttons' set. You should give it the `NSNumber` type items.
+ */
+@property (nullable, nonatomic, strong) NSIndexSet *destructiveButtonIndexSet;
+
+/**
+ Destructive button's color. Default is RGB(254, 67, 37).
+ */
+@property (nonatomic, strong) UIColor *destructiveButtonColor;
+
+/**
+ Title's color. Default is `[UIColor blackColor]`.
+ */
+@property (nonatomic, strong) UIColor *titleColor;
+/**
+ Buttons' color, without destructive buttons. Default is `[UIColor blackColor]`.
+ */
+@property (nonatomic, strong) UIColor *buttonColor;
+/**
+ Title's font. Default is `[UIFont systemFontOfSize:14.0f]`.
+ */
+@property (nonatomic, strong) UIFont *titleFont;
+/**
+ All buttons' font. Default is `[UIFont systemFontOfSize:18.0f]`.
+ */
+@property (nonatomic, strong) UIFont *buttonFont;
+/**
+ All buttons' height. Default is 49.0f;
+ */
+@property (nonatomic, assign) CGFloat buttonHeight;
+
+/**
+ If buttons' bottom view can scrolling. Default is NO.
+ */
+@property (nonatomic, assign, getter=canScrolling) BOOL scrolling;
+
+/**
+ Visible buttons' count. You have to set `scrolling = YES` if you want to set it.
+ */
+@property (nonatomic, assign) CGFloat visibleButtonCount;
+
+/**
+ Animation duration. Default is 0.3 seconds.
+ */
+@property (nonatomic, assign) CGFloat animationDuration;
+
+/**
+ Opacity of dark background. Default is 0.3f.
+ */
+@property (nonatomic, assign) CGFloat darkOpacity;
+
+/**
+ If you can tap darkView to dismiss. Defalut is NO, you can tap dardView to dismiss.
+ */
+@property (nonatomic, assign) BOOL darkViewNoTaped;
+
+/**
+ Clear blur effect. Default is NO, don't clear blur effect.
+ */
+@property (nonatomic, assign) BOOL unBlur;
+
+/**
+ Style of blur effect. Default is `UIBlurEffectStyleExtraLight`. iOS 8.0 +
+ */
+@property (nonatomic, assign) UIBlurEffectStyle blurEffectStyle;
+
+/**
+ Title's edge insets. Default is `UIEdgeInsetsMake(15.0f, 15.0f, 15.0f, 15.0f)`.
+ */
+@property (nonatomic, assign) UIEdgeInsets titleEdgeInsets;
+
+/**
+ Cell's separator color. Default is `RGBA(170/255.0f, 170/255.0f, 170/255.0f, 0.5f)`.
+ */
+@property (nonatomic, strong) UIColor *separatorColor;
+
+/**
+ Auto hide when the device rotated. Default is NO, won't auto hide.
+ */
+@property (nonatomic, assign) BOOL autoHideWhenDeviceRotated;
+
+/**
+ LCActionSheetConfig shared instance.
+ */
+@property (class, nonatomic, strong, readonly) LCActionSheetConfig *config;
+
+/**
+ LCActionSheetConfig shared instance.
+ */
++ (instancetype)shared __deprecated_msg("Method deprecated. Use property `config` instead.");
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 86 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheetConfig.m

@@ -0,0 +1,86 @@
+//
+//  LCActionSheetConfig.m
+//  LCActionSheet
+//
+//  Created by Leo on 2016/11/29.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import "LCActionSheetConfig.h"
+
+
+#define LC_ACTION_SHEET_BUTTON_HEIGHT       49.0f
+
+#define LC_ACTION_SHEET_RED_COLOR           LC_ACTION_SHEET_COLOR(254, 67, 37)
+
+#define LC_ACTION_SHEET_TITLE_FONT          [UIFont systemFontOfSize:14.0f]
+
+#define LC_ACTION_SHEET_BUTTON_FONT         [UIFont systemFontOfSize:18.0f]
+
+#define LC_ACTION_SHEET_ANIMATION_DURATION  0.3f
+
+#define LC_ACTION_SHEET_DARK_OPACITY        0.3f
+
+
+@implementation LCActionSheetConfig
+
++ (LCActionSheetConfig *)config {
+    static id _config = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        _config = [[self alloc] initSharedInstance];
+    });
+    return _config;
+}
+
++ (instancetype)shared {
+    return self.config;
+}
+
+- (instancetype)initSharedInstance {
+    if (self = [super init]) {
+        self.titleFont              = LC_ACTION_SHEET_TITLE_FONT;
+        self.buttonFont             = LC_ACTION_SHEET_BUTTON_FONT;
+        self.destructiveButtonColor = LC_ACTION_SHEET_RED_COLOR;
+        self.titleColor             = LC_ACTION_SHEET_COLOR(111, 111, 111);
+        self.buttonColor            = [UIColor blackColor];
+
+        self.buttonHeight           = LC_ACTION_SHEET_BUTTON_HEIGHT;
+        self.animationDuration      = LC_ACTION_SHEET_ANIMATION_DURATION;
+        self.darkOpacity            = LC_ACTION_SHEET_DARK_OPACITY;
+
+        self.titleEdgeInsets        = UIEdgeInsetsMake(15.0f, 15.0f, 15.0f, 15.0f);
+
+        self.separatorColor         = LC_ACTION_SHEET_COLOR_A(150, 150, 150, 0.3f);
+    }
+    return self;
+}
+
+- (instancetype)init {
+    return LCActionSheetConfig.config;
+}
+
+- (NSInteger)cancelButtonIndex {
+    return 0;
+}
+
+@end

+ 42 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheetViewController.h

@@ -0,0 +1,42 @@
+//
+//  LCActionSheetViewController.h
+//  LCActionSheet
+//
+//  Created by Leo on 12/05/2017.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import <UIKit/UIKit.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LCActionSheetViewController : UIViewController
+    
+/**
+ Status bar style. Same as the original.
+ */
+@property (nonatomic, assign) UIStatusBarStyle statusBarStyle;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 36 - 0
jiaPei/Vendor/LCActionSheet/LCActionSheetViewController.m

@@ -0,0 +1,36 @@
+//
+//  LCActionSheetViewController.m
+//  LCActionSheet
+//
+//  Created by Leo on 12/05/2017.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import "LCActionSheetViewController.h"
+
+@implementation LCActionSheetViewController
+    
+- (UIStatusBarStyle)preferredStatusBarStyle {
+    return self.statusBarStyle;
+}
+
+@end

+ 15 - 0
jiaPei/Vendor/LCActionSheet/MH_MODIFY_LC.h

@@ -0,0 +1,15 @@
+//
+//  MH_MODIFY_LC.h
+//  WeChat
+//
+//  Created by senba on 2017/5/22.
+//  Copyright © 2017年 RQ. All rights reserved.
+//  由于LCActionSheet的UI,与本项目所表现的UI有差异,现在需要手动改动框架内部的UI。
+
+#ifndef MH_MODIFY_LC_h
+#define MH_MODIFY_LC_h
+
+// 被RQ修改的
+#define USER_MODIFY_LC_BY_RQ 1
+
+#endif /* MH_MODIFY_LCActionSheet_h */

+ 42 - 0
jiaPei/Vendor/LCActionSheet/UIImage+LCActionSheet.h

@@ -0,0 +1,42 @@
+//
+//  UIImage+LCActionSheet.h
+//  LCActionSheet
+//
+//  Created by Leo on 2016/11/29.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import <UIKit/UIKit.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UIImage (LCActionSheet)
+
+/**
+ Create a image with the color.
+ */
++ (nullable instancetype)lc_imageWithColor:(UIColor *)color;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 45 - 0
jiaPei/Vendor/LCActionSheet/UIImage+LCActionSheet.m

@@ -0,0 +1,45 @@
+//
+//  UIImage+LCActionSheet.m
+//  LCActionSheet
+//
+//  Created by Leo on 2016/11/29.
+//
+//  Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy
+//  of this software and associated documentation files (the "Software"), to deal
+//  in the Software without restriction, including without limitation the rights
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//  copies of the Software, and to permit persons to whom the Software is
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in all
+//  copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+//  SOFTWARE.
+
+
+#import "UIImage+LCActionSheet.h"
+
+@implementation UIImage (LCActionSheet)
+
++ (instancetype)lc_imageWithColor:(UIColor *)color {
+    CGRect rect = CGRectMake(0.0f, 0.0f, 2.0f, 2.0f);
+    
+    UIGraphicsBeginImageContext(rect.size);
+    CGContextRef context = UIGraphicsGetCurrentContext();
+    CGContextSetFillColorWithColor(context, [color CGColor]);
+    CGContextFillRect(context, rect);
+    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    
+    return image;
+}
+
+@end

+ 40 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomBaseCell.h

@@ -0,0 +1,40 @@
+//
+//  QMChatRoomBaseCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <QMLineSDK/QMLineSDK.h>
+
+
+
+@interface QMChatRoomBaseCell : UITableViewCell
+
+@property (nonatomic, strong) UIImageView *iconImage; // 头像
+
+@property (nonatomic, strong) UILabel *timeLabel; // 时间
+
+@property (nonatomic, strong) UIImageView *chatBackgroudImage; // 气泡
+
+@property (nonatomic, strong) UIImageView *sendStatus; // 消息发送状态
+
+@property (nonatomic, strong) CustomMessage *message;
+
+@property (nonatomic, copy) void(^tapSendMessage)(NSString *);
+
+@property (nonatomic, copy) void(^didBtnAction)(BOOL);
+
+@property (nonatomic, copy) void(^tapNetAddress)(NSString *);
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater;
+
+//+ (CGFloat)setHeightWithData: (CustomMessage *)message;
+
+- (void)longPressTapGesture: (id)sender;
+
+- (void)setProgress: (float)progress;
+
+@end

+ 176 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomBaseCell.m

@@ -0,0 +1,176 @@
+//
+//  QMChatRoomBaseCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+#define kIconImageViewWidth 45
+
+@implementation QMChatRoomBaseCell
+{
+    CustomMessage *_message;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        self.backgroundColor = [UIColor colorWithRed:240/255.0 green:240/255.0 blue:240/255.0 alpha:1];
+        [self setUI];
+    }
+    return self;
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    self.iconImage.image = nil;
+    self.chatBackgroudImage.image = nil;
+    self.timeLabel.text = nil;
+}
+
+- (void)setUI {
+    self.iconImage = [[UIImageView alloc] init];
+    self.iconImage.backgroundColor = [UIColor whiteColor];
+    self.iconImage.contentMode = UIViewContentModeScaleAspectFill;
+    self.iconImage.layer.cornerRadius = 20.5;
+    self.iconImage.layer.masksToBounds = true;
+    self.iconImage.clipsToBounds = YES;
+    [self.contentView addSubview:self.iconImage];
+    
+    self.timeLabel = [[UILabel alloc] init];
+    self.timeLabel.hidden = YES;
+    self.timeLabel.textAlignment = NSTextAlignmentCenter;
+    self.timeLabel.backgroundColor = [UIColor clearColor];
+    self.timeLabel.textColor = [UIColor grayColor];
+    self.timeLabel.font = [UIFont systemFontOfSize:12];
+    [self.contentView addSubview:self.timeLabel];
+    
+    self.chatBackgroudImage = [[UIImageView alloc] init];
+    self.chatBackgroudImage.backgroundColor = [UIColor colorWithRed:240/255.0 green:240/255.0 blue:240/255.0 alpha:1];
+    self.chatBackgroudImage.userInteractionEnabled = YES;
+    [self.contentView addSubview:self.chatBackgroudImage];
+    
+    self.sendStatus = [[UIImageView alloc] init];
+    self.sendStatus.userInteractionEnabled = YES;
+    [self.contentView addSubview:self.sendStatus];
+    
+    UITapGestureRecognizer *tapResendMessage = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(reSendAction:)];
+    [self.sendStatus addGestureRecognizer:tapResendMessage];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    _message = message;
+    if (self.timeLabel.hidden == YES) {
+        self.timeLabel.frame = CGRectZero;
+    }else {
+        self.timeLabel.frame = CGRectMake(0, 10, RQ_SCREEN_WIDTH, 20);
+    }
+    self.timeLabel.text = [QMDateManager showChatTime:message.createdTime];
+    
+    // 重写
+    if ([message.fromType isEqualToString:@"0"]) {
+        //发送
+        if ([NSURL URLWithString:avater]) {
+            [self.iconImage sd_setImageWithURL:[NSURL URLWithString:avater] placeholderImage:[UIImage imageNamed:@"qm_default_user"]];
+        }else {
+            self.iconImage.image = [UIImage imageNamed:@"qm_default_user"];
+        }
+        self.iconImage.frame = CGRectMake(RQ_SCREEN_WIDTH-55, CGRectGetMaxY(self.timeLabel.frame)+10, 41, 41);
+        
+        UIImage *image = [UIImage imageNamed:@"SenderTextNodeBkg"];
+        self.chatBackgroudImage.image = image;
+        self.chatBackgroudImage.image = [self.chatBackgroudImage.image stretchableImageWithLeftCapWidth:20 topCapHeight:20];
+    }else {
+        //接收
+        if ([NSURL URLWithString:message.agentIcon]) {
+            [self.iconImage sd_setImageWithURL:[NSURL URLWithString:message.agentIcon] placeholderImage:[UIImage imageNamed:@"qm_default_agent"]];
+        }else {
+            if ([message.isRobot isEqualToString:@"1"]) {
+                self.iconImage.image = [UIImage imageNamed:@"qm_default_robot"];
+            }else {
+                self.iconImage.image = [UIImage imageNamed:@"qm_default_agent"];
+            }
+        }
+        self.iconImage.frame = CGRectMake(10, CGRectGetMaxY(self.timeLabel.frame)+10, 41, 41);
+        
+        UIImage *image = [UIImage imageNamed:@"ReceiverTextNodeBkg"];
+        self.chatBackgroudImage.image = image;
+        self.chatBackgroudImage.image = [self.chatBackgroudImage.image stretchableImageWithLeftCapWidth:20 topCapHeight:20];
+        
+        self.sendStatus.hidden = YES;
+    }
+    
+    if ([message.fromType isEqualToString:@"0"]) {
+        if ([message.status isEqualToString:@"0"]) {
+            self.sendStatus.hidden = YES;
+        }else if ([message.status isEqualToString:@"1"]) {
+            self.sendStatus.hidden = NO;
+            self.sendStatus.image = [UIImage imageNamed:@"icon_send_failed"];
+            [self removeSendingAnimation];
+        }else {
+            self.sendStatus.hidden = NO;
+            self.sendStatus.image = [UIImage imageNamed:@"icon_sending"];
+            [self showSendingAnimation];
+        }
+    }
+}
+
+- (void)showSendingAnimation {
+    CABasicAnimation * animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
+    animation.fromValue = @0.0;
+    animation.toValue = @(2*M_PI);
+    animation.duration = 1.0;
+    animation.repeatCount = MAXFLOAT;
+    animation.removedOnCompletion = NO;
+    __weak QMChatRoomBaseCell *strongSelf = self;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [strongSelf.sendStatus.layer addAnimation:animation forKey:@"transform.rotation.z"];
+    });
+}
+
+- (void)removeSendingAnimation {
+    __weak QMChatRoomBaseCell *strongSelf = self;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [strongSelf.sendStatus.layer removeAnimationForKey:@"transform.rotation.z"];
+    });
+}
+
+- (void)setProgress: (float)progress {
+    
+}
+
+- (void)longPressTapGesture:(id)sender {
+    
+}
+
+- (void)reSendAction: (UITapGestureRecognizer *)gesture {
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:NSLocalizedString(@"button.sendAgain", nil) preferredStyle:UIAlertControllerStyleAlert];
+    UIAlertAction * doneAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.sure", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        if ([_message.status isEqualToString:@"1"]) {
+            [QMConnect resendMessage:_message successBlock:^{
+                NSLog(@"消息重发成功");
+            } failBlock:^(NSString *str) {
+                NSLog(@"消息重发失败");
+            }];
+        }
+    }];
+    UIAlertAction * cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+
+    }];
+    [alert addAction:doneAction];
+    [alert addAction:cancelAction];
+    [[[[UIApplication sharedApplication] keyWindow] rootViewController] presentViewController:alert animated:YES completion:nil];
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCardCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatCardCell.h
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/6/22.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomCardCell : QMChatRoomBaseCell
+
+@end

+ 142 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCardCell.m

@@ -0,0 +1,142 @@
+//
+//  QMChatCardCell.m
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/6/22.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomCardCell.h"
+
+@interface QMChatRoomCardCell()
+
+@end
+
+
+@implementation QMChatRoomCardCell
+{
+    NSString *_messageId;
+    
+    UIView *_cardView;
+    
+    UILabel *_headerLabel;
+    
+    UILabel *_subheadLabel;
+    
+    UILabel *_priceLabel;
+    
+    UIImageView *_imageView;
+    
+    UIButton *_sendButton;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    self.iconImage.hidden = YES;
+
+    _cardView = [[UIView alloc] init];
+    _cardView.backgroundColor = [UIColor whiteColor];
+
+    [self.contentView addSubview:_cardView];
+    
+    _imageView = [[UIImageView alloc] init];
+    _imageView.frame = CGRectMake(10, 10, 60, 60);
+    [_cardView addSubview:_imageView];
+    
+    _headerLabel = [[UILabel alloc] init];
+    _headerLabel.frame = CGRectMake(80, 10, RQ_SCREEN_WIDTH - 90, 30);
+    _headerLabel.font = [UIFont systemFontOfSize:15.0f];
+    _headerLabel.textColor = [UIColor blackColor];
+    _headerLabel.numberOfLines = 2;
+    [_cardView addSubview:_headerLabel];
+    
+    _subheadLabel = [[UILabel alloc] init];
+    _subheadLabel.font = [UIFont systemFontOfSize:12.0f];
+    _subheadLabel.textColor = [UIColor colorWithRed:89/255.0 green:89/255.0 blue:89/255.0 alpha:1];
+    [_cardView addSubview:_subheadLabel];
+    
+    _priceLabel = [[UILabel alloc] init];
+    _priceLabel.textColor = [UIColor colorWithRed:255/255.0 green:107/255.0 blue:107/255.0 alpha:1];
+    _priceLabel.font = [UIFont systemFontOfSize:14.0f];
+    [_cardView addSubview:_priceLabel];
+    
+    _sendButton = [[UIButton alloc] init];
+    [_sendButton setTitle:@"发送" forState:UIControlStateNormal];
+    [_sendButton setTitleColor:[UIColor colorWithRed:115/255.0 green:170/255.0 blue:234/255.0 alpha:1] forState:UIControlStateNormal];
+    _sendButton.layer.borderWidth = 1;
+    _sendButton.layer.borderColor = [[UIColor colorWithRed:115/255.0 green:170/255.0 blue:234/255.0 alpha:1] CGColor];
+    _sendButton.layer.masksToBounds = YES;
+    _sendButton.layer.cornerRadius = 25/2;
+    _sendButton.titleLabel.font = [UIFont systemFontOfSize:15.0f];
+    [_sendButton addTarget:self action:@selector(sendAction:) forControlEvents:UIControlEventTouchUpInside];
+    [_cardView addSubview:_sendButton];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    self.message = message;
+    _messageId = message._id;
+    [super setData:message avater:avater];
+    
+    _cardView.frame = CGRectMake(0, CGRectGetMaxY(self.timeLabel.frame)+10, RQ_SCREEN_WIDTH, 150);
+    
+    [_imageView sd_setImageWithURL:[NSURL URLWithString:message.cardImage] placeholderImage:[UIImage imageNamed:@"qm_default_user"]];
+
+    _headerLabel.text = message.cardHeader;
+    
+    CGFloat strHeight = [self calcLabelHeight:message.cardHeader font:[UIFont systemFontOfSize:15.0f] width:RQ_SCREEN_WIDTH - 90];
+    _subheadLabel.text = message.cardSubhead;
+    _priceLabel.text = message.cardPrice;
+
+    _headerLabel.frame = CGRectMake(80, 10, RQ_SCREEN_WIDTH - 90, strHeight);
+    _subheadLabel.frame = CGRectMake(80, CGRectGetMaxY(_headerLabel.frame)+5, RQ_SCREEN_WIDTH - 90, 20);
+    _priceLabel.frame = CGRectMake(80, CGRectGetMaxY(_subheadLabel.frame)+10, RQ_SCREEN_WIDTH - 90, 20);
+    _sendButton.frame = CGRectMake(RQ_SCREEN_WIDTH/2-40, CGRectGetMaxY(_priceLabel.frame)+10, 80, 25);
+}
+
+- (void)sendAction: (UIButton *) button {
+    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
+    [dic setObject:self.message.cardImage forKey:@"cardImage"];
+    [dic setObject:self.message.cardHeader forKey:@"cardHeader"];
+    [dic setObject:self.message.cardSubhead forKey:@"cardSubhead"];
+    [dic setObject:self.message.cardPrice forKey:@"cardPrice"];
+    [dic setObject:self.message.cardUrl forKey:@"cardUrl"];
+    
+    [QMConnect sendMsgCardInfo:dic successBlock:^{
+        NSLog(@"发送商品信息成功");
+    } failBlock:^(NSString *str) {
+        NSLog(@"发送失败");
+    }];
+}
+
+- (void)setCornerButton: (UIButton *) button {
+    UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:button.bounds byRoundingCorners: UIRectCornerTopLeft | UIRectCornerBottomLeft | UIRectCornerTopRight | UIRectCornerBottomRight cornerRadii:CGSizeMake(20, 20)];
+    CAShapeLayer * maskLayer = [[CAShapeLayer alloc] init];
+    maskLayer.path = maskPath.CGPath;
+    button.layer.mask = maskLayer;
+}
+
+- (CGFloat)calcLabelHeight: (NSString *)text font: (UIFont *)font width: (CGFloat)width {
+    NSDictionary *attribute = @{NSFontAttributeName: font};
+    CGRect labelRect = [text boundingRectWithSize:CGSizeMake(width, 40) options:NSStringDrawingUsesLineFragmentOrigin attributes:attribute context:nil];
+    return labelRect.size.height;
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 29 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCellFactory.h

@@ -0,0 +1,29 @@
+//
+//  QMChatRoomCellFactory.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+@class QMChatRoomBaseCell;
+#import <Foundation/Foundation.h>
+#import <QMLineSDK/QMLineSDK.h>
+
+@interface QMChatRoomCellFactory : NSObject
+
+/**
+    cell工厂方法
+    
+    @param cellClassName cell类名
+    @param cellModel cell数据模型
+    @param indexPath index索引
+ 
+    return cell目标
+ */
+
++ (QMChatRoomBaseCell *)createCellWithClassName: (NSString *)className
+                                      cellModel: (CustomMessage *)cellModel
+                                      indexPath: (NSIndexPath *)indexPath;
+
+@end

+ 33 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomCellFactory.m

@@ -0,0 +1,33 @@
+//
+//  QMChatRoomCellFactory.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomCellFactory.h"
+#import "QMChatRoomBaseCell.h"
+#import "QMChatRoomTextCell.h"
+#import "QMChatRoomImageCell.h"
+#import "QMChatRoomVoiceCell.h"
+
+@implementation QMChatRoomCellFactory
+
++ (QMChatRoomBaseCell *)createCellWithClassName:(NSString *)className
+                                      cellModel:(CustomMessage *)cellModel
+                                      indexPath:(NSIndexPath *)indexPath {
+    QMChatRoomBaseCell * cell = nil;
+    
+    Class cellClass = NSClassFromString(className);
+    
+    cell = [[cellClass alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:className];
+    
+    if (cell == nil) {
+        cell = [[QMChatRoomBaseCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"QMChatRoomBaseCell"];
+    }
+    
+    return cell;
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomFileCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomFileCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/15.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomFileCell : QMChatRoomBaseCell
+
+@end

+ 232 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomFileCell.m

@@ -0,0 +1,232 @@
+//
+//  QMChatRoomFileCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/15.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomFileCell.h"
+#import "QMChatRoomShowFileController.h"
+#import "QMProfileManager.h"
+
+@interface QMChatRoomFileCell () {
+    UIImageView *_fileImageView;
+    UILabel *_fileName;
+    UILabel *_fileSize;
+    UILabel *_status;
+    
+    UIImageView *_trackTintColor;
+    UIImageView *_progressTintColor;
+}
+
+@end
+
+@implementation QMChatRoomFileCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle: style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    _fileImageView = [[UIImageView alloc] init];
+    [self.chatBackgroudImage addSubview:_fileImageView];
+    
+    _fileName = [[UILabel alloc] init];
+    _fileName.font = [UIFont systemFontOfSize:14];
+    _fileName.backgroundColor = [UIColor clearColor];
+    _fileName.numberOfLines = 1;
+    [self.chatBackgroudImage addSubview:_fileName];
+    
+    _fileSize = [[UILabel alloc] init];
+    _fileSize.font = [UIFont systemFontOfSize:12];
+    _fileSize.alpha = 0.7;
+    [self.chatBackgroudImage addSubview:_fileSize];
+    
+    _status = [[UILabel alloc] init];
+    _status.font = [UIFont systemFontOfSize:12];
+    _status.alpha = 0.7;
+    [self.chatBackgroudImage addSubview:_status];
+    
+    _trackTintColor = [[UIImageView alloc] init];
+    _trackTintColor.backgroundColor = [UIColor whiteColor];
+    [self.chatBackgroudImage addSubview:_trackTintColor];
+    
+    _progressTintColor = [[UIImageView alloc] init];
+    _progressTintColor.backgroundColor = [UIColor colorWithRed:3/255.0 green:216/255.0 blue:118/255.0 alpha:1];
+    [self.chatBackgroudImage addSubview:_progressTintColor];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    self.message = message;
+    [super setData:message avater:avater];
+    
+    UITapGestureRecognizer * tapPressGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPressGesture:)];
+    [self.chatBackgroudImage addGestureRecognizer:tapPressGesture];
+    
+    // 重写
+    if ([message.fromType isEqualToString:@"0"]) {
+        //发送
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMinX(self.iconImage.frame)-5-200, CGRectGetMaxY(self.timeLabel.frame)+10, 200, 50);
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(self.chatBackgroudImage.frame)-25, CGRectGetMinY(self.chatBackgroudImage.frame)+15, 20, 20);
+        
+        _fileImageView.frame = CGRectMake(self.chatBackgroudImage.frame.size.width - 50, 0, 50, 50);
+        UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_fileImageView.bounds byRoundingCorners:UIRectCornerBottomRight cornerRadii:CGSizeMake(16, 16)];
+        CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
+        maskLayer.frame = _fileImageView.bounds;
+        maskLayer.path = maskPath.CGPath;
+        _fileImageView.layer.mask = maskLayer;
+        
+        _fileName.frame = CGRectMake(15, 8, self.chatBackgroudImage.frame.size.width - 15 - 8 - 50, 18);
+        _fileName.textAlignment = NSTextAlignmentRight;
+        _fileName.textColor = [UIColor whiteColor];
+        
+        _fileSize.frame = CGRectMake(self.chatBackgroudImage.frame.size.width - 108, CGRectGetMaxY(_fileName.frame) + 3, 50, 13);
+        _fileSize.textAlignment = NSTextAlignmentRight;
+        _fileSize.textColor = [UIColor whiteColor];
+        
+        _trackTintColor.frame = CGRectMake(15, 47, 127, 2);
+        _progressTintColor.frame = CGRectMake(15, 47, 0, 2);
+        
+        _status.frame = CGRectMake(15, CGRectGetMaxY(_fileName.frame) + 3, 50, 13);
+        _status.textAlignment = NSTextAlignmentLeft;
+        _status.textColor = [UIColor whiteColor];
+    }else {
+        //接收
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, 200, 50);
+        
+        _fileImageView.frame = CGRectMake(0, 0, 50, 50);
+        UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_fileImageView.bounds byRoundingCorners:UIRectCornerBottomLeft cornerRadii:CGSizeMake(16, 16)];
+        CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
+        maskLayer.frame = _fileImageView.bounds;
+        maskLayer.path = maskPath.CGPath;
+        _fileImageView.layer.mask = maskLayer;
+        
+        _fileName.frame = CGRectMake(58, 8, self.chatBackgroudImage.frame.size.width - 15 - 8 - 50, 18);
+        _fileName.textAlignment = NSTextAlignmentLeft;
+        _fileName.textColor = [UIColor blackColor];
+        
+        _fileSize.frame = CGRectMake(58, CGRectGetMaxY(_fileName.frame) + 3, 50, 13);
+        _fileSize.textAlignment = NSTextAlignmentLeft;
+        _fileSize.textColor = [UIColor blackColor];
+        
+        _trackTintColor.frame = CGRectMake(58, 47, 127, 2);
+        _progressTintColor.frame = CGRectMake(58, 47, 0, 2);
+        
+        _status.frame = CGRectMake(self.chatBackgroudImage.frame.size.width - 65, CGRectGetMaxY(_fileName.frame) + 3, 50, 13);
+        _status.textAlignment = NSTextAlignmentRight;
+        _status.textColor = [UIColor blackColor];
+        self.sendStatus.hidden = YES;
+    }
+    
+    NSString *imageName = [self matchImageWithFileNameExtension: message.fileName.pathExtension.lowercaseString];
+    _fileImageView.image = [UIImage imageNamed:imageName];
+    
+    if (message.fileName != nil) {
+        _fileName.text = message.fileName;
+    }else {
+        _fileName.text = message.message;
+    }
+
+    if (message.fileSize == nil) {
+        _fileSize.text = @"0 K";
+    }else {
+        _fileSize.text = message.fileSize;
+    }
+    
+    if ([message.fromType isEqualToString:@"0"]) {
+        if ([message.status isEqualToString:@"0"]) {
+            _progressTintColor.hidden = YES;
+            _trackTintColor.hidden = YES;
+            _status.text = NSLocalizedString(@"title.uploaded", nil);
+        }else if ([message.status isEqualToString:@"1"]) {
+            _progressTintColor.hidden = YES;
+            _trackTintColor.hidden = YES;
+            _status.text = NSLocalizedString(@"title.uploadFailure", nil);
+        }else {
+            _progressTintColor.hidden = NO;
+            _trackTintColor.hidden = NO;
+            _status.text = NSLocalizedString(@"title.uploading", nil);
+        }
+    }else {
+        if ([message.downloadState isEqualToString:@"2"]) {
+            _progressTintColor.hidden = NO;
+            _trackTintColor.hidden = NO;
+            _status.text = NSLocalizedString(@"title.downloads", nil);
+        }else if ([message.downloadState isEqualToString:@"1"]) {
+            _progressTintColor.hidden = YES;
+            _trackTintColor.hidden = YES;
+            _status.text = NSLocalizedString(@"title.notDownloaded", nil);
+        }else if ([message.downloadState isEqualToString:@"0"]) {
+            _progressTintColor.hidden = YES;
+            _trackTintColor.hidden = YES;
+            _status.text = NSLocalizedString(@"title.downloaded", nil);
+        }else {
+            _progressTintColor.hidden = YES;
+            _trackTintColor.hidden = YES;
+            _status.text = NSLocalizedString(@"title.downloaded", nil);
+        }
+    }
+
+}
+
+- (void)setProgress: (float)progress {
+    if ([self.message.fromType isEqualToString:@"0"]) {
+        _progressTintColor.frame = CGRectMake(15, 47, progress*127, 2);
+    }else {
+        _progressTintColor.frame = CGRectMake(58, 47, progress*127, 2);
+    }
+}
+
+- (void)tapPressGesture:(id)sender {    
+    if (self.message.localFilePath == nil) {
+        NSString *localPath = [[QMProfileManager sharedInstance] checkFileExtension: self.message.fileName];
+        __weak QMChatRoomFileCell *weakSelf = self;
+        [QMConnect downloadFileWithMessage:self.message localFilePath:localPath progressHander:^(float progress) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [weakSelf setProgress:progress];
+            });
+        } successBlock:^{
+            // 图片或视频存储至相册
+            _progressTintColor.frame = CGRectMake(15, 94, 0, 3);
+            [weakSelf setProgress:0];
+        } failBlock:^(NSString * _Nonnull error) {
+            [weakSelf setProgress:0];
+        }];
+    }else {
+        // 打开本地文件
+        QMChatRoomShowFileController *showFile = [[QMChatRoomShowFileController alloc] init];
+        showFile.filePath = self.message.localFilePath;
+        UIViewController *vc = [[[UIApplication sharedApplication] keyWindow] rootViewController];
+		showFile.modalPresentationStyle = UIModalPresentationFullScreen;
+        [vc presentViewController:showFile animated:YES completion:nil];
+    }
+}
+
+- (NSString *)matchImageWithFileNameExtension: (NSString *)fileName {
+    NSString * str;
+    if ([fileName isEqualToString:@"doc"]||[fileName isEqualToString:@"docx"]) {
+        str = @"doc";
+    }else if ([fileName isEqualToString:@"xlsx"]||[fileName isEqualToString:@"xls"]) {
+        str = @"xlsx";
+    }else if ([fileName isEqualToString:@"ppt"]||[fileName isEqualToString:@"pptx"]) {
+        str = @"pptx";
+    }else if ([fileName isEqualToString:@"pdf"]) {
+        str = @"pdf";
+    }else if ([fileName isEqualToString:@"mp3"]) {
+        str = @"mp3";
+    }else if ([fileName isEqualToString:@"mov"]||[fileName isEqualToString:@"mp4"]) {
+        str = @"mov";
+    }else if ([fileName isEqualToString:@"png"]||[fileName isEqualToString:@"jpg"]||[fileName isEqualToString:@"bmp"]||[fileName isEqualToString:@"jpeg"]) {
+        str = @"bmp";
+    }else {
+        str = @"other";
+    }
+    return [NSString stringWithFormat:@"custom_file_%@", str];
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomIframeCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomIframeCell.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 16/11/13.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomIframeCell : QMChatRoomBaseCell
+
+@end

+ 64 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomIframeCell.m

@@ -0,0 +1,64 @@
+//
+//  QMChatRoomIframeCell.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 16/11/13.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomIframeCell.h"
+#import <WebKit/WebKit.h>
+
+@interface QMChatRoomIframeCell() {
+    WKWebView *_webView;
+    NSString *_messageId;
+}
+
+@end
+
+@implementation QMChatRoomIframeCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    _webView = [[WKWebView alloc] init];
+    [self.chatBackgroudImage addSubview:_webView];
+}
+
+- (void)setData: (CustomMessage *)message avater:(NSString *)avater {
+    _messageId = message._id;
+    self.message = message;
+    [super setData:message avater:avater];
+
+    if ([message.fromType isEqualToString:@"0"]) {
+        // 发送
+    }else {
+        NSURLRequest *reqeust = [NSURLRequest requestWithURL:[NSURL URLWithString:message.message]];
+        [_webView loadRequest:reqeust];
+        [_webView reload];
+        
+        _webView.frame = CGRectMake(15, 10, (CGFloat)message.width.intValue, (CGFloat)message.height.intValue);
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, _webView.frame.size.width+30, _webView.frame.size.height+20);
+        _webView.allowsLinkPreview = YES;
+        _webView.scrollView.backgroundColor = [UIColor redColor];
+    }
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomImageCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomImageCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomImageCell : QMChatRoomBaseCell
+
+@end

+ 141 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomImageCell.m

@@ -0,0 +1,141 @@
+//
+//  QMChatRoomImageCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomImageCell.h"
+#import "QMTapGestureRecognizer.h"
+#import "QMChatRoomShowImageController.h"
+#import <QMLineSDK/QMLineSDK.h>
+
+/**
+    图片消息
+ */
+@implementation QMChatRoomImageCell
+{
+    UIImageView *_imageView;
+    
+    NSString *_messageId;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    _imageView = [[UIImageView alloc] init];
+    _imageView.userInteractionEnabled = YES;
+    _imageView.contentMode = UIViewContentModeScaleAspectFit;
+    _imageView.clipsToBounds = YES;
+    [self.contentView addSubview:_imageView];
+    
+    UILongPressGestureRecognizer * longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressTapGesture:)];
+    [_imageView addGestureRecognizer:longPressGesture];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    _messageId = message._id;
+    self.message = message;
+    [super setData:message avater:avater];
+    
+    if ([message.fromType isEqualToString:@"0"]) {
+        NSString *filePath = [NSString stringWithFormat:@"%@/%@/%@",NSHomeDirectory(),@"Documents",message.message];
+        _imageView.image = [UIImage imageWithContentsOfFile:filePath];
+        _imageView.frame = CGRectMake(CGRectGetMinX(self.iconImage.frame)-5-120, CGRectGetMaxY(self.timeLabel.frame)+10, 120, 140);
+        UIImageView *maskImageView = [[UIImageView alloc] initWithFrame:_imageView.frame];
+        maskImageView.image = [[UIImage imageNamed:@"SenderTextNodeBkg"] stretchableImageWithLeftCapWidth:20 topCapHeight:16];
+        CALayer *layer = maskImageView.layer;
+        layer.frame = CGRectMake(0, 0, maskImageView.frame.size.width, maskImageView.frame.size.height);
+        _imageView.layer.mask = layer;
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(_imageView.frame)-25, CGRectGetMinY(_imageView.frame)+5, 20, 20);
+    }else {
+        [_imageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@?imageView2/0/w/200/interlace/1/q/80",message.message]]];
+        _imageView.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+5, 120, 140);
+        UIImageView *maskImageView = [[UIImageView alloc] initWithFrame:_imageView.frame];
+        maskImageView.image = [[UIImage imageNamed:@"ReceiverTextNodeBkg"] stretchableImageWithLeftCapWidth:20 topCapHeight:16];
+        CALayer *layer = maskImageView.layer;
+        layer.frame = CGRectMake(0, 0, maskImageView.frame.size.width, maskImageView.frame.size.height);
+        _imageView.layer.mask = layer;
+    }
+    
+    QMTapGestureRecognizer * tapPressGesture = [[QMTapGestureRecognizer alloc] initWithTarget:self action:@selector(imagePressGesture:)];
+    tapPressGesture.picName = message.message;
+    tapPressGesture.picType = message.fromType;
+    tapPressGesture.image = _imageView.image;
+    [_imageView addGestureRecognizer:tapPressGesture];
+}
+
+- (void)longPressTapGesture:(UILongPressGestureRecognizer *)sender {
+    if (sender.state == UIGestureRecognizerStateBegan) {
+        [self becomeFirstResponder];
+        UIMenuController *menu = [UIMenuController sharedMenuController];
+        UIMenuItem *removeMenu = [[UIMenuItem alloc] initWithTitle:@"删除" action:@selector(removeMenu:)];
+        [menu setMenuItems:[NSArray arrayWithObjects:removeMenu, nil]];
+        [menu setTargetRect:_imageView.frame inView:self];
+        [menu setMenuVisible:true animated:true];
+        
+        UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
+        if ([window isKeyWindow] == NO) {
+            [window becomeKeyWindow];
+            [window makeKeyAndVisible];
+        }
+    }
+}
+
+- (BOOL)canBecomeFirstResponder {
+    return YES;
+}
+
+- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
+    if (action == @selector(removeMenu:)) {
+        return YES;
+    }else {
+        return  NO;
+    }
+}
+
+- (void)imagePressGesture:(QMTapGestureRecognizer *)gestureRecognizer {
+    QMChatRoomShowImageController * showPicVC = [[QMChatRoomShowImageController alloc] init];
+    showPicVC.picName = gestureRecognizer.picName;
+    showPicVC.picType = gestureRecognizer.picType;
+    showPicVC.image = gestureRecognizer.image;
+	showPicVC.modalPresentationStyle = UIModalPresentationFullScreen;
+	[RQ_SHARE_FUNCTION.topViewController presentViewController:showPicVC animated:NO completion:nil];
+}
+
+- (void)removeMenu:(id)sender {
+    // 删除语音(只能删除本地数据库消息)
+    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"title.prompt", nil) message:NSLocalizedString(@"title.statement", nil) preferredStyle:UIAlertControllerStyleAlert];
+
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+    
+    }];
+    UIAlertAction *sureAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.sure", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [QMConnect removeDataFromDataBase:_messageId];
+        [[NSNotificationCenter defaultCenter] postNotificationName:CHATMSG_RELOAD object:nil];
+    }];
+    [alertController addAction:cancelAction];
+    [alertController addAction:sureAction];
+    
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertController animated:YES completion:nil];
+}
+
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomInvestigateCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomInvestigateCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomInvestigateCell : QMChatRoomBaseCell
+
+@end

+ 190 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomInvestigateCell.m

@@ -0,0 +1,190 @@
+//
+//  QMChatRoomInvestigateCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomInvestigateCell.h"
+#import <QMLineSDK/QMLineSDK.h>
+
+@implementation QMChatRoomInvestigateCell
+{
+    UIView *_backgrounView;
+    
+    UILabel *_warnLabel;
+    
+    NSArray *_investigateArray;
+    
+    UILabel *_investigateLabel;
+    
+    UILabel *_investigateValue;
+    
+    UIButton *_submitButton;
+    
+    UIButton *_valueButtonOne;
+    UIButton *_valueButtonTwo;
+    UIButton *_valueButtonThree;
+    UIButton *_valueButtonFour;
+    UIButton *_valueButtonFive;
+    
+    NSString *_messageId;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {    
+    _backgrounView = [[UIView alloc] init];
+    _backgrounView.frame = CGRectMake(30, 5, RQ_SCREEN_WIDTH-60, 140);
+    _backgrounView.backgroundColor = [UIColor whiteColor];
+    _backgrounView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
+    _backgrounView.layer.borderWidth = 0.5;
+    [self.contentView addSubview:_backgrounView];
+    
+    _warnLabel = [[UILabel alloc] init];
+    _warnLabel.frame = CGRectMake(10, 5, RQ_SCREEN_WIDTH-80, 60);
+    _warnLabel.numberOfLines = 0;
+    _warnLabel.font = [UIFont systemFontOfSize:15];
+    _warnLabel.text = @"[邀评]系统提示:“为了提高服务质量,请您在咨询结束后,点击五角星对客服的服务进行评价,谢谢!”";
+    [_backgrounView addSubview:_warnLabel];
+    
+    _investigateLabel = [[UILabel alloc] init];
+    _investigateLabel.frame = CGRectMake(10, 100, 180, 30);
+    [_backgrounView addSubview:_investigateLabel];
+    
+    _investigateValue = [[UILabel alloc] init];
+    
+    _valueButtonOne = [UIButton buttonWithType:UIButtonTypeCustom];
+    _valueButtonOne.frame = CGRectMake(0, 60, 40, 40);
+    _valueButtonOne.tag = 1;
+    _valueButtonOne.selected = YES;
+    [_valueButtonOne setBackgroundImage:[UIImage imageNamed:@"contactflag_star_nor"] forState:UIControlStateNormal];
+    [_valueButtonOne setBackgroundImage:[UIImage imageNamed:@"contactflag_star_select"] forState:UIControlStateSelected];
+    [_valueButtonOne addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
+    
+    _valueButtonTwo = [UIButton buttonWithType:UIButtonTypeCustom];
+    _valueButtonTwo.frame = CGRectMake(40, 60, 40, 40);
+    _valueButtonTwo.tag = 2;
+    _valueButtonTwo.selected = YES;
+    [_valueButtonTwo setBackgroundImage:[UIImage imageNamed:@"contactflag_star_nor"] forState:UIControlStateNormal];
+    [_valueButtonTwo setBackgroundImage:[UIImage imageNamed:@"contactflag_star_select"] forState:UIControlStateSelected];
+    [_valueButtonTwo addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
+    
+    _valueButtonThree = [UIButton buttonWithType:UIButtonTypeCustom];
+    _valueButtonThree.frame = CGRectMake(80, 60, 40, 40);
+    _valueButtonThree.tag = 3;
+    _valueButtonThree.selected = YES;
+    [_valueButtonThree setBackgroundImage:[UIImage imageNamed:@"contactflag_star_nor"] forState:UIControlStateNormal];
+    [_valueButtonThree setBackgroundImage:[UIImage imageNamed:@"contactflag_star_select"] forState:UIControlStateSelected];
+    [_valueButtonThree addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
+    
+    _valueButtonFour = [UIButton buttonWithType:UIButtonTypeCustom];
+    _valueButtonFour.frame = CGRectMake(120, 60, 40, 40);
+    _valueButtonFour.tag = 4;
+    [_valueButtonFour setBackgroundImage:[UIImage imageNamed:@"contactflag_star_nor"] forState:UIControlStateNormal];
+    [_valueButtonFour setBackgroundImage:[UIImage imageNamed:@"contactflag_star_select"] forState:UIControlStateSelected];
+    [_valueButtonFour addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
+    
+    _valueButtonFive = [UIButton buttonWithType:UIButtonTypeCustom];
+    _valueButtonFive.frame = CGRectMake(160, 60, 40, 40);
+    _valueButtonFive.tag = 5;
+    [_valueButtonFive setBackgroundImage:[UIImage imageNamed:@"contactflag_star_nor"] forState:UIControlStateNormal];
+    [_valueButtonFive setBackgroundImage:[UIImage imageNamed:@"contactflag_star_select"] forState:UIControlStateSelected];
+    [_valueButtonFive addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
+
+    if ([_investigateArray count] == 0) {
+        [_backgrounView addSubview:_valueButtonOne];
+    }else if ([_investigateArray count] == 1) {
+        [_backgrounView addSubview:_valueButtonOne];
+        [_backgrounView addSubview:_valueButtonTwo];
+    }else if ([_investigateArray count] == 2) {
+        [_backgrounView addSubview:_valueButtonOne];
+        [_backgrounView addSubview:_valueButtonTwo];
+        [_backgrounView addSubview:_valueButtonThree];
+    }else if ([_investigateArray count] == 3) {
+        [_backgrounView addSubview:_valueButtonOne];
+        [_backgrounView addSubview:_valueButtonTwo];
+        [_backgrounView addSubview:_valueButtonThree];
+        [_backgrounView addSubview:_valueButtonFour];
+    }else {
+        [_backgrounView addSubview:_valueButtonOne];
+        [_backgrounView addSubview:_valueButtonTwo];
+        [_backgrounView addSubview:_valueButtonThree];
+        [_backgrounView addSubview:_valueButtonFour];
+        [_backgrounView addSubview:_valueButtonFive];
+    }
+    
+    NSDictionary * dict = [_investigateArray objectAtIndex:[_investigateArray count]-3];
+    _investigateLabel.text = [dict objectForKey:@"name"];
+    _investigateValue.text = [dict objectForKey:@"value"];
+    
+    
+    _submitButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    _submitButton.frame = CGRectMake(_backgrounView.frame.size.width-80, _backgrounView.frame.size.height-40, 70, 30);
+    _submitButton.backgroundColor = [UIColor redColor];
+    [_submitButton setTitle:@"提交" forState:UIControlStateNormal];
+    [_submitButton addTarget:self action:@selector(submitAction:) forControlEvents:UIControlEventTouchUpInside];
+    [_backgrounView addSubview:_submitButton];
+}
+
+- (void)buttonAction: (UIButton *)sender {
+    NSDictionary * dict = [_investigateArray objectAtIndex:[_investigateArray count]-(sender.tag-1)-1];
+    _investigateLabel.text = [dict objectForKey:@"name"];
+    _investigateValue.text = [dict objectForKey:@"value"];
+    
+    if (sender.tag == 1) {
+        _valueButtonOne.selected = YES;
+        _valueButtonTwo.selected = NO;
+        _valueButtonThree.selected = NO;
+        _valueButtonFour.selected = NO;
+        _valueButtonFive.selected = NO;
+    }else if (sender.tag == 2) {
+        _valueButtonOne.selected = YES;
+        _valueButtonTwo.selected = YES;
+        _valueButtonThree.selected = NO;
+        _valueButtonFour.selected = NO;
+        _valueButtonFive.selected = NO;
+    }else if (sender.tag == 3) {
+        _valueButtonOne.selected = YES;
+        _valueButtonTwo.selected = YES;
+        _valueButtonThree.selected = YES;
+        _valueButtonFour.selected = NO;
+        _valueButtonFive.selected = NO;
+    }else if (sender.tag == 4) {
+        _valueButtonOne.selected = YES;
+        _valueButtonTwo.selected = YES;
+        _valueButtonThree.selected = YES;
+        _valueButtonFour.selected = YES;
+        _valueButtonFive.selected = NO;
+    }else {
+        _valueButtonOne.selected = YES;
+        _valueButtonTwo.selected = YES;
+        _valueButtonThree.selected = YES;
+        _valueButtonFour.selected = YES;
+        _valueButtonFive.selected = YES;
+    }
+}
+
+- (void)setData:(CustomMessage *)message {
+    _messageId = message._id;
+}
+
+- (void)submitAction: (UIButton *)sender {
+    [QMConnect sdkSubmitInvestigate:_investigateLabel.text value:_investigateValue.text successBlock:^{
+        NSLog(@"评价成功");
+    } failBlock:^(NSString *str) {
+        NSLog(@"评价失败");
+    }];
+    // 提交评价成功,收到评价状态反馈,不用reload tableView
+    [QMConnect removeDataFromDataBase:_messageId];
+    [[NSNotificationCenter defaultCenter] postNotificationName:CHATMSG_RELOAD object:nil];
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomMp3Cell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomMp3Cell.h
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/4/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomMp3Cell : QMChatRoomBaseCell
+
+@end

+ 283 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomMp3Cell.m

@@ -0,0 +1,283 @@
+//
+//  QMChatRoomMp3Cell.m
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/4/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomMp3Cell.h"
+#import <AVFoundation/AVFoundation.h>
+#import <QMLineSDK/QMLineSDK.h>
+#import "QMAudioPlayer.h"
+#import "QMAudioAnimation.h"
+
+@interface QMChatRoomMp3Cell() <AVAudioPlayerDelegate>
+
+@end
+
+@implementation QMChatRoomMp3Cell
+{
+    UIImageView *_voicePlayImageView;
+    
+    UILabel *_secondsLabel;
+    
+    AVAudioSession *_audioSession;
+    
+    NSString *_messageId;
+    
+    UIImageView *_badgeView;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    _voicePlayImageView = [[UIImageView alloc] init];
+    _voicePlayImageView.animationDuration = 1.0;
+    [self.chatBackgroudImage addSubview:_voicePlayImageView];
+    
+    _secondsLabel = [[UILabel alloc] init];
+    _secondsLabel.backgroundColor = [UIColor clearColor];
+    _secondsLabel.font = [UIFont systemFontOfSize:16];
+    [self.chatBackgroudImage addSubview:_secondsLabel];
+    
+    _badgeView = [[UIImageView alloc] init];
+    _badgeView.backgroundColor = [UIColor redColor];
+    _badgeView.layer.cornerRadius = 4;
+    _badgeView.layer.masksToBounds = YES;
+    [_badgeView setHidden:YES];
+    [self.contentView addSubview:_badgeView];
+    
+    _audioSession = [AVAudioSession sharedInstance];
+    
+    UILongPressGestureRecognizer * longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressTapGesture:)];
+    [_voicePlayImageView addGestureRecognizer:longPressGesture];
+    
+    // 默认为听筒
+    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    _messageId = message._id;
+    self.message = message;
+    [super setData:message avater:avater];
+    
+    UITapGestureRecognizer * tapPressGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPressGesture:)];
+    [self.chatBackgroudImage addGestureRecognizer:tapPressGesture];
+    
+    NSString *playUrl = [NSString stringWithFormat:@"%@/%@/%@", NSHomeDirectory(), @"Documents", [NSString stringWithFormat:@"%@", self.message._id]];
+    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
+    dispatch_async(queue, ^{
+        [self downloadFile:playUrl];
+        
+    });
+    
+    if ([message.fromType isEqualToString:@"0"]) {
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMinX(self.iconImage.frame)-10-125, CGRectGetMaxY(self.timeLabel.frame)+10, 125, 40);
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(self.chatBackgroudImage.frame)-25, CGRectGetMaxY(self.chatBackgroudImage.frame)-32, 20, 20);
+        
+        _voicePlayImageView.frame = CGRectMake(125-35, 11, 13, 17);
+        _voicePlayImageView.image = [UIImage imageNamed:@"SenderVoiceNodePlaying"];
+        
+        if ([message.status isEqualToString:@"0"]) {
+            _secondsLabel.textColor = [UIColor whiteColor];
+            _secondsLabel.frame = CGRectMake(CGRectGetMinX(_voicePlayImageView.frame)-50, 11, 40, 20);
+            _secondsLabel.text = [NSString stringWithFormat:@"%@''",message.recordSeconds];
+            _secondsLabel.textAlignment = NSTextAlignmentRight;
+            _secondsLabel.hidden = NO;
+        }else {
+            _secondsLabel.hidden = YES;
+        }
+        
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(self.chatBackgroudImage.frame)-25, CGRectGetMinY(self.chatBackgroudImage.frame)+10, 20, 20);
+        
+        [[QMAudioAnimation sharedInstance]setAudioAnimationPlay:YES and:_voicePlayImageView];
+        
+        [_badgeView setHidden:YES];
+    }else {
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, 125, 40);
+        _badgeView.frame = CGRectMake(CGRectGetMaxX(self.chatBackgroudImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+15, 8, 8);
+        _voicePlayImageView.frame = CGRectMake(22, 11, 13, 17);
+        _voicePlayImageView.image = [UIImage imageNamed:@"ReceiverVoiceNodePlaying"];
+        
+        _secondsLabel.textColor = [UIColor blackColor];
+        _secondsLabel.frame = CGRectMake(CGRectGetMaxX(_voicePlayImageView.frame)+10, 11, 40, 20);
+        _secondsLabel.text = [NSString stringWithFormat:@"%@''",message.recordSeconds ? message.recordSeconds : 0];
+        _secondsLabel.textAlignment = NSTextAlignmentLeft;
+        
+        [[QMAudioAnimation sharedInstance]setAudioAnimationPlay:NO and:_voicePlayImageView];
+        
+        CustomMessage *msg = [QMConnect getOneDataFromDatabase:message._id].firstObject;
+        if ([msg.isRead isEqualToString:@"1"]) {
+            [_badgeView setHidden:YES];
+        }else {
+            [_badgeView setHidden:NO];
+        }
+    }
+    
+    NSString *fileName;
+    if ([self existFile:self.message.message]) {
+        fileName = self.message.message;
+    }else {
+        fileName = self.message._id;
+    }
+    
+    if ([[QMAudioPlayer sharedInstance] isPlaying:fileName] == true) {
+        [[QMAudioAnimation sharedInstance]startAudioAnimation:_voicePlayImageView];
+    }
+
+}
+
+- (void)longPressTapGesture:(UILongPressGestureRecognizer *)sender {
+    if (sender.state == UIGestureRecognizerStateBegan) {
+        [self becomeFirstResponder];
+        UIMenuController *menu = [UIMenuController sharedMenuController];
+        UIMenuItem *reciverMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.receiver", nil) action:@selector(reciverMenu:)];
+        UIMenuItem *speakerMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.speaker", nil) action:@selector(speakerMenu:)];
+        UIMenuItem *removeMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.delete", nil) action:@selector(removeMenu:)];
+        [menu setMenuItems:[NSArray arrayWithObjects:reciverMenu,speakerMenu,removeMenu, nil]];
+        [menu setTargetRect:self.chatBackgroudImage.frame inView:self];
+        [menu setMenuVisible:true animated:true];
+        
+        UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
+        if ([window isKeyWindow] == NO) {
+            [window becomeKeyWindow];
+            [window makeKeyAndVisible];
+        }
+    }
+}
+
+- (BOOL)canBecomeFirstResponder {
+    return YES;
+}
+
+- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
+    if (action == @selector(reciverMenu:) || action == @selector(speakerMenu:) || action == @selector(removeMenu:)) {
+        return YES;
+    }else {
+        return  NO;
+    }
+}
+
+- (void)reciverMenu:(id)sendr {
+    //听筒
+    NSError *error = nil;
+    if ([[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:&error]) {
+    }
+}
+
+- (void)speakerMenu:(id)sender {
+    // 扬声器
+    NSError *error = nil;
+    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&error];
+}
+
+- (void)removeMenu:(id)sender {
+    // 删除语音(只能删除本地数据库消息)
+    // 删除文本消息
+    
+    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"title.prompt", nil) message:NSLocalizedString(@"title.statement", nil) preferredStyle:UIAlertControllerStyleAlert];
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+    
+    }];
+    UIAlertAction *sureAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.sure", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [QMConnect removeDataFromDataBase:_messageId];
+        [[NSNotificationCenter defaultCenter] postNotificationName:CHATMSG_RELOAD object:nil];
+    }];
+    [alertController addAction:cancelAction];
+    [alertController addAction:sureAction];
+    
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertController animated:YES completion:nil];
+}
+
+- (void)tapPressGesture:(id)sender {
+    NSLog(@"点击语音消息");
+    [_badgeView setHidden:YES];
+    [QMConnect changeAudioMessageStatus:_messageId];
+    
+    [[QMAudioAnimation sharedInstance] stopAudioAnimation:nil];
+    [[QMAudioAnimation sharedInstance] startAudioAnimation:_voicePlayImageView];
+    
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((_secondsLabel.text).intValue * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [[QMAudioAnimation sharedInstance] stopAudioAnimation:_voicePlayImageView];
+    });
+    
+    NSString *fileName;
+    if ([self existFile:self.message.message]) {
+        fileName = self.message.message;
+    }else if ([self existFile:[NSString stringWithFormat:@"%@", self.message._id]]) {
+        fileName = self.message._id;
+    }else {
+        NSString *playUrl = [NSString stringWithFormat:@"%@/%@/%@", NSHomeDirectory(), @"Documents", [NSString stringWithFormat:@"%@", self.message._id]];
+        fileName = self.message._id;
+        NSURL *fileUrl = [NSURL URLWithString:self.message.remoteFilePath];
+        NSData *data = [NSData dataWithContentsOfURL:fileUrl];
+        
+        [data writeToFile:playUrl atomically:YES];
+    }
+    
+    [[QMAudioPlayer sharedInstance] startAudioPlayer:fileName withDelegate:self];
+}
+
+- (BOOL)existFile: (NSString *)name {
+    NSString * filePath = [NSString stringWithFormat:@"%@/%@/%@", NSHomeDirectory(), @"Documents", name];
+    NSFileManager *fileManager = [NSFileManager defaultManager];
+    if ([fileManager fileExistsAtPath:filePath]) {
+        return YES;
+    }else {
+        return NO;
+    }
+}
+
+- (void)downloadFile: (NSString *)fileStr {
+    
+    NSString *timeStr = [QMConnect queryMp3FileMessageSize:self.message._id];
+    if ([timeStr isEqualToString:@"0"]) {
+
+        NSString *str = [self.message.remoteFilePath stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet];
+        NSURL *fileUrl = [NSURL URLWithString:str];
+        NSData *data = [NSData dataWithContentsOfURL:fileUrl];
+    
+        [data writeToFile:fileStr atomically:YES];
+    
+        float aaa = [self fileAllTime:str];
+    
+        dispatch_async(dispatch_get_main_queue(), ^{
+            _secondsLabel.text = [NSString stringWithFormat:@"%d", (int)aaa];
+            [QMConnect changeMp3FileMessageSize:self.message._id fileSize:[NSString stringWithFormat:@"%d", (int)aaa]];
+        });
+    }else {
+        dispatch_sync(dispatch_get_main_queue(), ^{
+            _secondsLabel.text = timeStr;
+        });
+    }
+}
+
+- (float)fileAllTime: (NSString *)str {
+    NSURL *fileUrl = [NSURL URLWithString:str];
+    NSDictionary *options = @{AVURLAssetPreferPreciseDurationAndTimingKey: @YES};
+    AVURLAsset *audioAsset = [AVURLAsset URLAssetWithURL:fileUrl options:options];
+    CMTime audioDuration = audioAsset.duration;
+    float audioDurationSeconds = CMTimeGetSeconds(audioDuration);
+    return audioDurationSeconds;
+}
+
+- (void)awakeFromNib {
+    // Initialization code
+    [super awakeFromNib];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+    
+    // Configure the view for the selected state
+}
+
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomNoteCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomNoteCell.h
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/3/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomNoteCell : QMChatRoomBaseCell
+
+@end

+ 56 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomNoteCell.m

@@ -0,0 +1,56 @@
+//
+//  QMChatRoomNoteCell.m
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/3/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomNoteCell.h"
+
+@implementation QMChatRoomNoteCell {
+    
+    UILabel *_detailLabel;
+
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    _detailLabel = [[UILabel alloc] init];
+    _detailLabel.frame = CGRectMake(10, 15, RQ_SCREEN_WIDTH - 20, 30);
+    _detailLabel.textAlignment = NSTextAlignmentCenter;
+    _detailLabel.textColor = [UIColor grayColor];
+    _detailLabel.font = [UIFont systemFontOfSize:14];
+    [self.contentView addSubview:_detailLabel];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    self.message = message;
+        [super setData:message avater:avater];
+    
+    if ([message.fromType isEqualToString:@"1"]) {
+        _detailLabel.text = message.message;
+        self.iconImage.hidden = YES;
+        self.timeLabel.hidden = YES;
+    }
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRichTextCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomRichTextCell.h
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/3/8.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomRichTextCell : QMChatRoomBaseCell
+
+@end

+ 173 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRichTextCell.m

@@ -0,0 +1,173 @@
+//
+//  QMChatRoomRichTextCell.m
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/3/8.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomRichTextCell.h"
+#import "QMChatRoomShowRichTextController.h"
+#import "QMAlert.h"
+
+/**
+ 富文本消息
+ */
+@interface QMChatRoomRichTextCell() <MLEmojiLabelDelegate>
+
+@end
+
+@implementation QMChatRoomRichTextCell
+{
+    NSString *_messageId;
+    
+    UIView *_richView;
+    
+    UILabel *_titleLabel;
+    
+    UILabel *_descriptionLabel;
+    
+    UILabel *_price;
+    
+    UIImageView *_imageView;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    _richView = [[UIView alloc] init];
+    _richView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width - 160, 110);
+    _richView.clipsToBounds = YES;
+    [self.contentView addSubview:_richView];
+    
+    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
+    [_richView addGestureRecognizer:tap];
+    
+    _titleLabel = [[UILabel alloc] init];
+    _titleLabel.frame = CGRectMake(10, 10, [UIScreen mainScreen].bounds.size.width - 180, 30);
+    _titleLabel.font = [UIFont systemFontOfSize:15.0f];
+    _titleLabel.numberOfLines = 2;
+    [_richView addSubview:_titleLabel];
+    
+    _descriptionLabel = [[UILabel alloc] init];
+    _descriptionLabel.frame = CGRectMake(10, _titleLabel.frame.size.height + 15, [UIScreen mainScreen].bounds.size.width - 250, 50);
+    _descriptionLabel.numberOfLines = 0;
+    _descriptionLabel.font = [UIFont systemFontOfSize:12.0f];
+    _descriptionLabel.textColor = [UIColor colorWithRed:89/255.0 green:89/255.0 blue:89/255.0 alpha:1];
+    [_richView addSubview:_descriptionLabel];
+    
+    _price = [[UILabel alloc] init];
+    _price.font = [UIFont systemFontOfSize:12.0f];
+    _price.textColor = [UIColor colorWithRed:255/255.0 green:107/255.0 blue:107/255.0 alpha:1];
+    [_richView addSubview:_price];
+    
+    _imageView = [[UIImageView alloc] init];
+    _imageView.frame = CGRectMake( _descriptionLabel.frame.size.width+20, _titleLabel.frame.size.height + 15, 60, 50);
+    [_richView addSubview:_imageView];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    self.message = message;
+    _messageId = message._id;
+    [super setData:message avater:avater];
+    
+    if ([message.fromType isEqualToString:@"1"]) {
+        
+        _titleLabel.textColor = [UIColor blackColor];
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, [UIScreen mainScreen].bounds.size.width - 160, 110);
+        _richView.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+5, [UIScreen mainScreen].bounds.size.width - 160, 120);
+        _titleLabel.text = message.richTextTitle;
+        
+        if (_titleLabel.text != nil) {
+            CGFloat height = [self calculateRowHeight:_titleLabel.text fontSize:15];
+            if (height > 20) {
+                _titleLabel.frame = CGRectMake(10, 10, [UIScreen mainScreen].bounds.size.width - 180, 40);
+                _imageView.frame = CGRectMake( [UIScreen mainScreen].bounds.size.width - 230, _titleLabel.frame.size.height + 15, 60, 50);
+                _descriptionLabel.frame = CGRectMake(10, _titleLabel.frame.size.height + 15, [UIScreen mainScreen].bounds.size.width - 250, 50);
+            }
+            NSMutableAttributedString *content = [[NSMutableAttributedString alloc]initWithString:_titleLabel.text];
+            NSRange range = NSMakeRange(0, content.length);
+            [content addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:range];
+            _titleLabel.attributedText = content;
+        }
+        _descriptionLabel.text = message.richTextDescription;
+        
+        if ([message.richTextPicUrl  isEqual: @""]) {
+            _descriptionLabel.frame = CGRectMake(10, _titleLabel.frame.size.height + 15, [UIScreen mainScreen].bounds.size.width - 180, 50);
+            _imageView.hidden = YES;
+        }else{
+            _descriptionLabel.frame = CGRectMake(10, _titleLabel.frame.size.height + 15, [UIScreen mainScreen].bounds.size.width - 250, 50);
+            _imageView.hidden = NO;
+            [_imageView sd_setImageWithURL:[NSURL URLWithString:message.richTextPicUrl] placeholderImage:[UIImage imageNamed:@""]];
+        }
+        [_descriptionLabel sizeToFit];
+    }else{
+        
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(self.chatBackgroudImage.frame)-25, CGRectGetMinY(self.chatBackgroudImage.frame)+15, 20, 20);
+        
+        _richView.frame = CGRectMake(60, CGRectGetMaxY(self.timeLabel.frame)+5, [UIScreen mainScreen].bounds.size.width - 120, 80);
+        
+        self.chatBackgroudImage.frame = CGRectMake(60, CGRectGetMaxY(self.timeLabel.frame)+5, [UIScreen mainScreen].bounds.size.width - 120, 80);
+        _titleLabel.text = message.cardHeader;
+        if (message.cardSubhead != nil) {
+            _descriptionLabel.text = message.cardSubhead;
+        }
+        if (message.cardPrice != nil) {
+            _price.text = message.cardPrice;
+        }
+        
+        if ([message.cardImage  isEqual: @""]) {
+            _titleLabel.frame = CGRectMake(10, 10, [UIScreen mainScreen].bounds.size.width - 140, 25);
+            _descriptionLabel.frame = CGRectMake(10, CGRectGetMaxY(_titleLabel.frame) + 5, [UIScreen mainScreen].bounds.size.width - 140, 15);
+            _price.frame = CGRectMake(10, CGRectGetMaxY(_descriptionLabel.frame) + 5, [UIScreen mainScreen].bounds.size.width - 140, 15);
+        }else{
+            _imageView.frame = CGRectMake(10, 10, 60, 60);
+            _titleLabel.frame = CGRectMake(80, 10, [UIScreen mainScreen].bounds.size.width - 200, 25);
+            _descriptionLabel.frame = CGRectMake(80, CGRectGetMaxY(_titleLabel.frame) + 5, [UIScreen mainScreen].bounds.size.width - 220, 15);
+            _price.frame = CGRectMake(80, CGRectGetMaxY(_descriptionLabel.frame) + 5, [UIScreen mainScreen].bounds.size.width - 220, 15);
+            _imageView.hidden = NO;
+            [_imageView sd_setImageWithURL:[NSURL URLWithString:message.cardImage] placeholderImage:[UIImage imageNamed:@""]];
+        }
+        UIImage *image = [UIImage imageNamed:@"SenderCardNodeBkg"];
+        self.chatBackgroudImage.image = image;
+        self.chatBackgroudImage.image = [self.chatBackgroudImage.image stretchableImageWithLeftCapWidth:20 topCapHeight:20];
+    }
+}
+
+- (void)tapAction:(UITapGestureRecognizer *)gestureRecognizer {
+    NSLog(@"点击富文本");
+    QMChatRoomShowRichTextController * showWebVC = [[QMChatRoomShowRichTextController alloc] init];
+    if ([self.message.fromType isEqualToString:@"1"]) {
+        showWebVC.urlStr = self.message.richTextUrl;
+    }else{
+        showWebVC.urlStr = self.message.cardUrl;
+    }
+	showWebVC.modalPresentationStyle = UIModalPresentationFullScreen;
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:showWebVC animated:true completion:nil];
+}
+
+- (CGFloat)calculateRowHeight:(NSString *)string fontSize:(NSInteger)fontSize {
+    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize]};//指定字号
+    CGRect rect = [string boundingRectWithSize:CGSizeMake([UIScreen mainScreen].bounds.size.width - 180, 0)/*计算高度要先指定宽度*/ options:NSStringDrawingUsesLineFragmentOrigin |
+                   NSStringDrawingUsesFontLeading attributes:dic context:nil];
+    return rect.size.height;
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+    
+    // Configure the view for the selected state
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRobotCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomRobotCell.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2018/1/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomRobotCell : QMChatRoomBaseCell
+
+@end

+ 342 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomRobotCell.m

@@ -0,0 +1,342 @@
+//
+//  QMChatRoomRobotCell.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2018/1/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomRobotCell.h"
+#import "QMChatRoomRobotReplyView.h"
+#import <QMLineSDK/QMLineSDK.h>
+#import "QMTextModel.h"
+#import "QMTapGestureRecognizer.h"
+#import "QMChatRoomShowImageController.h"
+
+@interface QMChatRoomRobotCell() <MLEmojiLabelDelegate>
+
+@end
+
+@implementation QMChatRoomRobotCell
+{
+    NSString *_messageId;
+    
+    QMChatRoomRobotReplyView *_replyView;
+    
+    // 内容高度
+    CGFloat height;
+    
+    // 内容宽度
+    CGFloat width;
+    
+    // 链接集合
+    NSMutableArray *srcArrs;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        srcArrs = [NSMutableArray array];
+    }
+    return self;
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    self.message = message;
+    _messageId = message._id;
+    [super setData:message avater:avater];
+    
+    [srcArrs removeAllObjects];
+    
+    
+    if ([message.fromType isEqualToString:@"1"]) {
+        height = 10;
+        width = 0;
+        
+        for(UIView *view in self.chatBackgroudImage.subviews){
+            if(view){
+                [view removeFromSuperview];
+            }
+        }
+        
+        //html标签替换
+        message.message = [message.message stringByReplacingOccurrencesOfString:@"<br>" withString:@"\n"];
+        message.message = [message.message stringByReplacingOccurrencesOfString:@"</br>" withString:@"\n"];
+        message.message = [message.message stringByReplacingOccurrencesOfString:@"</p>" withString:@"\n"];
+        NSMutableArray * srcArr = [self showHtml:message.message];
+        
+        //获取分段类型 文本 图片
+        for (QMTextModel *model in srcArr) {
+            if ([model.type isEqualToString:@"text"]) {
+                [self createLabel:model.content];
+            }else {
+                [self createImage:model.content];
+            }
+        }
+        
+        //机器人评价
+        _replyView = [[QMChatRoomRobotReplyView alloc] init];
+        _replyView.backgroundColor = [UIColor clearColor];
+        [_replyView.helpBtn addTarget:self action:@selector(helpBtnAction:) forControlEvents:UIControlEventTouchUpInside];
+        [_replyView.noHelpBtn addTarget:self action:@selector(noHelpBtnAction:) forControlEvents:UIControlEventTouchUpInside];
+        [self.chatBackgroudImage addSubview:_replyView];
+        if ([message.isRobot isEqualToString:@"1"] && ![message.questionId isEqualToString:@""]) {
+            [_replyView setHidden:NO];
+            if (message.isUseful) {
+                _replyView.status = message.isUseful;
+                if ([message.isUseful isEqualToString:@"none"]) {
+                    _replyView.frame = CGRectMake(10, height + 5, [UIScreen mainScreen].bounds.size.width - 150, 25);
+                    self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, [UIScreen mainScreen].bounds.size.width-130, height+15 + 30);
+                }else {
+                    _replyView.frame = CGRectMake(10, height + 5, [UIScreen mainScreen].bounds.size.width - 150, 55);
+                    self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, [UIScreen mainScreen].bounds.size.width-130, height+15 + 60);
+                }
+            }else {
+                _replyView.status = @"none";
+                _replyView.frame = CGRectMake(10, height + 5, [UIScreen mainScreen].bounds.size.width - 150, 25);
+                self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, [UIScreen mainScreen].bounds.size.width-130, height+15 + 30);
+            }
+        }else {
+            [_replyView setHidden:YES];
+            _replyView.frame = CGRectZero;
+            self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, width+30, height+15);
+        }
+    }
+}
+
+// 创建文本
+- (void)createLabel: (NSString *)text {
+//    NSMutableArray *array = [self getAHtml:text];
+    NSRegularExpression *regularExpretion = [[NSRegularExpression alloc] initWithPattern:@"<[^>]*>" options:NSRegularExpressionCaseInsensitive error:nil];
+    NSString *tempString = [regularExpretion stringByReplacingMatchesInString:text options:NSMatchingReportProgress range:NSMakeRange(0, text.length) withTemplate:@""];
+    
+    MLEmojiLabel *tLabel = [[MLEmojiLabel alloc] initWithFrame:CGRectZero];
+    tLabel.numberOfLines = 0;
+    tLabel.font = [UIFont systemFontOfSize:14.0f];
+    tLabel.lineBreakMode = NSLineBreakByTruncatingTail;
+    tLabel.delegate = self;
+    tLabel.disableEmoji = NO;
+    tLabel.disableThreeCommon = NO;
+    tLabel.isNeedAtAndPoundSign = YES;
+    tLabel.customEmojiRegex = @"\\:[^\\:]+\\:";
+    tLabel.customEmojiPlistName = @"expressionImage.plist";
+    tLabel.customEmojiBundleName = @"QMEmoticon.bundle";
+    [self.chatBackgroudImage addSubview:tLabel];
+    
+//    tLabel.checkResults = array;
+//    tLabel.checkColor = [UIColor colorWithRed:32/255.0f green:188/255.0f blue:158/255.0f alpha:1];
+    
+    tLabel.text = tempString;
+    
+    // labelFrame
+    CGSize size = [tLabel preferredSizeWithMaxWidth: [UIScreen mainScreen].bounds.size.width - 160];
+    tLabel.frame = CGRectMake(15, height, size.width, size.height);
+    
+    // 宽高适配
+    height += size.height;
+    width = width > size.width ? width : size.width;
+}
+
+// 创建图片 图片大小可调整
+- (void)createImage: (NSString *)imageUrl {
+    
+    NSArray *temArray = nil;
+    if ([imageUrl rangeOfString:@"src=\""].location != NSNotFound) {
+        temArray = [imageUrl componentsSeparatedByString:@"src=\""];
+    }else if ([imageUrl rangeOfString:@"src="].location != NSNotFound) {
+        temArray = [imageUrl componentsSeparatedByString:@"src="];
+    }
+
+    if (temArray.count >= 2) {
+        NSString *src = temArray[1];
+        
+        NSUInteger loc = [src rangeOfString:@"\""].location;
+        if (loc != NSNotFound) {
+            
+            // 图片地址
+            src = [src substringToIndex:loc];
+            src = [src stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+            
+            UIImageView *imageView = [[UIImageView alloc] init];
+            imageView.frame = CGRectMake(15, height, 140, 100);
+            imageView.userInteractionEnabled = YES;
+            imageView.contentMode = UIViewContentModeScaleAspectFill;
+            imageView.clipsToBounds = YES;
+            [self.chatBackgroudImage addSubview:imageView];
+            
+            [imageView sd_setImageWithURL:[NSURL URLWithString:src] placeholderImage:[UIImage imageNamed:@"icon"]];
+            
+            QMTapGestureRecognizer * tapPressGesture = [[QMTapGestureRecognizer alloc] initWithTarget:self action:@selector(imagePressGesture:)];
+            tapPressGesture.picName = src;
+            tapPressGesture.picType = @"1";
+            tapPressGesture.image = imageView.image;
+            [imageView addGestureRecognizer:tapPressGesture];
+
+            height += 100;
+        }
+    }
+}
+
+#pragma mark 文本处理
+- (NSMutableArray *)showHtml: (NSString *)htmlString {
+    // 拆分文本和图片
+    __block NSString *tempString = htmlString;
+    __block NSMutableArray *srcArr = [NSMutableArray array];
+    
+    NSRegularExpression *regularExpretion = [[NSRegularExpression alloc] initWithPattern:@"<[^>]*>" options:NSRegularExpressionCaseInsensitive error:nil];
+    [regularExpretion enumerateMatchesInString:htmlString options:NSMatchingReportProgress range:NSMakeRange(0, [htmlString length]) usingBlock:^(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL * _Nonnull stop) {
+        
+        if (result.range.length != 0) {
+            // 字符串
+            NSString *actionString = [NSString stringWithFormat:@"%@",[htmlString substringWithRange:result.range]];
+            
+            // 新的range
+            NSRange range = [tempString rangeOfString:actionString];
+            
+            NSArray *components = nil;
+            if ([actionString rangeOfString:@"<img src=\""].location != NSNotFound) {
+                components = [actionString componentsSeparatedByString:@"src=\""];
+            }else if ([actionString rangeOfString:@"<img src="].location != NSNotFound) {
+                components = [actionString componentsSeparatedByString:@"src="];
+            }
+            if (components.count >= 2) {
+                // 文本内容
+                QMTextModel *model1 = [[QMTextModel alloc] init];
+                model1.type = @"text";
+                model1.content = [tempString substringToIndex:range.location];
+                [srcArr addObject:model1];
+                
+                // 图片内容
+                QMTextModel *model2 = [[QMTextModel alloc] init];
+                model2.type = @"image";
+                model2.content = [tempString substringWithRange:range];;
+                [srcArr addObject:model2];
+                tempString = [tempString substringFromIndex:range.location+range.length];
+            }
+        }
+    }];
+    
+    QMTextModel *model3 = [[QMTextModel alloc] init];
+    model3.type = @"text";
+    model3.content = tempString;
+    [srcArr addObject:model3];
+    
+    return srcArr;
+}
+
+- (NSMutableArray *)getAHtml: (NSString *)htmlString {
+    // 文本匹配A标签
+    __block NSString *tempString = htmlString;
+    __block NSMutableArray *srcArr = [NSMutableArray array];
+    __block int length = 0;
+
+    NSRegularExpression *regularExpretion = [[NSRegularExpression alloc] initWithPattern:@"<a href=(?:.*?)>(.*?)</a>" options:NSRegularExpressionCaseInsensitive error:nil];
+    [regularExpretion enumerateMatchesInString:htmlString options:NSMatchingReportProgress range:NSMakeRange(0, [htmlString length]) usingBlock:^(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL * _Nonnull stop) {
+        
+        if (result.range.length != 0) {
+            NSRegularExpression *regularExpretion1 = [[NSRegularExpression alloc] initWithPattern:@"<[^>]*>" options:NSRegularExpressionCaseInsensitive error:nil];
+            
+            QMTextModel *model = [[QMTextModel alloc] init];
+
+            // 获取高亮字符串
+            NSString *actionString = [NSString stringWithFormat:@"%@",[htmlString substringWithRange:result.range]];
+            // 获取链接 actionString -> https
+            NSArray *components = [actionString componentsSeparatedByString:@"href=\""];
+            if (components.count > 1) {
+                NSString *src = components[1];
+                NSUInteger loc = [src rangeOfString:@"\""].location;
+                if (loc != NSNotFound) {
+                    // 地址
+                    src = [src substringToIndex:loc];
+                    src = [src stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+                    model.content = src;
+                }
+            }
+            
+            actionString = [regularExpretion1 stringByReplacingMatchesInString:actionString options:NSMatchingReportProgress range:NSMakeRange(0, actionString.length) withTemplate:@""];
+
+            // 获取高亮range 防止重复
+            actionString = [NSString stringWithFormat:@">%@<", actionString];
+            model.type = actionString;
+            
+            NSRange range = [tempString rangeOfString:actionString];
+            // 高亮之前的字符串
+            if (tempString.length > range.location+1) {
+                NSString *preString = [tempString substringToIndex:range.location+1];
+
+                preString = [regularExpretion1 stringByReplacingMatchesInString:preString options:NSMatchingReportProgress range:NSMakeRange(0, preString.length) withTemplate:@""];
+            
+                actionString = [NSString stringWithFormat:@"at->%@",actionString];
+                NSTextCheckingResult *aResult = [NSTextCheckingResult correctionCheckingResultWithRange:NSMakeRange(preString.length+length, range.length-2) replacementString:actionString];
+            
+                // 截取掉a标签前的字符串(防止a标签名称重复)
+                tempString = [tempString substringFromIndex:range.location+1];
+            
+                // 字符串截取部分的长度
+                length += preString.length;
+            
+                [srcArr addObject:aResult];
+                [srcArrs addObject:model];
+            }
+        }
+    }];
+    
+    return srcArr;
+}
+
+#pragma mark MLEmojiLabelDelegate
+- (void)mlEmojiLabel:(MLEmojiLabel *)emojiLabel didSelectLink:(NSString *)link withType:(MLEmojiLabelLinkType)type {
+    switch (type) {
+        case 1:
+            self.tapNetAddress(link);
+            break;
+        case 3:
+            for (QMTextModel *model in srcArrs) {
+                if ([model.type isEqualToString:link]) {
+                    self.tapNetAddress(model.content);
+                    break;
+                }
+            }
+            break;
+        default:{
+            NSString *newLink = [link stringByReplacingOccurrencesOfString:@"\n" withString:@""];
+            NSArray *array = [newLink componentsSeparatedByString:@":"];
+            if (array.count > 1) {
+                self.tapSendMessage(array[1]);
+            }
+            break;
+        }
+    }
+}
+
+#pragma mark 点击图片GestureRecognizer
+- (void)imagePressGesture:(QMTapGestureRecognizer *)gestureRecognizer {
+    QMChatRoomShowImageController * showPicVC = [[QMChatRoomShowImageController alloc] init];
+    showPicVC.picName = gestureRecognizer.picName;
+    showPicVC.picType = gestureRecognizer.picType;
+    showPicVC.image = gestureRecognizer.image;
+	showPicVC.modalPresentationStyle = UIModalPresentationFullScreen;
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:showPicVC animated:true completion:nil];
+}
+
+#pragma mark 机器人答案反馈点击事件
+- (void)helpBtnAction: (UIButton *)sender {
+    self.didBtnAction(YES);
+}
+
+- (void)noHelpBtnAction: (UIButton *)sender {
+    self.didBtnAction(NO);
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomTextCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomTextCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomTextCell : QMChatRoomBaseCell
+
+@end

+ 162 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomTextCell.m

@@ -0,0 +1,162 @@
+//
+//  QMChatRoomTextCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomTextCell.h"
+#import "QMChatRoomRobotReplyView.h"
+#import <QMLineSDK/QMLineSDK.h>
+
+/**
+    文本消息
+ */
+@interface QMChatRoomTextCell() <MLEmojiLabelDelegate>
+
+@end
+
+@implementation QMChatRoomTextCell
+{
+    MLEmojiLabel *_textLabel;
+    
+    NSString *_messageId;
+    
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {    
+    _textLabel = [[MLEmojiLabel alloc] initWithFrame:CGRectZero];
+    _textLabel.numberOfLines = 0;
+    _textLabel.font = [UIFont systemFontOfSize:14.0f];
+    _textLabel.lineBreakMode = NSLineBreakByTruncatingTail;
+    _textLabel.delegate = self;
+    _textLabel.disableEmoji = NO;
+    _textLabel.disableThreeCommon = NO;
+    _textLabel.isNeedAtAndPoundSign = YES;
+    _textLabel.customEmojiRegex = @"\\:[^\\:]+\\:";
+    _textLabel.customEmojiPlistName = @"expressionImage.plist";
+    _textLabel.customEmojiBundleName = @"QMEmoticon.bundle";
+    [self.chatBackgroudImage addSubview:_textLabel];
+    
+    UILongPressGestureRecognizer * longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressTapGesture:)];
+    [_textLabel addGestureRecognizer:longPressGesture];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    self.message = message;
+    _messageId = message._id;
+    [super setData:message avater:avater];
+            
+    if ([message.fromType isEqualToString:@"0"]) {
+        _textLabel.textColor = [UIColor whiteColor];
+        _textLabel.text = message.message;
+        CGSize size = [_textLabel preferredSizeWithMaxWidth: [UIScreen mainScreen].bounds.size.width - 160];
+        _textLabel.frame = CGRectMake(15, 10, size.width, size.height+5);
+        
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMinX(self.iconImage.frame)-5-_textLabel.frame.size.width-30, CGRectGetMaxY(self.timeLabel.frame)+10, _textLabel.frame.size.width+30, _textLabel.frame.size.height+20);
+        
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(self.chatBackgroudImage.frame)-25, CGRectGetMinY(self.chatBackgroudImage.frame)+10, 20, 20);
+    }else {
+        _textLabel.textColor = [UIColor blackColor];
+        _textLabel.text = message.message;
+        
+        CGSize size = [_textLabel preferredSizeWithMaxWidth: [UIScreen mainScreen].bounds.size.width - 160];
+        
+        _textLabel.frame = CGRectMake(15, 10, size.width, size.height+5);
+        
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, _textLabel.frame.size.width+30, _textLabel.frame.size.height+20);
+    }
+}
+
+- (void)longPressTapGesture:(UILongPressGestureRecognizer *)sender {
+    if (sender.state == UIGestureRecognizerStateBegan) {
+        [self becomeFirstResponder];
+        UIMenuController *menu = [UIMenuController sharedMenuController];
+        UIMenuItem *copyMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.copy", nil)  action:@selector(copyMenu:)];
+        UIMenuItem *removeMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.delete", nil) action:@selector(removeMenu:)];
+        [menu setMenuItems:[NSArray arrayWithObjects:copyMenu,removeMenu, nil]];
+        [menu setTargetRect:self.chatBackgroudImage.frame inView:self];
+        [menu setMenuVisible:true animated:true];
+        
+        UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
+        if ([window isKeyWindow] == NO) {
+            [window becomeKeyWindow];
+            [window makeKeyAndVisible];
+        }
+    }
+}
+
+- (void)helpBtnAction: (UIButton *)sender {
+    NSLog(@"帮助点击");
+    self.didBtnAction(YES);
+
+}
+
+- (void)noHelpBtnAction: (UIButton *)sender {
+    NSLog(@"没有帮助点击");
+    self.didBtnAction(NO);
+}
+
+- (BOOL)canBecomeFirstResponder {
+    return YES;
+}
+
+- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
+    if (action == @selector(copyMenu:) || action == @selector(removeMenu:)) {
+        return YES;
+    }else {
+        return  NO;
+    }
+}
+
+- (void)copyMenu:(id)sender {
+    // 复制文本消息
+    UIPasteboard *pasteBoard =  [UIPasteboard generalPasteboard];
+    pasteBoard.string = _textLabel.text;
+}
+
+- (void)removeMenu:(id)sender {
+    // 删除文本消息
+    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"title.prompt", nil) message:NSLocalizedString(@"title.statement", nil) preferredStyle:UIAlertControllerStyleAlert];
+    
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+
+    }];
+    UIAlertAction *sureAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.sure", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [QMConnect removeDataFromDataBase:_messageId];
+        [[NSNotificationCenter defaultCenter] postNotificationName:CHATMSG_RELOAD object:nil];
+    }];
+    [alertController addAction:cancelAction];
+    [alertController addAction:sureAction];
+
+	[RQ_SHARE_FUNCTION.topViewController presentViewController:alertController animated:YES completion:nil];
+}
+
+- (void)mlEmojiLabel:(MLEmojiLabel *)emojiLabel didSelectLink:(NSString *)link withType:(MLEmojiLabelLinkType)type {
+    NSLog(@"%@, %lu", link, (unsigned long)type);
+    if (link) {
+        self.tapNetAddress(link);
+    }
+}
+
+- (void)awakeFromNib {
+    // Initialization code
+    [super awakeFromNib];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomVoiceCell.h

@@ -0,0 +1,13 @@
+//
+//  QMChatRoomVoiceCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomBaseCell.h"
+
+@interface QMChatRoomVoiceCell : QMChatRoomBaseCell
+
+@end

+ 244 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMChatRoomVoiceCell.m

@@ -0,0 +1,244 @@
+//
+//  QMChatRoomVoiceCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/3/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMChatRoomVoiceCell.h"
+#import <AVFoundation/AVFoundation.h>
+#import <QMLineSDK/QMLineSDK.h>
+#import "QMAudioPlayer.h"
+#import "QMAudioAnimation.h"
+
+@interface QMChatRoomVoiceCell() <AVAudioPlayerDelegate>
+
+@end
+
+/**
+    语音消息
+ */
+@implementation QMChatRoomVoiceCell
+{
+    UIImageView *_voicePlayImageView;
+    
+    UILabel *_secondsLabel;
+        
+    AVAudioSession *_audioSession;
+    
+    NSString *_messageId;
+    
+    UIImageView *_badgeView;
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {    
+    _voicePlayImageView = [[UIImageView alloc] init];
+    _voicePlayImageView.animationDuration = 1.0;
+    [self.chatBackgroudImage addSubview:_voicePlayImageView];
+    
+    _secondsLabel = [[UILabel alloc] init];
+    _secondsLabel.backgroundColor = [UIColor clearColor];
+    _secondsLabel.font = [UIFont systemFontOfSize:16];
+    [self.chatBackgroudImage addSubview:_secondsLabel];
+    
+    _badgeView = [[UIImageView alloc] init];
+    _badgeView.backgroundColor = [UIColor redColor];
+    _badgeView.layer.cornerRadius = 4;
+    _badgeView.layer.masksToBounds = YES;
+    [_badgeView setHidden:YES];
+    [self.contentView addSubview:_badgeView];
+    
+    _audioSession = [AVAudioSession sharedInstance];
+    
+    UILongPressGestureRecognizer * longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressTapGesture:)];
+    [_voicePlayImageView addGestureRecognizer:longPressGesture];
+    
+    // 默认为听筒
+    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
+}
+
+- (void)setData:(CustomMessage *)message avater:(NSString *)avater {
+    _messageId = message._id;
+    self.message = message;
+    [super setData:message avater:avater];
+    
+    UITapGestureRecognizer * tapPressGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPressGesture:)];
+    [self.chatBackgroudImage addGestureRecognizer:tapPressGesture];
+    
+    if ([message.fromType isEqualToString:@"0"]) {
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMinX(self.iconImage.frame)-10-125, CGRectGetMaxY(self.timeLabel.frame)+10, 125, 40);
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(self.chatBackgroudImage.frame)-25, CGRectGetMaxY(self.chatBackgroudImage.frame)-32, 20, 20);
+        
+        _voicePlayImageView.frame = CGRectMake(125-35, 11, 13, 17);
+        _voicePlayImageView.image = [UIImage imageNamed:@"SenderVoiceNodePlaying"];
+        
+        if ([message.status isEqualToString:@"0"]) {
+            _secondsLabel.textColor = [UIColor whiteColor];
+            _secondsLabel.frame = CGRectMake(CGRectGetMinX(_voicePlayImageView.frame)-50, 11, 40, 20);
+            _secondsLabel.text = [NSString stringWithFormat:@"%@''",message.recordSeconds];
+            _secondsLabel.textAlignment = NSTextAlignmentRight;
+            _secondsLabel.hidden = NO;
+        }else {
+            _secondsLabel.hidden = YES;
+        }
+        
+        self.sendStatus.frame = CGRectMake(CGRectGetMinX(self.chatBackgroudImage.frame)-25, CGRectGetMinY(self.chatBackgroudImage.frame)+10, 20, 20);
+        
+        [[QMAudioAnimation sharedInstance]setAudioAnimationPlay:YES and:_voicePlayImageView];
+        
+        [_badgeView setHidden:YES];
+    }else {
+        self.chatBackgroudImage.frame = CGRectMake(CGRectGetMaxX(self.iconImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+10, 125, 40);
+        _badgeView.frame = CGRectMake(CGRectGetMaxX(self.chatBackgroudImage.frame)+5, CGRectGetMaxY(self.timeLabel.frame)+15, 8, 8);
+        _voicePlayImageView.frame = CGRectMake(22, 11, 13, 17);
+        _voicePlayImageView.image = [UIImage imageNamed:@"ReceiverVoiceNodePlaying"];
+
+        _secondsLabel.textColor = [UIColor blackColor];
+        _secondsLabel.frame = CGRectMake(CGRectGetMaxX(_voicePlayImageView.frame)+10, 11, 40, 20);
+        _secondsLabel.text = [NSString stringWithFormat:@"%@''",message.recordSeconds ? message.recordSeconds : 0];
+        _secondsLabel.textAlignment = NSTextAlignmentLeft;
+        
+        [[QMAudioAnimation sharedInstance]setAudioAnimationPlay:NO and:_voicePlayImageView];
+        
+        CustomMessage *msg = [QMConnect getOneDataFromDatabase:message._id].firstObject;
+        if ([msg.isRead isEqualToString:@"1"]) {
+            [_badgeView setHidden:YES];
+        }else {
+            [_badgeView setHidden:NO];
+        }
+    }
+    
+    NSString *fileName;
+    if ([self existFile:self.message.message]) {
+        fileName = self.message.message;
+    }else {
+        fileName = self.message._id;
+    }
+
+    if ([[QMAudioPlayer sharedInstance] isPlaying:fileName] == true) {
+        [[QMAudioAnimation sharedInstance]startAudioAnimation:_voicePlayImageView];
+    }
+}
+
+- (void)longPressTapGesture:(UILongPressGestureRecognizer *)sender {
+    if (sender.state == UIGestureRecognizerStateBegan) {
+        [self becomeFirstResponder];
+        UIMenuController *menu = [UIMenuController sharedMenuController];
+        UIMenuItem *reciverMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.receiver", nil) action:@selector(reciverMenu:)];
+        UIMenuItem *speakerMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.speaker", nil) action:@selector(speakerMenu:)];
+        UIMenuItem *removeMenu = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"button.delete", nil) action:@selector(removeMenu:)];
+        [menu setMenuItems:[NSArray arrayWithObjects:reciverMenu,speakerMenu,removeMenu, nil]];
+        [menu setTargetRect:self.chatBackgroudImage.frame inView:self];
+        [menu setMenuVisible:true animated:true];
+        
+        UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
+        if ([window isKeyWindow] == NO) {
+            [window becomeKeyWindow];
+            [window makeKeyAndVisible];
+        }
+    }    
+}
+
+- (BOOL)canBecomeFirstResponder {
+    return YES;
+}
+
+- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
+    if (action == @selector(reciverMenu:) || action == @selector(speakerMenu:) || action == @selector(removeMenu:)) {
+        return YES;
+    }else {
+        return  NO;
+    }
+}
+
+- (void)reciverMenu:(id)sendr {
+    //听筒
+    NSError *error = nil;
+    if ([[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:&error]) {
+    }
+}
+
+- (void)speakerMenu:(id)sender {
+    // 扬声器
+    NSError *error = nil;
+    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&error];
+}
+
+- (void)removeMenu:(id)sender {
+    // 删除语音(只能删除本地数据库消息)
+    // 删除文本消息
+    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"title.prompt", nil) message:NSLocalizedString(@"title.statement", nil) preferredStyle:UIAlertControllerStyleAlert];
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+
+    }];
+    UIAlertAction *sureAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"button.sure", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [QMConnect removeDataFromDataBase:_messageId];
+        [[NSNotificationCenter defaultCenter] postNotificationName:CHATMSG_RELOAD object:nil];
+    }];
+    [alertController addAction:cancelAction];
+    [alertController addAction:sureAction];
+    
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertController animated:YES completion:nil];
+}
+
+- (void)tapPressGesture:(id)sender {
+    NSLog(@"点击语音消息");
+    [_badgeView setHidden:YES];
+    [QMConnect changeAudioMessageStatus:_messageId];
+    
+    [[QMAudioAnimation sharedInstance] stopAudioAnimation:nil];
+    [[QMAudioAnimation sharedInstance] startAudioAnimation:_voicePlayImageView];
+    
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((self.message.recordSeconds).intValue * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [[QMAudioAnimation sharedInstance] stopAudioAnimation:_voicePlayImageView];
+    });
+    
+    NSString *fileName;
+    if ([self existFile:self.message.message]) {
+        fileName = self.message.message;
+    }else if ([self existFile:[NSString stringWithFormat:@"%@", self.message._id]]) {
+        fileName = self.message._id;
+    }else {
+        NSString *playUrl = [NSString stringWithFormat:@"%@/%@/%@", NSHomeDirectory(), @"Documents", [NSString stringWithFormat:@"%@", self.message._id]];
+        fileName = self.message._id;
+        NSURL *fileUrl = [NSURL URLWithString:self.message.remoteFilePath];
+        NSData *data = [NSData dataWithContentsOfURL:fileUrl];
+        
+        [data writeToFile:playUrl atomically:YES];
+    }
+    
+    // 目前只能发送语音消息 不能接收
+    [[QMAudioPlayer sharedInstance] startAudioPlayer:fileName withDelegate:self];
+}
+
+- (BOOL)existFile: (NSString *)name {
+    NSString * filePath = [NSString stringWithFormat:@"%@/%@/%@", NSHomeDirectory(), @"Documents", name];
+    NSFileManager *fileManager = [NSFileManager defaultManager];
+    if ([fileManager fileExistsAtPath:filePath]) {
+        return YES;
+    }else {
+        return NO;
+    }
+}
+
+- (void)awakeFromNib {
+    // Initialization code
+    [super awakeFromNib];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 21 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMLeaveMessageCell.h

@@ -0,0 +1,21 @@
+//
+//  QMLeaveMessageCell.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/11/27.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMLeaveMessageCell : UITableViewCell
+
+@property (nonatomic, strong) UILabel *fieldLabel;
+
+@property (nonatomic, strong) UITextField *textField;
+
+- (void)setData: (NSDictionary *)information defaultValue: (NSString *)value;
+
+@property (nonatomic, copy) void(^backInformation)(NSString *);
+
+@end

+ 83 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Cell/QMLeaveMessageCell.m

@@ -0,0 +1,83 @@
+//
+//  QMLeaveMessageCell.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/11/27.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMLeaveMessageCell.h"
+
+@interface QMLeaveMessageCell ()
+
+@end
+
+@implementation QMLeaveMessageCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        self.backgroundColor = [UIColor whiteColor];
+        [self setUI];
+    }
+    return self;
+}
+
+- (void)setUI {
+    self.fieldLabel = [[UILabel alloc] init];
+    self.fieldLabel.frame = CGRectMake(15, 7, 100, 30);
+    self.fieldLabel.backgroundColor = [UIColor clearColor];
+    self.fieldLabel.font = [UIFont systemFontOfSize:14];
+    self.fieldLabel.text = NSLocalizedString(@"title.phoneNumber", nil);
+    self.fieldLabel.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0];
+    [self.contentView addSubview:self.fieldLabel];
+
+    self.textField = [[UITextField alloc] init];
+    self.textField.frame = CGRectMake(15 + 100, 7, RQ_SCREEN_WIDTH - 30 - 100, 30);
+    self.textField.backgroundColor = [UIColor clearColor];
+    self.textField.textAlignment = NSTextAlignmentRight;
+    self.textField.font = [UIFont systemFontOfSize:16];
+    self.textField.placeholder = NSLocalizedString(@"title.selection", nil);
+    [self.contentView addSubview:self.textField];
+    
+    [self.textField addTarget:self action:@selector(change:) forControlEvents:UIControlEventEditingChanged];
+}
+
+- (void)setData: (NSDictionary *)information defaultValue: (NSString *)value {
+    self.textField.text = @"";
+    if (information[@"name"]) {
+        self.fieldLabel.text = information[@"name"];
+    }
+    
+    if (information[@"required"]) {
+        BOOL required = [[information objectForKey:@"required"] boolValue];
+        if (required == YES) {
+            self.textField.placeholder = NSLocalizedString(@"title.required", nil);
+        }else {
+            self.textField.placeholder = NSLocalizedString(@"title.selection", nil);
+        }
+    }else {
+        self.textField.placeholder = NSLocalizedString(@"title.selection", nil);
+    }
+    
+    if (value) {
+        self.textField.text = value;
+    }
+}
+
+- (void)change: (UITextField *)textF {
+    self.backInformation(textF.text);
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 19 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileCollectionCell.h

@@ -0,0 +1,19 @@
+//
+//  QMFileCollectionCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <Photos/Photos.h>
+
+@interface QMFileCollectionCell : UICollectionViewCell
+
+@property (nonatomic, strong)PHAsset *imageAsset;
+@property (nonatomic, strong)PHImageManager *imageManager;
+
+@property (nonatomic, strong)UIImageView *pickedItemImageView;
+
+@end

+ 56 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileCollectionCell.m

@@ -0,0 +1,56 @@
+//
+//  QMFileCollectionCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMFileCollectionCell.h"
+
+@interface QMFileCollectionCell () {
+    UIImageView *_photoImageView;
+}
+
+@end
+
+@implementation QMFileCollectionCell
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    self.contentView.backgroundColor = [UIColor whiteColor];
+    
+    _photoImageView = [[UIImageView alloc] init];
+    _photoImageView.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
+    [self.contentView addSubview:_photoImageView];
+    
+    self.pickedItemImageView = [[UIImageView alloc] init];
+    self.pickedItemImageView.frame = CGRectMake(self.bounds.size.width-35, 5, 30, 30);
+    self.pickedItemImageView.image = [UIImage imageNamed:@"ic_checkbox_pressed"];
+    [self.contentView addSubview:self.pickedItemImageView];
+    
+}
+
+- (void)setImageAsset:(PHAsset *)imageAsset {
+    if (imageAsset) {
+        PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+        options.synchronous = YES;
+        options.version = PHImageRequestOptionsVersionCurrent;
+        options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+        options.resizeMode = PHImageRequestOptionsResizeModeExact;
+        options.networkAccessAllowed = YES;
+        
+        [self.imageManager requestImageForAsset:imageAsset targetSize:CGSizeMake(120, 120) contentMode:PHImageContentModeAspectFill options:options resultHandler:^(UIImage * _Nullable result, NSDictionary * _Nullable info) {
+            _photoImageView.image = result;
+        }];
+    }
+}
+
+@end

+ 18 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileTableCell.h

@@ -0,0 +1,18 @@
+//
+//  QMFileTableCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class QMFileModel;
+@interface QMFileTableCell : UITableViewCell
+
+@property (nonatomic, strong)UIImageView *pickedItemImageView;
+
+- (void)configureWithModel: (QMFileModel *)model;
+
+@end

+ 97 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMFileTableCell.m

@@ -0,0 +1,97 @@
+//
+//  QMFileTableCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMFileTableCell.h"
+#import "QMFileModel.h"
+
+@interface QMFileTableCell () {
+    UIImageView *_fileImageView;
+    UILabel *_fileName;
+    UILabel *_fileSize;
+    UILabel *_fileDate;
+}
+
+@end
+
+@implementation QMFileTableCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    _fileImageView = [[UIImageView alloc] init];
+    _fileImageView.frame = CGRectMake(20, 10, 60, 60);
+    _fileImageView.backgroundColor = [UIColor whiteColor];
+    [self.contentView addSubview:_fileImageView];
+    
+    _fileName = [[UILabel alloc] init];
+    _fileName.frame = CGRectMake(90, 10, RQ_SCREEN_WIDTH-150, 20);
+    _fileName.font = [UIFont systemFontOfSize:16];
+    _fileName.textColor = [UIColor blackColor];
+    [self.contentView addSubview:_fileName];
+    
+    _fileSize = [[UILabel alloc] init];
+    _fileSize.frame = CGRectMake(90, 30, RQ_SCREEN_WIDTH-150, 20);
+    _fileSize.font = [UIFont systemFontOfSize:14];
+    _fileSize.textColor = [UIColor lightGrayColor];
+    [self.contentView addSubview:_fileSize];
+    
+    _fileDate = [[UILabel alloc] init];
+    _fileDate.frame = CGRectMake(90, 50, RQ_SCREEN_WIDTH-150, 20);
+    _fileDate.font = [UIFont systemFontOfSize:14];
+    _fileDate.textColor = [UIColor lightGrayColor];
+    [self.contentView addSubview:_fileDate];
+    
+    self.pickedItemImageView = [[UIImageView alloc] init];
+    self.pickedItemImageView.frame = CGRectMake(RQ_SCREEN_WIDTH-50, 25, 30, 30);
+    self.pickedItemImageView.image = [UIImage imageNamed:@"ic_checkbox_pressed"];
+    [self.contentView addSubview:self.pickedItemImageView];
+}
+
+- (void)configureWithModel:(QMFileModel *)model {
+    _fileName.text = model.fileName;
+    _fileSize.text = model.fileSize;
+    _fileDate.text = model.fileDate;
+    
+    if ([model.fileName.pathExtension.lowercaseString isEqualToString:@"doc"]||[model.fileName.pathExtension.lowercaseString isEqualToString:@"docx"]) {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_doc"];
+    }else if ([model.fileName.pathExtension.lowercaseString isEqualToString:@"xlsx"]||[model.fileName.pathExtension.lowercaseString isEqualToString:@"xls"]) {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_xlsx"];
+    }else if ([model.fileName.pathExtension.lowercaseString isEqualToString:@"ppt"]||[model.fileName.pathExtension.lowercaseString isEqualToString:@"pptx"]) {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_pptx"];
+    }else if ([model.fileName.pathExtension.lowercaseString isEqualToString:@"pdf"]) {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_pdf"];
+    }else if ([model.fileName.pathExtension.lowercaseString isEqualToString:@"mp3"]) {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_mp3"];
+    }else if ([model.fileName.pathExtension.lowercaseString isEqualToString:@"mov"]||[model.fileName.pathExtension.lowercaseString isEqualToString:@"mp4"]) {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_mov"];
+    }else if ([model.fileName.pathExtension.lowercaseString isEqualToString:@"png"]||[model.fileName.pathExtension.lowercaseString isEqualToString:@"jpg"]||[model.fileName.pathExtension.lowercaseString isEqualToString:@"bmp"]||[model.fileName.pathExtension.lowercaseString isEqualToString:@"jpeg"]) {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_bmp"];
+    }else {
+        _fileImageView.image = [UIImage imageNamed:@"custom_file_other"];
+    }
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 19 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMItemCollectionCell.h

@@ -0,0 +1,19 @@
+//
+//  QMItemCollectionCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMItemCollectionCell : UICollectionViewCell
+
+@property (nonatomic, strong)UIImageView *iconImageView;
+
+@property (nonatomic, strong)UILabel *nameLabel;
+
+- (void)configureWithName: (NSString *)name;
+
+@end

+ 42 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMItemCollectionCell.m

@@ -0,0 +1,42 @@
+//
+//  QMItemCollectionCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMItemCollectionCell.h"
+
+@implementation QMItemCollectionCell
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    self.contentView.backgroundColor = [UIColor whiteColor];
+    
+    self.iconImageView = [[UIImageView alloc] init];
+    self.iconImageView.frame = CGRectMake(20, 20, self.bounds.size.width-40, self.bounds.size.height-60);
+    [self.contentView addSubview:self.iconImageView];
+    
+    self.nameLabel = [[UILabel alloc] init];
+    self.nameLabel.frame = CGRectMake(0, self.bounds.size.height-20, self.bounds.size.width, 20);
+    self.nameLabel.font = [UIFont systemFontOfSize:14];
+    self.nameLabel.textAlignment = NSTextAlignmentCenter;
+    [self.contentView addSubview:self.nameLabel];
+}
+
+- (void)configureWithName: (NSString *)name {
+    self.iconImageView.image = [UIImage imageNamed:@"custom_file_folder"];
+    self.nameLabel.text = name;
+}
+
+
+
+@end

+ 19 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMVideoTableCell.h

@@ -0,0 +1,19 @@
+//
+//  QMVideoTableCell.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <Photos/Photos.h>
+
+@interface QMVideoTableCell : UITableViewCell
+
+@property (nonatomic, strong)PHAsset *imageAsset;
+@property (nonatomic, strong)PHImageManager *imageManager;
+
+@property (nonatomic, strong)UIImageView *pickedItemImageView;
+
+@end

+ 124 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Cell/QMVideoTableCell.m

@@ -0,0 +1,124 @@
+//
+//  QMVideoTableCell.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMVideoTableCell.h"
+
+@interface QMVideoTableCell() {
+    UIImageView *_videoImageView;
+    UILabel *_videoName;
+    UILabel *_videoSize;
+    UILabel *_videoDate;
+}
+
+@end
+
+@implementation QMVideoTableCell
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+-(void)createUI {
+    self.contentView.backgroundColor = [UIColor whiteColor];
+    
+    _videoImageView = [[UIImageView alloc] init];
+    _videoImageView.frame = CGRectMake(20, 10, 60, 60);
+    _videoImageView.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_videoImageView];
+    
+    _videoName = [[UILabel alloc] init];
+    _videoName.frame = CGRectMake(90, 10, RQ_SCREEN_WIDTH-150, 20);
+    _videoName.font = [UIFont systemFontOfSize:16];
+    _videoName.textColor = [UIColor blackColor];
+    [self.contentView addSubview:_videoName];
+    
+    _videoSize = [[UILabel alloc] init];
+    _videoSize.frame = CGRectMake(90, 30, RQ_SCREEN_WIDTH-150, 20);
+    _videoSize.font = [UIFont systemFontOfSize:14];
+    _videoSize.textColor = [UIColor lightGrayColor];
+    [self.contentView addSubview:_videoSize];
+
+    _videoDate = [[UILabel alloc] init];
+    _videoDate.frame = CGRectMake(90, 50, RQ_SCREEN_WIDTH-150, 20);
+    _videoDate.font = [UIFont systemFontOfSize:14];
+    _videoDate.textColor = [UIColor lightGrayColor];
+    [self.contentView addSubview:_videoDate];
+    
+    self.pickedItemImageView = [[UIImageView alloc] init];
+    self.pickedItemImageView.frame = CGRectMake(RQ_SCREEN_WIDTH-50, 25, 30, 30);
+    self.pickedItemImageView.image = [UIImage imageNamed:@"ic_checkbox_pressed"];
+    [self.contentView addSubview:self.pickedItemImageView];
+}
+
+- (void)setImageAsset:(PHAsset *)imageAsset {
+    if (imageAsset) {
+        PHVideoRequestOptions *voptions = [[PHVideoRequestOptions alloc] init];
+        voptions.version = PHVideoRequestOptionsVersionCurrent;
+        voptions.deliveryMode = PHVideoRequestOptionsDeliveryModeHighQualityFormat;
+        voptions.networkAccessAllowed = YES;
+        
+        [self.imageManager requestAVAssetForVideo:imageAsset options:voptions resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {
+            
+            if (asset && [asset isKindOfClass:[AVURLAsset class]] && [NSString stringWithFormat:@"%@",((AVURLAsset *)asset).URL].length > 0) {
+                
+                NSURL *videoURL = [(AVURLAsset *)asset URL];
+                NSNumber *fileSizeValue = nil;
+                [videoURL getResourceValue:&fileSizeValue forKey:NSURLFileSizeKey error:nil];
+                
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    if (fileSizeValue) {
+                        if (fileSizeValue.intValue>1024) {
+                            _videoSize.text = [NSString stringWithFormat:@"%.f MB", (float)fileSizeValue.intValue/1024/1024];
+                        }else {
+                            _videoSize.text = [NSString stringWithFormat:@"%.f KB", (float)fileSizeValue.intValue/1024];
+                        }
+                    }
+                });
+            }
+            
+            NSString *filePath = [info objectForKey:@"PHImageFileSandboxExtensionTokenKey"];
+            
+            NSArray * array = [filePath componentsSeparatedByString:@"/"];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                _videoName.text = array.lastObject;
+            });
+        }];
+        
+        PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
+        options.synchronous = YES;
+        options.version = PHImageRequestOptionsVersionCurrent;
+        options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
+        options.resizeMode = PHImageRequestOptionsResizeModeExact;
+        options.networkAccessAllowed = YES;
+        
+        [self.imageManager requestImageForAsset:imageAsset targetSize:CGSizeMake(120, 120) contentMode:PHImageContentModeAspectFill options:options resultHandler:^(UIImage * _Nullable result, NSDictionary * _Nullable info) {
+            _videoImageView.image = result;
+            
+            NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+            formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
+            formatter.dateFormat = @"MM-dd HH:mm";
+            _videoDate.text = [formatter stringFromDate:[imageAsset creationDate]];
+        }];
+    }
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+}
+
+@end

+ 27 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileManager.h

@@ -0,0 +1,27 @@
+//
+//  QMFileManager.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#define kDOCUMENTS NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]
+
+@interface QMFileManager : NSObject
+
++ (BOOL)createFolder: (NSString *)folderPath;
+
++ (NSArray *)getFileNames: (NSString *)folderPath;
+
++ (BOOL)fileIsExsited: (NSString *)filePath;
+
++ (NSDictionary *)getFileAttributes: (NSString *)filePath;
+
++ (NSString *)writeDictionary: (NSDictionary *)dict toFile: (NSString *)filePath;
+
++ (NSMutableDictionary *)readDictionary: (NSString *)filePath;
+
+@end

+ 72 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileManager.m

@@ -0,0 +1,72 @@
+//
+//  QMFileManager.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMFileManager.h"
+
+@interface QMFileManager ()
+
+@property (nonatomic)NSFileManager *fileManager;
+
+@end
+
+@implementation QMFileManager
+
+
++ (BOOL)createFolder: (NSString *)folderPath {
+    NSString * path = [NSString stringWithFormat:@"%@/%@", kDOCUMENTS, folderPath];
+    
+    if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
+        NSError *error = nil;
+        [[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error];
+        if (error) {
+            return NO;
+        }else {
+            return YES;
+        }
+    }else {
+        return NO;
+    }
+}
+
++ (NSArray *)getFileNames: (NSString *)folderPath {
+    NSString * path = [NSString stringWithFormat:@"%@/%@", kDOCUMENTS, folderPath];
+    return [[NSFileManager defaultManager] subpathsAtPath:path];
+}
+
++ (BOOL)fileIsExsited: (NSString *)filePath {
+    NSString *path = [NSString stringWithFormat:@"%@/%@", kDOCUMENTS, filePath];
+    return [[NSFileManager defaultManager] fileExistsAtPath:path];
+}
+
++ (NSDictionary *)getFileAttributes: (NSString *)filePath {
+    NSString *path = [NSString stringWithFormat:@"%@/%@", kDOCUMENTS, filePath];
+    if ([[NSFileManager defaultManager] fileExistsAtPath:path]) {
+        NSError *error = nil;
+        return [[NSFileManager defaultManager] attributesOfItemAtPath:path error:&error];
+    }else {
+        return nil;
+    }
+}
+
++ (NSString *)writeDictionary: (NSDictionary *)dict toFile: (NSString *)filePath {
+    NSString *path = [NSString stringWithFormat:@"%@/%@", kDOCUMENTS, filePath];
+    BOOL success = [dict writeToFile:path atomically:YES];
+    if (success) {
+        return path;
+    }else {
+        return nil;
+    }
+}
+
++ (NSMutableDictionary *)readDictionary: (NSString *)filePath {
+    NSString *path = [NSString stringWithFormat:@"%@/%@", kDOCUMENTS, filePath];
+    return [NSMutableDictionary dictionaryWithContentsOfFile:path];
+}
+
+
+@end

+ 18 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileModel.h

@@ -0,0 +1,18 @@
+//
+//  QMFileModel.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface QMFileModel : NSObject
+
+@property (nonatomic, copy)NSString *fileName;
+@property (nonatomic, copy)NSString *fileDate;
+@property (nonatomic, copy)NSString *fileSize;
+@property (nonatomic, copy)NSString *filePath;
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMFileModel.m

@@ -0,0 +1,13 @@
+//
+//  QMFileModel.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMFileModel.h"
+
+@implementation QMFileModel
+
+@end

+ 38 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMProfileManager.h

@@ -0,0 +1,38 @@
+//
+//  QMProfileManager.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+enum QMFileCategory {
+    DOCX,
+    IMAGE,
+    AUDIO,
+    VIDEO,
+    OTHER
+};
+
+enum QMFileType {
+    DOC,
+    MP3
+};
+
+@class QMFileModel;
+
+@interface QMProfileManager : NSObject
+
++ (QMProfileManager *)sharedInstance;
+
+- (BOOL)loadProfile: (NSString *)name password: (NSString *)password;
+
+- (NSArray *)getFilesAttributes: (enum QMFileCategory)type;
+
+- (NSString *)getFilePath: (NSString *)fileName;
+
+- (NSString *)checkFileExtension: (NSString *)name;
+
+@end

+ 169 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/Model/QMProfileManager.m

@@ -0,0 +1,169 @@
+//
+//  QMProfileManager.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMProfileManager.h"
+#import "QMFileModel.h"
+#import "QMFileManager.h"
+
+@implementation QMProfileManager
+
+static NSString *DocFolder   = @"%@/Doc";
+static NSString *ImageFolder = @"%@/Image";
+static NSString *AudioFolder = @"%@/Audio";
+static NSString *VideoFolder = @"%@/Video";
+static NSString *OtherFolder = @"%@/Other";
+static NSString *SendVideoFolder = @"%@/SendVideo";
+
+static NSString *profileList = @"profiles.plist";
+static NSString *lastLogin   = @"lastlogin.plist";
+
+static NSString *KEY_LASTLOGIN_NAME     = @"LASTLOGIN_NAME";
+static NSString *KEY_LASTLOGIN_PASSWORD = @"LASTLOGIN_PASSWORD";
+
+static QMProfileManager * instance = nil;
++ (instancetype)sharedInstance {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [[self alloc] init];
+    });
+    return instance;
+}
+
++ (instancetype)allocWithZone:(struct _NSZone *)zone {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [super allocWithZone:zone];
+    });
+    return instance;
+}
+
+- (BOOL)loadProfile: (NSString *)name password: (NSString *)password {
+    if (![QMFileManager fileIsExsited:profileList]) {
+        [QMFileManager writeDictionary:[NSDictionary new] toFile:profileList];
+        [QMFileManager writeDictionary:[NSDictionary new] toFile:lastLogin];
+    }
+    
+    NSMutableDictionary *profiles = [QMFileManager readDictionary:profileList];
+    if ([profiles objectForKey:name]==nil) {
+        [QMFileManager createFolder:name];
+        
+        [QMFileManager createFolder:[NSString stringWithFormat:DocFolder, name]];
+        [QMFileManager createFolder:[NSString stringWithFormat:AudioFolder, name]];
+        [QMFileManager createFolder:[NSString stringWithFormat:ImageFolder, name]];
+        [QMFileManager createFolder:[NSString stringWithFormat:VideoFolder, name]];
+        [QMFileManager createFolder:[NSString stringWithFormat:OtherFolder, name]];
+        [QMFileManager createFolder:[NSString stringWithFormat:SendVideoFolder, name]];
+    }
+    
+    NSDictionary *lastDict = @{
+                               KEY_LASTLOGIN_NAME       :name,
+                               KEY_LASTLOGIN_PASSWORD   :password
+                               };
+    [QMFileManager writeDictionary:lastDict toFile:lastLogin];
+    return YES;
+}
+
+- (NSArray *)getFilesAttributes: (enum QMFileCategory)type {
+    NSMutableArray *fileModels = [[NSMutableArray alloc] init];
+    NSMutableDictionary *profiles = [QMFileManager readDictionary:lastLogin];
+    if ([profiles objectForKey:KEY_LASTLOGIN_NAME] == nil) {
+        return fileModels;
+    }
+    
+    NSString *folder = @"";
+    switch (type) {
+        case DOCX:
+            folder = [NSString stringWithFormat:DocFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+            break;
+        case IMAGE:
+            folder = [NSString stringWithFormat:ImageFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+            break;
+        case AUDIO:
+            folder = [NSString stringWithFormat:AudioFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+            break;
+        case VIDEO:
+            folder = [NSString stringWithFormat:VideoFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+            break;
+        case OTHER:
+            folder = [NSString stringWithFormat:OtherFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+            break;
+        default:
+            break;
+    }
+    
+    NSArray *fileNames = [QMFileManager getFileNames:folder];
+    
+    NSLog(@"%@", fileNames);
+    
+    for (NSString * fileName in fileNames) {
+        
+        NSLog(@"%@", fileName);
+        
+        NSLog(@"%@", [NSString stringWithFormat:@"%@/%@", folder, fileName]);
+        
+        NSDictionary *fileInfo = [QMFileManager getFileAttributes:[NSString stringWithFormat:@"%@/%@", folder, fileName]];
+        
+        QMFileModel *model = [[QMFileModel alloc] init];
+        model.fileName = fileName;
+        
+        NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
+        formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
+        formatter.dateFormat = @"MM-dd HH:mm";
+        model.fileDate = [formatter stringFromDate:[fileInfo objectForKey:NSFileCreationDate]];
+        if ([[fileInfo objectForKey:NSFileSize] floatValue] > 1024) {
+            model.fileSize = [NSString stringWithFormat:@"%.f KB", [[fileInfo objectForKey:NSFileSize] floatValue]/1024];
+        }else {
+            model.fileSize = [NSString stringWithFormat:@"%.f MB", [[fileInfo objectForKey:NSFileSize] floatValue]/1024/1024];
+        }
+        
+//        model.fileSize = [[fileInfo objectForKey:NSFileSize] description];
+        model.filePath = [NSString stringWithFormat:@"%@/%@", folder, fileName];
+        
+        [fileModels addObject:model];
+    }
+    return fileModels;
+}
+
+- (NSString *)getFilePath: (NSString *)fileName {
+    
+    NSMutableDictionary *profiles = [QMFileManager readDictionary:lastLogin];
+    if ([profiles objectForKey:KEY_LASTLOGIN_NAME] == nil) {
+        return @"";
+    }
+    
+    NSString *folder = [NSString stringWithFormat:[self checkFileExtension:fileName], [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+    
+    NSLog(@"%@", [NSString stringWithFormat:@"%@/%@", folder, fileName]);
+    return [NSString stringWithFormat:@"%@/%@", folder, fileName];
+}
+
+- (NSString *)checkFileExtension: (NSString *)name {
+    NSMutableDictionary *profiles = [QMFileManager readDictionary:lastLogin];
+    if ([profiles objectForKey:KEY_LASTLOGIN_NAME] == nil) {
+        return name;
+    }
+    
+    NSString *tempString = @"";
+    NSString *exten = name.pathExtension.lowercaseString;
+    
+    if ([exten isEqualToString:@"doc"]||[exten isEqualToString:@"docx"]||[exten isEqualToString:@"ppt"]||[exten isEqualToString:@"pptx"]||[exten isEqualToString:@"xls"]||[exten isEqualToString:@"xlsx"]||[exten isEqualToString:@"xml"]||[exten isEqualToString:@"wps"]||[exten isEqualToString:@"txt"]||[exten isEqualToString:@"html"]||[exten isEqualToString:@"htm"]||[exten isEqualToString:@"pps"]||[exten isEqualToString:@"text"]) {
+        tempString = [NSString stringWithFormat:DocFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+    }else if ([exten isEqualToString:@"png"]||[exten isEqualToString:@"gif"]||[exten isEqualToString:@"jpg"]||[exten isEqualToString:@"jpeg"]||[exten isEqualToString:@"bmp"]) {
+        tempString = [NSString stringWithFormat:ImageFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+    }else if ([exten isEqualToString:@"mp3"]||[exten isEqualToString:@"wav"]||[exten isEqualToString:@"m4a"]||[exten isEqualToString:@"wma"]||[exten isEqualToString:@"caf"]) {
+        tempString = [NSString stringWithFormat:AudioFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+    }else if ([exten isEqualToString:@"avi"]||[exten isEqualToString:@"mov"]||[exten isEqualToString:@"mp4"]||[exten isEqualToString:@"mkv"]||[exten isEqualToString:@"rmvb"]||[exten isEqualToString:@"wmv"]) {
+        tempString = [NSString stringWithFormat:VideoFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+    }else {
+        tempString = [NSString stringWithFormat:OtherFolder, [profiles objectForKey:KEY_LASTLOGIN_NAME]];
+    }
+    
+    return [NSString stringWithFormat:@"%@/%@", tempString, name];
+}
+
+@end

+ 17 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/View/QMFileTabbarView.h

@@ -0,0 +1,17 @@
+//
+//  QMFileTabbarView.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/15.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMFileTabbarView : UIView
+
+@property (nonatomic, strong)void(^selectAction)(void);
+
+@property (nonatomic, strong)UIButton *doneButton;
+
+@end

+ 42 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/View/QMFileTabbarView.m

@@ -0,0 +1,42 @@
+//
+//  QMFileTabbarView.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/15.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMFileTabbarView.h"
+
+@implementation QMFileTabbarView
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self createUI];
+    }
+    return self;
+}
+
+- (void)createUI {
+    self.backgroundColor = [UIColor whiteColor];
+    self.layer.borderColor = [[UIColor lightGrayColor] CGColor];
+    self.layer.borderWidth = 0.5;
+    
+    self.doneButton = [[UIButton alloc] init];
+    self.doneButton.frame = CGRectMake(RQ_SCREEN_WIDTH-80, 7, 70, 30);
+    [self.doneButton setTitle:NSLocalizedString(@"button.complete", nil) forState:UIControlStateNormal];
+    self.doneButton.layer.cornerRadius = 5;
+    self.doneButton.layer.masksToBounds = YES;
+    [self.doneButton setBackgroundImage:[[UIImage imageNamed:@"send_press_no_allow"] stretchableImageWithLeftCapWidth:10 topCapHeight:10] forState:UIControlStateNormal];
+    [self.doneButton setBackgroundImage:[[UIImage imageNamed:@"send_press_allow"] stretchableImageWithLeftCapWidth:10 topCapHeight:10] forState:UIControlStateSelected];
+    [self.doneButton addTarget:self action:@selector(doneAction) forControlEvents:UIControlEventTouchUpInside];
+    [self addSubview:self.doneButton];
+}
+
+
+- (void)doneAction {
+    self.selectAction();
+}
+
+@end

+ 17 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMFileManagerController.h

@@ -0,0 +1,17 @@
+//
+//  QMFileManagerController.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^CallBackBlock)(NSString *name, NSString * size, NSString * path);
+
+@interface QMFileManagerController : UIViewController
+
+@property (nonatomic, strong)CallBackBlock callBackBlock;
+
+@end

+ 119 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMFileManagerController.m

@@ -0,0 +1,119 @@
+//
+//  QMFileManagerController.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMFileManagerController.h"
+#import "QMItemCollectionCell.h"
+
+#import "QMPickedPhotoViewController.h"
+#import "QMPickedVideoViewController.h"
+#import "QMPickedDocViewController.h"
+#import "QMPickedAudioViewController.h"
+#import "QMPickedOtherViewController.h"
+
+
+
+/**
+ 
+ */
+@interface QMFileManagerController ()<UICollectionViewDelegate, UICollectionViewDataSource> {
+    UICollectionView *_collectionView;
+    NSArray *_items;
+}
+
+@end
+
+@implementation QMFileManagerController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.view.backgroundColor = [UIColor whiteColor];
+    _items = @[NSLocalizedString(@"button.chat_file", nil), NSLocalizedString(@"button.chat_img", nil), NSLocalizedString(@"button.chat_music", nil), NSLocalizedString(@"button.chat_video", nil), NSLocalizedString(@"button.chat_other", nil)];
+    
+    [self createUI];
+}
+
+- (void)dealloc {
+    
+}
+
+- (void)createUI {
+    UICollectionViewFlowLayout * layout = [[UICollectionViewFlowLayout alloc] init];
+    layout.itemSize = CGSizeMake((RQ_SCREEN_WIDTH-6)/3, (RQ_SCREEN_WIDTH-6)/3);
+    layout.scrollDirection = UICollectionViewScrollDirectionVertical;
+    layout.sectionInset = UIEdgeInsetsMake(0, 1, 0, 1);
+    layout.minimumLineSpacing = 2.0;
+    layout.minimumInteritemSpacing = 1.0;
+    layout.headerReferenceSize = CGSizeMake(0, 0);
+    
+    _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, RQ_SCREEN_WIDTH, RQ_SCREEN_HEIGHT-64) collectionViewLayout:layout];
+    _collectionView.backgroundColor = [UIColor whiteColor];
+    _collectionView.delegate = self;
+    _collectionView.dataSource = self;
+    [self.view addSubview:_collectionView];
+    
+    [_collectionView registerClass:[QMItemCollectionCell self] forCellWithReuseIdentifier:NSStringFromClass(QMItemCollectionCell.self)];
+    
+}
+
+- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
+    NSString * name = _items[indexPath.item];
+    if ([cell isKindOfClass:[QMItemCollectionCell class]]) {
+        QMItemCollectionCell * displayCell = (QMItemCollectionCell *)cell;
+        [displayCell configureWithName:name];
+    }
+}
+
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+    return _items.count;
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
+    QMItemCollectionCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(QMItemCollectionCell.self) forIndexPath:indexPath];
+    
+    return cell;
+}
+
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {    
+    switch (indexPath.item) {
+        case 0: {
+            QMPickedDocViewController *viewController = [[QMPickedDocViewController alloc] init];
+            [self.navigationController pushViewController:viewController animated:YES];
+        }
+            break;
+        case 1: {
+            QMPickedPhotoViewController *viewController = [[QMPickedPhotoViewController alloc] init];
+            [self.navigationController pushViewController:viewController animated:YES];
+            break;
+        }
+        case 2: {
+            QMPickedAudioViewController *viewController = [[QMPickedAudioViewController  alloc] init];
+            [self.navigationController pushViewController:viewController animated:YES];
+            break;
+        }
+        case 3: {
+            QMPickedVideoViewController *viewController = [[QMPickedVideoViewController alloc] init];
+            [self.navigationController pushViewController:viewController animated:YES];
+            break;
+        }
+        case 4: {
+            QMPickedOtherViewController *viewController = [[QMPickedOtherViewController alloc] init];
+            [self.navigationController pushViewController:viewController animated:YES];
+            break;
+        }
+        default:
+            break;
+    }
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    
+}
+
+@end
+

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedAudioViewController.h

@@ -0,0 +1,13 @@
+//
+//  QMPickedAudioViewController.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMPickedAudioViewController : UIViewController
+
+@end

+ 146 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedAudioViewController.m

@@ -0,0 +1,146 @@
+//
+//  QMPickedAudioViewController.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMPickedAudioViewController.h"
+
+#import "QMFileManager.h"
+#import "QMFileTabbarView.h"
+#import "QMProfileManager.h"
+#import "QMFileTableCell.h"
+#import "QMFileModel.h"
+#import "QMChatRoomViewController.h"
+
+@interface QMPickedAudioViewController ()<UITableViewDelegate, UITableViewDataSource> {
+    UITableView *_tableView;
+    QMFileTabbarView *_tabbarView;
+    
+    NSArray *_audioArray;
+    
+    CGFloat _navHeight;
+}
+
+@property (nonatomic, strong) NSMutableSet *pickedAudioSet;
+
+@end
+
+@implementation QMPickedAudioViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    CGRect StatusRect = [[UIApplication sharedApplication] statusBarFrame];
+    CGRect NavRect = self.navigationController.navigationBar.frame;
+    _navHeight = StatusRect.size.height + NavRect.size.height;
+    
+    self.view.backgroundColor = [UIColor whiteColor];
+    
+    self.pickedAudioSet = [[NSMutableSet alloc] initWithCapacity:10];
+
+    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, RQ_SCREEN_WIDTH, RQ_SCREEN_HEIGHT-_navHeight-44) style:UITableViewStylePlain];
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
+    _tableView.backgroundColor = [UIColor whiteColor];
+    _tableView.delegate = self;
+    _tableView.dataSource = self;
+    [self.view addSubview:_tableView];
+    
+    _tabbarView = [[QMFileTabbarView alloc] init];
+    _tabbarView.frame = CGRectMake(0, RQ_SCREEN_HEIGHT-44-_navHeight, RQ_SCREEN_WIDTH, 44);
+    [self.view addSubview:_tabbarView];
+    
+    [_tableView registerClass:[QMFileTableCell class] forCellReuseIdentifier:NSStringFromClass(QMFileTableCell.self)];
+    
+    __weak QMPickedAudioViewController *strongSelf = self;
+    _tabbarView.selectAction = ^{
+        QMChatRoomViewController * tagViewController = nil;
+        for (UIViewController *viewController in strongSelf.navigationController.viewControllers) {
+            if ([viewController isKindOfClass:[QMChatRoomViewController class]]) {
+                tagViewController = (QMChatRoomViewController *)viewController;
+                [strongSelf.navigationController popToViewController:tagViewController animated:true];
+                
+                for (QMFileModel *model in strongSelf.pickedAudioSet) {
+                    [tagViewController sendFileMessageWithName:model.fileName AndSize:model.fileSize AndPath:model.fileName];
+                }
+            }
+        }
+    };
+    
+    [self getData];
+}
+
+- (void)dealloc {
+}
+
+- (void)getData {
+    QMProfileManager * manager = [QMProfileManager sharedInstance];
+    _audioArray = [manager getFilesAttributes:AUDIO];
+    [_tableView reloadData];
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 80;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return _audioArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    QMFileTableCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(QMFileTableCell.self) forIndexPath:indexPath];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+    QMFileModel *model = _audioArray[indexPath.row];
+    if ([cell isKindOfClass:[QMFileTableCell class]]) {
+        QMFileTableCell *displayCell = (QMFileTableCell *)cell;
+        [displayCell configureWithModel:model];
+        
+        displayCell.pickedItemImageView.hidden = ![self.pickedAudioSet containsObject:model];
+    }
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+    QMFileModel *model = _audioArray[indexPath.row];
+    if ([self.pickedAudioSet containsObject:model]) {
+        [self.pickedAudioSet removeObject:model];
+    }else {
+        if ([self.pickedAudioSet count]>0) {
+            
+        }else {
+            [self.pickedAudioSet addObject:model];
+        }
+    }
+    
+    QMFileTableCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+    cell.pickedItemImageView.hidden = ![self.pickedAudioSet containsObject:model];
+    
+    if ([self.pickedAudioSet count]>0) {
+        _tabbarView.doneButton.selected = YES;
+    }else {
+        _tabbarView.doneButton.selected = NO;
+    }
+}
+
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedDocViewController.h

@@ -0,0 +1,13 @@
+//
+//  QMPickedDocViewController.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMPickedDocViewController : UIViewController
+
+@end

+ 148 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedDocViewController.m

@@ -0,0 +1,148 @@
+//
+//  QMPickedDocViewController.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMPickedDocViewController.h"
+
+#import "QMFileManager.h"
+#import "QMFileTabbarView.h"
+#import "QMProfileManager.h"
+#import "QMFileTableCell.h"
+#import "QMFileModel.h"
+#import "QMChatRoomViewController.h"
+
+@interface QMPickedDocViewController ()<UITableViewDelegate, UITableViewDataSource> {
+    UITableView *_tableView;
+    QMFileTabbarView *_tabbarView;
+    
+    NSArray *_docArray;
+    CGFloat _navHeight;
+}
+
+@property (nonatomic, strong) NSMutableSet *pickedDocSet;
+
+@end
+
+@implementation QMPickedDocViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    CGRect StatusRect = [[UIApplication sharedApplication] statusBarFrame];
+    CGRect NavRect = self.navigationController.navigationBar.frame;
+    _navHeight = StatusRect.size.height + NavRect.size.height;
+
+    self.view.backgroundColor = [UIColor whiteColor];
+    
+    self.pickedDocSet = [[NSMutableSet alloc] initWithCapacity:10];
+    
+    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, RQ_SCREEN_WIDTH, RQ_SCREEN_HEIGHT-_navHeight-44) style:UITableViewStylePlain];
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
+    _tableView.backgroundColor = [UIColor whiteColor];
+    _tableView.delegate = self;
+    _tableView.dataSource = self;
+    [self.view addSubview:_tableView];
+    
+    _tabbarView = [[QMFileTabbarView alloc] init];
+    _tabbarView.frame = CGRectMake(0, RQ_SCREEN_HEIGHT-44-_navHeight, RQ_SCREEN_WIDTH, 44);
+    [self.view addSubview:_tabbarView];
+    
+    [_tableView registerClass:[QMFileTableCell class] forCellReuseIdentifier:NSStringFromClass(QMFileTableCell.self)];
+    
+    __weak  QMPickedDocViewController *strongSelf = self;
+    _tabbarView.selectAction = ^{
+        QMChatRoomViewController * tagViewController = nil;
+        for (UIViewController *viewController in strongSelf.navigationController.viewControllers) {
+            if ([viewController isKindOfClass:[QMChatRoomViewController class]]) {
+                tagViewController = (QMChatRoomViewController *)viewController;
+                [strongSelf.navigationController popToViewController:tagViewController animated:true];
+                
+                for (QMFileModel *model in strongSelf.pickedDocSet) {
+                    
+                    [tagViewController sendFileMessageWithName:model.fileName AndSize:model.fileSize AndPath:model.fileName];
+                }
+            }
+        }
+    };
+    
+    [self getData];
+}
+
+- (void)dealloc {
+    
+}
+
+- (void)getData {
+    QMProfileManager * manager = [QMProfileManager sharedInstance];
+    _docArray = [manager getFilesAttributes:DOCX];
+    if (_docArray.count == 0) {
+        
+    }
+    [_tableView reloadData];
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 80;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return _docArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    QMFileTableCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(QMFileTableCell.self) forIndexPath:indexPath];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+    QMFileModel *model = _docArray[indexPath.row];
+    if ([cell isKindOfClass:[QMFileTableCell class]]) {
+        QMFileTableCell *displayCell = (QMFileTableCell *)cell;
+        [displayCell configureWithModel:model];
+        
+        displayCell.pickedItemImageView.hidden = ![self.pickedDocSet containsObject:model];
+    }
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+    QMFileModel *model = _docArray[indexPath.row];
+    if ([self.pickedDocSet containsObject:model]) {
+        [self.pickedDocSet removeObject:model];
+    }else {
+        if ([self.pickedDocSet count]>0) {
+            
+        }else {
+            [self.pickedDocSet addObject:model];
+        }
+    }
+    
+    QMFileTableCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+    cell.pickedItemImageView.hidden = ![self.pickedDocSet containsObject:model];
+    
+    if ([self.pickedDocSet count]>0) {
+        _tabbarView.doneButton.selected = YES;
+    }else {
+        _tabbarView.doneButton.selected = NO;
+    }
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedOtherViewController.h

@@ -0,0 +1,13 @@
+//
+//  QMPickedOtherViewController.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMPickedOtherViewController : UIViewController
+
+@end

+ 144 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedOtherViewController.m

@@ -0,0 +1,144 @@
+//
+//  QMPickedOtherViewController.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMPickedOtherViewController.h"
+
+#import "QMFileManager.h"
+#import "QMFileTabbarView.h"
+#import "QMProfileManager.h"
+#import "QMFileTableCell.h"
+#import "QMFileModel.h"
+#import "QMChatRoomViewController.h"
+
+@interface QMPickedOtherViewController ()<UITableViewDelegate, UITableViewDataSource> {
+    UITableView *_tableView;
+    QMFileTabbarView *_tabbarView;
+    
+    NSArray *_otherArray;
+    CGFloat _navHeight;
+}
+
+@property (nonatomic, strong) NSMutableSet *pickedOtherSet;
+
+@end
+
+@implementation QMPickedOtherViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    CGRect StatusRect = [[UIApplication sharedApplication] statusBarFrame];
+    CGRect NavRect = self.navigationController.navigationBar.frame;
+    _navHeight = StatusRect.size.height + NavRect.size.height;
+
+    self.view.backgroundColor = [UIColor whiteColor];
+    
+    self.pickedOtherSet = [[NSMutableSet alloc] initWithCapacity:10];
+    
+    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, RQ_SCREEN_WIDTH, RQ_SCREEN_HEIGHT-_navHeight-44) style:UITableViewStylePlain];
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
+    _tableView.backgroundColor = [UIColor whiteColor];
+    _tableView.delegate = self;
+    _tableView.dataSource = self;
+    [self.view addSubview:_tableView];
+    
+    _tabbarView = [[QMFileTabbarView alloc] init];
+    _tabbarView.frame = CGRectMake(0, RQ_SCREEN_HEIGHT-44-_navHeight, RQ_SCREEN_WIDTH, 44);
+    [self.view addSubview:_tabbarView];
+    
+    [_tableView registerClass:[QMFileTableCell class] forCellReuseIdentifier:NSStringFromClass(QMFileTableCell.self)];
+    
+    __weak QMPickedOtherViewController *strongSelf = self;
+    _tabbarView.selectAction = ^{
+        QMChatRoomViewController * tagViewController = nil;
+        for (UIViewController *viewController in strongSelf.navigationController.viewControllers) {
+            if ([viewController isKindOfClass:[QMChatRoomViewController class]]) {
+                tagViewController = (QMChatRoomViewController *)viewController;
+                [strongSelf.navigationController popToViewController:tagViewController animated:true];
+                for (QMFileModel *model in strongSelf.pickedOtherSet) {
+                    [tagViewController sendFileMessageWithName:model.fileName AndSize:model.fileSize AndPath:model.fileName];
+                }
+            }
+        }
+    };
+    
+    [self getData];
+}
+
+- (void)dealloc {
+    
+}
+
+- (void)getData {
+    QMProfileManager * manager = [QMProfileManager sharedInstance];
+    _otherArray = [manager getFilesAttributes:OTHER];
+    [_tableView reloadData];
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 80;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return _otherArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    QMFileTableCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(QMFileTableCell.self) forIndexPath:indexPath];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+    QMFileModel *model = _otherArray[indexPath.row];
+    if ([cell isKindOfClass:[QMFileTableCell class]]) {
+        QMFileTableCell *displayCell = (QMFileTableCell *)cell;
+        [displayCell configureWithModel:model];
+        
+        displayCell.pickedItemImageView.hidden = ![self.pickedOtherSet containsObject:model];
+    }
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+    QMFileModel *model = _otherArray[indexPath.row];
+    if ([self.pickedOtherSet containsObject:model]) {
+        [self.pickedOtherSet removeObject:model];
+    }else {
+        if ([self.pickedOtherSet count]>0) {
+            
+        }else {
+            [self.pickedOtherSet addObject:model];
+        }
+    }
+    
+    QMFileTableCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+    cell.pickedItemImageView.hidden = ![self.pickedOtherSet containsObject:model];
+    
+    if ([self.pickedOtherSet count]>0) {
+        _tabbarView.doneButton.selected = YES;
+    }else {
+        _tabbarView.doneButton.selected = NO;
+    }
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+
+@end

+ 17 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedPhotoViewController.h

@@ -0,0 +1,17 @@
+//
+//  QMPickedPhotoViewController.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^CallBackBlock)(NSString *name, NSString * size, NSString * path);
+
+@interface QMPickedPhotoViewController : UIViewController
+
+@property (nonatomic, strong)CallBackBlock callBackBlock;
+
+@end

+ 150 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedPhotoViewController.m

@@ -0,0 +1,150 @@
+//
+//  QMPickedPhotoViewController.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/11.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMPickedPhotoViewController.h"
+
+#import "QMFileCollectionCell.h"
+#import <Photos/Photos.h>
+#import "QMFileTabbarView.h"
+#import "QMChatRoomViewController.h"
+
+@interface QMPickedPhotoViewController ()<UICollectionViewDelegate, UICollectionViewDataSource> {
+    UICollectionView *_collectionView;
+    PHFetchResult *_photoAssets;
+    PHCachingImageManager *_cacheManager;
+    
+    QMFileTabbarView *_tabbarView;
+    CGFloat _navHeight;
+}
+
+@property (nonatomic, strong) NSMutableSet *pickedImageSet;
+
+@end
+
+@implementation QMPickedPhotoViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    CGRect StatusRect = [[UIApplication sharedApplication] statusBarFrame];
+    CGRect NavRect = self.navigationController.navigationBar.frame;
+    _navHeight = StatusRect.size.height + NavRect.size.height;
+
+    _cacheManager = [[PHCachingImageManager alloc] init];
+    self.pickedImageSet = [[NSMutableSet alloc] init];
+    
+    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
+    layout.itemSize = CGSizeMake((RQ_SCREEN_WIDTH-6)/3, (RQ_SCREEN_WIDTH-6)/3);
+    layout.scrollDirection = UICollectionViewScrollDirectionVertical;
+    layout.sectionInset = UIEdgeInsetsMake(0, 1, 0, 1);
+    layout.minimumLineSpacing = 2.0;
+    layout.minimumInteritemSpacing = 1.0;
+    layout.headerReferenceSize = CGSizeMake(0, 0);
+
+    _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, RQ_SCREEN_WIDTH, RQ_SCREEN_HEIGHT-_navHeight-44) collectionViewLayout:layout];
+    _collectionView.backgroundColor = [UIColor whiteColor];
+    _collectionView.delegate = self;
+    _collectionView.dataSource = self;
+    [self.view addSubview:_collectionView];
+    [_collectionView registerClass:[QMFileCollectionCell self] forCellWithReuseIdentifier:NSStringFromClass(QMFileCollectionCell.self)];
+
+    _tabbarView = [[QMFileTabbarView alloc] init];
+    _tabbarView.frame = CGRectMake(0, RQ_SCREEN_HEIGHT-44-_navHeight, RQ_SCREEN_WIDTH, 44);
+    [self.view addSubview:_tabbarView];
+    
+    __weak QMPickedPhotoViewController *strongSelf = self;
+    _tabbarView.selectAction = ^{
+        QMChatRoomViewController * tagViewController = nil;
+        for (UIViewController *viewController in strongSelf.navigationController.viewControllers) {
+            if ([viewController isKindOfClass:[QMChatRoomViewController class]]) {
+                tagViewController = (QMChatRoomViewController *)viewController;
+                [strongSelf.navigationController popToViewController:tagViewController animated:true];
+                
+                for (PHAsset *asset in strongSelf.pickedImageSet) {
+                    
+                    [[PHImageManager defaultManager] requestImageDataForAsset:asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
+                        NSString *photoPath = [[info objectForKey:@"PHImageFileURLKey"] absoluteString];
+                        NSArray *array = [photoPath componentsSeparatedByString:@"/"];
+                        
+                        NSString *fileSize = [imageData length]<1024*1024 ? [NSString stringWithFormat:@"%d KB", (int)([imageData length]/1024.0)] : [NSString stringWithFormat:@"%d MB", (int)([imageData length]/1024.0/1024)];
+                        
+                        NSString * filePath = [NSString stringWithFormat:@"%@/%@", NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0], array.lastObject];
+                        // 写入sendVideo文件夹
+                        [imageData writeToFile:filePath atomically:YES];
+                        
+                        [tagViewController sendFileMessageWithName:array.lastObject AndSize:fileSize AndPath:array.lastObject];
+                    }];
+                }
+            }
+        }        
+    };
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        PHFetchOptions *options = [[PHFetchOptions alloc] init];
+        options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:YES]];
+        
+        _photoAssets = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeImage options:options];
+        [_collectionView reloadData];
+    });
+}
+
+- (void)dealloc {
+    
+}
+
+#pragma mark - CollectionViewDelegate CollectionViewDataSource
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+    return _photoAssets ? _photoAssets.count : 0;
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
+    QMFileCollectionCell * cell = (QMFileCollectionCell *)[collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(QMFileCollectionCell.self) forIndexPath:indexPath];
+    return cell;
+}
+
+- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
+    
+    if ([cell isKindOfClass:[QMFileCollectionCell class]]) {
+        QMFileCollectionCell *displayCell = (QMFileCollectionCell *)cell;
+        displayCell.imageManager = _cacheManager;
+        if (_photoAssets) {
+            PHAsset * asset = _photoAssets[indexPath.item];
+            displayCell.imageAsset = asset;
+            displayCell.pickedItemImageView.hidden = ![self.pickedImageSet containsObject:asset];
+        }
+    }
+}
+
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
+    if (_photoAssets) {
+        PHAsset *asset = _photoAssets[indexPath.item];
+        if ([self.pickedImageSet containsObject:asset]) {
+            [self.pickedImageSet removeObject:asset];
+        }else {
+            if (self.pickedImageSet.count>0) {
+                return;
+            }
+            [self.pickedImageSet addObject:asset];
+        }
+        
+        QMFileCollectionCell * cell = (QMFileCollectionCell *)[collectionView cellForItemAtIndexPath:indexPath];
+        cell.pickedItemImageView.hidden = ![self.pickedImageSet containsObject:asset];
+    }
+    
+    if (self.pickedImageSet.count>0) {
+        _tabbarView.doneButton.selected = YES;
+    }else {
+        _tabbarView.doneButton.selected = NO;
+    }
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedVideoViewController.h

@@ -0,0 +1,13 @@
+//
+//  QMPickedVideoViewController.h
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMPickedVideoViewController : UIViewController
+
+@end

+ 296 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/FileManager/ViewController/QMPickedVideoViewController.m

@@ -0,0 +1,296 @@
+//
+//  QMPickedVideoViewController.m
+//  IMSDK-OC
+//
+//  Created by HCF on 16/8/10.
+//  Copyright © 2016年 HCF. All rights reserved.
+//
+
+#import "QMPickedVideoViewController.h"
+
+#import <Photos/Photos.h>
+#import "QMVideoTableCell.h"
+#import "QMFileTabbarView.h"
+#import "QMChatRoomViewController.h"
+
+@interface QMPickedVideoViewController () <UITableViewDelegate, UITableViewDataSource> {
+    UITableView *_tableView;
+    PHFetchResult *_photoAssets;
+    PHCachingImageManager *_cacheManager;
+    
+    QMFileTabbarView *_tabbarView;
+    CGFloat _navHeight;
+}
+
+@property (nonatomic, strong) NSMutableSet *pickedImageSet;
+
+@end
+
+@implementation QMPickedVideoViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    CGRect StatusRect = [[UIApplication sharedApplication] statusBarFrame];
+    CGRect NavRect = self.navigationController.navigationBar.frame;
+    _navHeight = StatusRect.size.height + NavRect.size.height;
+
+    self.view.backgroundColor = [UIColor whiteColor];
+    _cacheManager = [[PHCachingImageManager alloc] init];
+    self.pickedImageSet = [[NSMutableSet alloc] init];
+
+    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, RQ_SCREEN_WIDTH, RQ_SCREEN_HEIGHT-_navHeight-44) style:UITableViewStylePlain];
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
+    _tableView.backgroundColor = [UIColor whiteColor];
+    _tableView.delegate = self;
+    _tableView.dataSource = self;
+    [self.view addSubview:_tableView];
+    
+    [_tableView registerClass:[QMVideoTableCell class] forCellReuseIdentifier:NSStringFromClass(QMVideoTableCell.self)];
+    
+    _tabbarView = [[QMFileTabbarView alloc] init];
+    _tabbarView.frame = CGRectMake(0, RQ_SCREEN_HEIGHT-44-_navHeight, RQ_SCREEN_WIDTH, 44);
+    [self.view addSubview:_tabbarView];
+    
+    __weak QMPickedVideoViewController *strongSelf = self;
+    _tabbarView.selectAction = ^{
+        QMChatRoomViewController * tagViewController = nil;
+        for (UIViewController *viewController in strongSelf.navigationController.viewControllers) {
+            if ([viewController isKindOfClass:[QMChatRoomViewController class]]) {
+                tagViewController = (QMChatRoomViewController *)viewController;
+                [strongSelf.navigationController popToViewController:tagViewController animated:true];
+                
+                for (PHAsset *asset in strongSelf.pickedImageSet) {
+                    PHVideoRequestOptions* options = [[PHVideoRequestOptions alloc] init];
+                    options.version = PHVideoRequestOptionsVersionOriginal;
+                    options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic;
+                    options.networkAccessAllowed = YES;
+                    [[PHImageManager defaultManager] requestAVAssetForVideo:asset options:options resultHandler:^(AVAsset* avasset, AVAudioMix* audioMix, NSDictionary* info){
+
+                        NSURL *videoURL = [(AVURLAsset *)avasset URL];
+                        
+                        // name
+                        NSString *photoPath = videoURL.absoluteString;
+                        NSArray *array = [photoPath componentsSeparatedByString:@"/"];
+
+                        AVURLAsset *videoAsset = (AVURLAsset*)avasset;
+                        [strongSelf startExportVideoWithVideoAsset:videoAsset name: array.lastObject completion:^(NSString *outputPath) {
+                            
+                            if (!outputPath) {
+                                NSData *videoData = [NSData dataWithContentsOfURL:videoURL];
+                                [videoData writeToFile:outputPath atomically:YES];
+                            }
+                            
+                            NSNumber *fileSizeValue = nil;
+                            [[NSURL fileURLWithPath:outputPath] getResourceValue:&fileSizeValue forKey:NSURLFileSizeKey error:nil];
+                            
+                            NSString *fileSize = fileSizeValue.intValue > 1024 ? [NSString stringWithFormat:@"%.f MB", (float)fileSizeValue.intValue/1024/1024] : [NSString stringWithFormat:@"%.f KB", (float)fileSizeValue.intValue/1024];
+
+                            [tagViewController sendFileMessageWithName:array.lastObject AndSize:fileSize AndPath:array.lastObject];
+                        }];
+                    }];
+                }
+            }
+        }
+    };
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        PHFetchOptions *options = [[PHFetchOptions alloc] init];
+        options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:YES]];
+        _photoAssets = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeVideo options:options];
+        [_tableView reloadData];
+    });
+}
+
+- (void)startExportVideoWithVideoAsset:(AVURLAsset *)videoAsset name:(NSString *)name completion:(void (^)(NSString *outputPath))completion {
+    // Find compatible presets by video asset.
+//    NSLog(@"%@", videoAsset);
+    
+    NSArray *presets = [AVAssetExportSession exportPresetsCompatibleWithAsset:videoAsset];
+    
+    if ([presets containsObject:AVAssetExportPreset640x480]) {
+        AVAssetExportSession *session = [[AVAssetExportSession alloc]initWithAsset:videoAsset presetName:AVAssetExportPreset640x480];
+        NSString * outputPath = [NSString stringWithFormat:@"%@/%@", NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0], name];
+        
+        session.outputURL = [NSURL fileURLWithPath:outputPath];
+        
+        session.shouldOptimizeForNetworkUse = true;
+        
+        NSArray *supportedTypeArray = session.supportedFileTypes;
+        if ([supportedTypeArray containsObject:AVFileTypeMPEG4]) {
+            session.outputFileType = AVFileTypeMPEG4;
+        } else if (supportedTypeArray.count == 0) {
+            return;
+        } else {
+            session.outputFileType = [supportedTypeArray objectAtIndex:0];
+        }
+        
+        if (![[NSFileManager defaultManager] fileExistsAtPath:[NSHomeDirectory() stringByAppendingFormat:@"/tmp"]]) {
+            [[NSFileManager defaultManager] createDirectoryAtPath:[NSHomeDirectory() stringByAppendingFormat:@"/tmp"] withIntermediateDirectories:YES attributes:nil error:nil];
+        }
+        
+        AVMutableVideoComposition *videoComposition = [self fixedCompositionWithAsset:videoAsset];
+        if (videoComposition.renderSize.width) {
+            // 修正视频转向
+            session.videoComposition = videoComposition;
+        }
+        
+        // Begin to export video to the output path asynchronously.
+        [session exportAsynchronouslyWithCompletionHandler:^(void) {
+            switch (session.status) {
+                case AVAssetExportSessionStatusCompleted: {
+                    dispatch_async(dispatch_get_main_queue(), ^{
+                        if (completion) {
+                            completion(outputPath);
+                        }
+                    });
+                }  break;
+                default: {
+                    if ([[NSFileManager defaultManager] fileExistsAtPath:outputPath]) {
+                        if (completion) {
+                            completion(outputPath);
+                        }
+                    }else {
+                        completion(nil);
+                    }
+                }
+                break;
+            }
+        }];
+    }
+}
+
+/// 获取优化后的视频转向信息
+- (AVMutableVideoComposition *)fixedCompositionWithAsset:(AVAsset *)videoAsset {
+    AVMutableVideoComposition *videoComposition = [AVMutableVideoComposition videoComposition];
+    // 视频转向
+    int degrees = [self degressFromVideoFileWithAsset:videoAsset];
+    if (degrees != 0) {
+        CGAffineTransform translateToCenter;
+        CGAffineTransform mixedTransform;
+        videoComposition.frameDuration = CMTimeMake(1, 30);
+        
+        NSArray *tracks = [videoAsset tracksWithMediaType:AVMediaTypeVideo];
+        AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
+        
+        AVMutableVideoCompositionInstruction *roateInstruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction];
+        roateInstruction.timeRange = CMTimeRangeMake(kCMTimeZero, [videoAsset duration]);
+        AVMutableVideoCompositionLayerInstruction *roateLayerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack];
+        
+        if (degrees == 90) {
+            // 顺时针旋转90°
+            translateToCenter = CGAffineTransformMakeTranslation(videoTrack.naturalSize.height, 0.0);
+            mixedTransform = CGAffineTransformRotate(translateToCenter,M_PI_2);
+            videoComposition.renderSize = CGSizeMake(videoTrack.naturalSize.height,videoTrack.naturalSize.width);
+            [roateLayerInstruction setTransform:mixedTransform atTime:kCMTimeZero];
+        } else if(degrees == 180){
+            // 顺时针旋转180°
+            translateToCenter = CGAffineTransformMakeTranslation(videoTrack.naturalSize.width, videoTrack.naturalSize.height);
+            mixedTransform = CGAffineTransformRotate(translateToCenter,M_PI);
+            videoComposition.renderSize = CGSizeMake(videoTrack.naturalSize.width,videoTrack.naturalSize.height);
+            [roateLayerInstruction setTransform:mixedTransform atTime:kCMTimeZero];
+        } else if(degrees == 270){
+            // 顺时针旋转270°
+            translateToCenter = CGAffineTransformMakeTranslation(0.0, videoTrack.naturalSize.width);
+            mixedTransform = CGAffineTransformRotate(translateToCenter,M_PI_2*3.0);
+            videoComposition.renderSize = CGSizeMake(videoTrack.naturalSize.height,videoTrack.naturalSize.width);
+            [roateLayerInstruction setTransform:mixedTransform atTime:kCMTimeZero];
+        }
+        
+        roateInstruction.layerInstructions = @[roateLayerInstruction];
+        // 加入视频方向信息
+        videoComposition.instructions = @[roateInstruction];
+    }
+    return videoComposition;
+}
+
+/// 获取视频角度
+- (int)degressFromVideoFileWithAsset:(AVAsset *)asset {
+    int degress = 0;
+    NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];
+    if([tracks count] > 0) {
+        AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
+        CGAffineTransform t = videoTrack.preferredTransform;
+        if(t.a == 0 && t.b == 1.0 && t.c == -1.0 && t.d == 0){
+            // Portrait
+            degress = 90;
+        } else if(t.a == 0 && t.b == -1.0 && t.c == 1.0 && t.d == 0){
+            // PortraitUpsideDown
+            degress = 270;
+        } else if(t.a == 1.0 && t.b == 0 && t.c == 0 && t.d == 1.0){
+            // LandscapeRight
+            degress = 0;
+        } else if(t.a == -1.0 && t.b == 0 && t.c == 0 && t.d == -1.0){
+            // LandscapeLeft
+            degress = 180;
+        }
+    }
+    return degress;
+}
+
+- (void)dealloc {
+    
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 80.0;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 0.1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return _photoAssets ? _photoAssets.count : 0;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    QMVideoTableCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(QMVideoTableCell.self) forIndexPath:indexPath];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+    if ([cell isKindOfClass:[QMVideoTableCell class]]) {
+        QMVideoTableCell * displayCell = (QMVideoTableCell *)cell;
+        displayCell.imageManager = _cacheManager;
+        if (_photoAssets) {
+            PHAsset *asset = _photoAssets[indexPath.row];
+            displayCell.imageAsset = asset;
+            displayCell.pickedItemImageView.hidden = ![self.pickedImageSet containsObject:asset];
+        }
+    }
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [tableView deselectRowAtIndexPath:indexPath animated:NO];
+    if (_photoAssets) {
+        PHAsset *asset = _photoAssets[indexPath.row];
+        if ([self.pickedImageSet containsObject:asset]) {
+            [self.pickedImageSet removeObject:asset];
+        }else {
+            if (self.pickedImageSet.count>0) {
+                return;
+            }
+            [self.pickedImageSet addObject:asset];
+        }
+        
+        QMVideoTableCell * cell = (QMVideoTableCell *)[tableView cellForRowAtIndexPath:indexPath];
+        cell.pickedItemImageView.hidden = ![self.pickedImageSet containsObject:asset];
+    }
+    
+    if (self.pickedImageSet.count>0) {
+        _tabbarView.doneButton.selected = YES;
+    }else {
+        _tabbarView.doneButton.selected = NO;
+    }
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+@end

+ 15 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/NSAttributedString+QMEmojiExtension.h

@@ -0,0 +1,15 @@
+//
+//  NSAttributedString+QMEmojiExtension.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/18.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSAttributedString (QMEmojiExtension)
+
+- (NSString *)getRichString;
+
+@end

+ 31 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/NSAttributedString+QMEmojiExtension.m

@@ -0,0 +1,31 @@
+//
+//  NSAttributedString+QMEmojiExtension.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/18.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "NSAttributedString+QMEmojiExtension.h"
+#import "QMTextAttachment.h"
+
+@implementation NSAttributedString (QMEmojiExtension)
+
+- (NSString *)getRichString {
+    NSMutableString *plainString = [NSMutableString stringWithString:self.string];
+    __block NSUInteger base = 0;
+    
+    [self enumerateAttribute:NSAttachmentAttributeName inRange:NSMakeRange(0, self.length)
+                     options:0
+                  usingBlock:^(id value, NSRange range, BOOL *stop) {
+                      if (value && [value isKindOfClass:[QMTextAttachment class]]) {
+                          [plainString replaceCharactersInRange:NSMakeRange(range.location + base, range.length)
+                                                     withString:((QMTextAttachment *) value).emojiCode];
+                          base += ((QMTextAttachment *) value).emojiCode.length - 1;
+                      }
+                  }];
+    
+    return plainString;
+}
+
+@end

+ 17 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAlert.h

@@ -0,0 +1,17 @@
+//
+//  QMAlert.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface QMAlert : NSObject
+
++ (UIWindow *)mainWindow;
+
++ (void)showMessage:(NSString *)message;
+
+@end

+ 67 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAlert.m

@@ -0,0 +1,67 @@
+//
+//  QMAlert.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMAlert.h"
+
+@implementation QMAlert
+
++ (UIWindow *)mainWindow {
+    UIApplication *app = [UIApplication sharedApplication];
+    if ([app.delegate respondsToSelector:@selector(window)]) {
+        return [app.delegate window];
+    }
+    else{
+        return [app keyWindow];
+    }
+}
+
++ (UIWindow *)lastWindow {
+    UIApplication *app = [UIApplication sharedApplication];
+    return app.windows.lastObject;
+}
+
++(void)showMessage:(NSString *)message{
+    UIWindow * window = [self mainWindow];
+    UIView *showview =  [[UIView alloc]init];
+    showview.backgroundColor = [UIColor blackColor];
+    showview.alpha = 0.8;
+    showview.frame = CGRectMake(1, 1, 1, 1);
+    showview.alpha = 1.0f;
+    showview.layer.cornerRadius = 5.0f;
+    showview.layer.masksToBounds = YES;
+    [window addSubview:showview];
+    
+    UILabel *label = [[UILabel alloc]init];
+    NSDictionary *attribute = @{NSFontAttributeName: [UIFont systemFontOfSize:14]};
+    CGSize LabelSize = [message boundingRectWithSize:CGSizeMake(RQ_SCREEN_WIDTH - 100, 0) options: NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attribute context:nil].size;
+    
+    label.frame = CGRectMake(10, 5, LabelSize.width, LabelSize.height);
+    label.text = message;
+    label.textColor = [UIColor whiteColor];
+    label.textAlignment = 1;
+    label.numberOfLines = 0;
+    label.backgroundColor = [UIColor clearColor];
+    label.font = [UIFont systemFontOfSize:14];
+    [showview addSubview:label];
+    showview.frame = CGRectMake((RQ_SCREEN_WIDTH - LabelSize.width - 20)/2, RQ_SCREEN_HEIGHT - label.frame.size.height - 80, LabelSize.width + 20, LabelSize.height + 10);
+    [UIView animateWithDuration:5 animations:^{
+        showview.alpha = 0;
+    } completion:^(BOOL finished) {
+        [showview removeFromSuperview];
+    }];
+}
+
+//计算文字高度
++ (CGFloat)calculateRowHeight:(NSString *)string fontSize:(NSInteger)fontSize{
+    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize]};//指定字号
+    CGRect rect = [string boundingRectWithSize:CGSizeMake([UIScreen mainScreen].bounds.size.width - 180, 0)/*计算高度要先指定宽度*/ options:NSStringDrawingUsesLineFragmentOrigin |
+                   NSStringDrawingUsesFontLeading attributes:dic context:nil];
+    return rect.size.height;
+}
+
+@end

+ 23 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioAnimation.h

@@ -0,0 +1,23 @@
+//
+//  QMAudioAnimation.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/18.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface QMAudioAnimation : NSObject
+
++ (QMAudioAnimation *)sharedInstance;
+
+- (void)setAudioAnimationPlay: (BOOL)sender and:(UIImageView *)imageView;
+
+- (void)stopAudioAnimation;
+
+- (void)startAudioAnimation: (UIImageView *)imageView;
+
+- (void)stopAudioAnimation: (UIImageView *)imageView;
+
+@end

+ 68 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioAnimation.m

@@ -0,0 +1,68 @@
+//
+//  QMAudioAnimation.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/18.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMAudioAnimation.h"
+
+@interface QMAudioAnimation() {
+    UIImageView *_animationView;
+}
+
+@end
+
+@implementation QMAudioAnimation
+
+static QMAudioAnimation * instance = nil;
+
++ (QMAudioAnimation *)sharedInstance {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [[self alloc] init];
+    });
+    return instance;
+}
+
++ (id)allocWithZone:(struct _NSZone *)zone {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [super allocWithZone:zone];
+    });
+    return instance;
+}
+
+- (void)setAudioAnimationPlay:(BOOL)sender and:(UIImageView *)imageView {
+    NSArray *images;
+    if (sender) {
+        images = [NSArray arrayWithObjects:[UIImage imageNamed:@"SenderVoiceNodePlaying001"],[UIImage imageNamed:@"SenderVoiceNodePlaying002"],[UIImage imageNamed:@"SenderVoiceNodePlaying003"], nil];
+        imageView.image = [UIImage imageNamed:@"SenderVoiceNodePlaying"];
+    }else {
+        images = [NSArray arrayWithObjects:[UIImage imageNamed:@"ReceiverVoiceNodePlaying001"],[UIImage imageNamed:@"ReceiverVoiceNodePlaying002"],[UIImage imageNamed:@"ReceiverVoiceNodePlaying003"], nil];
+        imageView.image = [UIImage imageNamed:@"ReceiverVoiceNodePlaying"];
+    }
+    imageView.animationImages = images;
+}
+
+- (void)stopAudioAnimation {
+    if (_animationView) {
+        [_animationView stopAnimating];
+    }
+}
+
+- (void)startAudioAnimation:(UIImageView *)imageView {
+    _animationView = imageView;
+    imageView.isAnimating ? [imageView stopAnimating] : [imageView startAnimating];
+}
+
+- (void)stopAudioAnimation:(UIImageView *)imageView {
+    if (imageView) {
+        [imageView stopAnimating];
+    }else {
+        [_animationView stopAnimating];
+    }
+}
+
+@end

+ 27 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioPlayer.h

@@ -0,0 +1,27 @@
+//
+//  QMAudioPlayer.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/8/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <AVFoundation/AVFoundation.h>
+
+@interface QMAudioPlayer : NSObject
+
+@property (nonatomic, strong)AVAudioPlayer *player;
+
+@property (nonatomic, copy) NSString *fileName;
+
++ (QMAudioPlayer *)sharedInstance;
+
+//- (void)startAudioPlayer:(CustomMessage *)message withDelegate:(id)audioPlayerDelegate;
+- (void)startAudioPlayer:(NSString *)fileName withDelegate:(id)audioPlayerDelegate;
+
+- (void)stopAudioPlayer;
+
+- (BOOL)isPlaying:(NSString *)fileName;
+
+@end

+ 76 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioPlayer.m

@@ -0,0 +1,76 @@
+//
+//  QMAudioPlayer.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/8/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMAudioPlayer.h"
+#import "QMAudioAnimation.h"
+
+@implementation QMAudioPlayer
+
+static QMAudioPlayer * instance = nil;
+
++ (QMAudioPlayer *)sharedInstance {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [[self alloc] init];
+    });
+    return instance;
+}
+
++ (id)allocWithZone:(struct _NSZone *)zone {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [super allocWithZone:zone];
+    });
+    return instance;
+}
+
+- (void)startAudioPlayer:(NSString *)fileName withDelegate:(id)audioPlayerDelegate {
+    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
+    [[AVAudioSession sharedInstance] setActive:YES error:nil];
+    
+    NSString *playUrl = [NSString stringWithFormat:@"%@/%@/%@",NSHomeDirectory(),@"Documents",fileName];
+    
+    NSURL *fileURL = [NSURL URLWithString:playUrl];
+    
+    if (self.player) {
+        if (self.player.isPlaying == YES && [self.fileName isEqualToString:fileName]) {
+            [[QMAudioAnimation sharedInstance] stopAudioAnimation];
+            [self.player stop];
+            return;
+        }
+    }
+    
+    self.fileName = fileName;
+    
+    NSError *playError = nil;
+    AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:&playError];
+    audioPlayer.delegate = audioPlayerDelegate;
+    [audioPlayer prepareToPlay];
+    self.player = audioPlayer;
+    if (playError == nil) {
+        [self.player play];
+    }else {
+        
+    }
+}
+
+- (void)stopAudioPlayer {
+    if (self.player) {
+        [self.player stop];
+        self.player = nil;
+    }
+}
+
+- (BOOL)isPlaying:(NSString *)fileName {
+    if (self.player && [self.fileName isEqualToString:fileName]) {
+        return self.player.isPlaying;
+    }else {
+        return NO;
+    }
+}
+@end

+ 36 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioRecorder.h

@@ -0,0 +1,36 @@
+//
+//  QMAudioRecorder.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/8/10.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <AVFoundation/AVFoundation.h>
+
+@protocol QMAudioRecorderDelegate <NSObject>
+
+- (void)audioRecorderStart;
+
+- (void)audioRecorderCompletion:(NSString *)fileName duration:(NSString *)duration;
+
+- (void)audioRecorderCancel;
+
+- (void)audioRecorderFail;
+
+- (void)audioRecorderChangeInTimer:(NSTimeInterval)power total:(int)count;
+
+@end
+
+@interface QMAudioRecorder : NSObject
+
++ (QMAudioRecorder *)sharedInstance;
+
+- (void)startAudioRecord:(NSString *)fileName maxDuration:(NSTimeInterval)duration delegate:(id<QMAudioRecorderDelegate>)delegate;
+
+- (void)stopAudioRecord;
+
+- (void)cancelAudioRecord;
+
+@end

+ 187 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMAudioRecorder.m

@@ -0,0 +1,187 @@
+//
+//  QMAudioRecorder.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/8/10.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMAudioRecorder.h"
+
+@interface QMAudioRecorder()<AVAudioRecorderDelegate>
+
+@property (nonatomic, strong) AVAudioRecorder *audioRecorder;
+
+@property (nonatomic, copy) NSString *recordFileName;
+
+@property (nonatomic, copy) NSString *recordFilePath;
+
+@property (nonatomic, assign) NSTimeInterval recordDuration;
+
+@property (nonatomic, assign) NSTimeInterval maxDuration;
+
+@property (nonatomic, strong) NSDictionary *recordSet;
+
+@property (nonatomic, weak) id<QMAudioRecorderDelegate> delegate;
+
+@property (nonatomic, strong) NSTimer *timer;
+
+@property (nonatomic, assign) BOOL isRecording;
+
+@property (nonatomic, assign) BOOL isCancel;
+
+@end
+
+@implementation QMAudioRecorder
+
+static QMAudioRecorder * instance = nil;
+
++ (QMAudioRecorder *)sharedInstance {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [[self alloc] init];
+    });
+    return instance;
+}
+
++ (id)allocWithZone:(struct _NSZone *)zone {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [super allocWithZone:zone];
+    });
+    return instance;
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (self) {
+        NSDictionary * recordSettings = @{
+                                          AVFormatIDKey           : [NSNumber numberWithUnsignedInt:kAudioFormatLinearPCM],
+                                          AVSampleRateKey         : [NSNumber numberWithFloat:8000],
+                                          AVLinearPCMBitDepthKey  : [NSNumber numberWithInt:16],
+                                          AVNumberOfChannelsKey   : [NSNumber numberWithInt:2]
+                                          };
+        self.recordSet = recordSettings;
+    }
+    return self;
+}
+
+- (void)startAudioRecord:(NSString *)fileName maxDuration:(NSTimeInterval)duration delegate:(id<QMAudioRecorderDelegate>)delegate {
+    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
+    [[AVAudioSession sharedInstance] setActive:YES error:nil];
+    
+    self.isCancel = false;
+    self.delegate = delegate;
+    self.recordDuration = 0.0;
+    if ([fileName isEqualToString:@""]) {
+        [self.delegate audioRecorderCancel];
+        return;
+    }
+    
+    self.maxDuration = duration;
+    self.recordFileName = fileName;
+    self.recordFilePath = [NSString stringWithFormat:@"%@/%@/%@",NSHomeDirectory(),@"Documents",fileName];
+    
+    if (![NSURL URLWithString:self.recordFilePath]) {
+        return;
+    }
+    
+    NSError *error = nil;
+    self.audioRecorder = [[AVAudioRecorder alloc] initWithURL:[NSURL URLWithString:self.recordFilePath] settings:self.recordSet error:&error];
+    self.audioRecorder.delegate = self;
+    if (error) {
+        [self.delegate audioRecorderCancel];
+        return;
+    }
+    [self.audioRecorder setMeteringEnabled:YES];
+    [self.audioRecorder prepareToRecord];
+    [self createTimer];
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        if ([self.audioRecorder recordForDuration:duration]) {
+            [self.delegate audioRecorderStart];
+        }else {
+            [self cancelAudioRecord];
+            return;
+        }
+    });
+}
+
+- (void)stopAudioRecord {
+    self.isCancel = false;
+    if (self.audioRecorder) {
+        [self.audioRecorder stop];
+    }
+    [self removeTimer];
+}
+
+- (void)cancelAudioRecord {
+    self.isCancel = true;
+    if (self.audioRecorder) {
+        [self.audioRecorder stop];
+        [self.audioRecorder deleteRecording];
+    }
+    [self removeTimer];
+    if (self.delegate) {
+        [self.delegate audioRecorderCancel];
+    }
+}
+
+- (void)createTimer {
+    [self removeTimer];
+    self.timer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(timerAction:) userInfo:nil repeats:YES];
+    [[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
+}
+
+- (void)timerAction:(NSTimer *)timer { 
+    if (self.delegate && self.audioRecorder) {
+        if (self.recordDuration > 50) {
+            if (self.audioRecorder.currentTime != 0) {
+                self.recordDuration = self.audioRecorder.currentTime;
+            }
+        }else {
+            self.recordDuration = self.audioRecorder.currentTime;
+        }
+        [self.delegate audioRecorderChangeInTimer:[self peakPower] total:[self totalTime]];
+    }
+}
+
+- (void)removeTimer {
+    if (self.timer) {
+        [self.timer invalidate];
+        self.timer = nil;
+    }
+}
+
+- (float)peakPower {
+    [self.audioRecorder updateMeters];
+    return self.audioRecorder ? [self.audioRecorder peakPowerForChannel:0] : 0;
+}
+
+- (int)totalTime {
+    return (int)(self.recordDuration*10)%10 > 6 ? (int)self.recordDuration + 1 : (int)self.recordDuration;
+}
+
+// MARK: - 代理方法
+- (void)audioRecorderEncodeErrorDidOccur:(AVAudioRecorder *)recorder error:(NSError *)error {
+    
+}
+
+- (void)audioRecorderDidFinishRecording:(AVAudioRecorder *)recorder successfully:(BOOL)flag {
+    if (self.isCancel) {
+        NSString *filePath = [NSString stringWithFormat:@"%@/%@/%@",NSHomeDirectory(),@"Documents",self.recordFileName];
+        NSFileManager *fileManger = [NSFileManager defaultManager];
+        if ([fileManger fileExistsAtPath:filePath]) {
+            [fileManger removeItemAtPath:filePath error:nil];
+        }
+        return;
+    }
+    
+    if (self.recordDuration >= 1) {
+        [self.delegate audioRecorderCompletion:self.recordFileName duration:[NSString stringWithFormat:@"%d", [self totalTime]]];
+        [self removeTimer];
+    }else {
+        [self.delegate audioRecorderFail];
+    }
+}
+
+@end

+ 15 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMDateManager.h

@@ -0,0 +1,15 @@
+//
+//  QMDateManager.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface QMDateManager : NSObject
+
++ (NSString *)showChatTime:(NSString *)timeT;
+
+@end

+ 41 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMDateManager.m

@@ -0,0 +1,41 @@
+//
+//  QMDateManager.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMDateManager.h"
+
+@implementation QMDateManager
+
++ (NSString *)showChatTime:(NSString *)timeT {
+    NSString * str = @"";
+    UInt64 msgTime = timeT.longLongValue;
+    UInt64 recordTime = [[NSDate date] timeIntervalSince1970]*1000;
+    UInt64 dxTime = recordTime - msgTime;
+    if (dxTime<60*1000) {
+        //几秒前
+        str = [NSString stringWithFormat:@"%llu 秒前",dxTime/1000];
+    }else if (60*1000<dxTime && dxTime<60*60*1000) {
+        //几分钟前
+        str = [NSString stringWithFormat:@"%llu 分钟前",dxTime/(60*1000)];
+    }else if (dxTime > 60*60*1000) {
+        NSString * string = [NSString stringWithFormat:@"%@",timeT];
+        NSDate * date = [NSDate dateWithTimeIntervalSince1970:string.doubleValue/1000];
+        NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
+        formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
+        [formatter setDateFormat:@"YYYY-MM-dd HH:mm"];
+        formatter.formatterBehavior = NSDateFormatterBehaviorDefault;
+        formatter.timeZone= [NSTimeZone timeZoneWithAbbreviation:@"UTC"];
+        NSTimeZone * zone = [NSTimeZone systemTimeZone];
+        NSInteger inv = [zone secondsFromGMTForDate:date];
+        NSTimeInterval  timeInv = inv;
+        NSDate * newDate = [date dateByAddingTimeInterval:timeInv];
+        str = [formatter stringFromDate:newDate];
+    }
+    return str;
+}
+
+@end

+ 17 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMManager.h

@@ -0,0 +1,17 @@
+//
+//  QMManager.h
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/5/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface QMManager : NSObject
+
+@property (nonatomic, assign) BOOL selectedPush;
+
++ (instancetype)defaultManager;
+
+@end

+ 22 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMManager.m

@@ -0,0 +1,22 @@
+//
+//  QMManager.m
+//  IMSDK-OC
+//
+//  Created by lishuijiao on 2018/5/23.
+//  Copyright © 2018年 HCF. All rights reserved.
+//
+
+#import "QMManager.h"
+
+@implementation QMManager
+
++ (instancetype)defaultManager {
+    static QMManager *manager = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        manager = [QMManager new];
+    });
+    return manager;
+}
+
+@end

+ 21 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTapGestureRecognizer.h

@@ -0,0 +1,21 @@
+//
+//  QMTapGestureRecognizer.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMTapGestureRecognizer : UITapGestureRecognizer
+
+@property (nonatomic ,copy)NSString * picName;
+
+@property (nonatomic ,copy)NSString * picType;
+
+@property (nonatomic ,strong)UIImage *image;
+
+@property (nonatomic ,copy)NSString * messageId;
+
+@end

+ 14 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTapGestureRecognizer.m

@@ -0,0 +1,14 @@
+//
+//  QMTapGestureRecognizer.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/17.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMTapGestureRecognizer.h"
+
+@implementation QMTapGestureRecognizer
+
+@end
+

+ 17 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTextAttachment.h

@@ -0,0 +1,17 @@
+//
+//  QMTextAttachment.h
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/18.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface QMTextAttachment : NSTextAttachment
+
+@property(strong, nonatomic) NSString *emojiCode;
+
+@property(assign, nonatomic) CGSize emojiSize;
+
+@end

+ 13 - 0
jiaPei/Vendor/QiNiu_IMSDK/QMChatRoom/Tool/QMTextAttachment.m

@@ -0,0 +1,13 @@
+//
+//  QMTextAttachment.m
+//  IMSDK-OC
+//
+//  Created by haochongfeng on 2017/5/18.
+//  Copyright © 2017年 HCF. All rights reserved.
+//
+
+#import "QMTextAttachment.h"
+
+@implementation QMTextAttachment
+
+@end