切换PDF版

语音播报版

桂枝颗粒说明书

桂枝颗粒说明书

发布时间:

2025-03-17

字体缩放:

') } }) $("body").append('') audio = $("body .readAudio") } $(".broadcast").on("click",".read",function(){ // let $this = $(this); // let audioTimeLenght = $(this).nextAll('.audioTime').length > 0; let text = $(this).parent().next().text(); if(text){ let id = $(this).attr("id") if(id == nowId){ if($(this).hasClass('isPaused')){ audioPlay() $(this).removeClass('isPaused') }else{ audioStop() $(this).addClass('isPaused') } return } nowId = id $(".broadcast .read").removeClass('isPaused') let url = 'https://dict.youdao.com/dictvoice?le=zh&ie=UTF-8&speed=0&audio='+encodeURI(text) audio.attr("src",url) audio.attr("controls",'') audio.find("source").attr("src",url) audio.find("embed").attr("src",url) audioPlay() // 音频控制 const player = new Plyr('audio', {}); window.player = player; /*console.log(audioTimeLenght) if(!audioTimeLenght){ audio.off('canplaythrough').on('canplaythrough', function() { var duration = audio[0].duration; // console.log("播放时长:",duration); $this.after('播放时长:'+duration+'') }); }else{ }*/ } }) function audioPlay(url){ audio[0].play(); } function audioStop(){ audio[0].pause() } audio.on("ended",function(){ nowId = "" }) $('.showpdf').click(function(){ $(this).addClass('cur'); $('.yy').removeClass('cur'); $('.additivePDF').addClass('show'); $('.yybhcont').hide(); $('.fontTransk > div:last-child').hide(); // 2024.08.12 var dataVal = $('.needPDF').find('input').val(); if (dataVal) { var jsonMap = JSON.parse(dataVal); var id = jsonMap[0].id; var title = jsonMap[0].title; var hostname = $(location).prop('hostname'); var protocol = window.location.protocol; console.log(protocol) var url = protocol + '//' + hostname + '/viewfilebizce/' + id + '/' + title; var iframe = ''; if (id) { $('.additivePDF .p_item').append(iframe); } } }) $('.yy').click(function(){ $(this).addClass('cur'); $('.showpdf').removeClass('cur'); $('.additivePDF').removeClass('show'); $('.yybhcont').show(); $('.fontTransk > div:last-child').show(); })