renderPartial('demo'); } //首页 shish 2019.12.2 public function actionIndex() { $where = ['merchantId' => $this->sjId, 'type' => 0, 'status' => 1, 'delStatus' => 0]; $adRespond = AdService::getAdList($where); $ad = []; if (isset($adRespond['list']) && !empty($adRespond['list'])) { foreach ($adRespond['list'] as $single) { $ad[] = ['adImg' => $single['adImgUrl'], 'url' => '']; } } $category = CategoryService::getTopThreeCategory($this->sjId); $categoryList = !empty($category) ? GoodsCategoryService::getAppointCategoryList($category) : []; $data = ['ad' => $ad, 'category' => $categoryList, 'columnStyle' => rand(1, 2)]; util::success($data); } //新客户 shish 2019.12.29 public function actionVisit() { $data = json_encode(array( 'type' => 'msg', 'msg' => 'aaaa', )); $id = 'merchantConsole_' . $this->sjId; $online = Gateway::getClientIdByUid($id); if ($online) { //直接发送 Gateway::sendToUid($id, json_encode($data)); } else { //保存 } } //新订单 shish 2019.12.29 public function actionOrder() { $data = json_encode(array( 'type' => 'msg', 'msg' => 'aaaa', )); $id = 'merchantConsole_' . $this->sjId; $online = Gateway::getClientIdByUid($id); if ($online) { //直接发送 Gateway::sendToUid($id, json_encode($data)); } else { //保存 } } }