questionBankTest.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432
  1. <template>
  2. <view id="questionBank">
  3. <nav-bar :title="title"></nav-bar>
  4. <swiper class="swiper" :current="current" @change="swiperChange" :interval="interval">
  5. <swiper-item v-for="(bank,bankIndex) in questionList" :key="bankIndex">
  6. <view class="pageContent">
  7. <view class="pad_8 titBox" >
  8. <view class="firstLetter">
  9. <view class="leftLetters">
  10. <view class="btnType">
  11. <text v-if="bank.type==1">单选</text>
  12. <text v-if="bank.type==2">多选</text>
  13. <text v-if="bank.type==3">判断</text>
  14. <text v-if="bank.type==4">案例题</text>
  15. <text v-if="bank.type==5">简答题</text>
  16. </view>
  17. <text>{{bankIndex+1}}/{{questionList.length}}</text>
  18. </view>
  19. <view class="leftLetters"></view>
  20. </view>
  21. <view class="titles">
  22. <rich-text :nodes="bank.content"></rich-text>
  23. </view>
  24. </view>
  25. <template v-if="bank.type == 1">
  26. <view class="pad_8 titBox no-margin">
  27. <view v-if="!bank.ques">
  28. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
  29. <view class="activeTI">{{ ast[index] }}</view>
  30. <view class="flex_auto">{{ item.content }}</view>
  31. </view>
  32. </view>
  33. <view v-if="bank.ques">
  34. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  35. <text :class="{right:(item.optionsId == bank.ques) || (item.optionsId == bank.ans),wrong:(item.optionsId == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  36. <view class="flex_auto">{{ item.content }}</view>
  37. </view>
  38. </view>
  39. </view>
  40. <view v-if="bank.ques">
  41. <view class="pad_8 answer">
  42. <view>正确答案:{{ast[bank.ans-1]}}</view>
  43. <view>我的答案:{{ast[bank.ques-1]}}</view>
  44. </view>
  45. <view class="pad_8 answerInfos">
  46. <view class="answerTitle">答案解析</view>
  47. <view class="answerContent">
  48. <rich-text :nodes="bank.analysisContent"></rich-text>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <template v-if="bank.type == 2">
  54. <view class="pad_8 titBox no-margin">
  55. <view v-if="!bank.ques">
  56. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
  57. <view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
  58. <view class="flex_auto">{{ item.content }}</view>
  59. </view>
  60. </view>
  61. <view v-if="!bank.ques" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(bank.jsonStr)}" @click="checkboxSubmit(bankIndex)">
  62. 确认答案
  63. </view>
  64. <view v-if="bank.ques">
  65. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  66. <text :class="{right:(bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans.indexOf(item.optionsId) == -1)}" class="activeTI">{{ ast[index] }}</text>
  67. <view class="flex_auto">{{ item.content }}</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-if="bank.ques">
  72. <view class="pad_8 answer">
  73. <view>正确答案:
  74. <text :key="ansItemIndex" v-for="(ansItem,ansItemIndex) in bank.ans">{{ast[ansItem-1]}}</text>
  75. </view>
  76. <view>我的答案:
  77. <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques">{{ast[quesItem-1]}}</text>
  78. </view>
  79. </view>
  80. <view class="pad_8 answerInfos">
  81. <view class="answerTitle">答案解析</view>
  82. <view class="answerContent">
  83. <rich-text :nodes="bank.analysisContent"></rich-text>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <template v-if="bank.type == 3">
  89. <view class="pad_8 titBox no-margin">
  90. <view v-if="!bank.ques">
  91. <view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
  92. <view class="activeTI">{{ ast[index] }}</view>
  93. <view class="flex_auto">
  94. {{ item }}
  95. </view>
  96. </view>
  97. </view>
  98. <view v-if="bank.ques">
  99. <view v-for="(item, index) in judge" :key="index" class="lisSty">
  100. <text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  101. <view class="flex_auto">
  102. {{ item }}
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view v-if="bank.ques">
  108. <view class="pad_8 answer">
  109. <view>正确答案:{{ast[bank.ans]}}</view>
  110. <view>我的答案:{{ast[bank.ques]}}</view>
  111. </view>
  112. <view class="pad_8 answerInfos">
  113. <view class="answerTitle">答案解析</view>
  114. <view class="answerContent">
  115. <rich-text :nodes="bank.analysisContent"></rich-text>
  116. </view>
  117. </view>
  118. </view>
  119. </template>
  120. <!-- 简答题 -->
  121. <template v-if="bank.type == 5">
  122. <view class="pad_8 titBox">
  123. <view class="ans">
  124. <view class="ans_input" v-if="!bank.ques">
  125. <view class="top flex">
  126. <image :data-index="bankIndex" class="icon" @click="chooseImg(bankIndex)" src="/static/08-10_032.jpg" mode=""></image>
  127. <view class="progress">{{bank.ansText.imageList.length || '0'}}/4</view>
  128. <view class="submit" :class="{disabled:!bank.ansText.text && hasImgs(bank)}" @click="submitAns(bankIndex)" >确认答案</view>
  129. </view>
  130. <view class="textarea">
  131. <textarea v-model="bank.ansText.text" placeholder="在此输入答案"></textarea>
  132. </view>
  133. <view class="imgs">
  134. <view class="img" v-for="(img,imgIndex) in bank.ansText.imageList" :key="imgIndex" >
  135. <text @click="deleteImg(imgIndex,bankIndex)">x</text>
  136. <image :src="$method.splitImgHost(img, true)"></image>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="ans_submit answerInfos" v-if="bank.ques">
  141. <view class="answerTitle">我的答案:</view>
  142. {{bank.ques.text}}
  143. <view class="imgs">
  144. <image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques.imageList" :src="$method.splitImgHost(ques,true)"></image>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <view v-if="bank.ques">
  150. <view class="pad_8 answerInfos">
  151. <view class="answerTitle">答案解析:</view>
  152. <view class="answerContent">
  153. <rich-text :nodes="bank.analysisContent"></rich-text>
  154. </view>
  155. </view>
  156. </view>
  157. </template>
  158. <!-- 案例题 -->
  159. <template v-if="bank.type == 4">
  160. <view class="tabs">
  161. <view class="tab" :class="{current:tabIndex == bank.current}" :key="tabIndex" v-for="(tab,tabIndex) in bank.jsonStr" @click="tabSelect(tabIndex,bankIndex)">问题{{tabIndex+1}}</view>
  162. </view>
  163. <view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
  164. <template v-if="ansItem.type == 1">
  165. <view class="pad_8 titBox">
  166. <view class="leftLetters">
  167. <view class="btnType">
  168. <text>单选</text>
  169. </view>
  170. </view>
  171. <view class="titles">
  172. <rich-text :nodes="ansItem.content"></rich-text>
  173. </view>
  174. <view v-if="!bank.ques[ansIndex]">
  175. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
  176. <view class="activeTI">{{ ast[childIndex] }}</view>
  177. <view class="flex_auto">
  178. <rich-text class="textChild" :nodes="option.content"></rich-text>
  179. </view>
  180. </view>
  181. </view>
  182. <view v-if="bank.ques[ansIndex]">
  183. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
  184. <text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}" class="activeTI">{{ ast[childIndex] }}</text>
  185. <view class="flex_auto">
  186. <rich-text :nodes="option.content"></rich-text>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. <view v-if="bank.ques[ansIndex]">
  192. <view class="pad_8 answer">
  193. <view>正确答案:{{ast[bank.ans[ansIndex]-1]}}</view>
  194. <view>我的答案:{{ast[bank.ques[ansIndex]-1]}}</view>
  195. </view>
  196. <view class="pad_8 answerInfos">
  197. <view class="answerTitle">答案解析</view>
  198. <view class="answerContent">
  199. <rich-text :nodes="option.analysisContent"></rich-text>
  200. </view>
  201. </view>
  202. </view>
  203. </template>
  204. <template v-if="ansItem.type == 2">
  205. <view class="pad_8 titBox">
  206. <view class="leftLetters">
  207. <view class="btnType">
  208. <text>多选</text>
  209. </view>
  210. </view>
  211. <view class="titles">
  212. <rich-text :nodes="ansItem.content"></rich-text>
  213. </view>
  214. <view v-if="!bank.ques[ansIndex]">
  215. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
  216. <view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
  217. <view class="flex_auto">
  218. <rich-text :nodes="option.content"></rich-text>
  219. </view>
  220. </view>
  221. </view>
  222. <view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
  223. 确认答案
  224. </view>
  225. <view v-if="bank.ques && bank.ques[ansIndex]">
  226. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
  227. <text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}" class="activeTI">{{ ast[childindex] }}</text>
  228. <view class="flex_auto">
  229. <rich-text :nodes="option.content"></rich-text>
  230. </view>
  231. </view>
  232. </view>
  233. </view>
  234. <view v-if="bank.ques[ansIndex]">
  235. <view class="pad_8 answer">
  236. <view>正确答案:
  237. <text :key="ansItemIndex1" v-for="(ansItem1,ansItemIndex1) in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
  238. </view>
  239. <view>我的答案:
  240. <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
  241. </view>
  242. </view>
  243. <view class="pad_8 answerInfos">
  244. <view class="answerTitle">答案解析</view>
  245. <view class="answerContent">
  246. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  247. </view>
  248. </view>
  249. </view>
  250. </template>
  251. <template v-if="ansItem.type == 3">
  252. <view class="pad_8 titBox">
  253. <view class="leftLetters">
  254. <view class="btnType">
  255. <text>判断</text>
  256. </view>
  257. </view>
  258. <view class="titles">
  259. <rich-text :nodes="ansItem.content"></rich-text>
  260. </view>
  261. <view v-if="!bank.ques[ansIndex]">
  262. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
  263. <view class="activeTI">{{ ast[childindex] }}</view>
  264. <view class="flex_auto">
  265. {{ option }}
  266. </view>
  267. </view>
  268. </view>
  269. <view v-if="bank.ques[ansIndex]">
  270. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
  271. <text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}" class="activeTI">{{ ast[childindex] }}</text>
  272. <view class="flex_auto">
  273. {{ option }}
  274. </view>
  275. </view>
  276. </view>
  277. </view>
  278. <view v-if="bank.ques[ansIndex]">
  279. <view class="pad_8 answer">
  280. <view>正确答案:{{ast[bank.ans[ansIndex]]}}</view>
  281. <view>我的答案:{{ast[bank.ques[ansIndex]]}}</view>
  282. </view>
  283. <view class="pad_8 answerInfos">
  284. <view class="answerTitle">答案解析:</view>
  285. <view class="answerContent">
  286. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  287. </view>
  288. </view>
  289. </view>
  290. </template>
  291. <!-- 简答题 -->
  292. <template v-if="ansItem.type == 5">
  293. <view class="pad_8 titBox_title">
  294. <view class="leftLetters">
  295. <view class="btnType">
  296. <text>简答</text>
  297. </view>
  298. </view>
  299. <view class="titles">
  300. <rich-text :nodes="ansItem.content"></rich-text>
  301. </view>
  302. </view>
  303. <view class="pad_8 titBox_title">
  304. <view class="ans">
  305. <view class="ans_input" v-if="!bank.ques[ansIndex]">
  306. <view class="top flex">
  307. <image class="icon" @click="chooseImgChild(bankIndex,ansIndex)" src="/static/08-10_032.jpg" mode=""></image>
  308. <view class="progress">{{ansItem.ansText.imageList.length || '0'}}/4</view>
  309. <view class="submit" :class="{disabled:!ansItem.ansText.text && hasImgs(ansItem)}" @click="submitAnsChild(bankIndex,ansIndex)">确认答案</view>
  310. </view>
  311. <view class="textarea">
  312. <textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea>
  313. </view>
  314. <view class="imgs">
  315. <view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" :key="imgIndex" >
  316. <text @click="deleteImgChild(imgIndex,bankIndex,ansIndex)">x</text>
  317. <image :src="$method.splitImgHost(img, true)"></image>
  318. </view>
  319. </view>
  320. </view>
  321. <view class="ans_submit answerInfos" v-if="bank.ques[ansIndex]">
  322. <view class="answerTitle">我的答案:</view>
  323. {{bank.ques[ansIndex].text}}
  324. <view class="imgs">
  325. <image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques,true)"></image>
  326. </view>
  327. </view>
  328. </view>
  329. </view>
  330. <view v-if="bank.ques[ansIndex]">
  331. <view class="pad_8 answerInfos">
  332. <view class="answerTitle">答案解析:</view>
  333. <view class="answerContent">
  334. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  335. </view>
  336. </view>
  337. </view>
  338. </template>
  339. </view>
  340. </template>
  341. <view class="footer_btn">
  342. <view class="collect" @click="collect">
  343. <view>
  344. <image src="/static/icon/collect.png" mode="widthFix"></image>
  345. <view>收藏</view>
  346. </view>
  347. </view>
  348. <view class="flex_center" @click="openFooterTab">
  349. <view class="up-icon">
  350. <image src="/static/up.png"></image>
  351. </view>
  352. 答题卡
  353. </view>
  354. <view class="collect show" @click="submit">
  355. <view>
  356. <image src="/static/jj.png" mode=""></image>
  357. <view>交卷</view>
  358. </view>
  359. </view>
  360. </view>
  361. </view>
  362. </swiper-item>
  363. </swiper>
  364. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  365. <view class="popupView">
  366. <view class="popupTops">
  367. <view class="topIcon"></view>
  368. 点击编号即可跳转至对应题目
  369. </view>
  370. <view class="popupContent">
  371. <scroll-view scroll-y="true" style="height: 506rpx;">
  372. <view class="boxSty">
  373. <view v-for="(item, index) in questionList" :key="index" @click="changeIndex(index)" :class="{isRight:isRight(item,index),isWrong:isWrong(item,index),disabled:index > (num - 1)}" class="liListSty">{{ index + 1 }}</view>
  374. </view>
  375. </scroll-view>
  376. </view>
  377. </view>
  378. </u-popup>
  379. <view class="dialog" v-if="showDialog">
  380. <image class="pointer" src="/static/pointer.png"></image>
  381. <view class="text">左右滑动切换上下题</view>
  382. <view class="btn" @click="hideDialog">我知道了</view>
  383. </view>
  384. </view>
  385. </template>
  386. <script>
  387. export default {
  388. data() {
  389. return {
  390. title:'',
  391. id:'',
  392. current:0,
  393. questionList:[],
  394. ast: ['A', 'B', 'C', 'D','E','F','G'],
  395. judge:['错误','正确'],
  396. show: false,
  397. showDialog:false,
  398. bankList: [],
  399. collectList:[],
  400. goodsId:'',
  401. num:0,
  402. };
  403. },
  404. onLoad(option){
  405. this.id = option.id;
  406. this.goodsId = option.goodsid;
  407. this.num = +option.num;
  408. let showDialog = uni.getStorageSync('showDialog');
  409. this.title = uni.getStorageSync('testname');
  410. if(showDialog) {
  411. this.showDialog = false;
  412. } else {
  413. this.showDialog = true;
  414. uni.setStorageSync('showDialog','1');
  415. }
  416. this.goodsQuestionList();
  417. },
  418. onUnload() {
  419. },
  420. methods: {
  421. /**
  422. * 是否有上传图片
  423. */
  424. hasImgs(bank) {
  425. return bank.ansText.imageList.length == 0;
  426. },
  427. /**
  428. * 请求题目列表
  429. */
  430. goodsQuestionList() {
  431. this.$api.goodsQuestionList({
  432. examId:this.id
  433. }).then(res => {
  434. res.data.data.forEach((item,index) => {
  435. if(typeof item.jsonStr == 'string') {
  436. item.jsonStr = JSON.parse(item.jsonStr)
  437. if(item.type == 2) { //多选
  438. item.jsonStr.forEach(str => {
  439. str.optionsId = ''+str.optionsId;
  440. })
  441. let arr = item.answerQuestion.split(',');
  442. arr.forEach((a,i) => {
  443. arr[i] = ''+a;
  444. })
  445. item.ans = arr;
  446. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  447. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  448. return;
  449. } else if(item.type == 5) { //简答题
  450. item.ansText = {
  451. text: '',
  452. imageList: []
  453. }
  454. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  455. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  456. } else if(item.type == 4) { //案例题
  457. console.log(item.jsonStr)
  458. item.ques = []
  459. item.current = 0;
  460. let ansArr = [];
  461. item.jsonStr.forEach((json,index) => {
  462. if(json.type == 1) {
  463. ansArr[index] = json.answerQuestion;
  464. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  465. } else if(json.type == 2) {
  466. json.optionsList.forEach(str => {
  467. str.optionsId = ''+str.optionsId;
  468. })
  469. let arr = json.answerQuestion.split(',');
  470. arr.forEach((a,i) => {
  471. arr[i] = ''+a;
  472. })
  473. ansArr[index] = arr;
  474. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  475. } else if(json.type == 3) {
  476. ansArr[index] = json.answerQuestion;
  477. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  478. } else if(json.type == 5) {
  479. ansArr[index] = {
  480. text: '',
  481. imageList: []
  482. }
  483. json.ansText = {
  484. text: '',
  485. imageList: []
  486. }
  487. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  488. }
  489. })
  490. item.ans = ansArr
  491. return;
  492. }
  493. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  494. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  495. item.ans = item.answerQuestion
  496. }
  497. })
  498. this.questionList = res.data.data;
  499. })
  500. },
  501. /**
  502. * @param {Object} e单选点击
  503. */
  504. radioSelect(optionsId,bindex) {
  505. if(this.questionList[bindex].ques) return;
  506. this.$set(this.questionList[bindex],'ques',optionsId)
  507. },
  508. /**
  509. * @param {Object} e案例单选点击
  510. */
  511. radioSelectChild(optionsId,ansIndex,bindex) {
  512. if(this.questionList[bindex].ques[ansIndex]) return;
  513. this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
  514. },
  515. /**
  516. * @param {Object} 多选点击
  517. */
  518. checkboxSelect(optionsId,bindex,index) {
  519. this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
  520. },
  521. /**
  522. * @param {Object} 案例多选点击
  523. */
  524. checkboxSelectChild(bindex,ansIndex,childIndex) {
  525. this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
  526. },
  527. isCheckboxChecked(arr) {
  528. return arr.some(item => {
  529. if (item.checked) {
  530. return true;
  531. }
  532. });
  533. },
  534. /**
  535. * @param {Object} 多选确认
  536. */
  537. checkboxSubmit(bindex) {
  538. if(this.questionList[bindex].ques) return;
  539. let arr = [];
  540. this.questionList[bindex].jsonStr.forEach(item => {
  541. if(item.checked) {
  542. arr.push(item.optionsId)
  543. }
  544. })
  545. if(!arr.length) {
  546. uni.showToast({
  547. title:'请选择答案',
  548. icon:'none'
  549. })
  550. return;
  551. }
  552. this.$set(this.questionList[bindex],'ques',arr)
  553. },
  554. /**
  555. * @param {Object} 案例多选确认
  556. */
  557. checkboxSubmitChild(bindex,ansIndex) {
  558. if(this.questionList[bindex].ques[ansIndex]) return;
  559. let arr = [];
  560. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
  561. if(item.checked) {
  562. arr.push(item.optionsId)
  563. }
  564. })
  565. if(!arr.length) {
  566. uni.showToast({
  567. title:'请选择答案',
  568. icon:'none'
  569. })
  570. return;
  571. }
  572. this.$set(this.questionList[bindex].ques,ansIndex,arr)
  573. },
  574. /**
  575. * @param {Object} index
  576. * @param {Object} bindex
  577. * 判断题
  578. */
  579. judgeSelect(index,bindex) {
  580. if(this.questionList[bindex].ques) return;
  581. this.$set(this.questionList[bindex],'ques',index+'')
  582. },
  583. /**
  584. * @param {Object} ansindex
  585. * @param {Object} childindex
  586. * @param {Object} bindex
  587. * 案例判断题
  588. */
  589. judgeSelectChild(ansindex,childindex,bindex) {
  590. if(this.questionList[bindex].ques[ansindex]) return;
  591. this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
  592. },
  593. openFooterTab() {
  594. this.show = true;
  595. },
  596. hideDialog() {
  597. this.showDialog = false;
  598. },
  599. changeIndex(index) {
  600. if(index <= (this.num-1)) {
  601. this.current = index
  602. } else {
  603. uni.showModal({
  604. title: '提示',
  605. content: '试做题目已经结束~',
  606. cancelText:'返回详情',
  607. cancelColor:'',
  608. confirmText:'继续作答',
  609. confirmColor:'',
  610. success: (res) => {
  611. if (res.confirm) {
  612. } else if (res.cancel) {
  613. uni.navigateBack({
  614. delta:1
  615. })
  616. console.log('返回详情');
  617. }
  618. }
  619. });
  620. }
  621. },
  622. swiperChange(e) {
  623. this.current = e.detail.current;
  624. if(this.current > this.num -1) {
  625. uni.showModal({
  626. title: '提示',
  627. content: '试做题目已经结束~',
  628. cancelText:'返回详情',
  629. cancelColor:'',
  630. confirmText:'继续作答',
  631. confirmColor:'',
  632. success: (res) => {
  633. if (res.confirm) {
  634. this.current = this.num - 1;
  635. } else if (res.cancel) {
  636. uni.navigateBack({
  637. delta:1
  638. })
  639. console.log('返回详情');
  640. }
  641. }
  642. });
  643. }
  644. },
  645. /**
  646. * 提交数据
  647. */
  648. submit() {
  649. uni.showToast({
  650. title: '试做题目不能交卷~',
  651. duration: 2000,
  652. icon:'none'
  653. });
  654. return;
  655. },
  656. /**
  657. * @param {Object} state
  658. * @param {Object} index
  659. * 收藏
  660. */
  661. collect(state,index) {
  662. uni.showToast({
  663. title: '试做题目,不支持收藏~',
  664. duration: 2000,
  665. icon:'none'
  666. });
  667. return;
  668. },
  669. /**
  670. * @param {Object} imgIndex
  671. * @param {Object} bankIndex
  672. * 删除简答图片
  673. */
  674. deleteImg(imgIndex,bankIndex) {
  675. this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
  676. },
  677. /**
  678. * @param {Object} imgIndex
  679. * @param {Object} bankIndex
  680. * @param {Object} ansIndex
  681. * 删除案例题简答图片
  682. */
  683. deleteImgChild(imgIndex,bankIndex,ansIndex) {
  684. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
  685. },
  686. /**
  687. * @param {Object} bankindex
  688. * 选择上传图片
  689. */
  690. chooseImg(bankindex) {
  691. uni.chooseImage({
  692. count: 1, //默认9
  693. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  694. sourceType: ['album','camera'], //从相册选择
  695. success: (res) => {
  696. let self = this;
  697. // console.log(JSON.stringify(res.tempFilePaths));
  698. let img = res.tempFilePaths[0];
  699. uni.getImageInfo({
  700. src: img,
  701. success: async res => {
  702. let canvasWidth = res.width; //图片原始长宽
  703. let canvasHeight = res.height;
  704. if (canvasWidth > 1000 || canvasHeight > 1000) {
  705. uni.compressImage({
  706. src: img,
  707. quality: 75,
  708. width: '50%',
  709. height: '50%',
  710. success: async rest => {
  711. const dir = await self.uploadFile(rest.tempFilePath, 0);
  712. this.questionList[bankindex].ansText.imageList.push(dir)
  713. }
  714. });
  715. } else {
  716. const dir = await self.uploadFile(img, 0);
  717. this.questionList[bankindex].ansText.imageList.push(dir)
  718. }
  719. }
  720. });
  721. }
  722. })
  723. },
  724. /**
  725. * @param {Object} bankindex
  726. * @param {Object} ansindex
  727. * 案例题选择上传图片
  728. */
  729. chooseImgChild(bankindex,ansindex) {
  730. uni.chooseImage({
  731. count: 1, //默认9
  732. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  733. sourceType: ['album','camera'], //从相册选择
  734. success: (res) => {
  735. let self = this;
  736. // console.log(JSON.stringify(res.tempFilePaths));
  737. let img = res.tempFilePaths[0];
  738. uni.getImageInfo({
  739. src: img,
  740. success: async res => {
  741. let canvasWidth = res.width; //图片原始长宽
  742. let canvasHeight = res.height;
  743. if (canvasWidth > 1000 || canvasHeight > 1000) {
  744. uni.compressImage({
  745. src: img,
  746. quality: 75,
  747. width: '50%',
  748. height: '50%',
  749. success: async rest => {
  750. const dir = await self.uploadFile(rest.tempFilePath, 0);
  751. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  752. }
  753. });
  754. } else {
  755. const dir = await self.uploadFile(img, 0);
  756. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  757. }
  758. }
  759. });
  760. }
  761. })
  762. },
  763. uploadFile(options, int) {
  764. var self = this;
  765. return new Promise((resolve, reject) => {
  766. var data = {
  767. imageStatus: int
  768. };
  769. self.$api.aliyunpolicy(data).then(res => {
  770. console.log(res.data,6)
  771. if(res.data.code!=200){
  772. self.$method.showToast('签名错误'+JSON.stringify(res.data))
  773. return
  774. }
  775. var ossToken = res.data.data.resultContent;
  776. if(ossToken.host==null||ossToken.host==undefined){
  777. self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
  778. return
  779. }
  780. uni.uploadFile({
  781. url: ossToken.host,
  782. name: 'file',
  783. filePath: options,
  784. fileType: 'image',
  785. header: {
  786. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  787. },
  788. formData: {
  789. key: ossToken.dir,
  790. OSSAccessKeyId: ossToken.accessid,
  791. policy: ossToken.policy,
  792. Signature: ossToken.signature,
  793. callback: ossToken.callback,
  794. success_action_status: 200
  795. },
  796. success: result => {
  797. if (result.statusCode === 200) {
  798. resolve(ossToken.dir);
  799. } else {
  800. uni.showToast({
  801. title: '上传失败',
  802. icon: 'none'
  803. });
  804. return;
  805. }
  806. },
  807. fail: error => {
  808. uni.showToast({
  809. title: '上传接口报错'+error,
  810. icon: 'none'
  811. });
  812. return;
  813. }
  814. });
  815. });
  816. });
  817. },
  818. /**
  819. * @param {Object} type
  820. * @param {Object} bankindex
  821. * 简答题答案确认
  822. */
  823. submitAns(bankindex) {
  824. console.log(this.questionList[bankindex])
  825. if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
  826. uni.showToast({
  827. title: '请输入内容或上传图片',
  828. duration: 2000,
  829. icon:'none'
  830. });
  831. return
  832. }
  833. this.$set(this.questionList[bankindex],'ques',{
  834. imageList:this.questionList[bankindex].ansText.imageList,
  835. text:this.questionList[bankindex].ansText.text,
  836. })
  837. },
  838. /**
  839. * @param {Object} bankindex
  840. * @param {Object} ansindex
  841. * 案例题简答答案确认
  842. */
  843. submitAnsChild(bankindex,ansindex) {
  844. if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
  845. uni.showToast({
  846. title: '请输入内容或上传图片',
  847. duration: 2000,
  848. icon:'none'
  849. });
  850. return
  851. }
  852. this.$set(this.questionList[bankindex].ques,ansindex,{
  853. imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  854. text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  855. })
  856. },
  857. isRight(item,index) {
  858. //单选
  859. if(this.questionList[index].ques) {
  860. if(item.type == 1) {
  861. return this.questionList[index].ques == this.questionList[index].ans;
  862. //多选
  863. } else if(item.type == 2) {
  864. //每一项都相等
  865. return this.questionList[index].ans.every((item,i) => {
  866. return item == this.questionList[index].ques[i];
  867. })
  868. //判断
  869. } else if(item.type == 3) {
  870. return this.questionList[index].ques == this.questionList[index].ans;
  871. } else {
  872. return false;
  873. }
  874. } else {
  875. return false;
  876. }
  877. },
  878. right(bankIndex,ansIndex,option) {
  879. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  880. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
  881. return true
  882. } else {
  883. return false;
  884. }
  885. } else {
  886. return false;
  887. }
  888. },
  889. wrong(bankIndex,ansIndex,option) {
  890. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  891. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
  892. return true;
  893. } else {
  894. return false;
  895. }
  896. } else {
  897. return false;
  898. }
  899. },
  900. isWrong(item,index) {
  901. if(this.questionList[index].ques) {
  902. //单选
  903. if(item.type == 1) {
  904. return this.questionList[index].ques != this.questionList[index].ans;
  905. //多选
  906. } else if(item.type == 2) {
  907. //每一项都相等
  908. return this.questionList[index].ans.some((item,i) => {
  909. return item != this.questionList[index].ques[i];
  910. })
  911. //判断
  912. } else if(item.type == 3) {
  913. return this.questionList[index].ques != this.questionList[index].ans;
  914. } else {
  915. return false;
  916. }
  917. } else {
  918. return false;
  919. }
  920. },
  921. tabSelect(index,bankindex) {
  922. this.$set(this.questionList[bankindex],'current',index)
  923. },
  924. }
  925. };
  926. </script>
  927. <style lang="scss" scoped>
  928. .swiper {
  929. width:100%;
  930. height:100vh;
  931. }
  932. .lisSty {
  933. margin-bottom: 16rpx;
  934. display: flex;
  935. align-items: center;
  936. .flex_auto {
  937. flex:1;
  938. }
  939. }
  940. .activeTI {
  941. vertical-align: middle;
  942. display: inline-block;
  943. border: 1rpx solid #eee;
  944. border-radius: 50rpx;
  945. height: 48rpx;
  946. line-height: 46rpx;
  947. text-align: center;
  948. width: 48rpx;
  949. margin-right: 15rpx;
  950. color: #666;
  951. font-size: 30rpx;
  952. &.right {
  953. color:#fff;
  954. background:#36C75A;
  955. }
  956. &.wrong {
  957. color:#fff;
  958. background:#FF3B30;
  959. }
  960. &.checked {
  961. color:#fff;
  962. background:#007AFF;
  963. }
  964. }
  965. .submit_checkbox {
  966. position:fixed;
  967. left:0;
  968. right:0;
  969. bottom:120rpx;
  970. margin: 20rpx auto;
  971. width: 526rpx;
  972. height: 80rpx;
  973. background: rgba(0, 122, 255, 1);
  974. color:#fff;
  975. text-align: center;
  976. line-height: 80rpx;
  977. font-size: 30rpx;
  978. border-radius: 40rpx;
  979. &.disabled {
  980. opacity: 0.6;
  981. }
  982. }
  983. .titles {
  984. overflow: hidden;
  985. margin-bottom: 24rpx;
  986. }
  987. .titBox {
  988. padding: 41rpx 25rpx 24rpx 25rpx;
  989. }
  990. .titBox_title {
  991. padding: 21rpx;
  992. }
  993. .tabs {
  994. margin:10rpx;
  995. display: flex;
  996. .tab {
  997. margin: 0 4rpx;
  998. padding:10rpx 13rpx;
  999. text-align: center;
  1000. color: #007aff;
  1001. font-size: 28rpx;
  1002. border-radius: 16rpx;
  1003. background:#fff;
  1004. &.current {
  1005. color:#fff;
  1006. background: #007AFF;
  1007. }
  1008. }
  1009. }
  1010. .ans {
  1011. margin:8rpx 8rpx 8rpx;
  1012. .ans_input {
  1013. border-radius: 16rpx;
  1014. background:#fff;
  1015. .top {
  1016. border-bottom:1rpx solid #EEEEEE;
  1017. padding: 16rpx;
  1018. display: flex;
  1019. align-items: center;
  1020. .icon {
  1021. margin-right:20rpx;
  1022. width: 40rpx;
  1023. height: 38rpx;
  1024. }
  1025. .progress {
  1026. flex:1;
  1027. }
  1028. .submit {
  1029. width: 168rpx;
  1030. height: 48rpx;
  1031. line-height: 48rpx;
  1032. text-align: center;
  1033. color:#fff;
  1034. font-size: 30rpx;
  1035. background: #007AFF;
  1036. border-radius: 24rpx;
  1037. &.disabled {
  1038. opacity: 0.6;
  1039. }
  1040. }
  1041. }
  1042. .textarea {
  1043. textarea {
  1044. width:100%;
  1045. height:287rpx;
  1046. padding:10rpx;
  1047. }
  1048. }
  1049. .imgs {
  1050. overflow: hidden;
  1051. display: flex;
  1052. width:100%;
  1053. .img {
  1054. width: 104rpx;
  1055. height: 104rpx;
  1056. border-radius: 8rpx;
  1057. position:relative;
  1058. margin:20rpx;
  1059. text {
  1060. position:absolute;
  1061. right:-15rpx;
  1062. top:-15rpx;
  1063. width:30rpx;
  1064. height:30rpx;
  1065. text-align: center;
  1066. line-height: 30rpx;
  1067. color:#fff;
  1068. background:#FF3B30;
  1069. border-radius:50%;
  1070. }
  1071. image {
  1072. width:100%;
  1073. height:100%;
  1074. }
  1075. }
  1076. }
  1077. }
  1078. .ans_submit {
  1079. padding:16rpx;
  1080. border-radius: 16rpx;
  1081. background:#fff;
  1082. .imgs {
  1083. overflow: hidden;
  1084. display: flex;
  1085. width:100%;
  1086. .img {
  1087. width: 104rpx;
  1088. height: 104rpx;
  1089. border-radius: 8rpx;
  1090. position:relative;
  1091. margin:20rpx;
  1092. image {
  1093. width:100%;
  1094. height:100%;
  1095. }
  1096. }
  1097. }
  1098. }
  1099. }
  1100. .leftLetters {
  1101. display: flex;
  1102. align-items: center;
  1103. width: 220rpx;
  1104. .btnType {
  1105. padding: 5rpx 10rpx;
  1106. border: 1rpx solid #007aff;
  1107. border-radius: 10rpx;
  1108. background-color: rgba(0, 122, 255, 0.1);
  1109. font-size: 28rpx;
  1110. color: #007aff;
  1111. margin-right: 15rpx;
  1112. }
  1113. }
  1114. .firstLetter {
  1115. display: flex;
  1116. justify-content: space-between;
  1117. align-items: center;
  1118. margin-bottom: 30rpx;
  1119. }
  1120. .popupView {
  1121. height: 100%;
  1122. padding-bottom: 100rpx;
  1123. .popupTops {
  1124. height: 77rpx;
  1125. border-bottom: 1rpx solid #eee;
  1126. text-align: center;
  1127. line-height: 77rpx;
  1128. font-size: 24rpx;
  1129. color: #999;
  1130. position: relative;
  1131. .topIcon {
  1132. position: absolute;
  1133. top: 10rpx;
  1134. left: 50%;
  1135. transform: translateX(-50%);
  1136. width: 80rpx;
  1137. height: 8rpx;
  1138. background-color: #999;
  1139. border-radius: 4rpx;
  1140. }
  1141. }
  1142. .popupContent {
  1143. }
  1144. }
  1145. .pageContent {
  1146. position:relative;
  1147. background-color: #eaeef1;
  1148. min-height: 100vh;
  1149. padding-top: 8rpx;
  1150. padding-bottom: 100rpx;
  1151. }
  1152. .pad_8 {
  1153. background-color: #fff;
  1154. margin: 0rpx 8rpx 8rpx;
  1155. border-radius: 16rpx;
  1156. &.no-margin {
  1157. margin-top:-16rpx;
  1158. border-radius: 0 0 16rpx 16rpx;
  1159. }
  1160. }
  1161. .answer {
  1162. height: 80rpx;
  1163. line-height: 80rpx;
  1164. padding: 0rpx 24rpx;
  1165. display: flex;
  1166. align-items: center;
  1167. justify-content: space-between;
  1168. color: #666;
  1169. font-size: 30rpx;
  1170. }
  1171. .footer_btn {
  1172. background-color: #fff;
  1173. position: fixed;
  1174. bottom: 0rpx;
  1175. display: flex;
  1176. align-items: center;
  1177. justify-content: space-between;
  1178. width: 100%;
  1179. height: 98rpx;
  1180. padding: 0rpx 38rpx;
  1181. border-top: 1rpx solid #eee;
  1182. z-index: 9999999;
  1183. .flex_center {
  1184. flex:1;
  1185. display: flex;
  1186. justify-content: center;
  1187. align-items: center;
  1188. flex-direction: column;
  1189. margin:0 200rpx;
  1190. font-size: 24rpx;
  1191. color: #999999;
  1192. .up-icon {
  1193. margin-bottom:18rpx;
  1194. width:100%;
  1195. display: flex;
  1196. justify-content: center;
  1197. image {
  1198. width:58rpx;
  1199. height:21rpx;
  1200. }
  1201. }
  1202. }
  1203. .collect {
  1204. >view {
  1205. display: flex;
  1206. flex-direction: column;
  1207. align-items: center;
  1208. justify-content: center;
  1209. image {
  1210. width:32rpx;
  1211. height:32rpx;
  1212. margin-bottom:6rpx;
  1213. }
  1214. view {
  1215. font-size: 24rpx;
  1216. color: #999999;
  1217. }
  1218. }
  1219. }
  1220. }
  1221. .boxSty {
  1222. padding: 44rpx 41rpx 0rpx;
  1223. }
  1224. .liListSty {
  1225. border:1rpx solid #EEEEEE;
  1226. width: 88rpx;
  1227. height: 88rpx;
  1228. border-radius: 32rpx;
  1229. text-align: center;
  1230. line-height: 88rpx;
  1231. color: #333;
  1232. font-size: 32rpx;
  1233. float: left;
  1234. margin: 20rpx 23rpx;
  1235. &.isRight {
  1236. border:0;
  1237. color:#fff;
  1238. background: #36C75A;
  1239. }
  1240. &.isWrong {
  1241. border:0;
  1242. color:#fff;
  1243. background: #FF3B30;
  1244. }
  1245. &.disabled {
  1246. color:#EEEEEE;
  1247. }
  1248. }
  1249. .answerInfos {
  1250. padding: 25rpx 25rpx 25rpx 23rpx;
  1251. }
  1252. .answerTitle {
  1253. margin-bottom: 28rpx;
  1254. color: #666;
  1255. font-size: 30rpx;
  1256. }
  1257. .answerContent {
  1258. font-size: 30rpx;
  1259. color: #666;
  1260. }
  1261. .textChild {
  1262. display: inline-block;
  1263. vertical-align: middle;
  1264. }
  1265. .dialog {
  1266. position: fixed;
  1267. left:0;
  1268. top:0;
  1269. width:100%;
  1270. height:100%;
  1271. background-color: rgba(0,0,0,0.8);
  1272. display: flex;
  1273. flex-direction: column;
  1274. align-items: center;
  1275. justify-content: center;
  1276. z-index: 20000;
  1277. .pointer {
  1278. width:338rpx;
  1279. height:240rpx;
  1280. }
  1281. .text {
  1282. font-size: 32rpx;
  1283. color: #FFFFFF;
  1284. text-align: center;
  1285. }
  1286. .btn {
  1287. width: 242rpx;
  1288. height: 82rpx;
  1289. border: 2rpx solid #FFFFFF;
  1290. border-radius: 16rpx;
  1291. text-align: center;
  1292. line-height: 82rpx;
  1293. margin:41rpx auto;
  1294. color:#fff;
  1295. font-size: 32rpx;
  1296. }
  1297. }
  1298. </style>