| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- namespace app\modules\alliance\controllers;
- use app\modules\alliance\models\GoodsAgentForm;
- use app\modules\alliance\behaviors\goodsAgentAuth;
- use yii\helpers\ArrayHelper;
- class GoodsAgentController extends BaseController
- {
- public function behaviors()
- {
- $merge = [
- [
- 'class' => goodsAgentAuth::class,
- ]
- ];
- return ArrayHelper::merge($merge, parent::behaviors());
- }
- //产品代理中心
- public function actionGetInfo() {
- $form = new GoodsAgentForm();
- $form->attributes = get_params();
- $res = $form->getInfo();
- return $this->asJson($res);
- }
- //产品代理(代理产品)
- public function actionApplyGoodsAgent() {
- $form = new GoodsAgentForm();
- $form->attributes = post_params();
- $res = $form->bindFrontAgentGoods();
- return $this->asJson($res);
- }
- //产品代理(查看已绑定代理产品)
- public function actionGetBindGoodsList() {
- $form = new GoodsAgentForm();
- $form->attributes = get_params();
- $res = $form->getBindGoodsList();
- return $this->asJson($res);
- }
- //产品代理(查看未绑定的代理产品)
- public function actionFrontAgentGoodsList() {
- $form = new GoodsAgentForm();
- $form->attributes = get_params();
- $res = $form->frontAgentGoodsList();
- return $this->asJson($res);
- }
- //产品代理(订单列表)
- public function actionGetOrderList() {
- $form = new GoodsAgentForm();
- $form->attributes = get_params();
- $res = $form->getInstallLog();
- return $this->asJson($res);
- }
- //点击配送
- public function actionSetInstallStatus() {
- $form = new GoodsAgentForm();
- $form->attributes = get_params();
- $order_type = get_params('order_type', 0);
- $res = $form->setInstallStatus($order_type);
- return $this->asJson($res);
- }
- }
|