questionBankTest.vue 37 KB

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