(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/learning/Equinoctial/index2"],{364:function(e,t,i){"use strict";(function(e){i(5),i(6);n(i(4));var t=n(i(365));function n(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=i,e(t.default)}).call(this,i(1)["createPage"])},365:function(e,t,i){"use strict";i.r(t);var n=i(366),o=i(368);for(var s in o)"default"!==s&&function(e){i.d(t,e,(function(){return o[e]}))}(s);i(370);var a,r=i(17),d=Object(r["default"])(o["default"],n["render"],n["staticRenderFns"],!1,null,"1e9d2b35",null,!1,n["components"],a);d.options.__file="pages/learning/Equinoctial/index2.vue",t["default"]=d.exports},366:function(e,t,i){"use strict";i.r(t);var n=i(367);i.d(t,"render",(function(){return n["render"]})),i.d(t,"staticRenderFns",(function(){return n["staticRenderFns"]})),i.d(t,"recyclableRender",(function(){return n["recyclableRender"]})),i.d(t,"components",(function(){return n["components"]}))},367:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"render",(function(){return o})),i.d(t,"staticRenderFns",(function(){return a})),i.d(t,"recyclableRender",(function(){return s})),i.d(t,"components",(function(){return n}));try{n={uIcon:function(){return i.e("uview-ui/components/u-icon/u-icon").then(i.bind(null,579))},uAvatar:function(){return i.e("uview-ui/components/u-avatar/u-avatar").then(i.bind(null,594))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var e=this,t=e.$createElement,i=(e._self._c,e.__map(e.dialogList,(function(t,i){var n=e.__get_orig(t),o=e.__map(t.message,(function(t,i){var n=e.__get_orig(t),o=1==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,s=2==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,a=3==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,r=4==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,d=5==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,c=6==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,u=7==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,l=8==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null,h=9==t.speaker&&0==t.isShow?e.Aimg.replace(/[\r\n]/g,""):null;return{$orig:n,g0:o,g1:s,g2:a,g3:r,g4:d,g5:c,g6:u,g7:l,g8:h}}));return{$orig:n,l0:o}})));e.$mp.data=Object.assign({},{$root:{l1:i}})},s=!1,a=[];o._withStripped=!0},368:function(e,t,i){"use strict";i.r(t);var n=i(369),o=i.n(n);for(var s in n)"default"!==s&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=o.a},369:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;getApp();var n=i(67),o=i(11),s=requirePlugin("WechatSI"),a=s.getRecordRecognitionManager(),r={data:function(){return{Aimg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAACqVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f3////9/f39/f3////////9/f3////////////9/f3////9/f39/f3////9/f3////////9/f3////9/f3////////////////9/f39/f3////////9/f39/f3////9/f39/f3////////9/f39/f3////////9/f39/f39/f3////////////////+/v7+/v7////+/v7////+/v7////+/v7+/v7////////+/v7+/v7////+/v7////+/v7////////////////////////////+/v7////+/v7////+/v7+/v7////////////+/v7////+/v7////+/v7+/v7////////+/v7////+/v7////////+/v7////////+/v7////+/v7+/v7+/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bomyQH+KIGljIYaWNxxDtC72ouMgsdpZzosHhqqYDmFdraOQNpttHUfLKU0TITlKtra6IZpCu3tgMVPQx0sG2ivDqaVFDgOppk0LIbJm6C9DTB1UCAMU4SGZ2GqocAumL6jQBtMMRq2wLScAik3dMV/UWB/EQwrafgSpk6KlEJ3LIXOgGE9DQdgqKDQSdBNoNAiGL6i6SjowhSaAt1UCm2CzpOk6QTonqfQJdBdSKGkD5pKWqZCU7iHQtdB10KxWmjOpqUJmtMp9gB091LsIWiCtCyFZiHFXoZuHcW+hiZGy0vQvE2xT6DbTolKAI/R8hmA4SmKdUG3jxIhAG/QkigAZlAi6QJQTJk2AF1MGwXcRRkfgJGU2V8EHzP8wBeUqQQwllKTcCozpuFESk0AMJNSC3AxM8KYT6lpAFootRGLmLEQ6ynVCCBAqcSQ1cy4f8ghSs0HcMzvlKp+lRmvVFMqNQ6aaIoyd3Yy49vllOmuh+H4WZFIpFnTpJmjadTM1oQ1oVAgFNQENA0N9f01BIKh8OzGOU3NkbmXzwuV41/wNztgHKhu7WKTAAAAAElFTkSuQmCC",dialogList:[],isshowFile:!1,luyinList:[],newluyinList:[],fileIndex:0,fileId:"",id:"",audioStop:!1,customerId:"",date:"",time:"",message:"",durationTimeStr:"",autoLoad:!0,playNow:0,scrollTop:0,scrollId:"",editing:!1,isLiked:null,createUser:null,commentList:[],content:"",voiceShow:!1,isRecording:!1,answerUserId:null,answerId:null,textareaFocus:!1,myId:e.getStorageSync("weapp_session_userInfo_data").accountId,startTime:"",alltimeStr:"00:00",audioPlay:!1,sliderValue:0,end:!1,sliderMax:0,innerAudioContext:"",currentTimeStr:"00:00",timeStr:"00:00",recordPath:"",csdFileindex:0,biaoqian:"",biaoqianyaisshow:!1,startFile:"",textindex:0,toptextindex:0,roleindex:0}},onLoad:function(e){this.startTime=e.startTime,this.customerId=e.customerId,this.biaoqian=e.biaoqian,this.startFile=e.startFile,this.getdianzan(),this.getCommentList()},onShow:function(){this.initRecord(),this.innerAudioContext=e.createInnerAudioContext(),this.innerAudioContext.autoplay=!1,this.innerAudioContext.title="音频",this.onPlay(),this.onPause(),this.onCanplay(),this.onEnded(),this.onSeeking(),this.onSeeked(),this.TimeUpdate(),this.getluyinList()},destroyed:function(){this.innerAudioContext&&this.innerAudioContext.destroy()},onUnload:function(){this.innerAudioContext.destroy()},methods:{onPlay:function(){var e=this;this.innerAudioContext.onPlay((function(){console.log("播放!"),e.audioPlay=!0}))},onPause:function(){var e=this;this.innerAudioContext.onPause((function(){console.log("暂停播放!"),e.audioPlay=!1}))},onCanplay:function(){var e=this;this.innerAudioContext.onCanplay((function(t){console.log("缓冲回调",e.innerAudioContext.duration)}))},onEnded:function(){var e=this;this.innerAudioContext.onEnded((function(){console.log("播放结束!"),e.audioPlay=!1}))},onSeeking:function(){this.innerAudioContext.onSeeking((function(e){console.log("进行跳转",e)}))},onSeeked:function(){var e=this;this.innerAudioContext.onSeeked((function(t){console.log("结束跳转",t),e.$forceUpdate()}))},TimeUpdate:function(){var e=this;this.innerAudioContext.onTimeUpdate((function(){var t=e.innerAudioContext,i=t.currentTime;t.duration;if(e.playNow=parseInt(1e3*i),0==e.dialogList.length);else for(var n=e.dialogList[0].message,o=0;oe.playNow){e.scrollId="dialog"+e.csdFileindex+"text"+o;break}var s=e.formatTime(i);e.sliderValue=parseInt(i),e.currentTimeStr=s,e.sliderMax=e.luyinList[e.csdFileindex].recordDuration,e.$forceUpdate()}))},ltolower:function(){var t=this,i=this.newluyinList.length-1;this.textindex>=i?e.showToast({title:"到底了",duration:2e3}):(this.textindex=this.textindex+1,this.newluyinList[this.textindex].message.forEach((function(e){t.dialogList[0].message.push(e)})),console.log("下一页",this.textindex))},rolltoupper:function(){var e=this;if(0!=this.toptextindex&&void 0!=this.dialogList[0]){this.toptextindex=this.toptextindex-1;var t=this.newluyinList[this.toptextindex].message,i=t.reverse();i.forEach((function(t){e.dialogList[0].message.unshift(t)})),console.log("上一页",this.toptextindex)}},dianjibiaoqian:function(){this.biaoqian.length>4&&(this.biaoqianyaisshow=!this.biaoqianyaisshow)},getdianzan:function(){var t=this;e.request({url:o.service.likegetLike+"?targetId="+this.customerId,method:"GET",header:{"content-type":"application/json","Access-Token":e.getStorageSync("weapp_session_login_data").token},success:function(i){1e4==i.data.code?t.isLiked=i.data.data.like:(e.hideLoading(),e.showModal({title:"提示",content:"请求数据失败,请重新尝试",showCancel:!1}))},fail:function(t){return e.hideLoading(),e.showModal({title:"提示",content:"网络异常,请重新尝试",showCancel:!1}),!1}})},getCommentList:function(){var e=this;n.getRequestPromise(o.service.cmmentList+"?targetId="+this.customerId,{},!1,"GET").then((function(t){var i=t;i.reverse(),e.commentList=i}))},getluyinList:function(){var e=this;this.sliderMax=0,this.timeStr="00:00";var t={pageNum:1,pageSize:100,query:{whetherFinish:1,customerId:this.customerId,id:this.startFile}};this.$u.post("/corpus/fendianFindByPage",t).then((function(t){if(t&&t.length){var i=1+t[0].recordDuration;e.alltimeStr=e.getTime(i),e.luyinList=t,e.recordPath=t[0].recordPath,e.sliderMax=e.getTime(t[0].recordDuration),e.timeStr=e.getTime(t[0].recordDuration),e.date=t[0].receptionTime,e.getCorpusAnalysis(),e.creatAudio()}}))},adasdasdasd:function(e){var t=this.formatTime(e);this.currentTimeStr=t,this.innerAudioContext.seek(e),this.innerAudioContext.play()},showFile:function(){this.isshowFile=!this.isshowFile},changeVoiceShow:function(){this.voiceShow=!this.voiceShow},voiceStart:function(){a.start({lang:"zh_CN"})},voiceEnd:function(){this.isRecording&&e.showLoading({title:"识别中"}),this.voiceShow=!1,this.isRecording=!1,a.stop()},initRecord:function(){var t=this;a.onStart=function(e){t.isRecording=!0},a.onRecognize=function(e){console.log("ing"+e.result)},a.onStop=function(i){e.hideLoading();var n=t.content+i.result;n.length>140&&(n=n.substring(0,140)),t.content=n,t.textareaFocus=!0},a.onError=function(t){e.hideLoading()}},changePlayState:function(){0==this.audioPlay?this.innerAudioContext.play():this.innerAudioContext.pause()},sliderChangeComplate:function(t){var i=this,n=1e3*t.detail.value;this.dialogList=[],e.request({url:o.service.fastForward+"?corpusId="+this.luyinList[this.csdFileindex].id+"&bg="+n,method:"GET",header:{"content-type":"application/json","Access-Token":e.getStorageSync("weapp_session_login_data").token},success:function(e){i.textindex=e.data.data.index,i.toptextindex=e.data.data.index,i.dialogList.push(i.newluyinList[e.data.data.index]);var n=i.formatTime(t.detail.value);i.currentTimeStr=n,i.innerAudioContext.seek(t.detail.value),i.innerAudioContext.play()}})},getCorpusAnalysis:function(){var t=this;this.dialogList=[],e.request({url:o.service.getCorpusAnal+"?corpusId="+this.luyinList[this.csdFileindex].id+"&bg="+this.startTime+"&speaker="+this.roleindex,method:"GET",header:{"content-type":"application/json","Access-Token":e.getStorageSync("weapp_session_login_data").token},success:function(e){var i=JSON.parse(e.data.data.audioContent);t.textindex=e.data.data.index,t.toptextindex=e.data.data.index,i.forEach((function(e){e.message=JSON.parse(e.onebest),e.backindex=t.csdFileindex})),console.log(i),t.newluyinList=i,t.dialogList.push(i[t.textindex]);var n=parseInt(t.startTime/1e3);t.adasdasdasd(n)}})},getTime:function(e){return n.formatSecond(e)},creatAudio:function(){this.innerAudioContext=e.createInnerAudioContext(),this.innerAudioContext.autoplay=!0,this.innerAudioContext.src=this.recordPath,this.innerAudioContext.title="音频",this.onPlay(),this.onPause(),this.onCanplay(),this.onEnded(),this.onSeeking(),this.onSeeked(),this.TimeUpdate()},formatTime:function(e){e=e.toFixed(0);var t=e%60;t<10&&(t="0"+t);var i=Math.floor(e/60);return i<10&&(i="0"+i),i+":"+t},changeContent:function(e){this.content=e.detail.value},answer:function(e,t){this.answerId=t,this.answerUserId=e,this.editing=!0,this.textareaFocus=!0},sendComment:function(){if(""!=this.content){var t={targetId:this.customerId,content:this.content,commentType:1};this.answerUserId&&(t.replyCommentId=this.answerId,t.replyUser=this.answerUserId);var i=this;n.getRequestPromise(o.service.saveCmment,t,!1).then((function(t){i.getCommentList(),e.showToast({title:"评论成功",icon:"none"}),i.textareaFocus=!1,i.content=""}))}else e.showToast({icon:"none",title:"请输入标题"})},uploadImage:function(){var t=this,i={targetId:t.id,commentType:1};this.answerUserId&&(i.replyCommentId=this.answerId,i.replyUser=this.answerUserId),e.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(n){e.showLoading({title:"上传中"}),e.uploadFile({url:o.service.saveCmmentUpload,filePath:n.tempFilePaths[0],name:"file",header:{"Access-Token":e.getStorageSync("weapp_session_login_data").token},formData:i,success:function(i){t.getCommentList(),e.hideLoading(),e.showToast({icon:"none",title:"上传成功"}),console.log(i.data)}})}})},changeLike:function(){e.showLoading({title:"请求中",mask:!0}),this.isLiked?this.cancelLike():this.saveLike()},saveLike:function(){var t=this;n.getRequestPromise(o.service.saveLike,{targetId:this.customerId},!1).then((function(i){t.isLiked=!0,e.hideLoading(),e.showToast({icon:"none",title:"点赞成功"})}))},cancelLike:function(){var t=this;n.getRequestPromise(o.service.cancelLike,{targetId:this.customerId},!1).then((function(i){t.isLiked=!1,e.hideLoading(),e.showToast({icon:"none",title:"取消点赞成功"})}))},gotoChat:function(){var e=this;this.scrollId=null,this.$nextTick((function(){e.scrollId="hash"}))},gotoTop:function(){var e=this;this.scrollId=null,this.$nextTick((function(){e.scrollId="top"}))},changeEditing:function(e){this.editing=e,this.answerId=null,this.answerUserId=null,this.textareaFocus=!1,this.dialogList.forEach((function(e){e.message.forEach((function(e){e.isshow=!1}))}))}}};t.default=r}).call(this,i(1)["default"])},370:function(e,t,i){"use strict";i.r(t);var n=i(371),o=i.n(n);for(var s in n)"default"!==s&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=o.a},371:function(e,t,i){}},[[364,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/learning/Equinoctial/index2.js.map