Commit 3e86ffc0 authored by luhongguang's avatar luhongguang

update:兼容图片展示

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