You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1013 B
44 lines
1013 B
<?php
|
|
|
|
namespace app\store\controller\apps\dealer;
|
|
|
|
use app\store\controller\Controller;
|
|
use app\store\model\dealer\Apply as ApplyModel;
|
|
|
|
/**
|
|
* 分销商申请
|
|
* Class Setting
|
|
* @package app\store\controller\apps\dealer
|
|
*/
|
|
class Apply extends Controller
|
|
{
|
|
/**
|
|
* 分销商申请列表
|
|
* @param string $search
|
|
* @return mixed
|
|
* @throws \think\exception\DbException
|
|
*/
|
|
public function index($search = '')
|
|
{
|
|
$model = new ApplyModel;
|
|
return $this->fetch('index', [
|
|
'list' => $model->getList($search),
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* 分销商审核
|
|
* @param $apply_id
|
|
* @return array|bool
|
|
* @throws \think\exception\DbException
|
|
*/
|
|
public function submit($apply_id)
|
|
{
|
|
$model = ApplyModel::detail($apply_id);
|
|
if ($model->submit($this->postData('apply'))) {
|
|
return $this->renderSuccess('操作成功');
|
|
}
|
|
return $this->renderError($model->getError() ?: '操作失败');
|
|
}
|
|
|
|
}
|