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