lqmac 8 months ago
parent fad622eead
commit 1be278da4d
  1. 2
      app/admin/controller/goods/Import.php
  2. 2
      app/api/controller/Goods.php
  3. 2
      app/common/model/Goods.php
  4. 2
      app/store/model/Store.php

@ -35,7 +35,7 @@ class Import extends Controller
$params['store_id'] = 0;
$model = new ImportModel;
$platform = $this->getUserPlatform();
$params['channels'] = $platform ? array_column($platform->toArray(), "code") : [];
$params['channels'] = $this->admin['user']['role'] == 0 ? [] : ($platform ? array_column($platform->toArray(), "code") : []);
$list = $model->getList($params);
return $this->renderSuccess(compact('list'));
}

@ -411,7 +411,7 @@ class Goods extends Controller
$wxConfig = WxappSettingModel::getConfigBasic($store_id);
// 请求api获取短连接
$link_obj = new ShortLink($wxConfig['app_id'], $wxConfig['app_secret']);
$url = $link_obj->shortUrl($page_url, $page_title);
$url = $link_obj->shortUrl($page_url, "");
return $this->renderSuccess(['url' => $url]);
}

@ -584,7 +584,7 @@ class Goods extends BaseModel
protected function setGoodsData($goodsInfo, callable $callback = null)
{
$channel = Channel::withoutGlobalScope()->where('code', $goodsInfo['channel'])->find();
$goodsInfo['channel_name'] = $channel['name'] ?? "";
$goodsInfo['channel_name'] = $channel['alias'] ?? "";
$goodsInfo['goods_images'] = helper::getArrayColumn($goodsInfo['images'], 'file');
// 商品主图

@ -30,7 +30,7 @@ class Store extends StoreModel
{
// 是否删除图片
!isset($data['logo_image_id']) && $data['logo_image_id'] = 0;
$data['fliter_condition'] = json_encode($data['fliter_condition'], JSON_UNESCAPED_UNICODE);
$data['fliter_condition'] = isset($data['fliter_condition']) ? json_encode($data['fliter_condition'], JSON_UNESCAPED_UNICODE) : "";
return $this->save($data) !== false;
}
}

Loading…
Cancel
Save