Commit 2e89cba3 authored by luhongguang's avatar luhongguang

update:商品图片url

parent 14fcb105
......@@ -1354,20 +1354,18 @@ class GoodsService
$strList = explode(",", $picUrlStr);
foreach ($strList as $key => $str) {
$arr = explode("/", $str);
if (count($arr) == 1) {
if (preg_match("/^http[s]{0,1}:\/\/([\w.]+\/?)\S*/", $str)) {
$data[] = $str;
if (preg_match("/^http[s]{0,1}:\/\/([\w.]+\/?)\S*/", $str)) {
$data[] = $str;
} else if (count($arr) == 1) {
if (!empty($widthSize) && !empty($highSize)) {
$urlRes = Ks3Api::picEncryptUrl($str, $widthSize, $highSize);
} else {
if (!empty($widthSize) && !empty($highSize)) {
$urlRes = Ks3Api::picEncryptUrl($str, $widthSize, $highSize);
} else {
$urlRes = Ks3Api::picEncryptUrl($str);
}
if (!empty($urlRes["response"]["data"]["url"]) && $urlRes["response"]["data"]["url"]) {
$data[] = $urlRes["response"]["data"]["url"];
} else {
continue;
}
$urlRes = Ks3Api::picEncryptUrl($str);
}
if (!empty($urlRes["response"]["data"]["url"]) && $urlRes["response"]["data"]["url"]) {
$data[] = $urlRes["response"]["data"]["url"];
} else {
continue;
}
} else {
$bucket = $arr[0];
......
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