(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/learning/Thefulltext/index"],{320:function(t,e,n){"use strict";(function(t){n(5),n(6);i(n(4));var e=i(n(321));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n(1)["createPage"])},321:function(t,e,n){"use strict";n.r(e);var i=n(322),o=n(324);for(var s in o)"default"!==s&&function(t){n.d(e,t,(function(){return o[t]}))}(s);n(326);var a,r=n(17),d=Object(r["default"])(o["default"],i["render"],i["staticRenderFns"],!1,null,"7d491ad8",null,!1,i["components"],a);d.options.__file="pages/learning/Thefulltext/index.vue",e["default"]=d.exports},322:function(t,e,n){"use strict";n.r(e);var i=n(323);n.d(e,"render",(function(){return i["render"]})),n.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(e,"components",(function(){return i["components"]}))},323:function(t,e,n){"use strict";var i;n.r(e),n.d(e,"render",(function(){return o})),n.d(e,"staticRenderFns",(function(){return a})),n.d(e,"recyclableRender",(function(){return s})),n.d(e,"components",(function(){return i}));try{i={uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,579))},uAvatar:function(){return n.e("uview-ui/components/u-avatar/u-avatar").then(n.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 t=this,e=t.$createElement;t._self._c},s=!1,a=[];o._withStripped=!0},324:function(t,e,n){"use strict";n.r(e);var i=n(325),o=n.n(i);for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=o.a},325:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;getApp();var i=n(67),o=n(11),s=requirePlugin("WechatSI"),a=s.getRecordRecognitionManager(),r={data:function(){return{dialogList:[],isshowFile:!1,luyinList:[],id:"",customerId:"",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:t.getStorageSync("weapp_session_userInfo_data").accountId,audioPlay:!1,sliderValue:0,end:!1,sliderMax:0,innerAudioContext:"",currentTimeStr:"00:00",timeStr:"00:00",recordPath:"",csdFileindex:0,date:"",alltimeStr:"00:00",num:0,Bnum:0,status:0,timer:null}},onLoad:function(t){this.customerId=t.customerId,this.getdianzan(),this.getCommentList(),this.getView();var e=this;this.timer=setTimeout((function(){e.addHot()}),3e4)},onShow:function(){this.initRecord();var e=getCurrentPages(),n=e[e.length-1],i=n.data.info;this.innerAudioContext=t.createInnerAudioContext(),this.innerAudioContext.autoplay=!1,this.innerAudioContext.title="音频",this.onPlay(),this.onPause(),this.onCanplay(),this.onEnded(),this.onSeeking(),this.onSeeked(),this.TimeUpdate(),this.getluyinList(i)},destroyed:function(){clearTimeout(this.timer),this.innerAudioContext&&this.innerAudioContext.destroy()},onUnload:function(){this.innerAudioContext.destroy()},methods:{toKeywordsearch:function(){this.innerAudioContext.destroy(),t.navigateTo({url:"/pages/learning/Keywordsearch?customerId="+this.customerId+"&status="+this.status})},getView:function(){this.$u.get("/addtodigest/addPageviews",{id:this.customerId}).then((function(t){}))},addHot:function(){this.$u.get("/addtodigest/addHeat",{id:this.customerId}).then((function(t){}))},onPlay:function(){var t=this;this.innerAudioContext.onPlay((function(){console.log("播放!"),t.audioPlay=!0}))},onPause:function(){var t=this;this.innerAudioContext.onPause((function(){console.log("暂停播放!"),t.audioPlay=!1}))},onCanplay:function(){var t=this;this.innerAudioContext.onCanplay((function(e){console.log("缓冲回调",t.innerAudioContext.duration)}))},onEnded:function(){var t=this;this.innerAudioContext.onEnded((function(){console.log("播放结束!"),t.audioPlay=!1,t.qeihuanwenjian()}))},onSeeking:function(){this.innerAudioContext.onSeeking((function(t){console.log("进行跳转",t)}))},onSeeked:function(){var t=this;this.innerAudioContext.onSeeked((function(e){console.log("结束跳转",e),t.$forceUpdate()}))},TimeUpdate:function(){var t=this;this.innerAudioContext.onTimeUpdate((function(){var e=t.innerAudioContext,n=e.currentTime;e.duration;if(t.playNow=parseInt(1e3*n),0==t.dialogList.length);else for(var i=t.dialogList[0].message,o=0;ot.playNow){t.scrollId="dialog"+t.csdFileindex+"text"+o;break}var s=t.formatTime(n);t.sliderValue=parseInt(n),t.currentTimeStr=s,t.sliderMax=t.luyinList[t.csdFileindex].recordDuration,t.$forceUpdate()}))},ltolower:function(){var e=this,n=this.luyinList.length-1;this.num>=n?t.showToast({title:"到底了",duration:2e3}):(this.num=this.num+1,t.showLoading({title:"加载中"}),setTimeout((function(){t.hideLoading()}),2e3),t.request({url:o.service.getCorpusAnalysis+"?corpusId="+this.luyinList[this.num].id+"&customerId="+this.customerId,method:"GET",header:{"content-type":"application/json","Access-Token":t.getStorageSync("weapp_session_login_data").token},success:function(n){if(1e4==n.data.code)if(0==n.data.data.audioContent.length)setTimeout((function(){t.hideLoading()}),2e3);else{var i=JSON.parse(n.data.data.audioContent);e.dialogList.push({message:i}),e.dialogList.forEach((function(t,e){t.message.forEach((function(t,e){t.isshow=!1}))}))}}}))},rolltoupper:function(){var e=this;0!=this.csdFileindex&&0!=this.Bnum?(this.Bnum=this.Bnum-1,t.showLoading({title:"加载中"}),setTimeout((function(){t.hideLoading()}),2e3),t.request({url:o.service.getCorpusAnalysis+"?corpusId="+this.luyinList[this.Bnum].id+"&customerId="+this.customerId,method:"GET",header:{"content-type":"application/json","Access-Token":t.getStorageSync("weapp_session_login_data").token},success:function(n){if(1e4==n.data.code)if(0==n.data.data.audioContent.length)setTimeout((function(){t.hideLoading()}),2e3);else{var i=JSON.parse(n.data.data.audioContent);e.dialogList.unshift({message:i}),e.dialogList.forEach((function(t,e){t.message.forEach((function(t,e){t.isshow=!1}))}))}}})):t.showToast({title:"到头了",duration:2e3})},getdianzan:function(){var e=this;t.request({url:o.service.likegetLike+"?targetId="+this.customerId,method:"GET",header:{"content-type":"application/json","Access-Token":t.getStorageSync("weapp_session_login_data").token},success:function(n){1e4==n.data.code?e.isLiked=n.data.data.like:(t.hideLoading(),t.showModal({title:"提示",content:"请求数据失败,请重新尝试",showCancel:!1}))},fail:function(e){return t.hideLoading(),t.showModal({title:"提示",content:"网络异常,请重新尝试",showCancel:!1}),!1}})},getCommentList:function(){var t=this;i.getRequestPromise(o.service.cmmentList+"?targetId="+this.customerId,{},!1,"GET").then((function(e){var n=e;n.reverse(),t.commentList=n}))},getluyinList:function(t){var e=this;this.sliderMax=0,this.timeStr="00:00";var n={pageNum:1,pageSize:100,query:{customerId:this.customerId}};this.$u.post("/corpus/findByPage",n).then((function(n){if(n&&n.length){var i=1;n.forEach((function(t){i+=t.recordDuration})),e.alltimeStr=e.getTime(i),t?n.forEach((function(i,o){if(i.id==t.id){e.csdFileindex=o,e.recordPath=n[o].recordPath,e.sliderMax=e.getTime(n[o].recordDuration),e.timeStr=e.getTime(n[o].recordDuration),e.date=n[o].receptionTime,e.isshowFile=!1,e.getCorpusAnalysis(t),e.creatAudio();var s=parseInt(t.bg/1e3);e.adasdasdasd(s)}})):(e.recordPath=n[0].recordPath,e.sliderMax=e.getTime(n[0].recordDuration),e.timeStr=e.getTime(n[0].recordDuration),e.date=n[0].receptionTime,e.innerAudioContext.src=e.recordPath,e.changePlayState(),e.luyinList=n,e.getCorpusAnalysis())}}))},adasdasdasd:function(t){var e=this.formatTime(t);this.currentTimeStr=e,this.innerAudioContext.seek(t),this.innerAudioContext.play()},getCorpusAnalysis:function(e){var n=this;this.dialogList=[],t.showLoading({title:"加载中"}),t.request({url:o.service.getCorpusAnalysis+"?corpusId="+this.luyinList[this.csdFileindex].id+"&customerId="+this.customerId,method:"GET",header:{"content-type":"application/json","Access-Token":t.getStorageSync("weapp_session_login_data").token},success:function(e){if(1e4==e.data.code)if(0==e.data.data.audioContent.length)setTimeout((function(){t.hideLoading()}),2e3);else{var i=JSON.parse(e.data.data.audioContent);n.dialogList.push({message:i}),setTimeout((function(){t.hideLoading()}),2e3)}else t.hideLoading(),t.showModal({title:"提示",content:"请求数据失败,请重新尝试",showCancel:!1})},fail:function(e){return t.hideLoading(),t.showModal({title:"提示",content:"网络异常,请重新尝试",showCancel:!1}),!1}})},getTime:function(t){return i.formatSecond(t)},filechange:function(t,e){this.num=e,this.Bnum=e,this.innerAudioContext.destroy(),this.csdFileindex=e,this.recordPath=t.recordPath,this.sliderMax=this.getTime(t.recordDuration),this.timeStr=this.getTime(t.recordDuration),this.date=t.receptionTime,this.isshowFile=!1,this.creatAudio(),this.getCorpusAnalysis()},creatAudio:function(){this.innerAudioContext=t.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()},qeihuanwenjian:function(){var t=this.csdFileindex+1;if(t140&&(i=i.substring(0,140)),e.content=i,e.textareaFocus=!0},a.onError=function(e){t.hideLoading()}},changeContent:function(t){this.content=t.detail.value},answer:function(t,e){this.answerId=e,this.answerUserId=t,this.editing=!0,this.textareaFocus=!0},sendComment:function(){if(""!=this.content){var e={targetId:this.customerId,content:this.content,commentType:1};this.answerUserId&&(e.replyCommentId=this.answerId,e.replyUser=this.answerUserId);var n=this;i.getRequestPromise(o.service.saveCmment,e,!1).then((function(e){n.getCommentList(),t.showToast({title:"评论成功",icon:"none"}),n.textareaFocus=!1,n.content=""}))}else t.showToast({icon:"none",title:"请输入标题"})},uploadImage:function(){var e=this,n={targetId:e.id,commentType:1};this.answerUserId&&(n.replyCommentId=this.answerId,n.replyUser=this.answerUserId),t.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(i){t.showLoading({title:"上传中"}),t.uploadFile({url:o.service.saveCmmentUpload,filePath:i.tempFilePaths[0],name:"file",header:{"Access-Token":t.getStorageSync("weapp_session_login_data").token},formData:n,success:function(n){e.getCommentList(),t.hideLoading(),t.showToast({icon:"none",title:"上传成功"}),console.log(n.data)}})}})},uploadAudio:function(){},changeLike:function(){t.showLoading({title:"请求中",mask:!0}),this.isLiked?this.cancelLike():this.saveLike()},saveLike:function(){var e=this;i.getRequestPromise(o.service.saveLike,{targetId:this.customerId},!1).then((function(n){e.isLiked=!0,t.hideLoading(),t.showToast({icon:"none",title:"点赞成功"})}))},cancelLike:function(){var e=this;i.getRequestPromise(o.service.cancelLike,{targetId:this.customerId},!1).then((function(n){e.isLiked=!1,t.hideLoading(),t.showToast({icon:"none",title:"取消点赞成功"})}))},gotoChat:function(){var t=this;this.scrollId=null,this.$nextTick((function(){t.scrollId="hash"}))},gotoTop:function(){var t=this;this.scrollId=null,this.$nextTick((function(){t.scrollId="top"}))},changeEditing:function(t){this.editing=t,this.answerId=null,this.answerUserId=null,this.textareaFocus=!1,this.dialogList.forEach((function(t){t.message.forEach((function(t){t.isshow=!1}))}))}}};e.default=r}).call(this,n(1)["default"])},326:function(t,e,n){"use strict";n.r(e);var i=n(327),o=n.n(i);for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=o.a},327:function(t,e,n){}},[[320,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/learning/Thefulltext/index.js.map