船员公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
gzh_chuanyuan/unpackage/dist/build/web/static/js/pages-exercises-cuowuti-cuo...

1 lines
18 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-exercises-cuowuti-cuowuti"],{"1d8b":function(t,i,e){"use strict";e("6a54");var n=e("f5bd").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var s=n(e("2634")),o=n(e("2fdc"));e("fd3c");var a={data:function(){return{playType:1,start_time:1e5,answer:"",category_id:"",teamIndex:0,successNum:0,errorNum:0,type:0,count:-1,list:[],fontSize:30,fontSize1:26,fontWeight:!0,info:{question_info:[]},timeData:{},log_id:0,page:1,innerAudioContext:null,isPlay:!1,current_question_id:"",next_question_id:"",current_question_choice:"",safeBottom:""}},onLoad:function(t){var i=uni.getSystemInfoSync(),e=i.safeAreaInsets;this.safeBottom=null===e||void 0===e?void 0:e.bottom,this.category_id=t.id?t.id:"",this.innerAudioContext=uni.createInnerAudioContext({useWebAudioImplement:!1}),this.type=1,this.getZhengTiList()},methods:{updateFont:function(t){1==t?this.fontSize++:2==t?this.fontSize--:3==t&&(this.fontWeight=!this.fontWeight)},updateFont1:function(t){1==t?this.fontSize1<70?this.fontSize1++:this.fontSize1:2==t&&(this.fontSize1>20?this.fontSize1--:this.fontSize1)},openPage:function(t){var i=this;2==t?i.teamIndex==i.count?uni.showModal({title:"交卷确认",content:"你确定要交卷吗?",confirmText:"确认",cancelText:"取消",confirmColor:"#2080F9",success:function(t){t.confirm&&uni.showModal({title:"再次确认",content:"你确定要交卷吗?",confirmText:"确认",cancelText:"取消",confirmColor:"#2080F9",success:function(t){t.confirm&&i.getInfo(2)}})}}):uni.showModal({title:"请确认",content:"你确定要交卷吗?",confirmText:"继续答题",cancelText:"确认",confirmColor:"#2080F9",success:function(t){t.cancel&&uni.showModal({title:"再次确认",content:"你确定要交卷吗?",confirmText:"确认",cancelText:"取消",confirmColor:"#2080F9",success:function(t){t.confirm&&i.toSumbit()}})}}):uni.navigateBack({delta:1})},onChange:function(t){this.timeData=t,this.count>0&&0==t.days&&0==t.hours&&0==t.milliseconds&&0==t.minutes&&0==t.seconds&&uni.showModal({title:"温馨提示",content:"当前刷题时间已结束,请返回上一页",showCancel:!1,confirmColor:"#2080F9",success:function(t){t.confirm&&uni.navigateBack({delta:1})}})},toPlayAudio:function(t){var i=this;console.log(t),0==this.isPlay?(1==this.playType?(this.innerAudioContext.src=t,this.innerAudioContext.play(),this.playType=2):this.innerAudioContext.play(),this.isPlay=!0):(this.isPlay=!1,this.innerAudioContext.pause()),this.innerAudioContext.onPlay((function(){console.log("开始播放")})),this.innerAudioContext.onEnded((function(){i.isPlay=!1}))},toSelect:function(t){1!=this.info.question_info.isDisable&&(this.info.question_info.isDisable=!0,this.info.question_info.choice.map((function(t){t.isSelect=!1})),this.info.question_info.choice[t].name==this.info.question_info.correct?(this.info.question_info.choice[t].isSelect=!0,this.info.question_info.choice[t].isErrow=!1,this.successNum++):(this.info.question_info.choice[t].isSelect=!1,this.info.question_info.choice[t].isErrow=!0,this.errorNum++),this.info.question_info.value=this.info.question_info.choice[t],this.current_question_choice=this.info.question_info.choice[t].name)},toSumbit:function(){var t=this;return(0,o.default)((0,s.default)().mark((function i(){var e,n,o;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return t,[],i.next=4,t.$api.realSubPaper({log_id:t.log_id});case 4:e=i.sent,n=e.code,o=e.data,e.msg,200==n&&(uni.showToast({title:"提交成功"}),setTimeout((function(){uni.setStorageSync("shareImg1",o.img),uni.redirectTo({url:"/pages/exercises/complete?score="+o.score+"&error_num="+o.error_num+"&use_time="+o.use_time})}),2e3));case 9:case"end":return i.stop()}}),i)})))()},getZhengTiList:function(){var t=this;return(0,o.default)((0,s.default)().mark((function i(){var e,n,o,a,c;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return e=t,i.next=3,t.$api.simulationErrorList({category_id:t.category_id,page:t.page});case 3:n=i.sent,o=n.code,a=n.data,c=n.msg,200==o?(t.list=a.list,t.log_id=a.log_id,t.count=a.count,t.start_time=1e3*a.start_time,t.successNum=a.correct_num,t.errorNum=a.error_num,t.count>0&&(0==a.current_question_id?(e.teamIndex=0,t.next_question_id=a.list[0]):(t.next_question_id=a.current_question_id,a.list&&a.list.length>0&&a.list.map((function(t,i){t==a.current_question_id&&(e.teamIndex=i)}))),t.getInfo())):uni.showToast({icon:"none",title:c});case 8:case"end":return i.stop()}}),i)})))()},getInfo:function(t){var i=this;return(0,o.default)((0,s.default)().mark((function e(){var n,o,a,c,r;return(0,s.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(1!=t){e.next=11;break}if(i.current_question_choice){e.next=4;break}return uni.showToast({icon:"none",title:"请选择答案!"}),e.abrupt("return");case 4:i.current_question_id=i.teamIndex>i.count?"":i.list[i.teamIndex-1],i.next_question_id=i.teamIndex>i.count?"":i.list[i.teamIndex],i.isPlay=!1,i.playType=1,i.innerAudioContext.pause(),e.next=12;break;case 11:2==t&&(i.next_question_id=0,i.current_question_id=i.list[i.list.length-1]);case 12:return uni.showLoading({title:"加载中"}),e.next=15,i.$api.realQuestionInfo({next_question_id:i.next_question_id,current_question_id:i.current_question_id,current_question_choice:i.current_question_choice,is_error:1==i.type?1:0,log_id:i.log_id?i.log_id:0});case 15:if(n=e.sent,o=n.code,a=n.data,c=n.msg,200!=o){e.next=33;break}if(uni.hideLoading(),2!=t){e.next=24;break}return i.toSumbit(),e.abrupt("return");case 24:r=a,r.question_info.value={},r.question_info.isDisable=!1,r.question_info&&r.question_info.choice&&r.question_info.choice.map((function(t){t.isSelect=!1,t.isErrow=!1})),i.teamIndex++,i.current_question_choice="",i.info=r,e.next=35;break;case 33:uni.hideLoading(),uni.showToast({icon:"none",title:c});case 35:case"end":return e.stop()}}),e)})))()}},onUnload:function(){this.innerAudioContext.src="",this.innerAudioContext.stop(),this.innerAudioContext.destroy()},destroyed:function(){this.innerAudioContext.src="",this.innerAudioContext.stop(),this.innerAudioContext.destroy()}};i.default=a},2493:function(t,i,e){var n=e("c86c"),s=e("2ec5"),o=e("1df2");i=n(!1);var a=s(o);i.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.erercises-detail[data-v-4a7f5c4b]{padding-bottom:%?140?%;overflow:hidden}.erercises-detail-section[data-v-4a7f5c4b]{width:100%;padding:0 %?25?% %?20?%;overflow:hidden;box-sizing:border-box}.erercises-detail-section .li[data-v-4a7f5c4b]{width:90%;margin:%?20?% auto 0;padding:%?30?%;background:#fff;border-radius:%?20?%;box-shadow:%?0?% %?5?% %?10?% %?0?% rgba(32,79,156,.06);border-radius:%?20?%}.erercises-detail-section .li .top[data-v-4a7f5c4b]{display:flex;align-items:center;justify-content:space-between;margin-bottom:%?20?%}.erercises-detail-section .li .top .tag[data-v-4a7f5c4b]{height:%?50?%;margin-left:%?-30?%;padding-left:%?30?%;padding-right:%?30?%;background:url('+a+") no-repeat;background-size:100% 100%;font-size:%?1?%;line-height:%?50?%;color:#fff}.erercises-detail-section .li .top .tag uni-text[data-v-4a7f5c4b]{font-size:%?30?%}.erercises-detail-section .li .top .time[data-v-4a7f5c4b]{font-size:%?24?%;color:#3e8ff9;display:flex;align-items:center}.erercises-detail-section .li .top .time uni-image[data-v-4a7f5c4b]{width:%?25?%;height:%?25?%;margin-right:%?10?%}.erercises-detail-section .li .tit[data-v-4a7f5c4b]{overflow:hidden;padding-bottom:%?10?%;color:#333;display:flex;align-items:flex-start}.erercises-detail-section .li .title_img[data-v-4a7f5c4b]{width:100%}.erercises-detail-section .li .title_img uni-image[data-v-4a7f5c4b]{width:100%}.erercises-detail-section .li .title_video[data-v-4a7f5c4b]{width:100%;height:%?300?%}.erercises-detail-section .li .title_video uni-video[data-v-4a7f5c4b]{width:100%;height:100%}.erercises-detail-section .li .con[data-v-4a7f5c4b]{overflow:hidden;display:flex;align-items:center;justify-content:space-between;margin-top:%?20?%;padding:%?30?% %?60?% %?30?% %?30?%;background:#f6f6f6;color:#333;line-height:%?50?%;position:relative}.erercises-detail-section .li .con.right[data-v-4a7f5c4b]{color:#49c99c;background-color:#f3f8f6}.erercises-detail-section .li .con.wrong[data-v-4a7f5c4b]{color:#fa6e6e;background-color:#fff3f3}.erercises-detail-section .li .con .mark[data-v-4a7f5c4b]{width:%?60?%;height:%?60?%;position:absolute;right:%?10?%;top:50%;margin-top:%?-30?%;z-index:2}.erercises-detail-section .li .con .mark uni-image[data-v-4a7f5c4b]{width:100%;height:100%}.erercises-detail-section .btns[data-v-4a7f5c4b]{padding:%?25?%;box-sizing:border-box;margin-top:%?20?%;display:flex;justify-content:center}.erercises-detail-section .btns .btn[data-v-4a7f5c4b]{flex:1;line-height:%?80?%;border-radius:%?10?%;text-align:center;background-color:#2080f9;font-size:%?28?%;color:#fff}.erercises-detail-section .analysis[data-v-4a7f5c4b]{width:90%;margin:%?20?% auto 0;padding:%?30?%;background:#fff;border-radius:%?20?%;box-shadow:%?0?% %?5?% %?10?% %?0?% rgba(32,79,156,.06);border-radius:%?20?%}.erercises-detail-section .analysis .answer[data-v-4a7f5c4b]{overflow:hidden;padding:%?20?% %?30?%;line-height:%?50?%;background-color:#f3f8f6}.erercises-detail-section .analysis .answer uni-text[data-v-4a7f5c4b]{color:#49c99c}.erercises-detail-section .analysis .line[data-v-4a7f5c4b]{width:70%;margin:0 auto}.erercises-detail-section .analysis .msg[data-v-4a7f5c4b]{line-height:1.5;letter-spacing:%?1?%;color:#6b6b6b}.erercises-detail-bottom[data-v-4a7f5c4b]{position:fixed;bottom:0;width:100%;height:%?100?%;background:#fff;display:flex;align-items:center;z-index:99;justify-content:space-between}.erercises-detail-bottom .check[data-v-4a7f5c4b]{margin-left:%?20?%;line-height:%?30?%}.erercises-detail-bottom .check .a[data-v-4a7f5c4b]{float:left;display:flex;align-items:center;margin-right:%?30?%;font-size:%?30?%;color:#37c594}.erercises-detail-bottom .check .b[data-v-4a7f5c4b]{float:left;display:flex;align-items:center;font-size:%?30?%;color:#f01b1b}.erercises-detail-bottom .check uni-image[data-v-4a7f5c4b]{width:%?44?%;height:%?44?%;margin-right:%?10?%}.erercises-detail-bottom .listen[data-v-4a7f5c4b]{display:flex;align-items:center;font-size:%?26?%;line-height:%?30?%;color:#666}.erercises-detail-bottom .listen uni-image[data-v-4a7f5c4b]{width:%?44?%;height:%?44?%;margin-right:%?12?%}.erercises-detail-bottom .btns[data-v-4a7f5c4b]{width:%?310?%;margin-right:%?20?%}.erercises-detail-bottom .btns .hand[data-v-4a7f5c4b]{float:left;width:%?140?%;margin-right:%?10?%;font-size:%?28?%;line-height:%?57?%;color:#fff;text-align:center;background:#2080f9;border:1px solid #2080f9;border-radius:%?29?%}.erercises-detail-bottom .btns .btn[data-v-4a7f5c4b]{float:right;width:%?140?%;font-size:%?28?%;line-height:%?57?%;color:#2080f9;text-align:center;background:#fff;border:1px solid #2080f9;border-radius:%?29?%}",""]),t.exports=i},"2fd2":function(t,i,e){"use strict";e.d(i,"b",(function(){return s})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){return n}));var n={uCountDown:e("b18d").default,uDivider:e("9ffc").default,uEmpty:e("7018").default,uButton:e("63ee").default},s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("v-uni-view",{staticClass:"erercises-detail"},[t.info.question_info.title?e("v-uni-view",{staticClass:"erercises-detail-section"},[e("v-uni-view",{staticClass:"li"},[e("v-uni-view",{staticClass:"top"},[e("v-uni-view",{staticClass:"tag"},[e("v-uni-text",[t._v(t._s(t.teamIndex)+"/"+t._s(t.count))])],1),1!=t.type?e("v-uni-view",{staticClass:"time"},[e("v-uni-image",{attrs:{src:"/static/icon-clock.png"}}),e("u-count-down",{attrs:{time:t.start_time,format:"HH:mm:ss",autoStart:!0},on:{change:function(i){arguments[0]=i=t.$handleEvent(i),t.onChange.apply(void 0,arguments)}}},[e("v-uni-view",{staticClass:"time"},[e("v-uni-view",{staticClass:"time__custom"},[e("v-uni-text",{staticClass:"time__custom__item"},[t._v(t._s(t.timeData.hours>10?t.timeData.hours:"0"+(t.timeData.hours?t.timeData.hours:0)))])],1),e("v-uni-text",{staticClass:"time__doc"},[t._v(":")]),e("v-uni-view",{staticClass:"time__custom"},[e("v-uni-text",{staticClass:"time__custom__item"},[t._v(t._s(t.timeData.minutes>10?t.timeData.minutes:"0"+(t.timeData.minutes?t.timeData.minutes:0)))])],1),e("v-uni-text",{staticClass:"time__doc"},[t._v(":")]),e("v-uni-view",{staticClass:"time__custom"},[e("v-uni-text",{staticClass:"time__custom__item"},[t._v(t._s(t.timeData.seconds>10?t.timeData.seconds:"0"+(t.timeData.seconds?t.timeData.seconds:0)))])],1)],1)],1)],1):t._e()],1),e("v-uni-view",{staticClass:"tit",style:{fontSize:t.fontSize+"rpx",fontWeight:t.fontWeight?"normal":"bold"}},[t._v(t._s(t.teamIndex)+"、"),e("v-uni-view",{staticClass:"content",domProps:{innerHTML:t._s(t.info.question_info.title)}})],1),t.info.question_info.title_img?e("v-uni-view",{staticClass:"title_img"},[e("v-uni-image",{attrs:{mode:"widthFix",src:t.info.question_info.title_img}})],1):t._e(),t.info.question_info.title_video?e("v-uni-view",{staticClass:"title_video"},[e("v-uni-video",{attrs:{src:t.info.question_info.title_video}})],1):t._e(),t._l(t.info.question_info.choice,(function(i,n){return e("v-uni-view",{key:n,staticClass:"con",class:i.isSelect?"right":i.isErrow?"wrong":"",style:{fontSize:t.fontSize+"rpx"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.toSelect(n)}}},[t._v(t._s(i.name)+"."+t._s(i.value)),e("v-uni-view",{staticClass:"mark"},[i.isSelect?e("v-uni-image",{attrs:{src:"/static/icon-study-right.png"}}):[i.isErrow?e("v-uni-image",{attrs:{src:"/static/icon-study-wrong.png"}}):t._e(),t.current_question_choice&&t.info.question_info.correct==i.name?e("v-uni-image",{attrs:{src:"/static/icon-study-right.png"}}):t._e()]],2)],1)}))],2),e("v-uni-view",{staticClass:"btns"},[e("v-uni-view",{staticClass:"btn",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.updateFont(1)}}},[t._v("放大")]),e("v-uni-view",{staticClass:"btn",staticStyle:{"margin-left":"20rpx","margin-right":"20rpx"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.updateFont(2)}}},[t._v("缩小")]),e("v-uni-view",{staticClass:"btn",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.updateFont(3)}}},[t._v(t._s(t.fontWeight?"加粗":"恢复"))])],1),t.current_question_choice?e("v-uni-view",{staticClass:"analysis"},[e("v-uni-view",{staticClass:"answer"},[t._v("答案:"),e("v-uni-text",[t._v(t._s(t.info.question_info.correct))])],1),e("v-uni-view",{staticClass:"line"},[e("u-divider",{attrs:{text:"答案解析",textSize:"14",textColor:"#3e3e3e"}})],1),e("v-uni-view",{staticClass:"msg",style:{fontSize:t.fontSize1+"rpx"},domProps:{innerHTML:t._s(t.info.question_info.prompt)}})],1):t._e(),t.current_question_choice?e("v-uni-view",{staticClass:"btns"},[e("v-uni-view",{staticClass:"btn",staticStyle:{flex:"1"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.updateFont1(1)}}},[t._v("放大")]),e("v-uni-view",{staticClass:"btn",staticStyle:{flex:"1","margin-left":"20rpx","margin-right":"20rpx"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.updateFont1(2)}}},[t._v("缩小")])],1):t._e()],1):t._e(),0==t.info.question_info.length&&t.count>=0?e("v-uni-view",{staticClass:"erercises-detail-section"},[0==t.count?e("v-uni-view",{staticClass:"empty",staticStyle:{"margin-top":"200rpx"}},[e("u-empty",{attrs:{mode:"data",text:"暂无相关信息"}})],1):[e("v-uni-view",{staticClass:"empty",staticStyle:{"margin-top":"200rpx","margin-bottom":"100rpx"}},[e("u-empty",{attrs:{mode:"data",text:"当前真题全部答完"}})],1),e("u-button",{attrs:{color:"#2080F9"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.openPage(8)}}},[t._v("返回上一页")])]],2):t._e(),t.info.question_info.title?e("v-uni-view",{staticClass:"erercises-detail-bottom",style:{"padding-bottom":t.safeBottom+"px"}},[e("v-uni-view",{staticClass:"check"},[e("v-uni-view",{staticClass:"a"},[e("v-uni-image",{attrs:{src:"/static/icon-study-yes.png"}}),t._v(t._s(t.successNum))],1),e("v-uni-view",{staticClass:"b"},[e("v-uni-image",{attrs:{src:"/static/icon-study-no.png"}}),t._v(t._s(t.errorNum))],1)],1),t.info.question_info.speech?e("v-uni-view",{staticClass:"listen",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.toPlayAudio(t.info.question_info.speech)}}},[0==t.isPlay?e("v-uni-image",{attrs:{src:"/static/icon-listen.png"}}):e("v-uni-image",{attrs:{src:"/static/icon-listen-on.png"}}),e("v-uni-text",{class:t.isPlay?"on":""},[t._v("听题")])],1):t._e(),e("v-uni-view",{staticClass:"btns"},[1!=t.type?[1!=t.type?e("v-uni-view",{staticClass:"hand",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.openPage(2)}}},[t._v("交卷")]):t._e(),t.teamIndex<t.count?e("v-uni-view",{staticClass:"btn",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.getInfo(1)}}},[t._v("下一题")]):t._e()]:[t.teamIndex<=t.count?e("v-uni-view",{staticClass:"btn",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.getInfo(1)}}},[t._v("下一题")]):t._e()]],2)],1):t._e()],1)},o=[]},9795:function(t,i,e){var n=e("2493");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var s=e("967d").default;s("7391cc1c",n,!0,{sourceMap:!1,shadowMode:!1})},b02e:function(t,i,e){"use strict";var n=e("9795"),s=e.n(n);s.a},b497:function(t,i,e){"use strict";e.r(i);var n=e("2fd2"),s=e("cad4");for(var o in s)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(o);e("b02e");var a=e("828b"),c=Object(a["a"])(s["default"],n["b"],n["c"],!1,null,"4a7f5c4b",null,!1,n["a"],void 0);i["default"]=c.exports},cad4:function(t,i,e){"use strict";e.r(i);var n=e("1d8b"),s=e.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(o);i["default"]=s.a}}]);