|
@@ -500,7 +500,16 @@ class GhsController extends BaseController
|
|
|
|
|
|
|
|
public function actionCommonInfo()
|
|
public function actionCommonInfo()
|
|
|
{
|
|
{
|
|
|
- $mainId = $this->resolveGhsMainId();
|
|
|
|
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
|
|
+ $ghsId = intval($get['ghsId'] ?? 0);
|
|
|
|
|
+ $ghs = GhsClass::getById($ghsId);
|
|
|
|
|
+ if(empty($ghs)){
|
|
|
|
|
+ util::fail('没有批发店信息');
|
|
|
|
|
+ }
|
|
|
|
|
+ if($ghs['ownMainId'] != $this->mainId){
|
|
|
|
|
+ util::fail('不是你的批发店');
|
|
|
|
|
+ }
|
|
|
|
|
+ $mainId = $ghs['mainId'] ?? 0;
|
|
|
// 通用接口返回全部有效公告,前端按 positions 字段筛选展示位置
|
|
// 通用接口返回全部有效公告,前端按 positions 字段筛选展示位置
|
|
|
$ghsNoticeList = GhsNoticeClass::getClientNoticeList($mainId);
|
|
$ghsNoticeList = GhsNoticeClass::getClientNoticeList($mainId);
|
|
|
util::success(['ghsNoticeList' => $ghsNoticeList]);
|
|
util::success(['ghsNoticeList' => $ghsNoticeList]);
|