Commit e2711753 authored by jianghaiming's avatar jianghaiming

update:修改

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