Commit 3e86ffc0 authored by luhongguang's avatar luhongguang

update:兼容图片展示

parent d68298c1
...@@ -180,7 +180,7 @@ class GoodsToInitController extends Cli ...@@ -180,7 +180,7 @@ class GoodsToInitController extends Cli
$expirationTime = $item["outDate"]; $expirationTime = $item["outDate"];
$ruleLimit = $item["canBuy"]; $ruleLimit = $item["canBuy"];
$ruleDesc = $item["ruleIntroduce"]; $ruleDesc = $item["ruleIntroduce"];
$ruleRefund = $item["useRule"]; $ruleRefund = empty($item["useRule"]) ? 1 : $item["useRule"];
$ruleDateType = $item["holidayUse"] == 0 ? 2 : 1; $ruleDateType = $item["holidayUse"] == 0 ? 2 : 1;
$ruleStartTime = $item["starTime"]; $ruleStartTime = $item["starTime"];
$ruleEndTime = $item["endTime"]; $ruleEndTime = $item["endTime"];
......
...@@ -1238,14 +1238,18 @@ class GoodsService ...@@ -1238,14 +1238,18 @@ class GoodsService
foreach ($strList as $key => $str) { foreach ($strList as $key => $str) {
$arr = explode("/", $str); $arr = explode("/", $str);
if (count($arr) != 2) { if (count($arr) != 2) {
continue; if (preg_match("/^http[s]{0,1}:\/\/([\w.]+\/?)\S*/", $str)) {
} $data[] = $str;
} else {
$bucket = $arr[0]; continue;
$objectId = $arr[1]; }
} else {
$bucket = $arr[0];
$objectId = $arr[1];
$url = Ksyun::getPicUrl("merchant-b", 'goods_temp', $bucket . '/' . $objectId, 200, 200, 'jpeg'); $url = Ksyun::getPicUrl("merchant-b", 'goods_temp', $bucket . '/' . $objectId, 200, 200, 'jpeg');
$data[] = $url; $data[] = $url;
}
} }
return $data; return $data;
......
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