Commit 7ba58159 by 杨昕

Merge branch 'test' into 'master'

Test

See merge request !6
parents a90ee164 396a3214
Pipeline #9995 passed with stages
in 39 seconds
......@@ -318,7 +318,7 @@ class MediaModel extends Eloquent
if (empty($media_catg)){
throw new \Exception("媒资类别不存在");
}
$tmp[] = MediaModel::select("_id","book_num","book_name","secret_key")->whereIn('book_num',$media_ids)->get();
$tmp[] = MediaModel::select("_id","book_num","book_name","secret_key","media_url")->whereIn('book_num',$media_ids)->get();
}
}catch (\Exception $exception){
......@@ -334,7 +334,7 @@ class MediaModel extends Eloquent
/**
* 排除res为空
*/
if (!isset($res[0]) || empty($res[0])){
if (!isset($res[0]) || empty($res[0]->first())){
return [];
}
......
......@@ -77,7 +77,7 @@ final class QiniuModel
return "$baseUrl&token=$token";
}
public static function uploadToken($bucket="", $key = null, $expires = 3600, $policy = null, $strictPolicy = true)
public static function uploadToken($bucket="", $key = null, $expires = 3600 * 24, $policy = null, $strictPolicy = true)
{
$deadline = time() + $expires;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment