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.
1 lines
6.7 KiB
1 lines
6.7 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/study/detail"],{1123:function(t,n,e){"use strict";e.r(n);var i=e("2b56"),o=e("2e65");for(var s in o)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(s);e("927b");var u=e("828b"),c=Object(u["a"])(o["default"],i["b"],i["c"],!1,null,"781f1acd",null,!1,i["a"],void 0);n["default"]=c.exports},"2b56":function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return s})),e.d(n,"a",(function(){return i}));var i={uDivider:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uview-ui/components/u-divider/u-divider")]).then(e.bind(null,"8f21"))},uEmpty:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uview-ui/components/u-empty/u-empty")]).then(e.bind(null,"1623"))},uButton:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uview-ui/components/u-button/u-button")]).then(e.bind(null,"95c6"))}},o=function(){var t=this,n=t.$createElement,e=(t._self._c,t.info.question_info.title?t.__map(t.info.question_info.choice,(function(n,e){var i=t.__get_orig(n),o=n.isSelect?t.staticUrl("/static/icon-study-right.png"):null,s=!n.isSelect&&n.isErrow?t.staticUrl("/static/icon-study-wrong.png"):null,u=!n.isSelect&&t.current_question_choice&&t.info.question_info.correct==n.name?t.staticUrl("/static/icon-study-right.png"):null;return{$orig:i,m0:o,m1:s,m2:u}})):null),i=0==t.info.question_info.length&&t.count>=0,o=t.info.question_info.title&&t.teamIndex<=t.count?t.staticUrl("/static/icon-study-yes.png"):null,s=t.info.question_info.title&&t.teamIndex<=t.count?t.staticUrl("/static/icon-study-no.png"):null,u=t.info.question_info.title&&t.teamIndex<=t.count&&t.info.question_info.speech&&0==t.isPlay?t.staticUrl("/static/icon-listen.png"):null,c=t.info.question_info.title&&t.teamIndex<=t.count&&t.info.question_info.speech&&0!=t.isPlay?t.staticUrl("/static/icon-listen-on.png"):null;t.$mp.data=Object.assign({},{$root:{l0:e,g0:i,m3:o,m4:s,m5:u,m6:c}})},s=[]},"2c1c":function(t,n,e){},"2e65":function(t,n,e){"use strict";e.r(n);var i=e("f64d"),o=e.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(s);n["default"]=o.a},"3efa":function(t,n,e){"use strict";(function(t,n){var i=e("47a9");e("482e");i(e("3240"));var o=i(e("1123"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(o.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},"927b":function(t,n,e){"use strict";var i=e("2c1c"),o=e.n(i);o.a},f64d:function(t,n,e){"use strict";(function(t){var i=e("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(e("7eb4")),s=i(e("ee10")),u={data:function(){return{playType:1,page:1,chapter_id:"",teamIndex:0,successNum:0,errorNum:0,type:0,count:0,list:[],fontSize:30,cid:"",fontSize1:26,fontWeight:!0,info:{question_info:[]},safeBottom:"",isPlay:!1,innerAudioContext:null,current_question_id:"",next_question_id:"",current_question_choice:""}},onLoad:function(n){this.type=n.type,this.chapter_id=n.id,this.cid=n.cid;var e=t.getSystemInfoSync(),i=e.safeAreaInsets;this.safeBottom=null===i||void 0===i?void 0:i.bottom,t.setNavigationBarTitle({title:1!=n.type?"章节练习":"章节错误题"}),0==n.type||2==n.type?this.getZhangJieList():this.getCuowuList(),this.innerAudioContext=t.createInnerAudioContext({useWebAudioImplement:!1})},methods:{updateFont:function(t){1==t?this.fontSize<70?this.fontSize++:this.fontSize:2==t?this.fontSize>20?this.fontSize--:this.fontSize:3==t&&(this.fontWeight=!this.fontWeight)},openPage:function(){t.navigateBack({delta:1})},toPlayAudio:function(t){var n=this;0==this.isPlay?(1==this.playType?(console.log(111),this.innerAudioContext.src=t,this.innerAudioContext.play(),this.playType=2):(console.log(22),this.innerAudioContext.play()),this.isPlay=!0):(this.isPlay=!1,this.innerAudioContext.pause()),this.innerAudioContext.onPlay((function(){console.log("开始播放")})),this.innerAudioContext.onEnded((function(){n.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.current_question_choice=this.info.question_info.choice[t].name)},getZhangJieList:function(){var t=this;return(0,s.default)(o.default.mark((function n(){var e,i,s;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$api.chapterQuestionsList({is_free:0==t.type?0:1,chapter_id:0==t.type?t.chapter_id:"",category_id:0==t.type?t.cid:t.chapter_id,page:t.page});case 2:e=n.sent,i=e.code,s=e.data,e.msg,200==i&&(t.list=s.list,t.count=s.count,t.count>0&&(t.next_question_id=s.list[0],t.getInfo()));case 7:case"end":return n.stop()}}),n)})))()},getCuowuList:function(){var n=this;return(0,s.default)(o.default.mark((function e(){var i,s,u,c;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,n.$api.chapterErrorQuestionsList({category_id:n.chapter_id,page:n.page});case 2:i=e.sent,s=i.code,u=i.data,c=i.msg,200==s?(n.list=u.list,n.count=u.count,n.count>0&&(n.next_question_id=u.list[0],n.getInfo())):t.showToast({icon:"none",title:c});case 7:case"end":return e.stop()}}),e)})))()},getInfo:function(n){var e=this;return(0,s.default)(o.default.mark((function i(){var s,u,c,r,a;return o.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(1!=n){i.next=9;break}if(e.current_question_choice){i.next=4;break}return t.showToast({icon:"none",title:"请选择答案!"}),i.abrupt("return");case 4:e.current_question_id=e.teamIndex>e.count?"":e.list[e.teamIndex-1],e.next_question_id=e.teamIndex>e.count?"":e.list[e.teamIndex],e.isPlay=!1,e.playType=1,e.innerAudioContext.pause();case 9:return t.showLoading({title:"加载中"}),i.next=12,e.$api.chapterQuestionsInfo({next_question_id:e.next_question_id,current_question_id:e.current_question_id,current_question_choice:e.current_question_choice,is_error:e.type});case 12:s=i.sent,u=s.code,c=s.data,r=s.msg,200==u?(t.hideLoading(),a=c,a.question_info.isDisable=!1,a.question_info&&a.question_info.choice&&a.question_info.choice.map((function(t){t.isSelect=!1,t.isErrow=!1})),e.teamIndex++,e.current_question_choice="",e.info=a):t.showToast({icon:"none",title:r});case 17:case"end":return i.stop()}}),i)})))()}},onUnload:function(){this.innerAudioContext.src="",this.innerAudioContext.stop(),this.innerAudioContext.destroy()},destroyed:function(){this.innerAudioContext.src="",this.innerAudioContext.stop(),this.innerAudioContext.destroy()}};n.default=u}).call(this,e("df3c")["default"])}},[["3efa","common/runtime","common/vendor"]]]); |