Authored by wangwei

视频描述限制,视频大小限制

... ... @@ -844,14 +844,14 @@
<div class="col-sm-8">
<input type="hidden" id="video_size" value="[[contentData.data.size]]">
<input type="text" id="video_intro" class="form-control" placeholder="视频描述" value="[[contentData.data.video_intro]]">
<input type="text" id="video_intro" class="form-control" placeholder="简介" value="[[contentData.data.video_intro]]">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">视频地址:<span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="video_src" class="form-control" required="required" placeholder="视频地址" value="[[contentData.data.src]]">
<input type="text" id="video_src" class="form-control" readonly="readonly" required="required" placeholder="视频地址" value="[[contentData.data.src]]">
</div>
</div>
<div class="form-group">
... ...
... ... @@ -164,6 +164,12 @@ var Bll = {
return false;
}
}
//视频描述限制
var videoIntroLimit=$("#video_intro").val();
if(videoIntroLimit&&videoIntroLimit.length>200){
common.util.__tip("视频描述不能超过200字", 'warning');
return false;
}
if (components.validate()) {
//TODO
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
... ... @@ -199,12 +205,16 @@ var Bll = {
onComplete: function (response) {
console.log("批量接口返回数据",response);
if (response.status && response.code == 200) {
$("#video_src").val(response.data.url);
$("#video_size").val(response.data.fileSize);
// if (loadModal) {
$("#imgTag").attr("src",response.data.url+"?vframe/jpg/offset/0");
$("#imgTag").show();
$("#imgATag").hide();
if(response.data.fileSize>20){
common.util.__tip("视频不能超过20M", 'warning');
}else{
$("#video_src").val(response.data.url);
$("#video_size").val(response.data.fileSize);
// if (loadModal) {
$("#imgTag").attr("src",response.data.url+"?vframe/jpg/offset/0");
$("#imgTag").show();
$("#imgATag").hide();
}
}
else {
common.util.__tip(response.message, 'warning');
... ...