Browse Source

动态声音在列表播放

lizhen_gitee 10 months ago
parent
commit
bc2e58e72b
2 changed files with 3 additions and 3 deletions
  1. 2 2
      public/assets/js/backend/topicdongtai.js
  2. 1 1
      public/assets/js/require-table.js

+ 2 - 2
public/assets/js/backend/topicdongtai.js

@@ -55,9 +55,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             }
                             },
                             events: Table.api.events.image, formatter: Table.api.formatter.images},
-//                        {field: 'audio_file', title: __('Audio_file'), operate: false},
-//                        {field: 'audio_second', title: __('Audio_second')},
                         {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
+                        {field: 'audio_file', title: __('Audio_file'), operate: false,events: Table.api.events.image, formatter: Table.api.formatter.audio},
+//                        {field: 'audio_second', title: __('Audio_second')},
 //                        {field: 'goodnum', title: __('Goodnum')},
 //                        {field: 'answernum', title: __('Answernum')},
                         {field: 'createtime', title: __('Createtime'),sortable:true, operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},

+ 1 - 1
public/assets/js/require-table.js

@@ -641,7 +641,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
                         return '';
                     }
 
-                    return '<audio controls="controls" src="' + value + '" /></audio>';
+                    return '<audio controls="controls" loop src="' + Fast.api.cdnurl(value) + '" /></audio>';
                 },
                 color: function (value, row, index) {
                     value = value == null || value.length === 0 ? '' : value.toString();