Commit e2711753 authored by jianghaiming's avatar jianghaiming

update:修改

parent 78edeb9f
...@@ -139,6 +139,8 @@ class DistributorService ...@@ -139,6 +139,8 @@ class DistributorService
$mobile = !empty($params['mobile']) ? $params['mobile'] : ''; $mobile = !empty($params['mobile']) ? $params['mobile'] : '';
$distributorCode = !empty($params['distributor_code']) ? $params['distributor_code'] : ''; $distributorCode = !empty($params['distributor_code']) ? $params['distributor_code'] : '';
$smsCode = !empty($params['sms_code']) ? $params['sms_code'] : ''; $smsCode = !empty($params['sms_code']) ? $params['sms_code'] : '';
$shareUserId = !empty($params['share_user_id']) ? $params['share_user_id'] : '';
if (empty($smsCode)) { if (empty($smsCode)) {
throw new DistributorException(['cus'=>11]); throw new DistributorException(['cus'=>11]);
} }
...@@ -147,7 +149,7 @@ class DistributorService ...@@ -147,7 +149,7 @@ class DistributorService
if (empty($distributorCode)) { if (empty($distributorCode)) {
throw new DistributorException(['cus'=>9]); throw new DistributorException(['cus'=>9]);
} }
$info = Distributor::getRecord(['distributor_code' => $distributorCode]); $info = Distributor::getRecord(['user_id' => $shareUserId]);
if (empty($info)) { if (empty($info)) {
throw new DistributorException(['cus'=>10]); throw new DistributorException(['cus'=>10]);
......
...@@ -166,6 +166,7 @@ class MarketingGoodsService ...@@ -166,6 +166,7 @@ class MarketingGoodsService
/** /**
* 获取图片地址,这里因为bucket可能不同,不保证图片顺序 * 获取图片地址,这里因为bucket可能不同,不保证图片顺序
* @param $picUrlStr * @param $picUrlStr
...@@ -175,7 +176,7 @@ class MarketingGoodsService ...@@ -175,7 +176,7 @@ class MarketingGoodsService
{ {
$data = $ksyunParams = []; $data = $ksyunParams = [];
$strList = explode(",", $picUrlStr); $strList = explode(",", $picUrlStr);
foreach ($strList as $str) { foreach ($strList as $key => $str) {
$arr = explode("/", $str); $arr = explode("/", $str);
if (count($arr) != 2) { if (count($arr) != 2) {
continue; continue;
...@@ -183,12 +184,11 @@ class MarketingGoodsService ...@@ -183,12 +184,11 @@ class MarketingGoodsService
$bucket = $arr[0]; $bucket = $arr[0];
$objectId = $arr[1]; $objectId = $arr[1];
$ksyunParams[$bucket][] = $objectId;
} $url = Ksyun::getPicUrl("merchant-b", 'goods_temp', $bucket . '/' . $objectId, 200, 200, 'jpeg');
foreach ($ksyunParams as $bucket => $objectIds) { $data[] = $url;
$ksyun = Ksyun::getDownUrl($objectIds, 'merchant-b', $bucket, 60);
$data = array_merge($data, array_values($ksyun));
} }
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