attributes = post_params(); $res = $form->lowerLevelShop(); return $this->asJson($res); } //店铺订单 public function actionShopOrder(){ $form = new AgencyForm(); $form->attributes = post_params(); $res = $form->shopOrder(); return $this->asJson($res); } //店铺续费订单 public function actionStoreReOrder(){ $form = new AgencyForm(); $form->attributes = post_params(); $res = $form->storeReOrder(); return $this->asJson($res); } //店铺续费订单 public function actionGetDataInfo(){ $form = new AgencyForm(); $res = $form->getDataInfo(); return $this->asJson($res); } //佣金明细 public function actionCommission(){ $form = new AgencyForm(); $form->attributes = post_params(); $res = $form->commission(); return $this->asJson($res); } //代理中心配置 public function actionAgencyConfig(){ $data = Option::get('agency_config', 0, 'saas'); $type = input_params('type', 0); if (empty($data['value'])) { $data = [ 'lowerLevelShop' => "", 'lowerLevelShopIcon' => "", 'renewOrder' => "", 'renewOrderIcon' => "", 'Withdrawal' => "", 'WithdrawalIcon' => "", 'commissionDetail' => "", 'commissionDetailIcon'=> "", 'WithdrawalLog' => "", 'WithdrawalLogIcon' => "", 'shopOrder' => "", 'shopOrderIcon' => "" ]; } else { $data = json_decode($data['value'], true); } if (in_array($type, [0, 1, 2])) { $agent_apply = AgentApply::findOne(['saas_user_id' => get_saas_user()->id, 'is_delete' => 0, 'agent_type' => $type]); $admin_type = 'admin'; if ((int)$type === 1) { $admin_type = 'bd_agent'; } if ((int)$type === 2) { $admin_type = 'goods_agent'; } $admin = Admin::findOne(['saas_user_id' => get_saas_user()->id, 'is_delete' => 0, 'type' => $admin_type]); $login_data = [ 'name' => $agent_apply->username ?: $admin->username, 'password' => $agent_apply->password ?: '', 'url' => "https://" . \Yii::$app->request->hostName, 'type' => $type ]; $data = array_merge($data, $login_data); } return $this->asJson([ 'code' => 0, 'msg' => 'success', 'data' => $data, ]); } }