exam.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <template>
  2. <view class="phone-kaoshi-page">
  3. <!-- 导航区域 -->
  4. <view class="icon-title-bjcolor-navBar-box">
  5. <view @click="handleBack" class="nav-bar-icon"></view>
  6. <text class="nav-bar-title">{{data.ksName}}</text>
  7. </view>
  8. <!-- 第一行 -->
  9. <view class="kaoshi-page-title">
  10. <view v-if="activeSt" class="title-types">{{dlName}}</view>
  11. <!-- 倒计时 -->
  12. <view v-if="!!data.endSecond">
  13. <text>考试倒计时:</text>
  14. <uni-countdown :show-day="true" :second="1000" @timeup="onTimeUp"
  15. :start="startCountDown"></uni-countdown>
  16. </view>
  17. </view>
  18. <view class="kaoshi-shiti-content">
  19. <!-- 内容区域 -->
  20. <!-- 试题区域 -->
  21. <view v-if="activeSt">
  22. <template v-if="activeSt.stTypeId == 1">
  23. <!-- 单选 -->
  24. <danxuan :question="activeSt" :key="activeSt.stId"></danxuan>
  25. </template>
  26. <template v-if="activeSt.stTypeId == 2">
  27. <!-- 多选 -->
  28. <duoxuan :question="activeSt" :key="activeSt.stId"></duoxuan>
  29. </template>
  30. <template v-if="activeSt.stTypeId == 3">
  31. <!-- 判断 -->
  32. <panduan :question="activeSt" :key="activeSt.stId"></panduan>
  33. </template>
  34. <template v-if="activeSt.stTypeId == 4">
  35. <!-- 填空 -->
  36. <tiankong :question="activeSt" :key="activeSt.stId"></tiankong>
  37. </template>
  38. </view>
  39. </view>
  40. <view class="kaoshi-bottom-box">
  41. <button class="phone-green-btn bj-btn" hover-class="none" type="default" size="mini"
  42. @click="handleBiaoji">{{activeSt && activeSt.marked ? '取标':'标记'}}</button>
  43. <view @click="showAnswerCard" class="shiti-num-box">
  44. <icon class="shiti-num-icon"></icon>
  45. <text
  46. class="active-num">{{activeSt ? activeSt.onlyNum: 0}}</text>/<text>{{data.StListForSearch.length}}</text>
  47. </view>
  48. <button class="phone-green-btn save-btn" hover-class="none" type="default" size="mini"
  49. @click="handleSave(true)">保存</button>
  50. </view>
  51. <template v-if="activeSt">
  52. <button type="default" size="mini" hover-class="none" class="phone-green-btn ks-btn-prev"
  53. @click="handlePrev" v-if="!isFistStId">上一题</button>
  54. <button type="default" size="mini" hover-class="none" class="phone-green-btn ks-btn-next"
  55. @click="handleNext" v-if="!isLastStId">下一题</button>
  56. <button type="default" size="mini" hover-class="none" class="phone-green-btn ks-btn-next"
  57. @click="handleJiaojuan" v-if="isLastStId">交卷</button>
  58. </template>
  59. <!-- 答题卡 -->
  60. <uni-popup ref="popupRef" background-color="#fff" :is-mask-click="false" :mask-click="false">
  61. <view class="answer-card-popup">
  62. <view class="icon-title-bjcolor-navBar-box">
  63. <view @click="handlePopupBack" class="nav-bar-icon"> </view>
  64. <text class="nav-bar-title">答题卡</text>
  65. </view>
  66. <view class="answer-card-content" v-for="(paragraph,paragraphIndex) in questionData"
  67. :key="paragraphIndex">
  68. <view class="paragraph-title">
  69. {{paragraph.name}}
  70. </view>
  71. <view class="paragraph-qa" v-for="(qa,qaIndex) in paragraph.qas" :key="qaIndex"
  72. :class="getQaClass(qa)" @click="answerCardItemClick(qa)">{{qa.onlyNum}}
  73. </view>
  74. </view>
  75. </view>
  76. </uni-popup>
  77. <!-- 摄像头确认 -->
  78. <zhuapaiConfirm ref="zhuapaiConfirmRef" @success="zpConfirmSuccess" @error="zpConfirmError"
  79. @cancel="zpConfirmCancel" key="1"></zhuapaiConfirm>
  80. <!-- 抓拍 -->
  81. <zhuapaiVue ref="zhuapaiRef" @error="zpError" @success="zpSuccess" key="2"></zhuapaiVue>
  82. <!-- 切屏 -->
  83. <qiepingVue ref="qiepingRef" @zhuapai="qpZhuapai" @forceSubmit="forceSubmit" @qiepingToast="qiepingToast"
  84. key="3"></qiepingVue>
  85. <!-- 交卷确认 -->
  86. <answerQueren ref="answerQrRef" @confirm="handleQuerenConfirm"></answerQueren>
  87. <!-- 考试得分 -->
  88. <submitScoreVue ref="subScoreRef" @confirm="handleScoreConfirm" @close="handleScoreClose"></submitScoreVue>
  89. </view>
  90. </template>
  91. <script setup>
  92. import {
  93. ref,
  94. reactive,
  95. computed,
  96. watch,
  97. nextTick
  98. } from "vue";
  99. import zhuapaiVue from "@/components/zhuapaiConfirm/zhuapai.vue";
  100. import qiepingVue from "@/components/zhuapaiConfirm/qieping.vue";
  101. import zhuapaiConfirm from "@/components/zhuapaiConfirm/index.vue";
  102. import answerQueren from "@/components/zhuapaiConfirm/answerQueren.vue";
  103. import submitScoreVue from "@/components/zhuapaiConfirm/submitScore.vue";
  104. import {
  105. onLoad
  106. } from "@dcloudio/uni-app";
  107. import * as ksApi from "@/api/kaoshi.js"
  108. import danxuan from "@/components/questions/danxuan.vue";
  109. import duoxuan from "@/components/questions/duoxuan.vue";
  110. import tiankong from "@/components/questions/tiankong.vue";
  111. import panduan from "@/components/questions/panduan.vue";
  112. import {
  113. useQuestionTools
  114. } from "@/components/questions/useQuestionTools.js";
  115. import {
  116. useKaoShiCache
  117. } from "./examTools"
  118. const {
  119. checkDanxuanReply,
  120. checkDuoxuanReply,
  121. checkPanduanReply,
  122. checkTiankongReply,
  123. getLetterByIndex
  124. } = useQuestionTools();
  125. const {
  126. saveCacheKs,
  127. getCacheKs,
  128. removeCacheKs
  129. } = useKaoShiCache();
  130. onLoad((option) => {
  131. data.ksId = option.ksId;
  132. data.zhuapai = option.zhuapai;
  133. data.from = option.from;
  134. if (data.zhuapai && data.zhuapai != 0) {
  135. // 考试前确认摄像头
  136. nextTick(() => {
  137. initBeforKaoshi();
  138. })
  139. } else {
  140. initKaoshi();
  141. }
  142. })
  143. const popupRef = ref(null)
  144. const zhuapaiRef = ref(null)
  145. const qiepingRef = ref(null)
  146. const zhuapaiConfirmRef = ref(null)
  147. const answerQrRef = ref(null);
  148. const startCountDown = ref(false);
  149. const subScoreRef = ref(null)
  150. const timer1 = ref(null);
  151. const data = reactive({
  152. ksId: null,
  153. operId: null,
  154. ksName: '',
  155. stTotal: 0,
  156. stScore: 0,
  157. biaoji: {},
  158. endSecond: 0,
  159. pageSize: 0,
  160. toggleScreenFlag: 0,
  161. toggleScreenSecond: 0,
  162. zhuapai: 0,
  163. duanluo: [],
  164. StListForSearch: [],
  165. from: ''
  166. })
  167. const markDB = ref([]);
  168. const questionData = ref([]);
  169. const progress = reactive({
  170. dlIndex: 0,
  171. dtIndex: 0
  172. })
  173. const dlName = computed(() => {
  174. if (data.StListForSearch && activeSt.value) {
  175. return data.StListForSearch[activeSt.value.onlyNum - 1].paragraphName
  176. } else {
  177. return ''
  178. }
  179. })
  180. watch(() => data.duanluo, (newVal) => {
  181. // 计算已答试题数量
  182. }, {
  183. deep: true
  184. })
  185. const activeSt = computed(() => {
  186. if (questionData.value.length) {
  187. return questionData.value.length && questionData.value[progress.dlIndex].qas[progress.dtIndex];
  188. } else {
  189. return null
  190. }
  191. })
  192. const isFistStId = computed(() => {
  193. if (data.StListForSearch.length) {
  194. return data.StListForSearch[0].stId == activeSt.value.stId
  195. } else {
  196. return false
  197. }
  198. });
  199. const isLastStId = computed(() => {
  200. if (data.StListForSearch.length) {
  201. return data.StListForSearch[data.StListForSearch.length - 1].stId == activeSt.value.stId
  202. } else {
  203. return false
  204. }
  205. });
  206. function handleScoreClose() {
  207. handleBack()
  208. }
  209. // 考试得分相关 start
  210. function handleScoreConfirm() {
  211. uni.redirectTo({
  212. url: '/pages/client/Chengji/list'
  213. })
  214. }
  215. // 考试得分相关 end
  216. // 保存相关
  217. function handleSave(showToast) {
  218. if (timer1.value) {
  219. uni.showToast({
  220. title: '请勿连续保存',
  221. icon: 'none'
  222. })
  223. return
  224. }
  225. timer1.value = setTimeout(() => {
  226. clearTimeout(timer1.value);
  227. },10*1000);
  228. console.log(questionData.value)
  229. const result = []
  230. const option = {
  231. force: false,
  232. operId: data.operId,
  233. replyList: []
  234. }
  235. questionData.value.forEach(dl => {
  236. dl.qas.forEach(st => {
  237. const opt = {
  238. stId: st.stId,
  239. reply: st.reply,
  240. }
  241. result.push(opt)
  242. option.replyList.push(opt)
  243. })
  244. })
  245. // 保存试题答案
  246. saveCacheKs(data.operId, {replyList:result, position: {dlIndex:progress.dlIndex, dtIndex: progress.dtIndex}})
  247. // 保存答题进度
  248. ksApi.getClientKsSave(option).then(res => {
  249. if (res.data && showToast) {
  250. uni.showToast({
  251. title: '保存成功',
  252. })
  253. }
  254. })
  255. }
  256. // 交卷相关功能 start
  257. function checkJiaojuan() {
  258. const result = []
  259. let count = 0;
  260. let total = 0;
  261. questionData.value.forEach(dl => {
  262. dl.qas.forEach(st => {
  263. const opt = {
  264. stId: st.stId,
  265. reply: st.reply,
  266. stTypeId: st.stTypeId
  267. }
  268. result.push(opt)
  269. })
  270. })
  271. result.forEach(item => {
  272. total++;
  273. if (item.stTypeId == 1 && !checkDanxuanReply(item)) {
  274. count++;
  275. }
  276. if (item.stTypeId == 2 && !checkDuoxuanReply(item)) {
  277. count++;
  278. }
  279. if (item.stTypeId == 3 && !checkPanduanReply(item)) {
  280. count++;
  281. }
  282. if (item.stTypeId == 4 && !checkTiankongReply(item)) {
  283. count++;
  284. }
  285. })
  286. return {
  287. total,
  288. count,
  289. }
  290. }
  291. function handleJiaojuan() {
  292. const result = checkJiaojuan()
  293. console.log(result)
  294. if (result.count) {
  295. // 提示
  296. answerQrRef.value.showDialog({
  297. answercartsCount: result.count,
  298. answercartsTotal: result.total,
  299. })
  300. } else {
  301. handleSubmit()
  302. }
  303. }
  304. function handleQuerenConfirm() {
  305. handleSubmit()
  306. }
  307. function handleSubmit(force = false) {
  308. const result = {
  309. force,
  310. operId: data.operId,
  311. replyList: []
  312. };
  313. console.log(questionData.value)
  314. uni.showLoading({
  315. title: '加载中'
  316. })
  317. questionData.value.forEach(dl => {
  318. dl.qas.forEach(st => {
  319. const opt = {
  320. stId: st.stId,
  321. reply: st.reply
  322. }
  323. result.replyList.push(opt)
  324. })
  325. })
  326. ksApi.getClientKsSubmit(result).then(res => {
  327. if (res.code == 0) {
  328. subScoreRef.value.showDialog(res.data);
  329. // 清空缓存
  330. removeCacheKs(data.operId);
  331. }
  332. }).finally(err => {
  333. uni.hideLoading()
  334. })
  335. }
  336. function onTimeUp() {
  337. handleSubmit();
  338. }
  339. // 交卷相关功能 end
  340. // 切屏功能 start
  341. function qiepingToast(count) {
  342. uni.showToast({
  343. title: '请在考试界面操作,注意考试纪律!'
  344. })
  345. }
  346. function forceSubmit() {
  347. // 强制交卷
  348. console.log('强制交卷')
  349. handleSubmit(true)
  350. }
  351. function qpZhuapai() {
  352. // 重新开启抓拍
  353. zhuapaiRef.value && zhuapaiRef.value.showVideoBtn()
  354. }
  355. // 切屏功能 end
  356. // 摄像头抓拍相关功能 start
  357. function zpSuccess() {}
  358. function zpError() {
  359. uni.showToast({
  360. title: '摄像头唤起异常',
  361. icon: 'none'
  362. })
  363. uni.redirectTo({
  364. url: '/pages/client/Kaoshi/list'
  365. })
  366. }
  367. // 摄像头抓拍相关功能 end
  368. // 摄像头确认相关功能 start
  369. function zpConfirmSuccess() {
  370. initKaoshi();
  371. }
  372. function zpConfirmError() {
  373. uni.showToast({
  374. title: '摄像头唤起异常',
  375. icon: 'none'
  376. })
  377. uni.redirectTo({
  378. url: '/pages/client/Kaoshi/list'
  379. })
  380. }
  381. function zpConfirmCancel() {
  382. uni.redirectTo({
  383. url: '/pages/client/Kaoshi/list'
  384. })
  385. }
  386. // 摄像头确认相关功能 end
  387. function getQaClass(qa) {
  388. if (qa.marked && qa.marked === true) {
  389. return 'paragraph-qa-block-mark';
  390. } else {
  391. if (qa.stTypeId == 1) {
  392. if (checkDanxuanReply(qa)) {
  393. return 'paragraph-qa-block-done';
  394. } else {
  395. return 'paragraph-qa-block-init';
  396. }
  397. } else if (qa.stTypeId == 2) {
  398. if (checkDuoxuanReply(qa)) {
  399. return 'paragraph-qa-block-done';
  400. } else {
  401. return 'paragraph-qa-block-init';
  402. }
  403. } else if (qa.stTypeId == 3) {
  404. if (checkPanduanReply(qa)) {
  405. return 'paragraph-qa-block-done';
  406. } else {
  407. return 'paragraph-qa-block-init';
  408. }
  409. } else if (qa.stTypeId == 4) {
  410. if (checkTiankongReply(qa)) {
  411. return 'paragraph-qa-block-done';
  412. } else {
  413. return 'paragraph-qa-block-init';
  414. }
  415. }
  416. }
  417. }
  418. function skipQuestion(dlIndex, dtIndex) {
  419. progress.dlIndex = dlIndex;
  420. progress.dtIndex = dtIndex;
  421. handlePopupBack()
  422. }
  423. function answerCardItemClick(qa) {
  424. const actQa = data.StListForSearch.find(item => item.stId == qa.stId);
  425. skipQuestion(actQa.dlIndex, actQa.dtIndex)
  426. }
  427. function handleBack() {
  428. const pages = getCurrentPages();
  429. if (pages.length>1) {
  430. uni.navigateBack()
  431. } else {
  432. if (data.from == 'shouye') {
  433. uni.redirectTo({
  434. url: "/pages/client/ShouYe/shouye"
  435. })
  436. } else if (data.from == 'kaoshiList') {
  437. uni.redirectTo({
  438. url: "/pages/client/Kaoshi/list"
  439. })
  440. } else {
  441. uni.redirectTo({
  442. url: "/pages/client/ShouYe/shouye"
  443. })
  444. }
  445. }
  446. }
  447. function showAnswerCard() {
  448. popupRef.value.open('bottom')
  449. }
  450. function handlePopupBack() {
  451. popupRef.value.close()
  452. }
  453. function handlePrev() {
  454. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  455. const index = qa.onlyNum - 1;
  456. if (index > 0) {
  457. const result = data.StListForSearch[index - 1];
  458. progress.dlIndex = result.dlIndex;
  459. progress.dtIndex = result.dtIndex
  460. }
  461. }
  462. function handleNext() {
  463. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  464. const index = qa.onlyNum - 1;
  465. if (index < data.StListForSearch.length) {
  466. const result = data.StListForSearch[index + 1];
  467. progress.dlIndex = result.dlIndex;
  468. progress.dtIndex = result.dtIndex
  469. }
  470. }
  471. function formatDuanluoList(dlData) {
  472. let uIndex = 0; // 试题onlyNum
  473. let iDuanluo = 0; // 段落onlyNum
  474. let result = [];
  475. for (const duanluo of data.duanluo) {
  476. let paragraph = {
  477. qas: [],
  478. };
  479. paragraph.name = duanluo.name;
  480. let iQa = 0; // 当前试题序号
  481. let order = 0; // 当前题型中第几题
  482. for (const iDanxuan of duanluo.danxuan) {
  483. iDanxuan.type = 'danxuan';
  484. iDanxuan.marked = data.biaoji[iDanxuan.stId] ? true: false;
  485. iDanxuan.onlyNum = uIndex + 1;
  486. iDanxuan.order = order;
  487. iDanxuan.iQa = iQa;
  488. paragraph.qas.push(iDanxuan);
  489. uIndex++;
  490. order++;
  491. iQa++;
  492. data.StListForSearch.push({
  493. stId: iDanxuan.stId,
  494. paragraphName: paragraph.name,
  495. dlIndex: iDuanluo,
  496. dtIndex: iDanxuan.iQa,
  497. onlyNum: iDanxuan.onlyNum
  498. })
  499. }
  500. order = 0;
  501. for (const iDuoxuan of duanluo.duoxuan) {
  502. iDuoxuan.type = 'duoxuan';
  503. iDuoxuan.marked = data.biaoji[iDuoxuan.stId] ? true: false;
  504. iDuoxuan.onlyNum = uIndex + 1;
  505. iDuoxuan.order = order;
  506. paragraph.qas.push(iDuoxuan);
  507. iDuoxuan.iQa = iQa;
  508. iDuoxuan.reply = [];
  509. uIndex++;
  510. order++;
  511. iQa++;
  512. data.StListForSearch.push({
  513. stId: iDuoxuan.stId,
  514. paragraphName: paragraph.name,
  515. dlIndex: iDuanluo,
  516. dtIndex: iDuoxuan.iQa,
  517. onlyNum: iDuoxuan.onlyNum
  518. })
  519. }
  520. order = 0;
  521. for (const iPanduan of duanluo.panduan) {
  522. iPanduan.type = 'panduan';
  523. iPanduan.marked = data.biaoji[iPanduan.stId] ? true: false;
  524. iPanduan.onlyNum = uIndex + 1;
  525. iPanduan.order = order;
  526. paragraph.qas.push(iPanduan);
  527. iPanduan.iQa = iQa;
  528. uIndex++;
  529. order++;
  530. iQa++;
  531. data.StListForSearch.push({
  532. stId: iPanduan.stId,
  533. paragraphName: paragraph.name,
  534. dlIndex: iDuanluo,
  535. dtIndex: iPanduan.iQa,
  536. onlyNum: iPanduan.onlyNum
  537. })
  538. }
  539. order = 0;
  540. for (const iTiankong of duanluo.tiankong) {
  541. iTiankong.type = 'tiankong';
  542. iTiankong.marked = data.biaoji[iTiankong.stId] ? true: false;
  543. iTiankong.onlyNum = uIndex + 1;
  544. iTiankong.order = order;
  545. paragraph.qas.push(iTiankong);
  546. iTiankong.iQa = iQa;
  547. iTiankong.reply = new Array(iTiankong.count).fill('');;
  548. uIndex++;
  549. order++;
  550. iQa++;
  551. data.StListForSearch.push({
  552. stId: iTiankong.stId,
  553. paragraphName: paragraph.name,
  554. dlIndex: iDuanluo,
  555. dtIndex: iTiankong.iQa,
  556. onlyNum: iTiankong.onlyNum
  557. })
  558. }
  559. iDuanluo++;
  560. questionData.value.push(paragraph)
  561. console.log('1', questionData.value)
  562. console.log('2', data.StListForSearch)
  563. }
  564. }
  565. function handleBiaoji() {
  566. activeSt.value.marked = !activeSt.value.marked;
  567. data.biaoji[activeSt.value.stId] = activeSt.value.marked
  568. ksApi.getClientKaoshiBiaoji({
  569. operId: data.operId,
  570. biaoji: JSON.stringify(data.biaoji)
  571. }).catch(err => {
  572. uni.redirectTo({
  573. url: '/pages/client/Kaoshi/list'
  574. })
  575. })
  576. }
  577. function formatKaoshiData() {
  578. const historyData = getCacheKs(data.operId);
  579. if (historyData) {
  580. const { replyList ,position } = historyData;
  581. if (replyList) {
  582. questionData.value.forEach(dl => {
  583. dl.qas.forEach(st => {
  584. st.reply = replyList.find(item => item.stId == st.stId).reply
  585. })
  586. })
  587. }
  588. if (position) {
  589. progress.dlIndex = position.dlIndex;
  590. progress.dtIndex = position.dtIndex;
  591. }
  592. }
  593. }
  594. // 摄像头确认初始化
  595. function initBeforKaoshi() {
  596. console.log(zhuapaiConfirmRef.value)
  597. zhuapaiConfirmRef.value.showDialog()
  598. }
  599. function initKaoshi() {
  600. ksApi.getClientKsStart({
  601. ksId: data.ksId
  602. }).then(res => {
  603. const {
  604. ksId,
  605. operId,
  606. ksName,
  607. stTotal,
  608. stScore,
  609. biaoji,
  610. endSecond,
  611. pageSize,
  612. toggleScreenFlag,
  613. toggleScreenSecond,
  614. zhuapai,
  615. duanluoList
  616. } = res.data;
  617. data.ksId = ksId;
  618. data.operId = operId;
  619. data.ksName = ksName;
  620. data.stTotal = stTotal;
  621. data.stScore = stScore;
  622. data.biaoji = biaoji ? JSON.parse(biaoji): {};
  623. data.endSecond = endSecond;
  624. data.pageSize = pageSize;
  625. data.toggleScreenFlag = toggleScreenFlag;
  626. data.toggleScreenSecond = toggleScreenSecond;
  627. data.zhuapai = zhuapai;
  628. data.duanluo = duanluoList;
  629. formatDuanluoList(data.duanluo);
  630. // 设置缓存
  631. formatKaoshiData();
  632. // 设置抓拍监听
  633. zhuapaiRef.value.init({
  634. zhuapai: zhuapai,
  635. operId: operId
  636. });
  637. // 设置切屏监听
  638. qiepingRef.value.init({
  639. zhuapaiFlag: true,
  640. toggleScreenFlag: toggleScreenFlag,
  641. toggleScreenSecond: toggleScreenSecond,
  642. ksId: data.ksId
  643. })
  644. uni.setNavigationBarTitle({
  645. title: data.ksName
  646. });
  647. startCountDown.value = true;
  648. })
  649. }
  650. </script>