| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145 | <template>  <view class="questionBank">    <uni-nav-bar      @clickLeft="clickLeft"      left-icon="back"      ref="navbar"      :statusBar="true"      :title="examData.examName"    ></uni-nav-bar>    <swiper      class="swiper"      :current="current"      @change="swiperChange"      :interval="interval"    >      <swiper-item v-for="(bank, bankIndex) in questionList" :key="bankIndex">        <view class="pageContent">          <view class="pad_8 titBox">            <view class="firstLetter">              <view class="leftLetters">                <view class="btnType">                  <text v-if="bank.type == 1">单选</text>                  <text v-if="bank.type == 2">多选</text>                  <text v-if="bank.type == 3">判断</text>                  <text v-if="bank.type == 4">案例</text>                  <text v-if="bank.type == 5">简答</text>                </view>                <text>{{ bankIndex + 1 }}/{{ questionList.length }}</text>              </view>              <view style="color: #666; font-size: 28rpx">{{                countdown(lastTime)              }}</view>            </view>            <view class="titles" @click="showPhoto(bank.content)"              ><rich-text :nodes="bank.content"></rich-text            ></view>          </view>          <template v-if="bank.type == 1">            <view class="pad_8 titBox no-margin">              <view v-if="!bank.ques">                <view                  v-for="(item, index) in bank.jsonStr"                  :key="index"                  class="lisSty"                  @click="radioSelect(item.optionsId, bankIndex)"                >                  <view class="activeTI">{{ ast[index] }}</view>                  <view class="flex_auto"                    >{{ item.content }}                    <view v-if="item.imgUrl">                      <image                        style="width: 600rpx"                        mode="widthFix"                        :src="$method.splitImgHost(item.imgUrl)"                      ></image>                    </view>                  </view>                </view>              </view>              <view v-if="bank.ques">                <view                  v-for="(item, index) in bank.jsonStr"                  :key="index"                  class="lisSty"                  @click="radioSelect(item.optionsId, bankIndex)"                >                  <text                    :class="{                      right:                        bankType == 1 && (item.optionsId == bank.ques ||                        item.optionsId == bank.ans),                      wrong:                        bankType == 1 && item.optionsId == bank.ques && bank.ques != bank.ans,                      user_choose: bankType == 2 && (item.optionsId == bank.ques),                    }"                    class="activeTI"                  >                    {{ ast[index] }}                  </text>                  <view class="flex_auto">                    {{ item.content }}                    <view v-if="item.imgUrl">                      <image                        style="width: 600rpx"                        mode="widthFix"                        :src="$method.splitImgHost(item.imgUrl)"                      ></image>                    </view>                  </view>                </view>              </view>            </view>            <view v-if="bankType == 1 && bank.ques">              <view class="pad_8 answer">                <view>正确答案:{{ ast[bank.ans - 1] }} </view>                <view>我的答案:{{ ast[bank.ques - 1] }}</view>              </view>              <view class="pad_8 answerInfos">                <view class="answerTitle">答案解析</view>                <view class="answerContent"                  ><rich-text :nodes="bank.analysisContent"></rich-text                ></view>              </view>            </view>          </template>          <template v-if="bank.type == 2">            <view class="pad_8 titBox no-margin">              <view v-if="!bank.ques">                <view                  v-for="(item, index) in bank.jsonStr"                  :key="index"                  class="lisSty"                  @click="checkboxSelect(item.optionsId, bankIndex, index)"                >                  <view :class="{ checked: item.checked }" class="activeTI">{{                    ast[index]                  }}</view>                  <view class="flex_auto">                    {{ item.content }}                    <view v-if="item.imgUrl">                      <image                        style="width: 600rpx"                        mode="widthFix"                        :src="$method.splitImgHost(item.imgUrl)"                      ></image>                    </view>                  </view>                </view>              </view>              <view v-if="bank.ques">                <view                  v-for="(item, index) in bank.jsonStr"                  :key="index"                  class="lisSty"                  @click="checkboxSelect(item.optionsId, bankIndex, index)"                >                  <text                    :class="{                      right:                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 ||                        bank.ans.indexOf(item.optionsId) != -1),                      wrong:                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 &&                        bank.ans.indexOf(item.optionsId) == -1),                      user_choose: bankType == 2 && item.checked,                    }"                    class="activeTI"                  >                    {{ ast[index] }}                  </text>                  <view class="flex_auto">                    {{ item.content }}                    <view v-if="item.imgUrl">                      <image                        style="width: 600rpx"                        mode="widthFix"                        :src="$method.splitImgHost(item.imgUrl)"                      ></image>                    </view>                  </view>                </view>              </view>              <view                v-if="bankType == 2 || (bankType == 1 && !bank.ques)"                class="submit_checkbox"                :class="{ disabled: !isCheckboxChecked(bank.jsonStr) }"                @click="checkboxSubmit(bankIndex)"                >确认答案</view              >            </view>            <view v-if="bankType == 1 && bank.ques">              <view class="pad_8 answer">                <view>                  正确答案:                  <text                    v-for="(ansItem, ansIndex) in bank.ans"                    :key="ansIndex"                    >{{ ast[ansItem - 1] }}</text                  >                </view>                <view>                  我的答案:                  <text                    v-for="(quesItem, quesIndex) in bank.ques"                    :key="quesIndex"                    >{{ ast[quesItem - 1] }}</text                  >                </view>              </view>              <view class="pad_8 answerInfos">                <view class="answerTitle">答案解析</view>                <view class="answerContent"                  ><rich-text :nodes="bank.analysisContent"></rich-text                ></view>              </view>            </view>          </template>          <template v-if="bank.type == 3">            <view class="pad_8 titBox no-margin">              <view v-if="!bank.ques">                <view                  v-for="(item, index) in judge"                  :key="index"                  class="lisSty"                  @click="judgeSelect(index, bankIndex)"                >                  <view class="activeTI">{{ ast[index] }}</view>                  <view class="flex_auto">                    {{ item }}                    <view v-if="item.imgUrl">                      <image                        style="width: 600rpx"                        mode="widthFix"                        :src="$method.splitImgHost(item.imgUrl)"                      ></image>                    </view>                  </view>                </view>              </view>              <view v-if="bank.ques">                <view                  v-for="(item, index) in judge"                  :key="index"                  class="lisSty"                  @click="judgeSelect(index, bankIndex)"                >                  <text                    :class="{                      right: bankType == 1 && (index == (bank.ques == 1 ? 0 : 1) || index != bank.ans),                      wrong: bankType == 1 && (index == (bank.ques == 1 ? 0 : 1) && bank.ques != bank.ans),                      user_choose: bankType == 2 && (index == (bank.ques == 1 ? 0 : 1)),                    }"                    class="activeTI"                  >                    {{ ast[index] }}                  </text>                  <view class="flex_auto">                    {{ item }}                    <view v-if="item.imgUrl">                      <image                        style="width: 600rpx"                        mode="widthFix"                        :src="$method.splitImgHost(item.imgUrl)"                      ></image>                    </view>                  </view>                </view>              </view>            </view>            <view v-if="bankType == 1 && bank.ques">              <view class="pad_8 answer">                <view>正确答案:{{ ast[bank.ans == 1 ? 0 : 1] }}</view>                <view>我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>              </view>              <view class="pad_8 answerInfos">                <view class="answerTitle">答案解析</view>                <view class="answerContent"                  ><rich-text :nodes="bank.analysisContent"></rich-text                ></view>              </view>            </view>          </template>          <!-- 简答题 -->          <template v-if="bank.type == 5">            <view class="pad_8 titBox">              <view class="ans">                <view                  class="ans_input"                  v-if="                    bankType == 2 || (bankType == 1 && (!bank.ques ||                    (!bank.ques.imageList.length && !bank.ques.text)))                  "                >                  <view class="top flex">                    <image                      :data-index="bankIndex"                      class="icon"                      @click="chooseImg(bankIndex)"                      src="/static/camera.png"                      mode=""                    ></image>                    <view class="progress"                      >{{ bank.ansText.imageList.length || "0" }}/4</view                    >                    <view                      class="submit"                      :class="{ disabled: !bank.ansText.text && hasImgs(bank) }"                      @click="submitAns(bankIndex)"                      >确认答案</view                    >                  </view>                  <view class="textarea">                    <textarea                      v-model="bank.ansText.text"                      placeholder="在此输入答案"                    ></textarea>                  </view>                  <view class="imgs">                    <view                      class="img"                      v-for="(img, imgIndex) in bank.ansText.imageList"                      :key="imgIndex"                    >                      <text @click="deleteImg(imgIndex, bankIndex)">x</text>                      <image :src="$method.splitImgHost(img, true)"></image>                    </view>                  </view>                </view>                <view                  class="ans_submit answerInfos"                  v-if="                    bankType == 1 && bank.ques && (bank.ques.imageList.length || bank.ques.text)                  "                >                  <view class="answerTitle">我的答案:</view>                  {{ bank.ques.text }}                  <view class="imgs"                    ><image                      class="img"                      :key="quesIndex"                      v-for="(ques, quesIndex) in bank.ques.imageList"                      :src="$method.splitImgHost(ques, true)"                    ></image                  ></view>                </view>              </view>            </view>            <view              v-if="bankType == 1 && bank.ques && (bank.ques.imageList.length || bank.ques.text)"            >              <view class="pad_8 answerInfos">                <view class="answerTitle">答案解析:</view>                <view class="answerContent"                  ><rich-text :nodes="bank.analysisContent"></rich-text                ></view>              </view>            </view>          </template>          <!-- 案例题 -->          <template v-if="bank.type == 4">            <view class="tabs">              <view                class="tab"                :class="{ current: tabIndex == bank.current }"                :key="tabIndex"                v-for="(tab, tabIndex) in bank.jsonStr"                @click="tabSelect(tabIndex, bankIndex)"              >                问题{{ tabIndex + 1 }}              </view>            </view>            <view              v-for="(ansItem, ansIndex) in bank.jsonStr"              v-if="bank.current == ansIndex"              :key="ansIndex"            >              <template v-if="ansItem.type == 1">                <view class="pad_8 titBox">                  <view class="leftLetters">                    <view class="btnType">                      <text>单选</text>                    </view>                  </view>                  <view class="titles"                    ><rich-text :nodes="ansItem.content"></rich-text                  ></view>                  <view v-if="!bank.ques[ansIndex]">                    <view                      v-for="(option, childIndex) in ansItem.optionsList"                      :key="childIndex"                      class="lisSty"                      @click="                        radioSelectChild(option.optionsId, ansIndex, bankIndex)                      "                    >                      <view class="activeTI">{{ ast[childIndex] }}</view>                      <view class="flex_auto">                        <rich-text                          class="textChild"                          :nodes="option.content"                        ></rich-text>                        <view v-if="option.imgUrl">                          <image                            style="width: 600rpx"                            mode="widthFix"                            :src="$method.splitImgHost(option.imgUrl)"                          ></image>                        </view>                      </view>                    </view>                  </view>                  <view v-if="bank.ques[ansIndex]">                    <view                      v-for="(option, childIndex) in ansItem.optionsList"                      :key="childIndex"                      class="lisSty"                      @click="                        radioSelectChild(option.optionsId, ansIndex, bankIndex)                      "                    >                      <text                        :class="{                          right:                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] ||                            option.optionsId == bank.ans[ansIndex]),                          wrong:                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] &&                            bank.ques[ansIndex] != bank.ans[ansIndex]),                          user_choose: bankType == 2 && (option.optionsId == bank.ques[ansIndex]),                        }"                        class="activeTI"                      >                        {{ ast[childIndex] }}                      </text>                      <view class="flex_auto">                        <rich-text :nodes="option.content"></rich-text>                        <view v-if="option.imgUrl">                          <image                            style="width: 600rpx"                            mode="widthFix"                            :src="$method.splitImgHost(option.imgUrl)"                          ></image>                        </view>                      </view>                    </view>                  </view>                </view>                <view v-if="bankType == 1 && bank.ques[ansIndex]">                  <view class="pad_8 answer">                    <view>正确答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>                    <view>我的答案:{{ ast[bank.ques[ansIndex] - 1] }}</view>                  </view>                  <view class="pad_8 answerInfos">                    <view class="answerTitle">答案解析</view>                    <view class="answerContent"                      ><rich-text :nodes="option.analysisContent"></rich-text                    ></view>                  </view>                </view>              </template>              <template v-if="ansItem.type == 2">                <view class="pad_8 titBox">                  <view class="leftLetters">                    <view class="btnType">                      <text>多选</text>                    </view>                  </view>                  <view class="titles"                    ><rich-text :nodes="ansItem.content"></rich-text                  ></view>                  <view v-if="!bank.ques[ansIndex]">                    <view                      v-for="(option, childindex) in ansItem.optionsList"                      :key="childindex"                      class="lisSty"                      @click="                        checkboxSelectChild(bankIndex, ansIndex, childindex)                      "                    >                      <view                        :class="{ checked: option.checked }"                        class="activeTI"                        >{{ ast[childindex] }}</view                      >                      <view class="flex_auto">                        <rich-text :nodes="option.content"></rich-text>                        <view v-if="option.imgUrl">                          <image                            style="width: 600rpx"                            mode="widthFix"                            :src="$method.splitImgHost(option.imgUrl)"                          ></image>                        </view>                      </view>                    </view>                  </view>                  <view                    v-if="bankType == 2 || (bankType == 1 && !bank.ques[ansIndex])"                    class="submit_checkbox"                    :class="{                      disabled: !isCheckboxChecked(ansItem.optionsList),                    }"                    @click="checkboxSubmitChild(bankIndex, ansIndex)"                    >确认答案</view                  >                  <view v-if="bank.ques && bank.ques[ansIndex]">                    <view                      v-for="(option, childindex) in ansItem.optionsList"                      :key="childindex"                      class="lisSty"                      @click="                        checkboxSelectChild(bankIndex, ansIndex, childindex)                      "                    >                      <text                        :class="{                          right: bankType == 1 && right(bankIndex, ansIndex, option),                          wrong: bankType == 1 && wrong(bankIndex, ansIndex, option),                          user_choose: bankType == 2 && option.checked,                        }"                        class="activeTI"                      >                        {{ ast[childindex] }}                      </text>                      <view class="flex_auto">                        <rich-text :nodes="option.content"></rich-text>                        <view v-if="option.imgUrl">                          <image                            style="width: 600rpx"                            mode="widthFix"                            :src="$method.splitImgHost(option.imgUrl)"                          ></image>                        </view>                      </view>                    </view>                  </view>                </view>                <view v-if="bankType == 1 && bank.ques[ansIndex]">                  <view class="pad_8 answer">                    <view>                      正确答案:                      <text                        :key="ansItemIndex1"                        v-for="(ansItem1, ansItemIndex1) in bank.ans[ansIndex]"                        >{{ ast[ansItem1 - 1] }}</text                      >                    </view>                    <view>                      我的答案:                      <text                        :key="quesItemIndex"                        v-for="(quesItem, quesItemIndex) in bank.ques[ansIndex]"                        >{{ ast[quesItem - 1] }}</text                      >                    </view>                  </view>                  <view class="pad_8 answerInfos">                    <view class="answerTitle">答案解析</view>                    <view class="answerContent"                      ><rich-text :nodes="ansItem.analysisContent"></rich-text                    ></view>                  </view>                </view>              </template>              <template v-if="ansItem.type == 3">                <view class="pad_8 titBox">                  <view class="leftLetters">                    <view class="btnType">                      <text>判断</text>                    </view>                  </view>                  <view class="titles"                    ><rich-text :nodes="ansItem.content"></rich-text                  ></view>                  <view v-if="!bank.ques[ansIndex]">                    <view                      v-for="(option, childindex) in judge"                      :key="childindex"                      class="lisSty"                      @click="judgeSelectChild(ansIndex, childindex, bankIndex)"                    >                      <view class="activeTI">{{ ast[childindex] }}</view>                      <view class="flex_auto">                        {{ option }}                        <view v-if="option.imgUrl">                          <image                            style="width: 600rpx"                            mode="widthFix"                            :src="$method.splitImgHost(option.imgUrl)"                          ></image>                        </view>                      </view>                    </view>                  </view>                  <view v-if="bank.ques[ansIndex]">                    <view                      v-for="(option, childindex) in judge"                      :key="childindex"                      class="lisSty"                      @click="judgeSelectChild(ansIndex, childindex, bankIndex)"                    >                      <text                        :class="{                          right:                            bankType == 1 && (childindex == (bank.ques[ansIndex] == 1 ? 0 : 1) ||                            childindex != bank.ans[ansIndex]),                          wrong:                            bankType == 1 && (childindex == (bank.ques[ansIndex] == 1 ? 0 : 1) &&                            bank.ques[ansIndex] != bank.ans[ansIndex]),                          user_choose: bankType == 2 && (childindex == (bank.ques[ansIndex] == 1 ? 0 : 1)),                        }"                        class="activeTI"                      >                        {{ ast[childindex] }}                      </text>                      <view class="flex_auto">                        {{ option }}                        <view v-if="option.imgUrl">                          <image                            style="width: 600rpx"                            mode="widthFix"                            :src="$method.splitImgHost(option.imgUrl)"                          ></image>                        </view>                      </view>                    </view>                  </view>                </view>                <view v-if="bankType == 1 && bank.ques[ansIndex]">                  <view class="pad_8 answer">                    <view>正确答案:{{ ast[bank.ans[ansIndex] == 1 ? 0 : 1] }}</view>                    <view>我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view>                  </view>                  <view class="pad_8 answerInfos">                    <view class="answerTitle">答案解析</view>                    <view class="answerContent"                      ><rich-text :nodes="ansItem.analysisContent"></rich-text                    ></view>                  </view>                </view>              </template>              <!-- 简答题 -->              <template v-if="ansItem.type == 5">                <view class="pad_8 titBox_title">                  <view class="leftLetters">                    <view class="btnType">                      <text>简答</text>                    </view>                  </view>                  <view><rich-text :nodes="ansItem.content"></rich-text></view>                </view>                <view class="pad_8 titBox_title">                  <view class="ans">                    <view                      class="ans_input"                      v-if="                        bankType == 2 || (bankType == 1 &&                        (!bank.ques[ansIndex] ||                        (!bank.ques[ansIndex].text &&                          !bank.ques[ansIndex].imageList.length)))                      "                    >                      <view class="top flex">                        <image                          class="icon"                          @click="chooseImgChild(bankIndex, ansIndex)"                          src="/static/camera.png"                          mode=""                        ></image>                        <view class="progress"                          >{{ ansItem.ansText.imageList.length || "0" }}/4</view                        >                        <view                          class="submit"                          :class="{                            disabled: !ansItem.ansText.text && hasImgs(ansItem),                          }"                          @click="submitAnsChild(bankIndex, ansIndex)"                          >确认答案</view                        >                      </view>                      <view class="textarea">                        <textarea                          v-model="ansItem.ansText.text"                          placeholder="在此输入答案"                        ></textarea>                      </view>                      <view class="imgs">                        <view                          class="img"                          v-for="(img, imgIndex) in ansItem.ansText.imageList"                          :key="imgIndex"                        >                          <text                            @click="                              deleteImgChild(imgIndex, bankIndex, ansIndex)                            "                            >x</text                          >                          <image :src="$method.splitImgHost(img, true)"></image>                        </view>                      </view>                    </view>                    <view                      class="ans_submit answerInfos"                      v-if="                        bankType == 1 && bank.ques[ansIndex] &&                        (bank.ques[ansIndex].imageList.length ||                          bank.ques[ansIndex].text)                      "                    >                      <view class="answerTitle">我的答案</view>                      {{ bank.ques[ansIndex].text || "" }}                      <view class="imgs">                        <image                          class="img"                          v-for="(ques, quesIndex) in bank.ques[ansIndex]                            .imageList"                          :key="quesIndex"                          :src="$method.splitImgHost(ques, true)"                        ></image>                      </view>                    </view>                  </view>                </view>                <view                  v-if="                    bankType == 1 && (bank.ques[ansIndex].imageList.length ||                    bank.ques[ansIndex].text)                  "                >                  <view class="pad_8 answerInfos">                    <view class="answerTitle">答案解析</view>                    <view class="answerContent"                      ><rich-text :nodes="ansItem.analysisContent"></rich-text                    ></view>                  </view>                </view>              </template>            </view>          </template>          <view class="footer_btn">            <view              class="collect"            >            </view>            <view class="flex_center" @click="openFooterTab">              <view class="up-icon">                <image src="/static/up.png"></image>              </view>              答题卡            </view>            <view class="collect show" @click="pdsubmit">              <view>                <image src="/static/jj.png" mode=""></image>                <view>交卷</view>              </view>            </view>          </view>        </view>      </swiper-item>    </swiper>    <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">      <view class="popupView">        <view class="popupTops">          <view class="topIcon"></view>          点击编号即可跳转至对应题目        </view>        <view class="popupContent">          <scroll-view scroll-y="true" style="height: 506rpx">            <view class="boxSty">              <view                v-for="(item, index) in questionList"                :key="index"                @click="changeIndex(index)"                :class="{                  isRight: bankType == 1 && isRight(item, index),                  isWrong: bankType == 1 && isWrong(item, index),                  isPart: bankType == 1 && isPart(item, index),                  isOver: bankType == 1 && isOver(item, index),                  check_ans: bankType == 2 && isCheck(item, index),                }"                class="liListSty"              >                {{ index + 1 }}              </view>            </view>          </scroll-view>        </view>      </view>    </u-popup>    <view class="dialog" v-if="showDialog">      <image class="pointer" src="/static/pointer.png" mode=""></image>      <view class="text">左右滑动切换上下题</view>      <view class="btn" @click="showDialog = false">我知道了</view>    </view>    <view class="dialog-arrow" v-if="showArrow">      <image class="pointer" src="/static/arrow-left.png" mode=""></image>      <view class="text">您当前正在测试, 若想退出请点击左上角返回按钮。</view>      <view class="btn" @click="showArrow = false">我知道了</view>    </view>    <view class="dialog_wrap" v-if="testOver">      <view class="bg"></view>      <view class="dialog">        <view class="title">温馨提示</view>        <view class="content">          <view>您已完成所有题目,</view>          <view>快去交卷吧!</view>        </view>        <view class="btns">          <view class="btn" @click="noSubmit()">暂不交卷</view>          <view class="btn active" @click="submitNow()">立即交卷</view>        </view>      </view>    </view>    <view class="dialog_wrap" v-if="isLastCount">      <view class="bg"></view>      <view class="dialog">        <view class="title">温馨提示</view>        <view class="content">          <view            >您当前正在测试,还剩{{ lastCount }}道题未完成,离开视为交卷</view          >        </view>        <view class="btns">          <view class="btn" @click="noLeave()">暂不离开</view>          <view class="btn active" @click="leaveNow()">继续离开</view>        </view>      </view>    </view>    <u-popup      v-model="showpopups"      mode="center"      border-radius="24"      height="439rpx"      width="640rpx"      :mask-close-able="false"    >      <view class="popboxs">        <view class="classTops">温馨提示</view>        <view class="textStys">          {{            cgType === 7              ? "您还未交卷,确定结束做题吗?"              : cgType === 8              ? `您还有${lastCount}道题未作答, 现在继续作答,还是下次继续?`              : cgType === 6              ? `您还有${lastCount}道题未作答, 您确定要交卷吗?`              : cgType == 9              ? `您已完成所有题目,快去交卷吧!`              : ""          }}        </view>        <view class="classFootsty" v-if="cgType === 6">          <view class="btnsty btns1" @click="submit">立即交卷</view>          <view class="btnsty btns2" @click="showpopups = false">继续做题</view>        </view>        <view class="classFootsty" v-if="cgType === 7">          <view class="btnsty btns1" @click="backPages">下次继续</view>          <view class="btnsty btns2" @click="submit">结束做题</view>        </view>        <view class="classFootsty" v-if="cgType === 8">          <view class="btnsty btns1" @click="backPages()">下次继续</view>          <view class="btnsty btns2" @click="showpopups = false">继续作答</view>        </view>        <view class="classFootsty" v-if="cgType === 9">          <view class="btnsty btns1" @click="showpopups = false">暂不交卷</view>          <view class="btnsty btns2" @click="submit">立即交卷</view>        </view>      </view>    </u-popup>  </view></template><script>	import {mapGetters,mapActions} from 'vuex'export default {	computed:{		...mapGetters(['sysTime']),	},  data() {    return {			subscribeId:0,      showpopups: false,      examId: "",      current: 0,      questionList: [],      ast: ["A", "B", "C", "D", "E", "F", "G"],      judge: ["正确", "错误"],      ans: [],      ques: [],      show: false,      showDialog: false,      bankList: [],      collectList: [],      recordId: "",      isSubmit: false,      lastTime: 0, //剩余考试时长      allTimes: 0, //总考试时长      timer: null,      wrongList: [],      bankType: 2, //试卷类型      needBack: false, //是否是考试      testOver: false,      isLastCount: false, //是否有未答题目      lastCount: 0, //剩余没有回答的题目数      showArrow: false, //退出提示      gradeId: "",      examData: {},			eachExamId:0,			normal:'',			isAutoSubmit:false,      cgType: 0, //对应设计稿弹窗编码			examStartTime:0,			examEndTime:0,    };  },  async onLoad(option) {		console.log(option)				this.examStartTime = option.examStartTime;		this.examEndTime = option.examEndTime;		this.subscribeId = option.subscribeId || ''    this.current = +option.current || 0;		this.eachExamId = option.eachExamId    this.examId = option.examId;		this.allTimes = this.examEndTime - this.examStartTime || "";    let isBack = option.isback;    let showDialog = uni.getStorageSync("showDialog");    if (showDialog) {      this.showDialog = false;    } else {      this.showDialog = true;      uni.setStorageSync("showDialog", "1");    }    //考试被迫返回    if (isBack) {      let app = getApp();      let globalData = app.globalData;      for (var k in globalData.bankData) {        this[k] = globalData.bankData[k];      }      this.showArrow = true;		      this.timer = setInterval(() => {        if (this.lastTime <= 0) {          clearInterval(this.timer);          uni.showToast({            icon: "none",            mask: true,            title: "考试时间已到,系统将自动交卷",            duration: 10000,          });										this.isAutoSubmit = true;          this.submit();          return;        }        this.lastTime--;      }, 1000);    } else {      //进入页面      await this.bankExam();			await this.setSystemTime()      this.goodsQuestionList();    }  },  onUnload() {    if (this.isSubmit) {      clearInterval(this.timer);      return;    }    //考试试卷 阻止ios手势返回,自动跳回答题页    if (this.needBack) {      let app = getApp();      app.globalData.bankData = this.$data;      clearInterval(this.timer);      uni.navigateTo({        url:          "/pages2/bank/questionBank?examId=" +          this.examId +          "&eachExamId=" +          this.eachExamId +          "&isback=true"+					"&subscribeId="+					this.subscribeId+					'&examStartTime='+this.examStartTime+					'&examEndTime='+this.examEndTime      });    } else {      //点击返回按钮确认允许退出,记录答题记录      clearInterval(this.timer);      this.mockRecordEdit();    }  },  methods: {		...mapActions(['setSystemTime']),    /**     * 是否有上传图片     */    hasImgs(bank) {      return bank.ansText.imageList.length == 0;    },    /**     * 获取试卷类型2考试,1练习     */    bankExam() {      return new Promise((resolve) => {        this.$api.bankExam(this.examId).then((res) => {          this.bankType = res.data.data.doType;          this.examData = res.data.data;          if (this.bankType == 2) {            this.needBack = true;          }          resolve();        });      });    },    /**     * 点击后退按钮     */    clickLeft() {      if (this.bankType == 1) {        let ansCount = this.questionOverNum(true); //已答题数        this.lastCount = this.questionList.length - ansCount; //统计未答完的题数        //所有题目答完        if (this.lastCount == 0) {          // this.testOver = true;          this.cgType = 7;          //未答完        } else {          this.cgType = 8;          // this.isLastCount = true;        }        this.showpopups = true;      } else if (this.bankType == 2) {        let ansCount = this.questionOverNum(true); //已答题数        this.lastCount = this.questionList.length - ansCount; //统计未答完的题数        //所有题目答完        if (this.lastCount == 0) {          this.testOver = true;          //未答完        } else {          this.isLastCount = true;        }      }    },    /**     * 返回上一页     */    backPages() {      this.needBack = false;      uni.navigateBack({        delta: 1,      });    },    /**     * 获取已经回答的题目数     * hasSpecail (是否包含简答和案例)     */    questionOverNum(hasSpecail) {      let count = 0;      this.questionList.forEach((item) => {        if (item.type == 1 || item.type == 2 || item.type == 3) {          if (item.ques) {            count++;          }        } else if (item.type == 4) {          //案例题          if (hasSpecail) {            let isOver = item.jsonStr.every((jsonItem, indexs) => {              if (                jsonItem.type == 1 ||                jsonItem.type == 2 ||                jsonItem.type == 3              ) {                if (item.ques[indexs]) {                  return true;                } else {                  return false;                }              } else if (jsonItem.type == 5) {                if (                  item.ques[indexs] &&                  (item.ques[indexs].text || item.ques[indexs].imageList.length)                ) {                  console.log("chil");                  return true;                } else {                  return false;                }              }            });            if (isOver) {              count++;              console.log(item, 444);            }          }        } else if (item.type == 5) {          //简答题          if (hasSpecail) {            if (item.ques && (item.ques.text || item.ques.imageList.length)) {              console.log(5, item);              count++;            }          }        }      });      return count;    },		mockSubscribeEdit() {			this.$api.mockSubscribeEdit({				subscribeId:this.subscribeId,				handStatus:this.isAutoSubmit ? 2 : 1			}).then(res => {							})		},    /**     * 是否做完所有题目     */    isDoOver() {      let questionOverNum = this.questionOverNum(true); //获取已经回答的题目数(包括简答和案例)      if (this.questionList.length == questionOverNum) {        //全部做完弹窗        this.cgType = 9;        this.showpopups = true;      }    },    /**     * 暂不交卷     */    noSubmit() {      //设为允许退出页面      this.needBack = false;      uni.navigateBack({        delta: 1,      });    },    /**     * 不离开     */    noLeave() {      this.isLastCount = false;    },    /**     * 立即离开并交卷     */    leaveNow() {      this.needBack = false;      this.isSubmit = true;      uni.navigateBack({        delta: 1,      });      let score = 0; //计算总分      let reportStatus = 0;      let number = 0; //做对的题目数量      let doQuestionNum = 0; //做过的题目数量      let allScore = 0; //总分      let passScore = 0;      let doWrongQuestionIds = []; //错题和未做题id(客观题)      let doQuestionIds = []; //做过的题目id      let lessQuestionNum = 0;      let rightQuestionIds = []; //做对的题目id      this.questionList.forEach((item, index) => {        // passScore = item.passScore        if (item.type == 1) {          //正确										console.log(item.ques, item.ans)          if (item.ques == item.ans) {            item.scoreResult = item.score;            score += item.score;            number++;            rightQuestionIds.push(item.questionId);          } else {            //错误            item.scoreResult = 0;						if (item.ques) {							doWrongQuestionIds.push(item.questionId);						}          }          allScore += item.score;          if (item.ques) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 2) {          let isRight =            item.ans &&            item.ans.every((quesItem, quesIndex) => {              if (item.ques) {                return item.ques[quesIndex] == item.ans[quesIndex];              } else {                return false;              }            });          if (isRight) {            score += item.score;            number++;            item.scoreResult = item.score;            rightQuestionIds.push(item.questionId);          } else {            let hasPart = false;            let checkboxScore = 1; //获取单题总分数            item.ques &&              item.ques.forEach((ques, quesIndex) => {                //选错一个全扣                if (item.ques) {                  if (item.ans.indexOf(item.ques[quesIndex]) == -1) {                    checkboxScore = 0;                  }                } else {                  checkboxScore = 0;                }              });            console.log(checkboxScore);            //没选错            if (checkboxScore) {              checkboxScore = 0;              item.ans.forEach((ans, quesIndex) => {                //漏选只能得部分分数                if (item.ques) {                  if (item.ques.indexOf(item.ans[quesIndex]) == -1) {                    checkboxScore = +item.partScore;                    hasPart = true;                  }                } else {                  checkboxScore = 0;                }              });            }            if (!hasPart) {              //0分              item.scoreResult = 0;							if (item.ques) {								doWrongQuestionIds.push(item.questionId);							}            } else {              //部分分              // number++;              lessQuestionNum++;              // doWrongQuestionIds.push(item.questionId);              item.scoreResult = checkboxScore;              score += checkboxScore;              // rightQuestionIds.push(item.questionId)            }          }          allScore += item.score;          if (item.ques && item.ques.length) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 3) {          if (item.ques == item.ans) {            item.scoreResult = item.score;            score += item.score;            number++;            rightQuestionIds.push(item.questionId);          } else {            item.scoreResult = 0;						if (item.ques) {							doWrongQuestionIds.push(item.questionId);						}          }          allScore += item.score;          if (item.ques) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 4) {          allScore += item.score;          if (item.ques && item.ques.length) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 5) {          allScore += item.score;          if (item.ques && (item.ques.imageList.length || item.ques.text)) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        }      });      //大于60分及格      if (score >= 60) {        reportStatus = 1;      } else {        reportStatus = 0;      }						if(this.subscribeId) {				this.mockSubscribeEdit();			}      //交卷      this.$api        .mockRecordEdit({          examId: this.examId,          reportStatus: reportStatus,          recordId: this.recordId,          rightQuestionNum: number,					eachExamId:this.eachExamId,          status: 1,					lessQuestionNum:lessQuestionNum,          doQuestionIds: doQuestionIds.join(","),          rightQuestionIds: rightQuestionIds.join(","),          doQuestionNum: doQuestionNum,          performance: score,          totalScore: allScore,          examTime: parseInt(this.allTimes),          doTime: parseInt(this.allTimes) - parseInt(this.lastTime),          historyExamJson: JSON.stringify(this.questionList),        })        .then((res) => {          this.isSubmit = true;          if (res.data.code == 200) {          }        });								//错题集id提交(客观题)				if(doWrongQuestionIds.length) {										this.$api					  .mockWrongRecord({							eachExamId:this.eachExamId,					    examId: this.examId,					    questionIds: doWrongQuestionIds,					    recordId: this.recordId,					  })					  .then((res) => {});				}    },    /**     * 立即交卷     */    submitNow() {      console.log('sds')      this.showpopups = false;      this.needBack = false;      this.submit();    },    /**     * 离开页面统计回答正确题数     */    mockRecordEdit() {      if (!this.isSubmit) {        let number = 0;        let score = 0;        let doQuestionNum = 0;        let doQuestionIds = []; //做过的题目id        this.questionList.forEach((item, index) => {          if (item.type == 1) {            if (item.ques == item.ans) {              score += item.score;              number++;            }            if (item.ques) {              doQuestionNum++;              doQuestionIds.push(item.questionId);            }          } else if (item.type == 2) {            let isRight =              item.ans &&              item.ans.every((quesItem, quesIndex) => {                if (item.ques) {                  return item.ques[quesIndex] == item.ans[quesIndex];                } else {                  return false;                }              });            if (isRight) {              score += item.score;              number++;            } else {              let checkboxScore = 1; //获取单题总分数              item.ques &&                item.ques.forEach((ques, quesIndex) => {                  //选错一个全扣                  if (item.ques) {                    if (item.ans.indexOf(item.ques[quesIndex]) == -1) {                      checkboxScore = 0;                    }                  } else {                    checkboxScore = 0;                  }                });              console.log(checkboxScore);              //没选错              if (checkboxScore) {                checkboxScore = 0;                item.ans.forEach((ans, quesIndex) => {                  //漏选扣一部分,对n题给n X partScore 分                  if (item.ques) {                    if (item.ques.indexOf(item.ans[quesIndex]) != -1) {                      checkboxScore += item.partScore;                    }                  } else {                    checkboxScore = 0;                  }                });              }              if (checkboxScore <= 0) {                //0分              } else {                //部分分                // number++;                score += checkboxScore;              }            }            if (item.ques && item.ques.length) {              doQuestionNum++;              doQuestionIds.push(item.questionId);            }          } else if (item.type == 3) {            if (item.ques == item.ans) {              score += item.score;              number++;            }            if (item.ques) {              doQuestionNum++;              doQuestionIds.push(item.questionId);            }          } else if (item == 4) {            if (item.ques.length) {              doQuestionNum++;              doQuestionIds.push(item.questionId);            }          } else if (item.type == 5) {            if (item.ques && (item.ques.imageList.length || item.ques.text)) {              doQuestionNum++;              doQuestionIds.push(item.questionId);            }          }        });								if(this.subscribeId) {					this.mockSubscribeEdit();				}        this.$api          .mockRecordEdit({            examId: this.examId,						eachExamId:this.eachExamId,            goodsId: this.goodsId,            recordId: this.recordId,            doQuestionIds: doQuestionIds.join(","),            rightQuestionNum: number,            status: 1,            doQuestionNum: doQuestionNum,            historyExamJson: JSON.stringify(this.questionList),          })          .then((res) => {});      }    },    /**     * 记录总题数     * hasSpecial (是否包含简答和案例) true 包含  false 不包含     */    mockRecord(hasSpecial) {      let questionList = 0;      // if(!hasSpecial) {      this.questionList.forEach((item, index) => {        if (item.type == 1 || item.type == 2 || item.type == 3) {          questionList++;        }      });      // } else {      // 	questionList = this.questionList.length;      // }      this.$api        .mockRecord({          examId: this.examId,					eachExamId:this.eachExamId,          totalQuestionNum: questionList,          allQuestionNum: this.questionList.length,        })        .then((res) => {          this.recordId = res.data.data;          //获取recordId 初始化先提交题目 以防突然下次继续做题退出报错        });    },    /**     * @param {Object} second倒计时过滤器     */    countdown(second) {      if (second) {        let h = parseInt((second / 60 / 60) % 24); //   计算小时        let m = parseInt((second / 60) % 60); //   计算分数        let s = parseInt(second % 60); //   计算当前秒数        if (h < 10) h = "0" + h;        if (m < 10) m = "0" + m;        if (s < 10) s = "0" + s;        return h + ":" + m + ":" + s;      } else {        return "";      }    },				hideDialog() {			this.showDialog = false		},    /**     * 请求题目列表     */    goodsQuestionList() {      // app/common/bank/question/list      this.$api        .goodsQuestionList({          examId: this.examId,        })        .then((res) => {          if (!res.data.data.length) {            this.hideDialog();            uni.showModal({              showCancel: false,              content: "该试卷暂无题目",              success: (k) => {                if (k.confirm) {									this.isSubmit = true;                  uni.navigateBack();                }              },            });            return;          }										 if (this.subscribeId) {							this.lastTime = this.examEndTime - this.sysTime;							//考试时间到了自动交卷							if (this.lastTime) {							  this.timer = setInterval(() => {							    if (this.lastTime <= 0) {							      clearInterval(this.timer);							      uni.showToast({							        icon: "none",							        mask: true,							        title: "考试时间已到,系统将自动交卷",							        duration: 5000,							      });																				this.isAutoSubmit = true;														      this.submit();							      return;							    }							    this.lastTime--;							  }, 1000);							} else {							}					 }                    res.data.data.forEach((item, index) => {            // if (typeof item.jsonStr == 'string') {            item.jsonStr = JSON.parse(item.jsonStr);            if (item.type == 2) {              //多选              item.jsonStr.forEach((str) => {                str.optionsId = "" + str.optionsId;              });              let arr = item.answerQuestion.split(",");              arr.forEach((a, i) => {                arr[i] = "" + a;              });              item.ans = arr;              item.analysisContent &&                (item.analysisContent = item.analysisContent.replace(                  /<img/gi,                  '<img style="max-width:100%;"'                ));              item.content &&                (item.content = item.content.replace(                  /<img/gi,                  '<img style="max-width:100%;"'                ));              return;            } else if (item.type == 5) {              //简答题              item.ansText = {                text: "",                imageList: [],              };              item.ques = {                text: "",                imageList: [],              };              item.analysisContent &&                (item.analysisContent = item.analysisContent.replace(                  /<img/gi,                  '<img style="max-width:100%;"'                ));              item.content &&                (item.content = item.content.replace(                  /<img/gi,                  '<img style="max-width:100%;"'                ));            } else if (item.type == 4) {              //案例题              item.ques = [];              item.current = 0;              let ansArr = [];              item.jsonStr.forEach((json, index) => {                if (json.type == 1) {                  ansArr[index] = json.answerQuestion;                  json.content &&                    (json.content = json.content.replace(                      /<img/gi,                      '<img style="max-width:100%;"'                    ));                } else if (json.type == 2) {                  json.optionsList.forEach((str) => {                    str.optionsId = "" + str.optionsId;                  });                  let arr = json.answerQuestion.split(",");                  arr.forEach((a, i) => {                    arr[i] = "" + a;                  });                  ansArr[index] = arr;                  json.content &&                    (json.content = json.content.replace(                      /<img/gi,                      '<img style="max-width:100%;"'                    ));                } else if (json.type == 3) {                  ansArr[index] = json.answerQuestion;                  json.content &&                    (json.content = json.content.replace(                      /<img/gi,                      '<img style="max-width:100%;"'                    ));                } else if (json.type == 5) {                  ansArr[index] = {                    text: json.answerQuestion,                    imageList: [],                  };                  json.ansText = {                    text: "",                    imageList: [],                  };                  json.content &&                    (json.content = json.content.replace(                      /<img/gi,                      '<img style="max-width:100%;"'                    ));                }              });              item.analysisContent &&                (item.analysisContent = item.analysisContent.replace(                  /<img/gi,                  '<img style="max-width:100%;"'                ));              item.content &&                (item.content = item.content.replace(                  /<img/gi,                  '<img style="max-width:100%;"'                ));              item.ans = ansArr;              return;            }            item.analysisContent &&              (item.analysisContent = item.analysisContent.replace(                /<img/gi,                '<img style="max-width:100%;"'              ));            item.content &&              (item.content = item.content.replace(                /<img/gi,                '<img style="max-width:100%;"'              ));            item.ans = item.answerQuestion;            // }          });          this.questionList = res.data.data;          this.lastCount = this.questionList.length;          this.mockRecord();        });    },    /**     * @param {Object} e单选点击     */    radioSelect(optionsId, bindex) {      // if (this.questionList[bindex].ques) return;      // 类型为考试的可以重新在选择答案      if (this.questionList[bindex].ques && this.bankType == 1) {        return      }      this.$set(this.questionList[bindex], "ques", optionsId);      // if ((bindex + 1) < this.questionList.length) {      //   this.current = bindex + 1      // }      console.log('改变后:', this.questionList[bindex].ques)      this.isDoOver();    },    /**     * @param {Object} e案例单选点击     */    radioSelectChild(optionsId, ansIndex, bindex) {      // if (this.questionList[bindex].ques[ansIndex]) return;      if (this.questionList[bindex].ques[ansIndex] && this.bankType == 1) {        return      }      this.$set(this.questionList[bindex].ques, ansIndex, optionsId);      this.isDoOver();    },    /**     * @param {Object} 多选点击     */    checkboxSelect(optionsId, bindex, index) {      if (this.questionList[bindex].ques && this.bankType == 1) {        return      }      this.$set(        this.questionList[bindex].jsonStr[index],        "checked",        !this.questionList[bindex].jsonStr[index].checked      );    },    /**     * @param {Object} 案例多选点击     */    checkboxSelectChild(bindex, ansIndex, childIndex) {      if (this.questionList[bindex].ques[ansIndex] && this.bankType == 1) {        return      }      this.$set(        this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],        "checked",        !this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex]          .checked      );    },    isCheckboxChecked(arr) {      return arr.some((item) => {        if (item.checked) {          return true;        }      });    },    /**     * @param {Object} 多选确认     */    checkboxSubmit(bindex) {      // if (this.questionList[bindex].ques) return;      if (this.questionList[bindex].ques && this.bankType == 1) {        return      }      let arr = [];      this.questionList[bindex].jsonStr.forEach((item) => {        if (item.checked) {          arr.push(item.optionsId);        }      });      if (!arr.length) {        delete this.questionList[bindex].ques        uni.showToast({          title: "请选择答案",          icon: "none",        });        return;      }      this.$set(this.questionList[bindex], "ques", arr);      this.$u.toast('已确认答案')      this.isDoOver();      console.log('this.questionList[bindex]', this.questionList[bindex].ques)      // let isWrong = this.questionList[bindex].ques.some(      //   (quesItem, quesIndex) => {      //     return (      //       this.questionList[bindex].ques[quesIndex] !=      //       this.questionList[bindex].ans[quesIndex]      //     );      //   }      // );    },    /**     * @param {Object} 案例多选确认     */    checkboxSubmitChild(bindex, ansIndex) {      // if (this.questionList[bindex].ques[ansIndex]) return;      if (this.questionList[bindex].ques[ansIndex] && this.bankType == 1) {        return      }      let arr = [];      this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(        (item) => {          if (item.checked) {            arr.push(item.optionsId);          }        }      );      if (!arr.length) {        delete this.questionList[bindex].ques[ansIndex]        uni.showToast({          title: "请选择答案",          icon: "none",        });        return;      }      this.$set(this.questionList[bindex].ques, ansIndex, arr);      this.$u.toast('已确认答案')      this.isDoOver();    },    /**     * @param {Object} index     * @param {Object} bindex     * 判断题     */    judgeSelect(index, bindex) {      // if (this.questionList[bindex].ques) return;      if (this.questionList[bindex].ques && this.bankType == 1) {        return      }      // 答案: 判断题1正确 0错误      let value = index == 0 ? '1' : '0'      // this.$set(this.questionList[bindex], "ques", index + "");      this.$set(this.questionList[bindex], "ques", value)      this.isDoOver();    },    /**     * @param {Object} ansindex     * @param {Object} childindex     * @param {Object} bindex     * 案例判断题     */    judgeSelectChild(ansindex, childindex, bindex) {      // if (this.questionList[bindex].ques[ansindex]) return;      if (this.questionList[bindex].ques[ansindex] && this.bankType == 1) {        return      }      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');      this.isDoOver();    },    openFooterTab() {      this.show = true;    },    changeIndex(index) {      this.current = index;    },    swiperChange(e) {      this.current = e.detail.current;    },        pdsubmit() {      // if (this.bankType == 1) {      let ansCount = this.questionOverNum(true); //已答题数      this.lastCount = this.questionList.length - ansCount; //统计未答完的题数      //没有答完      if (this.lastCount !== 0) {        this.cgType = 6;        this.showpopups = true;        return;      }      // }      if (this.bankType == 2) {        if (this.lastTime > 0) {          let lastTime = this.countdown(this.lastTime);          uni.showModal({            title: "提示",            content: `时间还剩余${lastTime},确定交卷吗?`,            confirmText: "交卷",            cancelText: "继续答题",            success: (res) => {              if (res.confirm) {                //确定                this.submit();              } else {                //取消              }            },          });          return;        }      }      this.submit();    },    /**     * 交卷     */    submit() {      console.log('itme--', this.questionList)      let score = 0; //计算总分      let reportStatus = 0;      let number = 0; //做对的题目数量      let doQuestionNum = 0; //做过的题目数量      let allScore = 0; //总分      let passScore = 0;      let doWrongQuestionIds = []; //错题和未做题id(客观题)      let doQuestionIds = []; //做过的题目id      let lessQuestionNum = 0;      let rightQuestionIds = []; //做对的题目id      this.questionList.forEach((item, index) => {        passScore = item.passScore;        if (item.type == 1) {          //正确          if (item.ques == item.ans) {            console.log('sfsofhusdho')            item.scoreResult = item.score;            score += item.score;            number++;            rightQuestionIds.push(item.questionId);          } else {            //错误            item.scoreResult = 0;						if (item.ques) {							doWrongQuestionIds.push(item.questionId);						}          }          allScore += item.score;          if (item.ques) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 2) {          let isRight =            item.ans &&            item.ans.every((quesItem, quesIndex) => {              if (item.ques) {                return item.ques[quesIndex] == item.ans[quesIndex];              } else {                return false;              }            });          if (isRight) {            score += item.score;            number++;            item.scoreResult = item.score;            rightQuestionIds.push(item.questionId);          } else {            let hasPart = false;            let checkboxScore = 1; //获取单题总分数            item.ques &&              item.ques.forEach((ques, quesIndex) => {                //选错一个全扣                if (item.ques) {                  if (item.ans.indexOf(item.ques[quesIndex]) == -1) {                    checkboxScore = 0;                  }                } else {                  checkboxScore = 0;                }              });            //没选错            if (checkboxScore) {              checkboxScore = 0;              item.ans.forEach((ans, quesIndex) => {                //漏选扣一部分,对n题给n X partScore 分                if (item.ques) {                  if (item.ques.indexOf(item.ans[quesIndex]) != -1) {                    checkboxScore += item.partScore;                    hasPart = true;                  }                } else {                  checkboxScore = 0;                }              });            }            if (!hasPart) {              //0分              item.scoreResult = 0;							if (item.ques) {								doWrongQuestionIds.push(item.questionId);							}            } else {              //部分分              // number++;							lessQuestionNum++              // doWrongQuestionIds.push(item.questionId);              item.scoreResult = checkboxScore;              score += checkboxScore;              // rightQuestionIds.push(item.questionId)            }          }          allScore += item.score;          if (item.ques && item.ques.length) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 3) {          if (item.ques == item.ans) {            item.scoreResult = item.score;            score += item.score;            number++;            rightQuestionIds.push(item.questionId);          } else {            item.scoreResult = 0;						if (item.ques) {							doWrongQuestionIds.push(item.questionId);						}          }          allScore += item.score;          if (item.ques) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 4) {          allScore += item.score;          if (item.ques && item.ques.length) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        } else if (item.type == 5) {          allScore += item.score;          if (item.ques && (item.ques.imageList.length || item.ques.text)) {            doQuestionNum++;            doQuestionIds.push(item.questionId);          }        }      });      //大于及格      if (score >= passScore) {        reportStatus = 1;      } else {        reportStatus = 0;      }						if(this.subscribeId) {				this.mockSubscribeEdit();			}      //交卷      this.$api        .mockRecordEdit({          examId: this.examId,					eachExamId:this.eachExamId,          reportStatus: reportStatus,          recordId: this.recordId,          rightQuestionNum: number,          status: 1,					lessQuestionNum:lessQuestionNum,          doQuestionIds: doQuestionIds.join(","),          rightQuestionIds: rightQuestionIds.join(","),          doQuestionNum: doQuestionNum,          performance: score,          totalScore: allScore,          examTime: parseInt(this.allTimes),          doTime: parseInt(this.allTimes) - parseInt(this.lastTime),          historyExamJson: JSON.stringify(this.questionList),        })        .then((res) => {          this.isSubmit = true;          if (res.data.code == 200) {            uni.showToast({              title: "交卷成功",              duration: 1000,              icon: "none",            });            setTimeout(() => {              uni.redirectTo({                url:                  "/pages5/examReport/index?&examId=" +                  this.examId +                  "&id=" +                  this.recordId+									"&eachExamId="+this.eachExamId +									"&subscribeId="+this.subscribeId              });            }, 1000);          }        });								//错题集id提交(客观题)				if(doWrongQuestionIds.length) {										this.$api					  .mockWrongRecord({							eachExamId:this.eachExamId,					    examId: this.examId,					    questionIds: doWrongQuestionIds,					    recordId: this.recordId,					  })					  .then((res) => {});				}    },    /**     * @param {Object} imgIndex     * @param {Object} bankIndex     * 删除简答图片     */    deleteImg(imgIndex, bankIndex) {      this.questionList[bankIndex].ansText.imageList.splice(imgIndex, 1);    },    /**     * @param {Object} imgIndex     * @param {Object} bankIndex     * @param {Object} ansIndex     * 删除案例题简答图片     */    deleteImgChild(imgIndex, bankIndex, ansIndex) {      this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(        imgIndex,        1      );    },    /**     * @param {Object} bankindex     * 选择上传图片     */    chooseImg(bankindex) {      if (        this.questionList[bankindex] &&        this.questionList[bankindex].ansText &&        this.questionList[bankindex].ansText.imageList.length >= 4      ) {        uni.showToast({          icon: "none",          title: "最多选择4张",        });        return;      }      uni.chooseImage({        count: 1, //默认9        sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有        sourceType: ["album", "camera"], //从相册选择        success: (res) => {          let self = this;          // console.log(JSON.stringify(res.tempFilePaths));          let img = res.tempFilePaths[0];          uni.getImageInfo({            src: img,            success: async (res) => {              let canvasWidth = res.width; //图片原始长宽              let canvasHeight = res.height;              if (canvasWidth > 1000 || canvasHeight > 1000) {                uni.compressImage({                  src: img,                  quality: 75,                  width: "50%",                  height: "50%",                  success: async (rest) => {                    const dir = await self.uploadFile(rest.tempFilePath, 0);                    this.questionList[bankindex].ansText.imageList.push(dir);                  },                });              } else {                const dir = await self.uploadFile(img, 0);                this.questionList[bankindex].ansText.imageList.push(dir);              }            },          });        },      });    },    /**     * @param {Object} bankindex     * @param {Object} ansindex     * 案例题选择上传图片     */    chooseImgChild(bankindex, ansindex) {      if (        this.questionList[bankindex].jsonStr[ansindex] &&        this.questionList[bankindex].jsonStr[ansindex].ansText &&        this.questionList[bankindex].jsonStr[ansindex].ansText.imageList          .length >= 4      ) {        uni.showToast({          icon: "none",          title: "最多选择4张",        });        return;      }      uni.chooseImage({        count: 1, //默认9        sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有        sourceType: ["album", "camera"], //从相册选择        success: (res) => {          let self = this;          // console.log(JSON.stringify(res.tempFilePaths));          let img = res.tempFilePaths[0];          uni.getImageInfo({            src: img,            success: async (res) => {              let canvasWidth = res.width; //图片原始长宽              let canvasHeight = res.height;              if (canvasWidth > 1000 || canvasHeight > 1000) {                uni.compressImage({                  src: img,                  quality: 75,                  width: "50%",                  height: "50%",                  success: async (rest) => {                    const dir = await self.uploadFile(rest.tempFilePath, 0);                    this.questionList[bankindex].jsonStr[                      ansindex                    ].ansText.imageList.push(dir);                  },                });              } else {                const dir = await self.uploadFile(img, 0);                this.questionList[bankindex].jsonStr[                  ansindex                ].ansText.imageList.push(dir);              }            },          });        },      });    },    uploadFile(options, int) {      var self = this;      return new Promise((resolve, reject) => {        var data = {          orderGoodsId: this.orderGoodsId,          imageStatus: int,        };        self.$api.aliyunpolicy(data).then((res) => {          console.log(res.data, 6);          if (res.data.code != 200) {            self.$method.showToast("签名错误" + JSON.stringify(res.data));            return;          }          var ossToken = res.data.data.resultContent;          if (ossToken.host == null || ossToken.host == undefined) {            self.$method.showToast("上传路径报错" + JSON.stringify(res.data));            return;          }          uni.uploadFile({            url: ossToken.host,            name: "file",            filePath: options,            fileType: "image",            header: {              AuthorizationToken: "WX " + uni.getStorageSync("token"),            },            formData: {              key: ossToken.dir,              OSSAccessKeyId: ossToken.accessid,              policy: ossToken.policy,              Signature: ossToken.signature,              callback: ossToken.callback,              success_action_status: 200,            },            success: (result) => {              // if (result.statusCode === 200) {                resolve(ossToken.dir);              // } else {              //   uni.showToast({              //     title: "上传失败",              //     icon: "none",              //   });              //   return;              // }            },            fail: (error) => {              uni.showToast({                title: "上传接口报错" + error,                icon: "none",              });              return;            },          });        });      });    },    /**     * @param {Object} type     * @param {Object} bankindex     * 简答题答案确认     */    submitAns(bankindex) {      console.log(this.questionList[bankindex]);      if (        !this.questionList[bankindex].ansText.text &&        !this.questionList[bankindex].ansText.imageList.length      ) {        uni.showToast({          title: "请输入内容或上传图片",          duration: 2000,          icon: "none",        });        return;      }      this.$set(this.questionList[bankindex], "ques", {        imageList: this.questionList[bankindex].ansText.imageList || [],        text: this.questionList[bankindex].ansText.text || "",      });      this.isDoOver();    },    /**     * @param {Object} bankindex     * @param {Object} ansindex     * 案例题简答答案确认     */    submitAnsChild(bankindex, ansindex) {      if (        !this.questionList[bankindex].jsonStr[ansindex].ansText.text &&        !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length      ) {        uni.showToast({          title: "请输入内容或上传图片",          duration: 2000,          icon: "none",        });        return;      }      this.$set(this.questionList[bankindex].ques, ansindex, {        imageList:          this.questionList[bankindex].jsonStr[ansindex].ansText.imageList ||          [],        text: this.questionList[bankindex].jsonStr[ansindex].ansText.text || "",      });      this.isDoOver();    },    isCheck(item, index) {      if (this.questionList[index].ques) {        return true      }    },    isRight(item, index) {      //单选      if (this.questionList[index].ques) {        if (item.type == 1) {          return this.questionList[index].ques == this.questionList[index].ans;          //多选        } else if (item.type == 2) {          //每一项都相等          return this.questionList[index].ans.every((item, i) => {            return item == this.questionList[index].ques[i];          });          //判断        } else if (item.type == 3) {          return this.questionList[index].ques == this.questionList[index].ans;          // } else if (item.type == 5) {          // 	if(this.questionList[index].ques.text){          // 		return true          // 	}else{          // 		return false          // 	}        } else {          return false;        }      } else {        return false;      }    },    right(bankIndex, ansIndex, option) {      if (        this.questionList[bankIndex].ques[ansIndex] &&        this.questionList[bankIndex].ans[ansIndex]      ) {        if (          this.questionList[bankIndex].ques[ansIndex].indexOf(            option.optionsId          ) != -1 ||          this.questionList[bankIndex].ans[ansIndex].indexOf(            option.optionsId          ) != -1        ) {          return true;        } else {          return false;        }      } else {        return false;      }    },    wrong(bankIndex, ansIndex, option) {      if (        this.questionList[bankIndex].ques[ansIndex] &&        this.questionList[bankIndex].ans[ansIndex]      ) {        if (          this.questionList[bankIndex].ques[ansIndex].indexOf(            option.optionsId          ) != -1 &&          this.questionList[bankIndex].ans[ansIndex].indexOf(            option.optionsId          ) == -1        ) {          return true;        } else {          return false;        }      } else {        return false;      }    },    isWrong(item, index) {      if (this.questionList[index].ques) {        //单选        if (item.type == 1) {          return this.questionList[index].ques != this.questionList[index].ans;          //多选        } else if (item.type == 2) {          //每一项都相等          return this.questionList[index].ques.some((item, i) => {            return this.questionList[index].ans.indexOf(item) == -1;          });          //判断        } else if (item.type == 3) {          return this.questionList[index].ques != this.questionList[index].ans;        } else {          return false;        }      } else {        return false;      }    },    isPart(item, index) {      if (this.questionList[index].ques) {        if (item.type == 2) {          let isWrong = this.questionList[index].ques.some((item, i) => {            return this.questionList[index].ans.indexOf(item) == -1;          });          let isRight = this.questionList[index].ans.every((item, i) => {            return item == this.questionList[index].ques[i];          });          if (!isRight && !isWrong) {            return true;          }        }      } else {        return false;      }    },    isOver(item, index) {      if (this.questionList[index].ques) {        if (item.type == 4) {          //案例题          let isOver = item.jsonStr.every((jsonItem, indexs) => {            if (              jsonItem.type == 1 ||              jsonItem.type == 2 ||              jsonItem.type == 3            ) {              if (item.ques[indexs]) {                return true;              } else {                return false;              }            } else if (jsonItem.type == 5) {              if (                item.ques[indexs] &&                (item.ques[indexs].text || item.ques[indexs].imageList.length)              ) {                console.log("chil");                return true;              } else {                return false;              }            }          });          if (isOver) {            return true;          } else {            return false;          }        } else if (item.type == 5) {          //简答题          //每一项都相等          if (item.ques && (item.ques.imageList.length || item.ques.text)) {            return true;          }          //判断        } else {          return false;        }      } else {        return false;      }    },    tabSelect(index, bankindex) {      this.$set(this.questionList[bankindex], "current", index);    },    showPhoto(contentStr) {      if (contentStr && typeof contentStr == "string") {        let reg = /<img[^>]*src[=\'\"\s]+([^\'\"]*)[\'\"]?[^>]*>/gi;        let strArr = contentStr.match(reg);        strArr.forEach((str, index) => {          strArr[index] = str.replace(reg, "$1");        });        // 预览图片        uni.previewImage({          urls: strArr,          longPressActions: {            itemList: ["发送给朋友", "保存图片", "收藏"],            success: function (data) {              console.log(                "选中了第" +                  (data.tapIndex + 1) +                  "个按钮,第" +                  (data.index + 1) +                  "张图片"              );            },            fail: function (err) {              console.log(err.errMsg);            },          },        });      }    },  },};</script><style lang="scss" scoped>.questionBank {  width: 100%;  height: 100vh;  display: flex;  flex-direction: column;}.swiper {  width: 100%;  flex: 1;}.lisSty {  margin-bottom: 16rpx;  display: flex;  align-items: center;  .flex_auto {    flex: 1;  }}.activeTI {  vertical-align: middle;  display: inline-block;  border: 1rpx solid #eee;  border-radius: 50rpx;  height: 48rpx;  line-height: 46rpx;  text-align: center;  width: 48rpx;  margin-right: 15rpx;  color: #666;  font-size: 30rpx;  &.right {    color: #fff;    background: #36c75a;  }  &.wrong {    color: #fff;    background: #ff3b30;  }  &.checked, &.user_choose {    color: #fff;    background: #007aff;  }}.submit_checkbox {  position: fixed;  left: 0;  right: 0;  bottom: 120rpx;  margin: 20rpx auto;  width: 526rpx;  height: 80rpx;  background: rgba(0, 122, 255, 1);  color: #fff;  text-align: center;  line-height: 80rpx;  font-size: 30rpx;  border-radius: 40rpx;  &.disabled {    opacity: 0.6;  }}.titles {  overflow: hidden;  margin-bottom: 24rpx;}.titBox {  padding: 41rpx 25rpx 24rpx 25rpx;}.titBox_title {  padding: 21rpx;}.tabs {  margin: 10rpx;  display: flex;  .tab {    margin: 0 4rpx;    padding: 10rpx 13rpx;    text-align: center;    color: #007aff;    font-size: 28rpx;    border-radius: 16rpx;    background: #fff;    &.current {      color: #fff;      background: #007aff;    }  }}.ans {  margin: 8rpx 8rpx 8rpx;  .ans_input {    border-radius: 16rpx;    background: #fff;    .top {      border-bottom: 1rpx solid #eeeeee;      padding: 16rpx;      display: flex;      align-items: center;      .icon {        margin-right: 20rpx;        width: 40rpx;        height: 38rpx;      }      .progress {        flex: 1;      }      .submit {        width: 168rpx;        height: 48rpx;        line-height: 48rpx;        text-align: center;        color: #fff;        font-size: 30rpx;        background: #007aff;        border-radius: 24rpx;        &.disabled {          opacity: 0.6;        }      }    }    .textarea {      textarea {        width: 100%;        height: 287rpx;        padding: 10rpx;      }    }    .imgs {      overflow: hidden;      display: flex;      width: 100%;      .img {        width: 104rpx;        height: 104rpx;        border-radius: 8rpx;        position: relative;        margin: 20rpx;        text {          position: absolute;          right: -15rpx;          top: -15rpx;          width: 30rpx;          height: 30rpx;          text-align: center;          line-height: 30rpx;          color: #fff;          background: #ff3b30;          border-radius: 50%;        }        image {          width: 100%;          height: 100%;        }      }    }  }  .ans_submit {    padding: 16rpx;    border-radius: 16rpx;    background: #fff;    .imgs {      overflow: hidden;      display: flex;      width: 100%;      .img {        width: 104rpx;        height: 104rpx;        border-radius: 8rpx;        position: relative;        margin: 20rpx;        image {          width: 100%;          height: 100%;        }      }    }  }}.leftLetters {  display: flex;  align-items: center;  width: 220rpx;  .btnType {    padding: 5rpx 10rpx;    border: 1rpx solid #007aff;    border-radius: 10rpx;    background-color: rgba(0, 122, 255, 0.1);    font-size: 28rpx;    color: #007aff;    margin-right: 15rpx;  }}.firstLetter {  display: flex;  justify-content: space-between;  align-items: center;  margin-bottom: 30rpx;}.popupView {  height: 100%;  padding-bottom: 100rpx;  .popupTops {    height: 77rpx;    border-bottom: 1rpx solid #eee;    text-align: center;    line-height: 77rpx;    font-size: 24rpx;    color: #999;    position: relative;    .topIcon {      position: absolute;      top: 10rpx;      left: 50%;      transform: translateX(-50%);      width: 80rpx;      height: 8rpx;      background-color: #999;      border-radius: 4rpx;    }  }}.pageContent {  position: relative;  background-color: #eaeef1;  height: 100%;  padding-top: 8rpx;  padding-bottom: 100rpx;  overflow-y: scroll;}.pad_8 {  background-color: #fff;  margin: 0rpx 8rpx 8rpx;  border-radius: 16rpx;  &.no-margin {    margin-top: -16rpx;    border-radius: 0 0 16rpx 16rpx;  }}.answer {  height: 80rpx;  line-height: 80rpx;  padding: 0rpx 24rpx;  display: flex;  align-items: center;  justify-content: space-between;  color: #666;  font-size: 30rpx;}.footer_btn {  background-color: #fff;  z-index: 10078;  position: fixed;  bottom: 0rpx;  display: flex;  align-items: center;  justify-content: space-between;  width: 100%;  height: 98rpx;  padding: 0rpx 38rpx;  border-top: 1rpx solid #eee;  .flex_center {    flex: 1;    display: flex;    justify-content: center;    align-items: center;    flex-direction: column;    margin: 0 200rpx;    font-size: 24rpx;    color: #999999;    .up-icon {      margin-bottom: 18rpx;      width: 100%;      display: flex;      justify-content: center;      image {        width: 58rpx;        height: 21rpx;      }    }  }  .collect {    visibility: hidden;    width: 100rpx;    &.show {      visibility: visible;    }    > view {      display: flex;      flex-direction: column;      align-items: center;      justify-content: center;      image {        width: 32rpx;        height: 32rpx;        margin-bottom: 6rpx;      }      view {        font-size: 24rpx;        color: #999999;      }    }  }}.boxSty {  padding: 44rpx 41rpx 0rpx;}.liListSty {  border: 1rpx solid #eeeeee;  width: 88rpx;  height: 88rpx;  border-radius: 32rpx;  text-align: center;  line-height: 88rpx;  color: #333;  font-size: 32rpx;  float: left;  margin: 20rpx 23rpx;  &.isRight {    border: 1rpx solid #eeeeee;    color: #fff;    background: #36c75a;  }  &.isWrong {    border: 1rpx solid #eeeeee;    color: #fff;    background: #ff3b30;  }  &.isPart {    border: 1rpx solid #eeeeee;    color: #fff;    background: #FFC53D;  }  &.isOver {    border: 1rpx solid #eeeeee;    color: #fff;    background: blue;  }  &.check_ans {    border: 1rpx solid #eeeeee;    color: #fff;    background: #007aff;  }}.answerInfos {  padding: 25rpx 25rpx 25rpx 23rpx;}.answerTitle {  margin-bottom: 28rpx;  color: #666;  font-size: 30rpx;}.answerContent {  font-size: 30rpx;  color: #666;}.textChild {  display: inline-block;  vertical-align: middle;}.dialog {  position: fixed;  left: 0;  top: 0;  width: 100%;  height: 100%;  background-color: rgba(0, 0, 0, 0.8);  display: flex;  flex-direction: column;  align-items: center;  justify-content: center;  z-index: 20000;  .pointer {    width: 338rpx;    height: 240rpx;  }  .text {    font-size: 32rpx;    color: #ffffff;    text-align: center;  }  .btn {    width: 242rpx;    height: 82rpx;    border: 2rpx solid #ffffff;    border-radius: 16rpx;    text-align: center;    line-height: 82rpx;    margin: 41rpx auto;    color: #fff;    font-size: 32rpx;  }}.dialog-arrow {  padding-top: 124rpx;  position: fixed;  left: 0;  top: 0;  width: 100%;  height: 100%;  background-color: rgba(0, 0, 0, 0.8);  z-index: 20000;  .pointer {    margin-left: 87rpx;    display: block;    width: 95rpx;    height: 98rpx;  }  .text {    padding-left: 177rpx;    font-size: 32rpx;    color: #ffffff;  }  .btn {    width: 242rpx;    height: 82rpx;    border: 2rpx solid #ffffff;    border-radius: 16rpx;    text-align: center;    line-height: 82rpx;    margin: 500rpx auto 0;    color: #fff;    font-size: 32rpx;  }}.dialog_wrap {  position: fixed;  left: 0;  top: 0;  width: 100%;  height: 100%;  z-index: 9999999999;  .bg {    background: rgba(0, 0, 0, 0.3);    position: absolute;    left: 0;    top: 0;    width: 100%;    height: 100%;  }  .dialog {    position: absolute;    left: 50%;    top: 50%;    transform: translate3D(-50%, -50%, 0);    width: 640rpx;    height: 439rpx;    background: #ffffff;    border-radius: 24rpx;    .title {      font-size: 30rpx;      font-weight: bold;      color: #333333;      line-height: 48rpx;      text-align: center;      margin-top: 40rpx;    }    .content {      margin: 35rpx 35rpx 0;      font-size: 30rpx;      color: #666666;      line-height: 48rpx;    }    .btns {      margin-top: 35rpx;      display: flex;      align-items: center;      justify-content: center;      .btn {        width: 200rpx;        height: 80rpx;        line-height: 80rpx;        text-align: center;        background: #f5f5f5;        border-radius: 40rpx;        font-size: 30rpx;        color: rgba(0, 122, 255, 1);        background: #f5f5f5;        margin: 0 20rpx;        &.active {          color: #f5f5f5;          background: rgba(0, 122, 255, 1);        }      }    }  }}.popboxs {  width: 100%;  height: 100%;  display: flex;  flex-direction: column;  align-items: center;}.classTops {  flex-shrink: 0;  padding: 39rpx 0rpx 4rpx;  font-weight: bold;  color: #333;  font-size: 30rpx;}.textStys {  width: 100%;  flex: 1;  padding: 36rpx;}.classFootsty {  flex-shrink: 0;  display: flex;  align-items: center;  justify-content: center;  padding: 10rpx 0rpx 40rpx;  .btnsty {    width: 200rpx;    height: 80rpx;    border-radius: 40rpx;    font-weight: bold;    font-size: 30rpx;    text-align: center;    line-height: 80rpx;  }  .btns1 {    background-color: #f5f5f5;    color: #007aff;  }  .btns2 {    margin-left: 40rpx;    background-color: #007aff;    color: #ffffff;  }}</style>
 |