修复视频播放问题

This commit is contained in:
zyx0814
2024-02-06 13:58:58 +08:00
Unverified
parent 5d3da83e43
commit c7d8646c5e
5 changed files with 28 additions and 9 deletions

View File

@@ -392,7 +392,9 @@ elseif($operation == 'mailcheck'){//邮件检测
exit(json_encode(array('path'=>$_G['setting']['attachurl'] .$waterpath))); exit(json_encode(array('path'=>$_G['setting']['attachurl'] .$waterpath)));
} }
exit(json_encode(array('error'=>'upload error'))); exit(json_encode(array('path'=>$waterfilepath.'?'.VERHASH)));
}else{
exit(json_encode(array('error'=>'upload failer')));
} }
}elseif($operation == 'watermark'){//水印设置 }elseif($operation == 'watermark'){//水印设置
if(!submitcheck('settingsubmit')) { if(!submitcheck('settingsubmit')) {

View File

@@ -248,6 +248,7 @@ class table_pichome_resources extends dzz_table
if ($downshare[$resourcesdata['appid']]['isdelete']) return array(); if ($downshare[$resourcesdata['appid']]['isdelete']) return array();
$attrdata = C::t('pichome_resources_attr')->fetch($rid); $attrdata = C::t('pichome_resources_attr')->fetch($rid);
$resourcesdata = array_merge($resourcesdata, $attrdata); $resourcesdata = array_merge($resourcesdata, $attrdata);
$resourcesdata['remoteid'] = 0;
if (is_numeric($resourcesdata['path'])) { if (is_numeric($resourcesdata['path'])) {
$attachment = C::t('attachment')->fetch(intval($resourcesdata['path'])); $attachment = C::t('attachment')->fetch(intval($resourcesdata['path']));
$bz = io_remote::getBzByRemoteid($attachment['remote']); $bz = io_remote::getBzByRemoteid($attachment['remote']);
@@ -260,12 +261,19 @@ class table_pichome_resources extends dzz_table
$resourcesdata['bz'] = 'dzz::'; $resourcesdata['bz'] = 'dzz::';
} else { } else {
$patharr = explode(':', $downshare[$resourcesdata['appid']]['path']); $patharr = explode(':', $downshare[$resourcesdata['appid']]['path']);
$resourcesdata['bz'] = ($patharr[1]) ? $patharr[0] . ':' . $patharr[1] . ':' : 'dzz::'; if(is_numeric($patharr[1])){
$resourcesdata['remoteid'] = $patharr[1]; $resourcesdata['bz'] = ($patharr[1]) ? $patharr[0] . ':' . $patharr[1] . ':' : 'dzz::';
$resourcesdata['remoteid'] = $patharr[1];
}else{
$resourcesdata['bz'] = 'dzz::';
}
} }
$resourcesdata['path'] = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path']; $resourcesdata['path'] = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
} }
$resourcesdata['vapptype'] = $downshare[$resourcesdata['appid']]['type']; $resourcesdata['vapptype'] = $downshare[$resourcesdata['appid']]['type'];
if($resourcesdata['vapptype'] == 3) $resourcesdata['iswebsitefile'] = 1;
else $resourcesdata['iswebsitefile'] =0;
return $resourcesdata; return $resourcesdata;
} }

View File

@@ -96,7 +96,7 @@
<!-- <el-radio :label="1" size="large">智能数据</el-radio> --> <!-- <el-radio :label="1" size="large">智能数据</el-radio> -->
<el-radio :label="2" size="large">单页</el-radio> <el-radio :label="2" size="large">单页</el-radio>
<el-radio :label="3" size="large">链接</el-radio> <el-radio :label="3" size="large">链接</el-radio>
<el-radio :label="4" size="large">专辑</el-radio> <!--<el-radio :label="4" size="large">专辑</el-radio>-->
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="数据来源" prop="value" v-if="DialogData.type != 5"> <el-form-item label="数据来源" prop="value" v-if="DialogData.type != 5">
@@ -126,13 +126,13 @@
:label="item.name" :label="item.name"
:value="item.id"></el-option> :value="item.id"></el-option>
</template> </template>
<template v-else-if="DialogData.type == 4"> <!--<template v-else-if="DialogData.type == 4">
<el-option <el-option
v-for="item in DialogData.dataList.tab" v-for="item in DialogData.dataList.tab"
:key="item.gid" :key="item.gid"
:label="item.name" :label="item.name"
:value="item.gid"></el-option> :value="item.gid"></el-option>
</template> </template>-->
</el-select> </el-select>
</template> </template>

View File

@@ -23,7 +23,11 @@ if($_GET['src']){
}else{ }else{
$resourcesdata = C::t('pichome_resources')->fetch_data_by_rid($rid); $resourcesdata = C::t('pichome_resources')->fetch_data_by_rid($rid);
} }
$fileurl = IO::getFileUri($resourcesdata['path']); if(!$resourcesdata['iswebsitefile'] && $resourcesdata['bz'] == 'dzz::'){
$fileurl = getglobal('siteurl') . 'index.php?mod=io&op=getStream&path=' . dzzencode($rid.'_3', '', 14400, 0);
}else{
$fileurl=IO::getFileuri($resourcesdata['path']);
}
$str = file_get_contents($fileurl); $str = file_get_contents($fileurl);
} }

View File

@@ -22,7 +22,7 @@ if($_GET['operation']=='progress'){
//$rid = dzzdecode($_GET['path'],'',0); //$rid = dzzdecode($_GET['path'],'',0);
if(strpos($rid, 'attach::') === 0){ if(strpos($rid, 'attach::') === 0){
$resourcesdata = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path))); $resourcesdata = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
$resourcesdata['iswebsitefile'] = 1;
}else{ }else{
$resourcesdata = C::t('pichome_resources')->fetch_data_by_rid($rid); $resourcesdata = C::t('pichome_resources')->fetch_data_by_rid($rid);
} }
@@ -119,7 +119,12 @@ if($_GET['operation']=='progress'){
} }
}else{ }else{
$src=IO::getFileuri($resourcesdata['path']); if(!$resourcesdata['iswebsitefile'] && $resourcesdata['bz'] == 'dzz::'){
$src = getglobal('siteurl') . 'index.php?mod=io&op=getStream&path=' . dzzencode($rid.'_3', '', 14400, 0);
}else{
$src=IO::getFileuri($resourcesdata['path']);
}
} }