Authored by whb

视频bug

@@ -95,7 +95,7 @@ class LiveController extends BaseController @@ -95,7 +95,7 @@ class LiveController extends BaseController
95 ->limit($pagination->limit)->all(); 95 ->limit($pagination->limit)->all();
96 $liveMasterIds = []; 96 $liveMasterIds = [];
97 $masterList = new \stdClass(); 97 $masterList = new \stdClass();
98 - foreach($videoList as $video) { 98 + foreach($videoList as &$video) {
99 if(!empty($video->master_id)) { 99 if(!empty($video->master_id)) {
100 $liveMasterIds[] = $video->master_id; 100 $liveMasterIds[] = $video->master_id;
101 } 101 }
@@ -126,7 +126,7 @@ class Video extends \yii\db\ActiveRecord @@ -126,7 +126,7 @@ class Video extends \yii\db\ActiveRecord
126 $sql = "v.url <>''"; 126 $sql = "v.url <>''";
127 break; 127 break;
128 case 0://未上传回看视频 128 case 0://未上传回看视频
129 - $sql = "v.url =''"; 129 + $sql = "v.url ='' OR v.url IS NULL";
130 break; 130 break;
131 case -1: 131 case -1:
132 default: 132 default:
@@ -53,3 +53,16 @@ use backend\widgets\YHGImage\Common\Images as CommonImages; @@ -53,3 +53,16 @@ use backend\widgets\YHGImage\Common\Images as CommonImages;
53 </form> 53 </form>
54 54
55 </div> 55 </div>
  56 +<script>
  57 +$(function(){
  58 + $("#upload_button").on("click", function()
  59 + {
  60 + var pic = $("input[name=pic]").val();
  61 + if(pic == "")
  62 + {
  63 + alert("头图不能为空");
  64 + return false;
  65 + }
  66 + });
  67 +});
  68 +</script>