questionBankContinue.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105
  1. <template>
  2. <view class="questionBank">
  3. <uni-nav-bar @clickLeft="clickLeft" left-icon="back" :statusBar="true" :title="examData.examName"></uni-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 style="color: #666;font-size: 28rpx;"></view>
  20. <view class="leftLetters"></view>
  21. </view>
  22. <view class="titles" @click="showPhoto(bank.content)">
  23. <rich-text :nodes="bank.content"></rich-text>
  24. </view>
  25. </view>
  26. <template v-if="bank.type == 1">
  27. <view class="pad_8 titBox no-margin">
  28. <view v-if="!bank.ques">
  29. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
  30. <view class="activeTI">{{ ast[index] }}</view>
  31. <view class="flex_auto">
  32. {{ item.content }}
  33. <view v-if="item.imgUrl">
  34. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view v-if="bank.ques">
  40. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  41. <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>
  42. <view class="flex_auto">
  43. {{ item.content }}
  44. <view v-if="item.imgUrl">
  45. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <view v-if="bank.ques">
  52. <view class="pad_8 answer">
  53. <view>正确答案:{{ast[bank.ans-1]}}</view>
  54. <view>我的答案:{{ast[bank.ques-1] || ''}}</view>
  55. </view>
  56. <view class="pad_8 answerInfos">
  57. <view class="answerTitle">答案解析</view>
  58. <view class="answerContent">
  59. <rich-text :nodes="bank.analysisContent"></rich-text>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <template v-if="bank.type == 2">
  65. <view class="pad_8 titBox no-margin">
  66. <view v-if="!bank.ques">
  67. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
  68. <view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
  69. <view class="flex_auto">
  70. {{ item.content }}
  71. <view v-if="item.imgUrl">
  72. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view v-if="!bank.ques" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(bank.jsonStr)}" @click="checkboxSubmit(bankIndex)">
  78. 确认答案
  79. </view>
  80. <view v-if="bank.ques">
  81. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  82. <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>
  83. <view class="flex_auto">
  84. {{ item.content }}
  85. <view v-if="item.imgUrl">
  86. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view v-if="bank.ques">
  93. <view class="pad_8 answer">
  94. <view>正确答案:
  95. <text :key="ansItemIndex" v-for="(ansItem,ansItemIndex) in bank.ans">{{ast[ansItem-1]}}</text>
  96. </view>
  97. <view>我的答案:
  98. <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques">{{ast[quesItem-1]}}</text>
  99. </view>
  100. </view>
  101. <view class="pad_8 answerInfos">
  102. <view class="answerTitle">答案解析</view>
  103. <view class="answerContent">
  104. <rich-text :nodes="bank.analysisContent"></rich-text>
  105. </view>
  106. </view>
  107. </view>
  108. </template>
  109. <template v-if="bank.type == 3">
  110. <view class="pad_8 titBox no-margin">
  111. <view v-if="!bank.ques">
  112. <view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
  113. <view class="activeTI">{{ ast[index] }}</view>
  114. <view class="flex_auto">
  115. {{ item }}
  116. <view v-if="item.imgUrl">
  117. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <view v-if="bank.ques">
  123. <view v-for="(item, index) in judge" :key="index" class="lisSty">
  124. <text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  125. {{ item }}
  126. <view v-if="item.imgUrl">
  127. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view v-if="bank.ques">
  133. <view class="pad_8 answer">
  134. <view>正确答案:{{ast[bank.ans]}}</view>
  135. <view>我的答案:{{ast[bank.ques] || ''}}</view>
  136. </view>
  137. <view class="pad_8 answerInfos">
  138. <view class="answerTitle">答案解析</view>
  139. <view class="answerContent">
  140. <rich-text :nodes="bank.analysisContent"></rich-text>
  141. </view>
  142. </view>
  143. </view>
  144. </template>
  145. <!-- 简答题 -->
  146. <template v-if="bank.type == 5">
  147. <view class="pad_8 titBox">
  148. <view class="ans">
  149. <view class="ans_input" v-if="!bank.ques ||( !bank.ques.text && !bank.ques.imageList.length)">
  150. <view class="top flex">
  151. <image :data-index="bankIndex" class="icon" @click="chooseImg(bankIndex)" src="/static/camera.png" mode=""></image>
  152. <view class="progress">{{bank.ansText.imageList.length || '0'}}/4</view>
  153. <view class="submit" :class="{disabled:!bank.ansText.text && hasImgs(bank)}" @click="submitAns(bankIndex)" >确认答案</view>
  154. </view>
  155. <view class="textarea">
  156. <textarea v-model="bank.ansText.text" placeholder="在此输入答案"></textarea>
  157. </view>
  158. <view class="imgs" >
  159. <view class="img" v-for="(img,imgIndex) in bank.ansText.imageList" :key="imgIndex">
  160. <text @click="deleteImg(imgIndex,bankIndex)">x</text>
  161. <image :src="$method.splitImgHost(img, true)"></image>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="ans_submit answerInfos" v-if="bank.ques && (bank.ques.text || bank.ques.imageList.length)">
  166. <view class="answerTitle">我的答案:</view>
  167. {{bank.ques.text || ''}}
  168. <view class="imgs">
  169. <image class="img" v-for="(ques,quesIndex) in bank.ques.imageList" :key="quesIndex" :src="$method.splitImgHost(ques,true)"></image>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. <view v-if="bank.ques.text || bank.ques.imageList.length">
  175. <view class="pad_8 answerInfos">
  176. <view class="answerTitle">答案解析:</view>
  177. <view class="answerContent">
  178. <rich-text :nodes="bank.analysisContent"></rich-text>
  179. </view>
  180. </view>
  181. </view>
  182. </template>
  183. <!-- 案例题 -->
  184. <template v-if="bank.type == 4">
  185. <view class="tabs">
  186. <view class="tab"
  187. :class="{current:tabIndex == bank.current}"
  188. :key="tabIndex" v-for="(tab,tabIndex) in bank.jsonStr"
  189. @click="tabSelect(tabIndex,bankIndex)"
  190. >
  191. 问题{{tabIndex+1}}
  192. </view>
  193. </view>
  194. <view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
  195. <template v-if="ansItem.type == 1">
  196. <view class="pad_8 titBox">
  197. <view class="leftLetters">
  198. <view class="btnType">
  199. <text>单选</text>
  200. </view>
  201. </view>
  202. <view class="titles">
  203. <rich-text :nodes="ansItem.content"></rich-text>
  204. </view>
  205. <view v-if="!bank.ques[ansIndex]">
  206. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
  207. <view class="activeTI">{{ ast[childIndex] }}</view>
  208. <view class="flex_auto">
  209. <rich-text class="textChild" :nodes="option.content"></rich-text>
  210. <view v-if="option.imgUrl">
  211. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(option.imgUrl)"></image>
  212. </view>
  213. </view>
  214. </view>
  215. </view>
  216. <view v-if="bank.ques[ansIndex]">
  217. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
  218. <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>
  219. <view class="flex_auto">
  220. <rich-text :nodes="option.content"></rich-text>
  221. <view v-if="option.imgUrl">
  222. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(option.imgUrl)"></image>
  223. </view>
  224. </view>
  225. </view>
  226. </view>
  227. </view>
  228. <view v-if="bank.ques[ansIndex]">
  229. <view class="pad_8 answer">
  230. <view>正确答案:{{ast[bank.ans[ansIndex]-1]}}</view>
  231. <view>我的答案:{{ast[bank.ques[ansIndex]-1] || ''}}</view>
  232. </view>
  233. <view class="pad_8 answerInfos">
  234. <view class="answerTitle">答案解析</view>
  235. <view class="answerContent">
  236. <rich-text :nodes="option.analysisContent"></rich-text>
  237. </view>
  238. </view>
  239. </view>
  240. </template>
  241. <template v-if="ansItem.type == 2">
  242. <view class="pad_8 titBox">
  243. <view class="leftLetters">
  244. <view class="btnType">
  245. <text>多选</text>
  246. </view>
  247. </view>
  248. <view class="titles">
  249. <rich-text :nodes="ansItem.content"></rich-text>
  250. </view>
  251. <view v-if="!bank.ques[ansIndex]">
  252. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
  253. <view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
  254. <view class="flex_auto">
  255. <rich-text :nodes="option.content"></rich-text>
  256. <view v-if="option.imgUrl">
  257. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(option.imgUrl)"></image>
  258. </view>
  259. </view>
  260. </view>
  261. </view>
  262. <view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
  263. 确认答案
  264. </view>
  265. <view v-if="bank.ques && bank.ques[ansIndex]">
  266. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
  267. <text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}" class="activeTI">{{ ast[childindex] }}</text>
  268. <view class="flex_auto">
  269. <rich-text :nodes="option.content"></rich-text>
  270. <view v-if="option.imgUrl">
  271. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(option.imgUrl)"></image>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. </view>
  277. <view v-if="bank.ques[ansIndex]">
  278. <view class="pad_8 answer">
  279. <view>正确答案:
  280. <text :key="ansItemIndex1" v-for="(ansItem1,ansItemIndex1) in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
  281. </view>
  282. <view>我的答案:
  283. <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
  284. </view>
  285. </view>
  286. <view class="pad_8 answerInfos">
  287. <view class="answerTitle">答案解析</view>
  288. <view class="answerContent">
  289. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  290. </view>
  291. </view>
  292. </view>
  293. </template>
  294. <template v-if="ansItem.type == 3">
  295. <view class="pad_8 titBox">
  296. <view class="leftLetters">
  297. <view class="btnType">
  298. <text>判断</text>
  299. </view>
  300. </view>
  301. <view class="titles">
  302. <rich-text :nodes="ansItem.content"></rich-text>
  303. </view>
  304. <view v-if="!bank.ques[ansIndex]">
  305. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
  306. <view class="activeTI">{{ ast[childindex] }}</view>
  307. <view class="flex_auto">
  308. {{ option }}
  309. <view v-if="option.imgUrl">
  310. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(option.imgUrl)"></image>
  311. </view>
  312. </view>
  313. </view>
  314. </view>
  315. <view v-if="bank.ques[ansIndex]">
  316. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
  317. <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>
  318. <view class="flex_auto">
  319. {{ option }}
  320. <view v-if="option.imgUrl">
  321. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(option.imgUrl)"></image>
  322. </view>
  323. </view>
  324. </view>
  325. </view>
  326. </view>
  327. <view v-if="bank.ques[ansIndex]">
  328. <view class="pad_8 answer">
  329. <view>正确答案:{{ast[bank.ans[ansIndex]]}}</view>
  330. <view>我的答案:{{ast[bank.ques[ansIndex]] || ''}}</view>
  331. </view>
  332. <view class="pad_8 answerInfos">
  333. <view class="answerTitle">答案解析</view>
  334. <view class="answerContent">
  335. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  336. </view>
  337. </view>
  338. </view>
  339. </template>
  340. <!-- 简答题 -->
  341. <template v-if="ansItem.type == 5">
  342. <view class="pad_8 titBox_title">
  343. <view class="leftLetters">
  344. <view class="btnType">
  345. <text>简答</text>
  346. </view>
  347. </view>
  348. <view class="titles">
  349. <rich-text :nodes="ansItem.content"></rich-text>
  350. </view>
  351. </view>
  352. <view class="pad_8 titBox_title">
  353. <view class="ans">
  354. <view class="ans_input" v-if="!bank.ques[ansIndex] || (!bank.ques[ansIndex].text && !bank.ques[ansIndex].imageList.length)">
  355. <view class="top flex">
  356. <image class="icon" @click="chooseImgChild(bankIndex,ansIndex)" src="/static/08-10_032.jpg" mode=""></image>
  357. <view class="progress">{{ansItem.ansText.imageList.length || '0'}}/4</view>
  358. <view class="submit" :class="{disabled:!ansItem.ansText.text && hasImgs(ansItem)}" @click="submitAnsChild(bankIndex,ansIndex)">确认答案</view>
  359. </view>
  360. <view class="textarea">
  361. <textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea>
  362. </view>
  363. <view class="imgs">
  364. <view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" :key="imgIndex">
  365. <text @click="deleteImgChild(imgIndex,bankIndex,ansIndex)">x</text>
  366. <image :src="$method.splitImgHost(img, true)"></image>
  367. </view>
  368. </view>
  369. </view>
  370. <view class="ans_submit answerInfos" v-if="bank.ques[ansIndex] && (bank.ques[ansIndex].text || bank.ques[ansIndex].imageList.length)">
  371. <view class="answerTitle">我的答案</view>
  372. {{bank.ques[ansIndex].text || ''}}
  373. <view class="imgs" v-if="bank.ques[ansIndex] && bank.ques[ansIndex].imageList.length">
  374. <image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques,true)"></image>
  375. </view>
  376. </view>
  377. </view>
  378. </view>
  379. <view v-if="bank.ques[ansIndex]">
  380. <view class="pad_8 answerInfos">
  381. <view class="answerTitle">答案解析</view>
  382. <view class="answerContent">
  383. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  384. </view>
  385. </view>
  386. </view>
  387. </template>
  388. </view>
  389. </template>
  390. <view class="footer_btn">
  391. <view class="collect show" @click="collect(collectList[bankIndex], bankIndex)">
  392. <view v-if="collectList[bankIndex]">
  393. <image src="/static/icon/collected.png" mode=""></image>
  394. <view>取消收藏</view>
  395. </view>
  396. <view v-if="!collectList[bankIndex]">
  397. <image src="/static/icon/collect.png" mode=""></image>
  398. <view>收藏</view>
  399. </view>
  400. </view>
  401. <view class="flex_center" @click="openFooterTab">
  402. <view class="up-icon">
  403. <image src="/static/up.png"></image>
  404. </view>
  405. 答题卡
  406. </view>
  407. <view class="collect show" @click="pdsubmit">
  408. <view>
  409. <image src="/static/jj.png" mode=""></image>
  410. <view>交卷</view>
  411. </view>
  412. </view>
  413. </view>
  414. </view>
  415. </swiper-item>
  416. </swiper>
  417. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  418. <view class="popupView">
  419. <view class="popupTops">
  420. <view class="topIcon"></view>
  421. 点击编号即可跳转至对应题目
  422. </view>
  423. <view class="popupContent">
  424. <scroll-view scroll-y="true" style="height: 506rpx;">
  425. <view class="boxSty">
  426. <view v-for="(item, index) in questionList" :key="index" @click="changeIndex(index)" :class="{isRight:isRight(item,index),isWrong:isWrong(item,index),isOver:isOver(item,index),isPart: isPart(item, index)}" class="liListSty">{{ index + 1 }}</view>
  427. </view>
  428. </scroll-view>
  429. </view>
  430. </view>
  431. </u-popup>
  432. <view class="dialog" v-if="showDialog">
  433. <view class="text">左右滑动切换上下题</view>
  434. <view class="btn" @click="hideDialog">我知道了</view>
  435. </view>
  436. <u-popup v-model="showpopups" mode="center" border-radius="24" height="439rpx" width="640rpx" :mask-close-able="false">
  437. <view class="popboxs">
  438. <view class="classTops">温馨提示</view>
  439. <view class="textStys">
  440. {{
  441. cgType === 7
  442. ? '您还未交卷,确定结束做题吗?'
  443. : cgType === 8
  444. ? `您还有${lastCount}道题未作答, 现在继续作答,还是下次继续?`
  445. : cgType === 6
  446. ? `您还有${lastCount}道题未作答, 您确定要交卷吗?`
  447. : cgType == 9
  448. ? `您已完成所有题目,快去交卷吧!`
  449. : ''
  450. }}
  451. </view>
  452. <view class="classFootsty" v-if="cgType === 6">
  453. <view class="btnsty btns1" @click="submit">立即交卷</view>
  454. <view class="btnsty btns2" @click="showpopups = false">继续做题</view>
  455. </view>
  456. <view class="classFootsty" v-if="cgType === 7">
  457. <view class="btnsty btns1" @click="backPages">下次继续</view>
  458. <view class="btnsty btns2" @click="submit">结束做题</view>
  459. </view>
  460. <view class="classFootsty" v-if="cgType === 8">
  461. <view class="btnsty btns1" @click="backPages()">下次继续</view>
  462. <view class="btnsty btns2" @click="showpopups = false">继续作答</view>
  463. </view>
  464. <view class="classFootsty" v-if="cgType === 9">
  465. <view class="btnsty btns1" @click="showpopups = false">暂不交卷</view>
  466. <view class="btnsty btns2" @click="submit">立即交卷</view>
  467. </view>
  468. </view>
  469. </u-popup>
  470. </view>
  471. </template>
  472. <script>
  473. export default {
  474. data() {
  475. return {
  476. id:'',
  477. current:0,
  478. showpopups:false,
  479. questionList:[],
  480. ast: ['A', 'B', 'C', 'D','E','F','G'],
  481. judge:['错误','正确'],
  482. show: false,
  483. showDialog:false,
  484. bankList: [],
  485. collectList:[],
  486. goodsId:'',
  487. recordId:'',
  488. isLastCount: false, //是否有未答题目
  489. lastCount: 0, //剩余没有回答的题目数
  490. chapterId:'',
  491. moduleId:'',
  492. isSubmit:false,
  493. examData:{},
  494. orderGoodsId:'',
  495. cgType: 0 //对应设计稿弹窗编码
  496. };
  497. },
  498. onLoad(option){
  499. this.orderGoodsId = option.orderGoodsId || ''
  500. this.id = option.id || '';
  501. this.goodsId = option.goodsid || '';
  502. this.chapterId = option.chapterId || '';
  503. this.moduleId = option.moduleId || '';
  504. this.recordId = option.recordId || '';
  505. let showDialog = uni.getStorageSync('showDialog');
  506. if(showDialog) {
  507. this.showDialog = false;
  508. } else {
  509. this.showDialog = true;
  510. uni.setStorageSync('showDialog','1');
  511. }
  512. this.goodsQuestionList();
  513. },
  514. onUnload() {
  515. if(this.isSubmit) {
  516. return
  517. }
  518. this.examRecordEdit();
  519. },
  520. methods: {
  521. /**
  522. * 是否有上传图片
  523. */
  524. hasImgs(bank) {
  525. return bank.ansText.imageList.length == 0;
  526. },
  527. /**
  528. * @param {Object} state
  529. * @param {Object} index
  530. * 收藏
  531. */
  532. collect(state, index) {
  533. if (!state) {
  534. this.$api
  535. .collectQuestion({
  536. examId: this.id,
  537. questionId: this.questionList[index].questionId,
  538. goodsId: this.goodsId || '',
  539. orderGoodsId:this.orderGoodsId
  540. })
  541. .then(res => {
  542. if (res.data.code == 200) {
  543. this.$set(this.collectList, index, true);
  544. uni.showToast({
  545. title: '收藏成功',
  546. duration: 2000,
  547. icon: 'none'
  548. });
  549. this.getCollectInfo(index)
  550. }
  551. });
  552. } else {
  553. this.$api.deleteCollectQuestion(this.collectList[index].collectQuestionId).then(res => {
  554. if (res.data.code == 200) {
  555. this.$set(this.collectList, index, false);
  556. uni.showToast({
  557. title: '取消收藏成功',
  558. duration: 2000,
  559. icon: 'none'
  560. });
  561. }
  562. });
  563. }
  564. return;
  565. },
  566. /**
  567. * 点击后退按钮
  568. */
  569. clickLeft() {
  570. let ansCount = this.questionOverNum(true); //已答题数
  571. this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
  572. //所有题目答完
  573. if (this.lastCount == 0) {
  574. // this.testOver = true;
  575. this.cgType = 7;
  576. //未答完
  577. } else {
  578. this.cgType = 8;
  579. // this.isLastCount = true;
  580. }
  581. this.showpopups = true;
  582. },
  583. /**
  584. * 获取已经回答的题目数
  585. * hasSpecail (是否包含简答和案例)
  586. */
  587. questionOverNum(hasSpecail) {
  588. let count = 0;
  589. this.questionList.forEach(item => {
  590. if (item.type == 1 || item.type == 2 || item.type == 3) {
  591. if (item.ques) {
  592. count++;
  593. }
  594. } else if (item.type == 4) {
  595. //案例题
  596. if(hasSpecail) {
  597. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  598. if (jsonItem.type == 1 || jsonItem.type == 2 || jsonItem.type == 3) {
  599. if (item.ques[indexs]) {
  600. return true;
  601. } else {
  602. return false;
  603. }
  604. } else if (jsonItem.type == 5) {
  605. if (item.ques[indexs] && (item.ques[indexs].text.length || item.ques[indexs].imageList.length)) {
  606. return true;
  607. } else {
  608. return false;
  609. }
  610. }
  611. });
  612. if (isOver) {
  613. count++;
  614. console.log(item, 444);
  615. }
  616. }
  617. } else if (item.type == 5) {
  618. //简答题
  619. if(hasSpecail) {
  620. if (item.ques && (item.ques.text || item.ques.imageList.length)) {
  621. count++;
  622. }
  623. }
  624. }
  625. });
  626. return count;
  627. },
  628. /**
  629. * 返回上一页
  630. */
  631. backPages() {
  632. uni.navigateBack({
  633. delta: 1
  634. });
  635. },
  636. /**
  637. * 是否做完所有题目
  638. */
  639. isDoOver() {
  640. let questionOverNum = this.questionOverNum(true); //获取已经回答的题目数(包括简答和案例)
  641. if(this.questionList.length == questionOverNum) { //全部做完弹窗
  642. this.cgType = 9;
  643. this.showpopups = true;
  644. }
  645. },
  646. pdsubmit() {
  647. // if (this.bankType == 1) {
  648. let ansCount = this.questionOverNum(true); //已答题数
  649. this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
  650. //没有答完
  651. if (this.lastCount !== 0) {
  652. this.cgType = 6;
  653. this.showpopups = true;
  654. return;
  655. }
  656. // }
  657. this.submit();
  658. },
  659. goodsQuestionList() {
  660. //继续答题
  661. console.log("继续做题")
  662. this.$api.examReport(this.recordId).then(res => {
  663. let json = JSON.parse(res.data.data.historyExamJson)
  664. this.examData = res.data.data;
  665. this.questionList = json;
  666. })
  667. },
  668. /**
  669. * @param {Object} current
  670. * 获取收藏信息
  671. */
  672. getCollectInfo(current) {
  673. this.$api
  674. .getCollectInfo({
  675. examId: this.id,
  676. questionId: this.questionList[current].questionId,
  677. goodsId: this.goodsId,
  678. orderGoodsId:this.orderGoodsId
  679. })
  680. .then(res => {
  681. if (res.data.code == 500) {
  682. this.$set(this.collectList, current, false);
  683. } else if (res.data.code == 200) {
  684. this.$set(this.collectList, current, res.data.data);
  685. }
  686. });
  687. },
  688. /**
  689. * @param {Object} e单选点击
  690. */
  691. radioSelect(optionsId,bindex) {
  692. if(this.questionList[bindex].ques) return;
  693. this.$set(this.questionList[bindex],'ques',optionsId)
  694. this.isDoOver()
  695. },
  696. examRecordEdit() {
  697. if(!this.isSubmit) {
  698. let number = 0;
  699. let score = 0;
  700. let doQuestionNum = 0;
  701. let doQuestionIds = []; //做过的题目id
  702. this.questionList.length && this.questionList.forEach((item,index) => {
  703. if(item.type == 1) {
  704. if(item.ques == item.ans) {
  705. score += item.score;
  706. number++
  707. }
  708. if (item.ques) {
  709. doQuestionNum++;
  710. doQuestionIds.push(item.questionId)
  711. }
  712. } else if(item.type == 2) {
  713. let isRight = item.ques && item.ques.every((quesItem,quesIndex) => {
  714. return item.ques[quesIndex] == item.ans[quesIndex]
  715. })
  716. if(isRight) {
  717. score += item.score;
  718. number++
  719. }
  720. if (item.ques && item.ques.length) {
  721. doQuestionNum++;
  722. doQuestionIds.push(item.questionId)
  723. }
  724. } else if(item.type == 3) {
  725. if(item.ques == item.ans) {
  726. score += item.score;
  727. number++
  728. }
  729. if (item.ques) {
  730. doQuestionNum++;
  731. doQuestionIds.push(item.questionId)
  732. }
  733. } else if (item == 4) {
  734. if (item.ques.length) {
  735. doQuestionNum++;
  736. doQuestionIds.push(item.questionId)
  737. }
  738. } else if (item.type == 5) {
  739. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  740. doQuestionNum++;
  741. doQuestionIds.push(item.questionId)
  742. }
  743. }
  744. })
  745. this.$api.examRecordEdit({
  746. moduleExamId:this.moduleId || 0,
  747. chapterExamId:this.chapterId || 0,
  748. examId:this.id,
  749. doQuestionIds:doQuestionIds.join(''),
  750. goodsId:this.goodsId,
  751. orderGoodsId:this.orderGoodsId,
  752. recordId: this.recordId,
  753. rightQuestionNum:number,
  754. status:0,
  755. doQuestionNum: doQuestionNum,
  756. historyExamJson:JSON.stringify(this.questionList)
  757. }).then(res => {
  758. })
  759. }
  760. },
  761. /**
  762. * @param {Object} e单选点击
  763. */
  764. radioSelectChild(optionsId,ansIndex,bindex) {
  765. if(this.questionList[bindex].ques[ansIndex]) return;
  766. this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
  767. this.isDoOver()
  768. },
  769. /**
  770. * @param {Object} 多选点击
  771. */
  772. checkboxSelect(optionsId,bindex,index) {
  773. this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
  774. },
  775. /**
  776. * @param {Object} 多选点击
  777. */
  778. checkboxSelectChild(bindex,ansIndex,childIndex) {
  779. this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
  780. },
  781. /**
  782. * 提交数据
  783. */
  784. submit() {
  785. let score = 0; //计算总分
  786. let reportStatus = 0;
  787. let number = 0;
  788. let allScore = 0;
  789. let passScore = 0;
  790. let doQuestionNum = 0;
  791. let doWrongQuestionIds = []; //错题和未做题id(客观题)
  792. let doQuestionIds = []; //做过的题目id
  793. let rightQuestionIds = []; //做对的题目id
  794. let lessQuestionNum = 0;
  795. this.questionList.forEach((item,index) => {
  796. passScore = item.passScore
  797. if(item.type == 1) {
  798. if(item.ques == item.ans) {
  799. score += item.score;
  800. number++
  801. rightQuestionIds.push(item.questionId)
  802. } else { //错误
  803. doWrongQuestionIds.push(item.questionId)
  804. }
  805. allScore += item.score
  806. if (item.ques) {
  807. doQuestionNum++;
  808. doQuestionIds.push(item.questionId)
  809. }
  810. } else if(item.type == 2) {
  811. let isRight = item.ans && item.ans.every((quesItem,quesIndex) => {
  812. if(item.ques) {
  813. return item.ques[quesIndex] == item.ans[quesIndex]
  814. } else {
  815. return false;
  816. }
  817. })
  818. if(isRight) {
  819. score += item.score;
  820. number++
  821. rightQuestionIds.push(item.questionId)
  822. } else {
  823. let hasPart = false;
  824. let checkboxScore = 1; //获取单题总分数
  825. item.ques && item.ques.forEach((ques,quesIndex) => {
  826. //选错一个全扣
  827. if(item.ques) {
  828. if(item.ans.indexOf(item.ques[quesIndex]) == -1) {
  829. checkboxScore = 0;
  830. }
  831. } else {
  832. checkboxScore = 0;
  833. }
  834. })
  835. console.log(checkboxScore)
  836. //没选错
  837. if(checkboxScore) {
  838. checkboxScore = 0;
  839. item.ans.forEach((ans,quesIndex) => {
  840. //漏选扣一部分,对n题给n X partScore 分
  841. if(item.ques) {
  842. if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
  843. checkboxScore += item.partScore;
  844. hasPart = true;
  845. }
  846. } else {
  847. checkboxScore = 0;
  848. }
  849. })
  850. }
  851. if(!hasPart) { //0分
  852. item.scoreResult = 0;
  853. doWrongQuestionIds.push(item.questionId)
  854. } else { //部分分
  855. // number++;
  856. // doWrongQuestionIds.push(item.questionId)
  857. lessQuestionNum++;
  858. item.scoreResult = checkboxScore;
  859. score += checkboxScore;
  860. // rightQuestionIds.push(item.questionId)
  861. }
  862. }
  863. allScore += item.score;
  864. if (item.ques && item.ques.length) {
  865. doQuestionNum++;
  866. doQuestionIds.push(item.questionId)
  867. }
  868. } else if(item.type == 3) {
  869. if(item.ques == item.ans) {
  870. score += item.score;
  871. number++
  872. rightQuestionIds.push(item.questionId)
  873. } else {
  874. doWrongQuestionIds.push(item.questionId)
  875. }
  876. allScore += item.score;
  877. if (item.ques) {
  878. doQuestionNum++;
  879. doQuestionIds.push(item.questionId)
  880. }
  881. } else if (item.type == 4) {
  882. allScore += item.score;
  883. if (item.ques && item.ques.length) {
  884. doQuestionNum++;
  885. doQuestionIds.push(item.questionId)
  886. }
  887. } else if (item.type == 5) {
  888. allScore += item.score;
  889. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  890. doQuestionNum++;
  891. doQuestionIds.push(item.questionId)
  892. }
  893. }
  894. })
  895. //大于及格
  896. if(score >= passScore) {
  897. reportStatus = 1
  898. } else {
  899. reportStatus = 0
  900. }
  901. this.$api.examRecordEdit({
  902. examId:this.id,
  903. goodsId:this.goodsId,
  904. orderGoodsId:this.orderGoodsId,
  905. reportStatus:reportStatus,
  906. totalScore:allScore,
  907. recordId: this.recordId,
  908. rightQuestionNum:number,
  909. lessQuestionNum:lessQuestionNum,
  910. status:1,
  911. moduleExamId:this.moduleId || 0,
  912. chapterExamId:this.chapterId || 0,
  913. doQuestionIds:doQuestionIds.join(','),
  914. rightQuestionIds:rightQuestionIds.join(','),
  915. doQuestionNum: doQuestionNum,
  916. performance: score,
  917. historyExamJson:JSON.stringify(this.questionList)
  918. }).then(res => {
  919. this.isSubmit = true;
  920. if(res.data.code == 200) {
  921. uni.showToast({
  922. title: '交卷成功',
  923. duration: 2000,
  924. icon:'none'
  925. });
  926. setTimeout(() => {
  927. uni.redirectTo({
  928. url:'/pages2/bank/question_report?orderGoodsId='+this.orderGoodsId+'&id='+this.recordId+'&examId='+this.id
  929. })
  930. },2000)
  931. }
  932. })
  933. //错题集id提交(客观题)
  934. this.$api.examWrongRecord({
  935. examId: this.id,
  936. goodsId: this.goodsId,
  937. questionIds: doWrongQuestionIds,
  938. recordId: this.recordId,
  939. orderGoodsId:this.orderGoodsId
  940. }).then(res => {
  941. });
  942. },
  943. isCheckboxChecked(arr) {
  944. return arr.some(item => {
  945. if (item.checked) {
  946. return true;
  947. }
  948. });
  949. },
  950. /**
  951. * @param {Object} 多选确认
  952. */
  953. checkboxSubmit(bindex) {
  954. if(this.questionList[bindex].ques) return;
  955. let arr = [];
  956. this.questionList[bindex].jsonStr.forEach(item => {
  957. if(item.checked) {
  958. arr.push(item.optionsId)
  959. }
  960. })
  961. if(!arr.length) {
  962. uni.showToast({
  963. title:'请选择答案',
  964. icon:'none'
  965. })
  966. return;
  967. }
  968. this.$set(this.questionList[bindex],'ques',arr)
  969. this.isDoOver()
  970. },
  971. /**
  972. * @param {Object} 多选确认
  973. */
  974. checkboxSubmitChild(bindex,ansIndex) {
  975. if(this.questionList[bindex].ques[ansIndex]) return;
  976. let arr = [];
  977. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
  978. if(item.checked) {
  979. arr.push(item.optionsId)
  980. }
  981. })
  982. if(!arr.length) {
  983. uni.showToast({
  984. title:'请选择答案',
  985. icon:'none'
  986. })
  987. return;
  988. }
  989. this.$set(this.questionList[bindex].ques,ansIndex,arr)
  990. this.isDoOver()
  991. },
  992. judgeSelect(index,bindex) {
  993. if(this.questionList[bindex].ques) return;
  994. this.$set(this.questionList[bindex],'ques',index+'')
  995. this.isDoOver()
  996. },
  997. judgeSelectChild(ansindex,childindex,bindex) {
  998. if(this.questionList[bindex].ques[ansindex]) return;
  999. this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
  1000. this.isDoOver()
  1001. },
  1002. /**
  1003. * 立即离开并交卷
  1004. */
  1005. leaveNow() {
  1006. this.needBack = false;
  1007. this.isSubmit = true;
  1008. uni.navigateBack({
  1009. delta: 1
  1010. });
  1011. let score = 0; //计算总分
  1012. let reportStatus = 0;
  1013. let number = 0; //做对的题目数量
  1014. let doQuestionNum = 0; //做过的题目数量
  1015. let allScore = 0; //总分
  1016. let passScore = 0;
  1017. let doWrongQuestionIds = []; //错题和未做题id(客观题)
  1018. let doQuestionIds = []; //做过的题目id
  1019. let rightQuestionIds = []; //做对的题目id
  1020. let lessQuestionNum = 0;
  1021. this.questionList.forEach((item, index) => {
  1022. // passScore = item.passScore
  1023. if (item.type == 1) {
  1024. //正确
  1025. if (item.ques == item.ans) {
  1026. item.scoreResult = item.score;
  1027. score += item.score;
  1028. number++;
  1029. rightQuestionIds.push(item.questionId)
  1030. } else { //错误
  1031. item.scoreResult = 0;
  1032. if (item.ques) {
  1033. doWrongQuestionIds.push(item.questionId);
  1034. }
  1035. }
  1036. allScore += item.score;
  1037. if (item.ques) {
  1038. doQuestionNum++;
  1039. doQuestionIds.push(item.questionId)
  1040. }
  1041. } else if (item.type == 2) {
  1042. let isRight =
  1043. item.ans &&
  1044. item.ans.every((quesItem, quesIndex) => {
  1045. if(item.ques) {
  1046. return item.ques[quesIndex] == item.ans[quesIndex];
  1047. } else {
  1048. return false;
  1049. }
  1050. });
  1051. if (isRight) {
  1052. score += item.score;
  1053. number++;
  1054. item.scoreResult = item.score;
  1055. rightQuestionIds.push(item.questionId)
  1056. } else {
  1057. let hasPart = false;
  1058. let checkboxScore = 1; //获取单题总分数
  1059. item.ques && item.ques.forEach((ques,quesIndex) => {
  1060. //选错一个全扣
  1061. if(item.ques) {
  1062. if(item.ans.indexOf(item.ques[quesIndex]) == -1) {
  1063. checkboxScore = 0;
  1064. }
  1065. } else {
  1066. checkboxScore = 0;
  1067. }
  1068. })
  1069. console.log(checkboxScore)
  1070. //没选错
  1071. if(checkboxScore) {
  1072. checkboxScore = 0;
  1073. item.ans.forEach((ans,quesIndex) => {
  1074. //漏选扣一部分,对n题给n X partScore 分
  1075. if(item.ques) {
  1076. if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
  1077. checkboxScore += item.partScore;
  1078. hasPart = true;
  1079. }
  1080. } else {
  1081. checkboxScore = 0;
  1082. }
  1083. })
  1084. }
  1085. if(!hasPart) { //0分
  1086. item.scoreResult = 0;
  1087. if (item.ques) {
  1088. doWrongQuestionIds.push(item.questionId);
  1089. }
  1090. } else { //部分分
  1091. // number++;
  1092. lessQuestionNum++
  1093. // doWrongQuestionIds.push(item.questionId)
  1094. item.scoreResult = checkboxScore;
  1095. score += checkboxScore;
  1096. // rightQuestionIds.push(item.questionId)
  1097. }
  1098. }
  1099. allScore += item.score;
  1100. if (item.ques && item.ques.length) {
  1101. doQuestionNum++;
  1102. doQuestionIds.push(item.questionId)
  1103. }
  1104. } else if (item.type == 3) {
  1105. if (item.ques == item.ans) {
  1106. item.scoreResult = item.score;
  1107. score += item.score;
  1108. number++;
  1109. rightQuestionIds.push(item.questionId)
  1110. } else {
  1111. item.scoreResult = 0;
  1112. if (item.ques) {
  1113. doWrongQuestionIds.push(item.questionId);
  1114. }
  1115. }
  1116. allScore += item.score;
  1117. if (item.ques) {
  1118. doQuestionNum++;
  1119. doQuestionIds.push(item.questionId)
  1120. }
  1121. } else if (item.type == 4) {
  1122. if (item.ques && item.ques.length) {
  1123. doQuestionNum++;
  1124. doQuestionIds.push(item.questionId)
  1125. }
  1126. } else if (item.type == 5) {
  1127. if (item.ques && (item.ques.imageList || item.ques.text)) {
  1128. doQuestionNum++;
  1129. doQuestionIds.push(item.questionId)
  1130. }
  1131. }
  1132. });
  1133. //大于60分及格
  1134. if(score >= 60) {
  1135. reportStatus = 1
  1136. } else {
  1137. reportStatus = 0
  1138. }
  1139. //交卷
  1140. this.$api
  1141. .examRecordEdit({
  1142. examId: this.id,
  1143. goodsId: this.goodsId,
  1144. orderGoodsId:this.orderGoodsId,
  1145. reportStatus:reportStatus,
  1146. recordId: this.recordId,
  1147. rightQuestionNum: number,
  1148. lessQuestionNum:lessQuestionNum,
  1149. status: 1,
  1150. moduleExamId:this.moduleId || 0,
  1151. chapterExamId:this.chapterId || 0,
  1152. doQuestionIds:doQuestionIds.join(','),
  1153. rightQuestionIds:rightQuestionIds.join(','),
  1154. doQuestionNum: doQuestionNum,
  1155. performance: score,
  1156. totalScore: allScore,
  1157. examTime: parseInt(this.allTimes),
  1158. doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
  1159. historyExamJson: JSON.stringify(this.questionList)
  1160. })
  1161. .then(res => {
  1162. this.isSubmit = true;
  1163. if (res.data.code == 200) {
  1164. }
  1165. });
  1166. //错题集id提交(客观题)
  1167. this.$api.examWrongRecord({
  1168. moduleExamId:this.moduleId || 0,
  1169. chapterExamId:this.chapterId || 0,
  1170. examId: this.id,
  1171. goodsId: this.goodsId,
  1172. orderGoodsId:this.orderGoodsId,
  1173. questionIds: doWrongQuestionIds,
  1174. recordId: this.recordId
  1175. }).then(res => {
  1176. });
  1177. },
  1178. openFooterTab() {
  1179. this.show = true;
  1180. },
  1181. hideDialog() {
  1182. this.showDialog = false
  1183. },
  1184. changeIndex(index) {
  1185. this.current = index
  1186. },
  1187. swiperChange(e) {
  1188. this.current = e.detail.current;
  1189. },
  1190. deleteImg(imgIndex,bankIndex) {
  1191. this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
  1192. },
  1193. deleteImgChild(imgIndex,bankIndex,ansIndex) {
  1194. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
  1195. },
  1196. chooseImg(bankindex) {
  1197. uni.chooseImage({
  1198. count: 1, //默认9
  1199. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  1200. sourceType: ['album','camera'], //从相册选择
  1201. success: (res) => {
  1202. let self = this;
  1203. // console.log(JSON.stringify(res.tempFilePaths));
  1204. let img = res.tempFilePaths[0];
  1205. uni.getImageInfo({
  1206. src: img,
  1207. success: async res => {
  1208. let canvasWidth = res.width; //图片原始长宽
  1209. let canvasHeight = res.height;
  1210. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1211. uni.compressImage({
  1212. src: img,
  1213. quality: 75,
  1214. width: '50%',
  1215. height: '50%',
  1216. success: async rest => {
  1217. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1218. this.questionList[bankindex].ansText.imageList.push(dir)
  1219. }
  1220. });
  1221. } else {
  1222. const dir = await self.uploadFile(img, 0);
  1223. this.questionList[bankindex].ansText.imageList.push(dir)
  1224. }
  1225. }
  1226. });
  1227. }
  1228. })
  1229. },
  1230. chooseImgChild(bankindex,ansindex) {
  1231. uni.chooseImage({
  1232. count: 1, //默认9
  1233. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  1234. sourceType: ['album','camera'], //从相册选择
  1235. success: (res) => {
  1236. let self = this;
  1237. // console.log(JSON.stringify(res.tempFilePaths));
  1238. let img = res.tempFilePaths[0];
  1239. uni.getImageInfo({
  1240. src: img,
  1241. success: async res => {
  1242. let canvasWidth = res.width; //图片原始长宽
  1243. let canvasHeight = res.height;
  1244. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1245. uni.compressImage({
  1246. src: img,
  1247. quality: 75,
  1248. width: '50%',
  1249. height: '50%',
  1250. success: async rest => {
  1251. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1252. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  1253. }
  1254. });
  1255. } else {
  1256. const dir = await self.uploadFile(img, 0);
  1257. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  1258. }
  1259. }
  1260. });
  1261. }
  1262. })
  1263. },
  1264. uploadFile(options, int) {
  1265. var self = this;
  1266. return new Promise((resolve, reject) => {
  1267. var data = {
  1268. orderGoodsId:this.orderGoodsId,
  1269. imageStatus: int
  1270. };
  1271. self.$api.aliyunpolicy(data).then(res => {
  1272. console.log(res.data,6)
  1273. if(res.data.code!=200){
  1274. self.$method.showToast('签名错误'+JSON.stringify(res.data))
  1275. return
  1276. }
  1277. var ossToken = res.data.data.resultContent;
  1278. if(ossToken.host==null||ossToken.host==undefined){
  1279. self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
  1280. return
  1281. }
  1282. uni.uploadFile({
  1283. url: ossToken.host,
  1284. name: 'file',
  1285. filePath: options,
  1286. fileType: 'image',
  1287. header: {
  1288. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  1289. },
  1290. formData: {
  1291. key: ossToken.dir,
  1292. OSSAccessKeyId: ossToken.accessid,
  1293. policy: ossToken.policy,
  1294. Signature: ossToken.signature,
  1295. callback: ossToken.callback,
  1296. success_action_status: 200
  1297. },
  1298. success: result => {
  1299. if (result.statusCode === 200) {
  1300. resolve(ossToken.dir);
  1301. } else {
  1302. uni.showToast({
  1303. title: '上传失败',
  1304. icon: 'none'
  1305. });
  1306. return;
  1307. }
  1308. },
  1309. fail: error => {
  1310. uni.showToast({
  1311. title: '上传接口报错'+error,
  1312. icon: 'none'
  1313. });
  1314. return;
  1315. }
  1316. });
  1317. });
  1318. });
  1319. },
  1320. submitAns(bankindex) {
  1321. console.log(this.questionList[bankindex])
  1322. if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
  1323. uni.showToast({
  1324. title: '请输入内容或上传图片',
  1325. duration: 2000,
  1326. icon:'none'
  1327. });
  1328. return
  1329. }
  1330. this.$set(this.questionList[bankindex],'ques',{
  1331. imageList:this.questionList[bankindex].ansText.imageList,
  1332. text:this.questionList[bankindex].ansText.text,
  1333. })
  1334. this.isDoOver()
  1335. },
  1336. submitAnsChild(bankindex,ansindex) {
  1337. if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
  1338. uni.showToast({
  1339. title: '请输入内容或上传图片',
  1340. duration: 2000,
  1341. icon:'none'
  1342. });
  1343. return
  1344. }
  1345. this.$set(this.questionList[bankindex].ques,ansindex,{
  1346. imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  1347. text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  1348. })
  1349. this.isDoOver()
  1350. },
  1351. isRight(item,index) {
  1352. //单选
  1353. if(this.questionList[index].ques) {
  1354. if(item.type == 1) {
  1355. return this.questionList[index].ques == this.questionList[index].ans;
  1356. //多选
  1357. } else if(item.type == 2) {
  1358. //每一项都相等
  1359. return this.questionList[index].ans.every((item,i) => {
  1360. return item == this.questionList[index].ques[i];
  1361. })
  1362. //判断
  1363. } else if(item.type == 3) {
  1364. return this.questionList[index].ques == this.questionList[index].ans;
  1365. } else {
  1366. return false;
  1367. }
  1368. } else {
  1369. return false;
  1370. }
  1371. },
  1372. right(bankIndex,ansIndex,option) {
  1373. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  1374. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
  1375. return true
  1376. } else {
  1377. return false;
  1378. }
  1379. } else {
  1380. return false;
  1381. }
  1382. },
  1383. wrong(bankIndex,ansIndex,option) {
  1384. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  1385. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
  1386. return true;
  1387. } else {
  1388. return false;
  1389. }
  1390. } else {
  1391. return false;
  1392. }
  1393. },
  1394. isWrong(item,index) {
  1395. if(this.questionList[index].ques) {
  1396. //单选
  1397. if(item.type == 1) {
  1398. return this.questionList[index].ques != this.questionList[index].ans;
  1399. //多选
  1400. } else if(item.type == 2) {
  1401. //每一项都相等
  1402. return this.questionList[index].ques.some((item, i) => {
  1403. return this.questionList[index].ans.indexOf(item) == -1;
  1404. });
  1405. //判断
  1406. } else if(item.type == 3) {
  1407. return this.questionList[index].ques != this.questionList[index].ans;
  1408. } else {
  1409. return false;
  1410. }
  1411. } else {
  1412. return false;
  1413. }
  1414. },
  1415. isPart(item,index) {
  1416. if (this.questionList[index].ques) {
  1417. if(item.type == 2) {
  1418. let isWrong = this.questionList[index].ques.some((item, i) => {
  1419. return this.questionList[index].ans.indexOf(item) == -1;
  1420. });
  1421. let isRight = this.questionList[index].ans.every((item, i) => {
  1422. return item == this.questionList[index].ques[i];
  1423. });
  1424. if (!isRight && !isWrong) {
  1425. return true;
  1426. }
  1427. }
  1428. } else {
  1429. return false;
  1430. }
  1431. },
  1432. isOver(item,index) {
  1433. if(this.questionList[index].ques) {
  1434. if (item.type == 4) { //案例题
  1435. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  1436. if (jsonItem.type == 1 || jsonItem.type == 2 || jsonItem.type == 3) {
  1437. if (item.ques[indexs]) {
  1438. return true;
  1439. } else {
  1440. return false;
  1441. }
  1442. } else if (jsonItem.type == 5) {
  1443. if (item.ques[indexs] && (item.ques[indexs].text || item.ques[indexs].imageList.length)) {
  1444. console.log('chil')
  1445. return true;
  1446. } else {
  1447. return false;
  1448. }
  1449. }
  1450. });
  1451. if (isOver) {
  1452. return true;
  1453. } else {
  1454. return false;
  1455. }
  1456. } else if (item.type == 5) { //简答题
  1457. //每一项都相等
  1458. if(item.ques && (item.ques.imageList.length || item.ques.text)) {
  1459. return true;
  1460. }
  1461. //判断
  1462. } else {
  1463. return false;
  1464. }
  1465. } else {
  1466. return false;
  1467. }
  1468. },
  1469. tabSelect(index,bankindex) {
  1470. this.$set(this.questionList[bankindex],'current',index)
  1471. },
  1472. showPhoto(contentStr) {
  1473. if(contentStr && typeof contentStr == 'string') {
  1474. let reg = /<img[^>]*src[=\'\"\s]+([^\'\"]*)[\'\"]?[^>]*>/gi;
  1475. let strArr = contentStr.match(reg);
  1476. strArr.forEach((str,index) => {
  1477. strArr[index] = str.replace(reg,'$1')
  1478. })
  1479. // 预览图片
  1480. uni.previewImage({
  1481. urls: strArr,
  1482. longPressActions: {
  1483. itemList: ['发送给朋友', '保存图片', '收藏'],
  1484. success: function(data) {
  1485. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  1486. },
  1487. fail: function(err) {
  1488. console.log(err.errMsg);
  1489. }
  1490. }
  1491. });
  1492. }
  1493. }
  1494. }
  1495. };
  1496. </script>
  1497. <style lang="scss" scoped>
  1498. .questionBank {
  1499. width:100%;
  1500. height:100vh;
  1501. display: flex;
  1502. flex-direction: column;
  1503. }
  1504. .swiper {
  1505. width:100%;
  1506. flex:1;
  1507. }
  1508. .lisSty {
  1509. margin-bottom: 16rpx;
  1510. display: flex;
  1511. align-items: center;
  1512. .flex_auto {
  1513. flex:1;
  1514. }
  1515. }
  1516. .activeTI {
  1517. vertical-align: middle;
  1518. display: inline-block;
  1519. border: 1rpx solid #eee;
  1520. border-radius: 50rpx;
  1521. height: 48rpx;
  1522. line-height: 46rpx;
  1523. text-align: center;
  1524. width: 48rpx;
  1525. margin-right: 15rpx;
  1526. color: #666;
  1527. font-size: 30rpx;
  1528. &.right {
  1529. color:#fff;
  1530. background:#36C75A;
  1531. }
  1532. &.wrong {
  1533. color:#fff;
  1534. background:#FF3B30;
  1535. }
  1536. &.checked {
  1537. color:#fff;
  1538. background:#007AFF;
  1539. }
  1540. }
  1541. .submit_checkbox {
  1542. position:fixed;
  1543. left:0;
  1544. right:0;
  1545. bottom:120rpx;
  1546. margin: 20rpx auto;
  1547. left:0;
  1548. right:0;
  1549. bottom:120rpx;
  1550. margin: 20rpx auto;
  1551. width: 526rpx;
  1552. height: 80rpx;
  1553. background: rgba(0, 122, 255, 1);
  1554. color:#fff;
  1555. text-align: center;
  1556. line-height: 80rpx;
  1557. font-size: 30rpx;
  1558. border-radius: 40rpx;
  1559. &.disabled {
  1560. opacity: 0.6;
  1561. }
  1562. }
  1563. .titles {
  1564. overflow: hidden;
  1565. margin-bottom: 24rpx;
  1566. }
  1567. .titBox {
  1568. padding: 41rpx 25rpx 24rpx 25rpx;
  1569. }
  1570. .titBox_title {
  1571. padding: 21rpx;
  1572. }
  1573. .tabs {
  1574. margin:10rpx;
  1575. display: flex;
  1576. .tab {
  1577. margin: 0 4rpx;
  1578. padding:10rpx 13rpx;
  1579. text-align: center;
  1580. color: #007aff;
  1581. font-size: 28rpx;
  1582. border-radius: 16rpx;
  1583. background:#fff;
  1584. &.current {
  1585. color:#fff;
  1586. background: #007AFF;
  1587. }
  1588. }
  1589. }
  1590. .ans {
  1591. margin:8rpx 8rpx 8rpx;
  1592. .ans_input {
  1593. border-radius: 16rpx;
  1594. background:#fff;
  1595. .top {
  1596. border-bottom:1rpx solid #EEEEEE;
  1597. padding: 16rpx;
  1598. display: flex;
  1599. align-items: center;
  1600. .icon {
  1601. margin-right:20rpx;
  1602. width: 40rpx;
  1603. height: 38rpx;
  1604. }
  1605. .progress {
  1606. flex:1;
  1607. }
  1608. .submit {
  1609. width: 168rpx;
  1610. height: 48rpx;
  1611. line-height: 48rpx;
  1612. text-align: center;
  1613. color:#fff;
  1614. font-size: 30rpx;
  1615. background: #007AFF;
  1616. border-radius: 24rpx;
  1617. &.disabled {
  1618. opacity: 0.6;
  1619. }
  1620. }
  1621. }
  1622. .textarea {
  1623. textarea {
  1624. width:100%;
  1625. height:287rpx;
  1626. padding:10rpx;
  1627. }
  1628. }
  1629. .imgs {
  1630. overflow: hidden;
  1631. display: flex;
  1632. width:100%;
  1633. .img {
  1634. width: 104rpx;
  1635. height: 104rpx;
  1636. border-radius: 8rpx;
  1637. position:relative;
  1638. margin:20rpx;
  1639. text {
  1640. position:absolute;
  1641. right:-15rpx;
  1642. top:-15rpx;
  1643. width:30rpx;
  1644. height:30rpx;
  1645. text-align: center;
  1646. line-height: 30rpx;
  1647. color:#fff;
  1648. background:#FF3B30;
  1649. border-radius:50%;
  1650. }
  1651. image {
  1652. width:100%;
  1653. height:100%;
  1654. }
  1655. }
  1656. }
  1657. }
  1658. .ans_submit {
  1659. padding:16rpx;
  1660. border-radius: 16rpx;
  1661. background:#fff;
  1662. .imgs {
  1663. overflow: hidden;
  1664. display: flex;
  1665. width:100%;
  1666. .img {
  1667. width: 104rpx;
  1668. height: 104rpx;
  1669. border-radius: 8rpx;
  1670. position:relative;
  1671. margin:20rpx;
  1672. image {
  1673. width:100%;
  1674. height:100%;
  1675. }
  1676. }
  1677. }
  1678. }
  1679. }
  1680. .leftLetters {
  1681. display: flex;
  1682. align-items: center;
  1683. width: 220rpx;
  1684. .btnType {
  1685. padding: 5rpx 10rpx;
  1686. border: 1rpx solid #007aff;
  1687. border-radius: 10rpx;
  1688. background-color: rgba(0, 122, 255, 0.1);
  1689. font-size: 28rpx;
  1690. color: #007aff;
  1691. margin-right: 15rpx;
  1692. }
  1693. }
  1694. .firstLetter {
  1695. display: flex;
  1696. justify-content: space-between;
  1697. align-items: center;
  1698. margin-bottom: 30rpx;
  1699. }
  1700. .popupView {
  1701. height: 100%;
  1702. padding-bottom: 100rpx;
  1703. .popupTops {
  1704. height: 77rpx;
  1705. border-bottom: 1rpx solid #eee;
  1706. text-align: center;
  1707. line-height: 77rpx;
  1708. font-size: 24rpx;
  1709. color: #999;
  1710. position: relative;
  1711. .topIcon {
  1712. position: absolute;
  1713. top: 10rpx;
  1714. left: 50%;
  1715. transform: translateX(-50%);
  1716. width: 80rpx;
  1717. height: 8rpx;
  1718. background-color: #999;
  1719. border-radius: 4rpx;
  1720. }
  1721. }
  1722. .popupContent {
  1723. }
  1724. }
  1725. .pageContent {
  1726. position:relative;
  1727. background-color: #eaeef1;
  1728. height: 100%;
  1729. overflow-y: scroll;
  1730. padding-top: 8rpx;
  1731. padding-bottom: 100rpx;
  1732. }
  1733. .pad_8 {
  1734. background-color: #fff;
  1735. margin: 0rpx 8rpx 8rpx;
  1736. border-radius: 16rpx;
  1737. &.no-margin {
  1738. margin-top:-16rpx;
  1739. border-radius: 0 0 16rpx 16rpx;
  1740. }
  1741. }
  1742. .answer {
  1743. height: 80rpx;
  1744. line-height: 80rpx;
  1745. padding: 0rpx 24rpx;
  1746. display: flex;
  1747. align-items: center;
  1748. justify-content: space-between;
  1749. color: #666;
  1750. font-size: 30rpx;
  1751. }
  1752. .footer_btn {
  1753. background-color: #fff;
  1754. z-index: 10078;
  1755. position: fixed;
  1756. bottom: 0rpx;
  1757. display: flex;
  1758. align-items: center;
  1759. justify-content: space-between;
  1760. width: 100%;
  1761. height: 98rpx;
  1762. padding: 0rpx 38rpx;
  1763. border-top: 1rpx solid #eee;
  1764. .flex_center {
  1765. flex:1;
  1766. display: flex;
  1767. justify-content: center;
  1768. align-items: center;
  1769. flex-direction: column;
  1770. margin:0 200rpx;
  1771. font-size: 24rpx;
  1772. color: #999999;
  1773. .up-icon {
  1774. margin-bottom:18rpx;
  1775. width:100%;
  1776. display: flex;
  1777. justify-content: center;
  1778. image {
  1779. width:58rpx;
  1780. height:21rpx;
  1781. }
  1782. }
  1783. }
  1784. .collect {
  1785. visibility: hidden;
  1786. width:100rpx;
  1787. &.show {
  1788. visibility: visible;
  1789. }
  1790. >view {
  1791. display: flex;
  1792. flex-direction: column;
  1793. align-items: center;
  1794. justify-content: center;
  1795. image {
  1796. width:32rpx;
  1797. height:32rpx;
  1798. margin-bottom:6rpx;
  1799. }
  1800. view {
  1801. font-size: 24rpx;
  1802. color: #999999;
  1803. }
  1804. }
  1805. }
  1806. }
  1807. .boxSty {
  1808. padding: 44rpx 41rpx 0rpx;
  1809. }
  1810. .liListSty {
  1811. border:1rpx solid #EEEEEE;
  1812. width: 88rpx;
  1813. height: 88rpx;
  1814. border-radius: 32rpx;
  1815. text-align: center;
  1816. line-height: 88rpx;
  1817. color: #333;
  1818. font-size: 32rpx;
  1819. float: left;
  1820. margin: 20rpx 23rpx;
  1821. &.isRight {
  1822. border:1rpx solid #EEEEEE;
  1823. color:#fff;
  1824. background: #36C75A;
  1825. }
  1826. &.isPart {
  1827. border: 1rpx solid #eeeeee;
  1828. color: #fff;
  1829. background: #FFC53D;
  1830. }
  1831. &.isWrong {
  1832. border:1rpx solid #EEEEEE;
  1833. color:#fff;
  1834. background: #FF3B30;
  1835. }
  1836. &.isOver {
  1837. border: 1rpx solid #eeeeee;
  1838. color: #fff;
  1839. background: blue;
  1840. }
  1841. }
  1842. .answerInfos {
  1843. padding: 25rpx 25rpx 25rpx 23rpx;
  1844. }
  1845. .answerTitle {
  1846. margin-bottom: 28rpx;
  1847. color: #666;
  1848. font-size: 30rpx;
  1849. }
  1850. .answerContent {
  1851. font-size: 30rpx;
  1852. color: #666;
  1853. }
  1854. .textChild {
  1855. display: inline-block;
  1856. vertical-align: middle;
  1857. }
  1858. .dialog {
  1859. position: fixed;
  1860. left:0;
  1861. top:0;
  1862. width:100%;
  1863. height:100%;
  1864. background-color: rgba(0,0,0,0.8);
  1865. display: flex;
  1866. flex-direction: column;
  1867. align-items: center;
  1868. justify-content: center;
  1869. z-index: 20000;
  1870. .pointer {
  1871. width:338rpx;
  1872. height:240rpx;
  1873. }
  1874. .text {
  1875. font-size: 32rpx;
  1876. color: #FFFFFF;
  1877. text-align: center;
  1878. }
  1879. .btn {
  1880. width: 242rpx;
  1881. height: 82rpx;
  1882. border: 2rpx solid #FFFFFF;
  1883. border-radius: 16rpx;
  1884. text-align: center;
  1885. line-height: 82rpx;
  1886. margin:41rpx auto;
  1887. color:#fff;
  1888. font-size: 32rpx;
  1889. }
  1890. }
  1891. .popboxs {
  1892. width: 100%;
  1893. height: 100%;
  1894. display: flex;
  1895. flex-direction: column;
  1896. align-items: center;
  1897. }
  1898. .classTops {
  1899. flex-shrink: 0;
  1900. padding: 39rpx 0rpx 4rpx;
  1901. font-weight: bold;
  1902. color: #333;
  1903. font-size: 30rpx;
  1904. }
  1905. .textStys {
  1906. width: 100%;
  1907. flex: 1;
  1908. padding: 36rpx;
  1909. }
  1910. .classFootsty {
  1911. flex-shrink: 0;
  1912. display: flex;
  1913. align-items: center;
  1914. justify-content: center;
  1915. padding: 10rpx 0rpx 40rpx;
  1916. .btnsty {
  1917. width: 200rpx;
  1918. height: 80rpx;
  1919. border-radius: 40rpx;
  1920. font-weight: bold;
  1921. font-size: 30rpx;
  1922. text-align: center;
  1923. line-height: 80rpx;
  1924. }
  1925. .btns1 {
  1926. background-color: #f5f5f5;
  1927. color: #007aff;
  1928. }
  1929. .btns2 {
  1930. margin-left: 40rpx;
  1931. background-color: #007aff;
  1932. color: #ffffff;
  1933. }
  1934. }
  1935. </style>