|
|
|
@ -119,7 +119,11 @@ use \common\libs\MyLib; |
|
|
|
|
<script> |
|
|
|
|
function opFormatter(value, row, index) { |
|
|
|
|
var opStr = []; |
|
|
|
|
if(row.record_file_url !== null) { |
|
|
|
|
opStr.push('<a href="javascript:void(0);" onclick="play(' + row.record_file_url + ')">'); |
|
|
|
|
} else { |
|
|
|
|
opStr.push('<a href="javascript:void(0);" onclick="play(' + row.record_file_url_real + ')">'); |
|
|
|
|
} |
|
|
|
|
opStr.push('<i class="fa fa-play" title="播放"></i>'); |
|
|
|
|
opStr.push('</a>'); |
|
|
|
|
|
|
|
|
@ -127,8 +131,8 @@ use \common\libs\MyLib; |
|
|
|
|
} |
|
|
|
|
function play(url) { |
|
|
|
|
var body = '<audio controls>'; |
|
|
|
|
body += '<source src="http://music.baidu.com/cms/app/muplayer/test_mp3/1.mp3" type="audio/mp3">'; |
|
|
|
|
body += '您的浏览器不支持在线播放,请<a href="http://music.baidu.com/cms/app/muplayer/test_mp3/1.mp3">下载</a>'; |
|
|
|
|
body += '<source src="' + url + '" type="audio/mp3">'; |
|
|
|
|
body += '您的浏览器不支持在线播放,请<a href="' + url + '">下载</a>'; |
|
|
|
|
body += '</audio>'; |
|
|
|
|
parent.layer.open({ |
|
|
|
|
type: 1, |
|
|
|
|