index.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <template>
  2. <view class="threeExam">
  3. <!-- <view style="position: absolute;top: 0;left: 0;z-index:99;">
  4. <image style="width: 100vw;" mode="widthFix" src="https://ndata.zzxcx.net/ctjk/mp-wx/threeExam/bg.png"></image>
  5. </view> -->
  6. <topbar>
  7. <view class="nav">
  8. <image @click="back" mode="widthFix" class="leftArrow"
  9. src="https://ndata.zzxcx.net/ctjk/mp-wx/mockExamEnd/arrow-left.png"></image>
  10. <text class="title">三力测试</text>
  11. </view>
  12. </topbar>
  13. <view class="mid1">
  14. <view class="mid1-line1">
  15. <view class="mid1-line1-title">考试类型 </view>
  16. <view class="mid1-line1-content">
  17. <view>小车(C1/C2)</view>
  18. <view>摩托车(D/E/F)</view>
  19. <view>轻型牵引挂车(C6)</view>
  20. </view>
  21. </view>
  22. <view class="mid1-line1">
  23. <view class="mid1-line1-title">考试标准 </view>
  24. <view class="mid1-line1-content">
  25. <view>20题,20分钟 </view>
  26. </view>
  27. </view>
  28. <view class="mid1-line1">
  29. <view class="mid1-line1-title">合格标准 </view>
  30. <view class="mid1-line1-content">
  31. <view>90分及格(满分100分) </view>
  32. </view>
  33. </view>
  34. <view class="mid1-line1">
  35. <view class="mid1-line1-title">出题规则 </view>
  36. <view class="mid1-line1-content">
  37. <view>根据公安部出题规则组卷</view>
  38. </view>
  39. </view>
  40. <view class="mid1-line2">
  41. <view class="mid1-line2-content">
  42. 温馨提示:考试模式不能修改答案,每错1题扣5分,错题累计超过2题,考试不能通过,系统自动提醒交卷。
  43. </view>
  44. </view>
  45. <view class="mid1-submit">
  46. <view @click="watchAdTobegin" class="mid1-submit-begin">
  47. <view style="width: 300rpx;">
  48. <view class="mid1-submit-begin-line1">
  49. 模拟考试
  50. </view>
  51. <view class="mid1-submit-begin-line2">
  52. 仿真模拟考试
  53. </view>
  54. </view>
  55. <view class="mid1-submit-begin-button1">
  56. 开始考试
  57. </view>
  58. </view>
  59. <navigator url="/otherPages/threeExam/index?showSubmit=0">
  60. <view class="mid1-submit-continue">
  61. <view style="width: 300rpx;">
  62. <view class="mid1-submit-continue-line1">
  63. 全部题库
  64. </view>
  65. <view class="mid1-submit-continue-line2">
  66. 顺序练习全部题目
  67. </view>
  68. </view>
  69. <view class="mid1-submit-continue-button1">
  70. 开始练习
  71. </view>
  72. </view>
  73. </navigator>
  74. </view>
  75. </view>
  76. <view class="mid2">
  77. <view class="mid2-line1">
  78. <image class="mid2-line1-icon" src="https://ndata.zzxcx.net/ctjk/mp-wx/threeExam/%E9%97%AE%E5%8F%B7%402x.png"
  79. mode="widthFix"></image>
  80. <text style="color: #498ef5; font-size: 34rpx">什么是三力测试?</text>
  81. </view>
  82. <view class="mid2-line2">
  83. “三力”测试是指70周岁以上的人群申领小型汽车、小型自动档汽车、轻便摩托车的驾照时需要增加记忆力、判断力、反应力的测试,
  84. 只有测试通过的才可报名。“三力”测试内容为驾驶理论,考生将随机抽取20道题(10道判断题、10道选择题),20分钟完成作答,
  85. 满分100分,90分合格,未通过的可以在三个月内补测两侧。
  86. </view>
  87. </view>
  88. <view style="height: 2vw;"></view>
  89. <view class="wxad">
  90. <ad ad-type="video" :ad-intervals="100" unit-id="adunit-8eb44bbd7e3147d4"></ad>
  91. </view>
  92. </view>
  93. </template>
  94. <script>
  95. export default {
  96. data() {
  97. return {};
  98. },
  99. methods: {
  100. watchAdTobegin() {
  101. let that = this
  102. let videoAd = null;
  103. uni.showModal({
  104. title: '观看激励广告',
  105. content: '广告结束后开始考试',
  106. success(res) {
  107. if (res.confirm) {
  108. if (wx.createRewardedVideoAd) {
  109. videoAd = wx.createRewardedVideoAd({
  110. adUnitId: "adunit-f0e94618f34d4baf",
  111. });
  112. videoAd.onLoad(() => {
  113. });
  114. videoAd.onError((err) => {
  115. console.log(err)
  116. });
  117. videoAd.offClose();
  118. videoAd.onClose((res) => {
  119. if (!res.isEnded) {
  120. return
  121. }
  122. // that.wxadWatchTip=false
  123. uni.navigateTo({
  124. url: "/otherPages/threeExam/index?showSubmit=1"
  125. })
  126. });
  127. videoAd.show().catch(() => {
  128. // 失败重试
  129. videoAd
  130. .load()
  131. .then(() => videoAd.show())
  132. .catch((err) => {
  133. console.log("激励视频 广告显示失败");
  134. });
  135. });
  136. } else if (res.cancel) {
  137. console.log('用户点击取消')
  138. }
  139. }
  140. }
  141. })
  142. },
  143. back() {
  144. uni.navigateBack();
  145. },
  146. },
  147. };
  148. </script>
  149. <style lang="scss" scoped>
  150. .threeExam {
  151. background: url("https://ndata.zzxcx.net/ctjk/mp-wx/threeExam/bg.png");
  152. background-size: 100%;
  153. background-repeat: no-repeat;
  154. padding-bottom: constant(safe-area-inset-bottom);
  155. padding-bottom: env(safe-area-inset-bottom);
  156. position: relative;
  157. background-color: #fff;
  158. background-size: 100% auto;
  159. .nav {
  160. width: 100%;
  161. height: 100%;
  162. position: relative;
  163. display: flex;
  164. align-items: center;
  165. .leftArrow {
  166. width: 18rpx;
  167. position: absolute;
  168. left: 30rpx;
  169. }
  170. .title {
  171. position: absolute;
  172. left: 50%;
  173. }
  174. }
  175. .mid1 {
  176. width: 690rpx;
  177. margin: 0 auto;
  178. padding-top: 40rpx;
  179. background-size: 100%;
  180. .mid1-line1 {
  181. display: flex;
  182. flex-direction: row;
  183. padding: 10rpx 30rpx;
  184. .mid1-line1-title {
  185. width: 270rpx;
  186. padding-right: 66rpx;
  187. text-align: right;
  188. color: #8a9099;
  189. font-size: 30rpx;
  190. }
  191. .mid1-line1-content {
  192. width: 412rpx;
  193. padding-right: 30rpx;
  194. text-align: left;
  195. font-size: 30rpx;
  196. color: #5c6066;
  197. }
  198. }
  199. .mid1-line2 {
  200. padding: 0 10rpx;
  201. margin-top: 28rpx;
  202. .mid1-line2-content {
  203. background: rgba(255, 77, 83, 0.1);
  204. color: #ff4d53;
  205. padding: 15rpx;
  206. font-size: 26rpx;
  207. }
  208. }
  209. .mid1-submit {
  210. margin-top: 30rpx;
  211. display: flex;
  212. justify-content: space-between;
  213. flex-wrap: wrap;
  214. height: 256rpx;
  215. flex-direction: column;
  216. align-items: center;
  217. align-content: center;
  218. .mid1-submit-begin {
  219. width: 630rpx;
  220. height: 108rpx;
  221. background: #498ef5;
  222. border-radius: 40px 40px 40px 40px;
  223. opacity: 1;
  224. color: #fff;
  225. padding: 0 50rpx;
  226. text-align: center;
  227. display: flex;
  228. align-items: center;
  229. align-content: center;
  230. justify-content: space-between;
  231. .mid1-submit-begin-line1 {
  232. font-size: 30rpx;
  233. text-align: left;
  234. }
  235. .mid1-submit-begin-line2 {
  236. font-size: 24rpx;
  237. color: #CCE0FF;
  238. text-align: left;
  239. }
  240. .mid1-submit-begin-button1 {
  241. width: 200rpx;
  242. height: 68rpx;
  243. background: linear-gradient(90deg, #FFFFFF 0%, #BAD5FF 100%);
  244. border-radius: 34rpx 34rpx 34rpx 34rpx;
  245. line-height: 68rpx;
  246. color: #498EF5;
  247. }
  248. }
  249. .mid1-submit-continue {
  250. width: 630rpx;
  251. height: 108rpx;
  252. display: flex;
  253. justify-content: space-between;
  254. align-items: center;
  255. align-content: center;
  256. border-radius: 40rpx 40rpx 40rpx 40rpx;
  257. opacity: 1;
  258. text-align: center;
  259. padding: 0 50rpx;
  260. background: linear-gradient(265deg, #31CC74 0%, #63E897 100%);
  261. .mid1-submit-continue-line1 {
  262. font-size: 30rpx;
  263. text-align: left;
  264. color: #fff;
  265. }
  266. .mid1-submit-continue-line2 {
  267. font-size: 24rpx;
  268. color: #CCE0FF;
  269. text-align: left;
  270. }
  271. .mid1-submit-continue-button1 {
  272. width: 200rpx;
  273. height: 68rpx;
  274. background: linear-gradient(90deg, #FFFFFF 0%, #BDFFD9 100%);
  275. border-radius: 34rpx 34rpx 34rpx 34rpx;
  276. line-height: 68rpx;
  277. color: #31CC74;
  278. }
  279. }
  280. }
  281. }
  282. .mid2 {
  283. width: 690rpx;
  284. background: #fff;
  285. margin: 0 auto;
  286. margin-top: 30rpx;
  287. box-shadow: 0px 0px 12px 2px rgba(0, 0, 0, 0.1);
  288. padding-top: 40rpx;
  289. padding-bottom: 40rpx;
  290. .mid2-line1 {
  291. display: flex;
  292. padding-bottom: 30rpx;
  293. padding-left: 30rpx;
  294. padding-right: 30rpx;
  295. align-content: center;
  296. align-items: center;
  297. .mid2-line1-icon {
  298. width: 58rpx;
  299. margin-right: 16rpx;
  300. }
  301. }
  302. .mid2-line2 {
  303. width: 630rpx;
  304. margin: 0 auto;
  305. background: #f2f3f5;
  306. color: #5c6066;
  307. padding: 20rpx;
  308. }
  309. }
  310. }
  311. </style>