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.
 
 
 

2 lines
14 KiB

  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/learning/Equinoctial/index2"],{100:function(t,e,i){},193:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){return n}));try{n={uIcon:function(){return i.e("uview-ui/components/u-icon/u-icon").then(i.bind(null,584))},uAvatar:function(){return i.e("uview-ui/components/u-avatar/u-avatar").then(i.bind(null,585))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.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,i=(t._self._c,t.__map(t.dialogList,(function(e,i){var n=t.__get_orig(e),o=t.__map(e.message,(function(e,i){var n=t.__get_orig(e),o=1==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,s=2==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,a=3==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,r=4==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,d=5==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,u=6==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,c=7==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,l=8==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null,h=9==e.speaker&&0==e.isShow?t.Aimg.replace(/[\r\n]/g,""):null;return{$orig:n,g0:o,g1:s,g2:a,g3:r,g4:d,g5:u,g6:c,g7:l,g8:h}}));return{$orig:n,l0:o}})));t.$mp.data=Object.assign({},{$root:{l1:i}})},s=[];o._withStripped=!0},363:function(t,e,i){"use strict";(function(t){i(3);n(i(2));var e=n(i(364));function n(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=i,t(e.default)}).call(this,i(0)["createPage"])},364:function(t,e,i){"use strict";i.r(e);var n=i(193),o=i(98);for(var s in o)"default"!==s&&function(t){i.d(e,t,(function(){return o[t]}))}(s);i(365);var a,r=i(1),d=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,"1e9d2b35",null,!1,n["a"],a);d.options.__file="pages/learning/Equinoctial/index2.vue",e["default"]=d.exports},365:function(t,e,i){"use strict";var n=i(100),o=i.n(n);o.a},98:function(t,e,i){"use strict";i.r(e);var n=i(99),o=i.n(n);for(var s in n)"default"!==s&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=o.a},99:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;getApp();var n=i(6),o=i(4),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+/v7////////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7+/v7////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sG2ivDqaVFDgOppk0LIbJm6C9DTB1UCAMU4SGZ2GqocAumL6jQBtMMRq2wLScAik3dMV/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:t.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(t){this.startTime=t.startTime,this.customerId=t.customerId,this.biaoqian=t.biaoqian,this.startFile=t.startFile,this.getdianzan(),this.getCommentList()},onShow:function(){this.initRecord(),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()},destroyed:function(){this.innerAudioContext&&this.innerAudioContext.destroy()},onUnload:function(){this.innerAudioContext.destroy()},methods:{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}))},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,i=e.currentTime;e.duration;if(t.playNow=parseInt(1e3*i),0==t.dialogList.length);else for(var n=t.dialogList[0].message,o=0;o<n.length;o++)if(Number(n[o].bg)<t.playNow&&Number(n[o].ed)>t.playNow){t.scrollId="dialog"+t.csdFileindex+"text"+o;break}var s=t.formatTime(i);t.sliderValue=parseInt(i),t.currentTimeStr=s,t.sliderMax=t.luyinList[t.csdFileindex].recordDuration,t.$forceUpdate()}))},ltolower:function(){var e=this,i=this.newluyinList.length-1;this.textindex>=i?t.showToast({title:"到底了",duration:2e3}):(this.textindex=this.textindex+1,this.newluyinList[this.textindex].message.forEach((function(t){e.dialogList[0].message.push(t)})),console.log("下一页",this.textindex))},rolltoupper:function(){var t=this;if(0!=this.toptextindex&&void 0!=this.dialogList[0]){this.toptextindex=this.toptextindex-1;var e=this.newluyinList[this.toptextindex].message,i=e.reverse();i.forEach((function(e){t.dialogList[0].message.unshift(e)})),console.log("上一页",this.toptextindex)}},dianjibiaoqian:function(){this.biaoqian.length>4&&(this.biaoqianyaisshow=!this.biaoqianyaisshow)},getdianzan:function(){var e=this;t.request({url:o.service.likegetLike+"?targetId="+this.customerId,method:"GET",header:{"content-type":"application/json",Authorization:"Bearer "+t.getStorageSync("weapp_session_login_data").token},success:function(i){1e4==i.data.code?e.isLiked=i.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;n.getRequestPromise(o.service.cmmentList+"?targetId="+this.customerId,{},!1,"GET").then((function(e){var i=e;i.reverse(),t.commentList=i}))},getluyinList:function(){var t=this;this.sliderMax=0,this.timeStr="00:00";var e={pageNum:1,pageSize:100,query:{whetherFinish:1,customerId:this.customerId,id:this.startFile}};this.$u.post("/corpus/fendianFindByPage",e).then((function(e){if(e&&e.length){var i=1+e[0].recordDuration;t.alltimeStr=t.getTime(i),t.luyinList=e,t.recordPath=e[0].recordPath,t.sliderMax=t.getTime(e[0].recordDuration),t.timeStr=t.getTime(e[0].recordDuration),t.date=e[0].receptionTime,t.getCorpusAnalysis(),t.creatAudio()}}))},adasdasdasd:function(t){var e=this.formatTime(t);this.currentTimeStr=e,this.innerAudioContext.seek(t),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&&t.showLoading({title:"识别中"}),this.voiceShow=!1,this.isRecording=!1,a.stop()},initRecord:function(){var e=this;a.onStart=function(t){e.isRecording=!0},a.onRecognize=function(t){console.log("ing"+t.result)},a.onStop=function(i){t.hideLoading();var n=e.content+i.result;n.length>140&&(n=n.substring(0,140)),e.content=n,e.textareaFocus=!0},a.onError=function(e){t.hideLoading()}},changePlayState:function(){0==this.audioPlay?this.innerAudioContext.play():this.innerAudioContext.pause()},sliderChangeComplate:function(e){var i=this,n=1e3*e.detail.value;this.dialogList=[],t.request({url:o.service.fastForward+"?corpusId="+this.luyinList[this.csdFileindex].id+"&bg="+n,method:"GET",header:{"content-type":"application/json",Authorization:"Bearer "+t.getStorageSync("weapp_session_login_data").token},success:function(t){i.textindex=t.data.data.index,i.toptextindex=t.data.data.index,i.dialogList.push(i.newluyinList[t.data.data.index]);var n=i.formatTime(e.detail.value);i.currentTimeStr=n,i.innerAudioContext.seek(e.detail.value),i.innerAudioContext.play()}})},getCorpusAnalysis:function(){var e=this;this.dialogList=[],t.request({url:o.service.getCorpusAnal+"?corpusId="+this.luyinList[this.csdFileindex].id+"&bg="+this.startTime+"&speaker="+this.roleindex,method:"GET",header:{"content-type":"application/json",Authorization:"Bearer "+t.getStorageSync("weapp_session_login_data").token},success:function(t){var i=JSON.parse(t.data.data.audioContent);e.textindex=t.data.data.index,e.toptextindex=t.data.data.index,i.forEach((function(t){t.message=JSON.parse(t.onebest),t.backindex=e.csdFileindex})),console.log(i),e.newluyinList=i,e.dialogList.push(i[e.textindex]);var n=parseInt(e.startTime/1e3);e.adasdasdasd(n)}})},getTime:function(t){return n.formatSecond(t)},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()},formatTime:function(t){t=t.toFixed(0);var e=t%60;e<10&&(e="0"+e);var i=Math.floor(t/60);return i<10&&(i="0"+i),i+":"+e},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 i=this;n.getRequestPromise(o.service.saveCmment,e,!1).then((function(e){i.getCommentList(),t.showToast({title:"评论成功",icon:"none"}),i.textareaFocus=!1,i.content=""}))}else t.showToast({icon:"none",title:"请输入标题"})},uploadImage:function(){var e=this,i={targetId:e.id,commentType:1};this.answerUserId&&(i.replyCommentId=this.answerId,i.replyUser=this.answerUserId),t.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(n){t.showLoading({title:"上传中"}),t.uploadFile({url:o.service.saveCmmentUpload,filePath:n.tempFilePaths[0],name:"file",header:{Authorization:"Bearer "+t.getStorageSync("weapp_session_login_data").token},formData:i,success:function(i){e.getCommentList(),t.hideLoading(),t.showToast({icon:"none",title:"上传成功"}),console.log(i.data)}})}})},changeLike:function(){t.showLoading({title:"请求中",mask:!0}),this.isLiked?this.cancelLike():this.saveLike()},saveLike:function(){var e=this;n.getRequestPromise(o.service.saveLike,{targetId:this.customerId},!1).then((function(i){e.isLiked=!0,t.hideLoading(),t.showToast({icon:"none",title:"点赞成功"})}))},cancelLike:function(){var e=this;n.getRequestPromise(o.service.cancelLike,{targetId:this.customerId},!1).then((function(i){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,i(0)["default"])}},[[363,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/learning/Equinoctial/index2.js.map