添加:总平台支持发布商品和商品详细信息编辑
This commit is contained in:
parent
f04923e13a
commit
ef0f4c5d57
|
|
@ -100,8 +100,7 @@ class ParameterTemplate extends BaseController
|
||||||
$where = $this->request->params(['cate_id',0]);
|
$where = $this->request->params(['cate_id',0]);
|
||||||
$where['mer_id'] = 0;
|
$where['mer_id'] = 0;
|
||||||
$data['sys'] = $this->repository->getSelect($where);
|
$data['sys'] = $this->repository->getSelect($where);
|
||||||
|
$where['mer_id'] = $this->request->merId();
|
||||||
$where = ['mer_id' => $this->request->merId()];
|
|
||||||
$data['mer'] = $this->repository->getSelect($where);
|
$data['mer'] = $this->repository->getSelect($where);
|
||||||
|
|
||||||
return app('json')->success($data);
|
return app('json')->success($data);
|
||||||
|
|
@ -120,6 +119,7 @@ class ParameterTemplate extends BaseController
|
||||||
if (!$template_ids) return app('json')->success([]);
|
if (!$template_ids) return app('json')->success([]);
|
||||||
$where['template_ids'] = $template_ids;
|
$where['template_ids'] = $template_ids;
|
||||||
$data = $this->repository->show($where);
|
$data = $this->repository->show($where);
|
||||||
|
|
||||||
return app('json')->success($data);
|
return app('json')->success($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -260,5 +260,15 @@ class Coupon extends BaseController
|
||||||
return app('json')->success($repository->getList($where, $page, $limit));
|
return app('json')->success($repository->getList($where, $page, $limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
* @author Qinii
|
||||||
|
*/
|
||||||
|
public function select(){
|
||||||
|
$where = $this->request->params(['coupon_name']);
|
||||||
|
$where['status'] = 1;
|
||||||
|
$where['send_type'] = 3;
|
||||||
|
[$page, $limit] = $this->getPage();
|
||||||
|
return app('json')->success($this->repository->getList($this->request->merId(), $where, $page, $limit));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
namespace app\controller\admin\store;
|
namespace app\controller\admin\store;
|
||||||
|
|
||||||
use app\common\repositories\store\GuaranteeRepository;
|
use app\common\repositories\store\GuaranteeRepository;
|
||||||
|
use app\common\repositories\store\GuaranteeTemplateRepository;
|
||||||
use app\validate\admin\GuaranteeValidate;
|
use app\validate\admin\GuaranteeValidate;
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
|
@ -108,4 +109,28 @@ class Guarantee extends BaseController
|
||||||
$validate->check($data);
|
$validate->check($data);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function select(){
|
||||||
|
$where['keyword'] = $this->request->param('keyword');
|
||||||
|
$where['is_del'] = 0;
|
||||||
|
$where['status'] = 1;
|
||||||
|
$data = app()->make(GuaranteeRepository::class)->select($where);
|
||||||
|
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 商品选择模板的下拉数据
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author Qinii
|
||||||
|
* @day 5/25/21
|
||||||
|
*/
|
||||||
|
public function list()
|
||||||
|
{
|
||||||
|
$data = app()->make(GuaranteeTemplateRepository::class)->list($this->request->merId());
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\controller\admin\store;
|
||||||
|
|
||||||
|
use app\common\repositories\store\GuaranteeRepository;
|
||||||
|
use app\common\repositories\store\GuaranteeTemplateRepository;
|
||||||
|
use app\validate\admin\GuaranteeTemplateValidate;
|
||||||
|
use think\App;
|
||||||
|
use crmeb\basic\BaseController;
|
||||||
|
|
||||||
|
class GuaranteeTemplate extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var GuaranteeTemplateRepository
|
||||||
|
*/
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Product constructor.
|
||||||
|
* @param App $app
|
||||||
|
* @param GuaranteeTemplateRepository $repository
|
||||||
|
*/
|
||||||
|
public function __construct(App $app, GuaranteeTemplateRepository $repository)
|
||||||
|
{
|
||||||
|
parent::__construct($app);
|
||||||
|
$this->repository = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function lst()
|
||||||
|
{
|
||||||
|
[$page, $limit] = $this->getPage();
|
||||||
|
$where = $this->request->params(['date','keyword']);
|
||||||
|
$where['is_del'] = 0;
|
||||||
|
$where['mer_id'] = $this->request->merId();
|
||||||
|
$data = $this->repository->getList($where,$page, $limit);
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create(GuaranteeTemplateValidate $validate)
|
||||||
|
{
|
||||||
|
$data = $this->request->params(['template_name','template_value',['status',1],'sort']);
|
||||||
|
$validate->check($data);
|
||||||
|
$data['mer_id'] = $this->request->merId();
|
||||||
|
$this->repository->create($data);
|
||||||
|
return app('json')->success('添加成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detail($id)
|
||||||
|
{
|
||||||
|
$ret = $this->repository->detail($id,$this->request->merId());
|
||||||
|
return app('json')->success($ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id,GuaranteeTemplateValidate $validate)
|
||||||
|
{
|
||||||
|
$data = $this->request->params(['template_name','template_value',['status',1],'sort']);
|
||||||
|
$validate->check($data);
|
||||||
|
$this->repository->detail($id,$this->request->merId());
|
||||||
|
|
||||||
|
$data['mer_id'] = $this->request->merId();
|
||||||
|
$this->repository->edit($id,$data);
|
||||||
|
|
||||||
|
return app('json')->success('编辑成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$this->repository->detail($id,$this->request->merId());
|
||||||
|
|
||||||
|
$this->repository->delete($id);
|
||||||
|
|
||||||
|
return app('json')->success('删除成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 添加模板筛选的条款数据
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author Qinii
|
||||||
|
* @day 5/25/21
|
||||||
|
*/
|
||||||
|
public function select()
|
||||||
|
{
|
||||||
|
$where['keyword'] = $this->request->param('keyword');
|
||||||
|
$where['is_del'] = 0;
|
||||||
|
$where['status'] = 1;
|
||||||
|
$data = app()->make(GuaranteeRepository::class)->select($where);
|
||||||
|
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function sort($id)
|
||||||
|
{
|
||||||
|
$ret = $this->repository->detail($id,$this->request->merId());
|
||||||
|
if(!$ret) return app('json')->fail('数据不存在');
|
||||||
|
$data = [
|
||||||
|
'sort' => $this->request->param('sort'),
|
||||||
|
];
|
||||||
|
$this->repository->update($id,$data);
|
||||||
|
|
||||||
|
return app('json')->success('修改成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 商品选择模板的下拉数据
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author Qinii
|
||||||
|
* @day 5/25/21
|
||||||
|
*/
|
||||||
|
public function list()
|
||||||
|
{
|
||||||
|
$data = $this->repository->list($this->request->merId());
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function switchStatus($id)
|
||||||
|
{
|
||||||
|
$ret = $this->repository->detail($id,$this->request->merId());
|
||||||
|
if(!$ret) return app('json')->fail('数据不存在');
|
||||||
|
$data = [
|
||||||
|
'status' => $this->request->param('status') == 1 ?: 0,
|
||||||
|
];
|
||||||
|
$this->repository->update($id,$data);
|
||||||
|
|
||||||
|
return app('json')->success('修改成功');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
<?php
|
||||||
|
namespace app\controller\admin\store;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\repositories\system\merchant\MerchantRepository;
|
||||||
|
use think\App;
|
||||||
|
use crmeb\basic\BaseController;
|
||||||
|
use app\common\repositories\store\product\ProductCopyRepository as repository;
|
||||||
|
|
||||||
|
class ProductCopy extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var repository
|
||||||
|
*/
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ProductCopy constructor.
|
||||||
|
* @param App $app
|
||||||
|
* @param repository $repository
|
||||||
|
*/
|
||||||
|
public function __construct(App $app ,repository $repository)
|
||||||
|
{
|
||||||
|
$this->repository = $repository;
|
||||||
|
parent::__construct($app);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 列表
|
||||||
|
* @return mixed
|
||||||
|
* @author Qinii
|
||||||
|
* @day 2020-08-14
|
||||||
|
*/
|
||||||
|
public function lst()
|
||||||
|
{
|
||||||
|
[$page, $limit] = $this->getPage();
|
||||||
|
|
||||||
|
$where['mer_id'] = $this->request->param('mer_id');
|
||||||
|
$mer_id = $this->request->merId();
|
||||||
|
if ($mer_id){
|
||||||
|
$where['mer_id'] = $this->request->merId();
|
||||||
|
}
|
||||||
|
$where['type'] = $this->request->param('type','copy');
|
||||||
|
|
||||||
|
return app('json')->success($this->repository->getList($where,$page, $limit));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
* @return mixed
|
||||||
|
* @author Qinii
|
||||||
|
* @day 2020-08-07
|
||||||
|
*/
|
||||||
|
public function count(){
|
||||||
|
|
||||||
|
// $count = $this->request->merchant()->copy_product_num;
|
||||||
|
return app('json')->success(['count' => 0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 复制商品
|
||||||
|
* @return mixed
|
||||||
|
* @author Qinii
|
||||||
|
* @day 2020-08-06
|
||||||
|
*/
|
||||||
|
public function get()
|
||||||
|
{
|
||||||
|
$status = systemConfig('copy_product_status');
|
||||||
|
if($status == 0) return app('json')->fail('请前往平台后台-设置-第三方接口-开启采集');
|
||||||
|
$num = app()->make(MerchantRepository::class)->getCopyNum($this->request->merId());
|
||||||
|
if($num <= 0) return app('json')->fail('复制商品次数已用完');
|
||||||
|
$url = $this->request->param('url');
|
||||||
|
if (!$url) return app('json')->fail('请输入采集链接');
|
||||||
|
$res = $this->repository->getProduct($url,$this->request->merId());
|
||||||
|
return app('json')->success($res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace app\controller\admin\store;
|
||||||
|
|
||||||
|
use app\common\repositories\store\CityAreaRepository;
|
||||||
|
use think\App;
|
||||||
|
use crmeb\basic\BaseController;
|
||||||
|
use app\common\repositories\store\shipping\CityRepository as repository;
|
||||||
|
use think\facade\Log;
|
||||||
|
|
||||||
|
class ShippingCity extends BaseController
|
||||||
|
{
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* City constructor.
|
||||||
|
* @param App $app
|
||||||
|
* @param repository $repository
|
||||||
|
*/
|
||||||
|
public function __construct(App $app, repository $repository)
|
||||||
|
{
|
||||||
|
parent::__construct($app);
|
||||||
|
$this->repository = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/8
|
||||||
|
* @Time: 14:40
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function lst()
|
||||||
|
{
|
||||||
|
return app('json')->success($this->repository->getFormatList([['is_show', '=', 1],['level','<',2]]));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function lstV2($pid)
|
||||||
|
{
|
||||||
|
return app('json')->success(app()->make(CityAreaRepository::class)->getChildren(intval($pid)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cityList()
|
||||||
|
{
|
||||||
|
$address = $this->request->param('address');
|
||||||
|
if (!$address)
|
||||||
|
return app('json')->fail('地址不存在');
|
||||||
|
$make = app()->make(CityAreaRepository::class);
|
||||||
|
$city = $make->search(compact('address'))->order('id DESC')->find();
|
||||||
|
if (!$city){
|
||||||
|
Log::info('用户定位对比失败,请在城市数据中增加:'.var_export($address,true));
|
||||||
|
return app('json')->fail('地址不存在');
|
||||||
|
}
|
||||||
|
return app('json')->success($make->getCityList($city));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
* @author Qinii
|
||||||
|
*/
|
||||||
|
public function getlist()
|
||||||
|
{
|
||||||
|
return app('json')->success($this->repository->getFormatList(['is_show' => 1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace app\controller\admin\store;
|
||||||
|
|
||||||
|
use think\App;
|
||||||
|
use crmeb\basic\BaseController;
|
||||||
|
use app\validate\merchant\ShippingTemplateValidate as validate;
|
||||||
|
use app\common\repositories\store\shipping\ShippingTemplateRepository as repository;
|
||||||
|
|
||||||
|
class ShippingTemplate extends BaseController
|
||||||
|
{
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ShippingTemplate constructor.
|
||||||
|
* @param App $app
|
||||||
|
* @param repository $repository
|
||||||
|
*/
|
||||||
|
public function __construct(App $app, repository $repository)
|
||||||
|
{
|
||||||
|
parent::__construct($app);
|
||||||
|
$this->repository = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/8
|
||||||
|
* @Time: 14:39
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function lst()
|
||||||
|
{
|
||||||
|
[$page, $limit] = $this->getPage();
|
||||||
|
$where = $this->request->params(['type','name']);
|
||||||
|
return app('json')->success($this->repository->search($this->request->merId(),$where, $page, $limit));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/18
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getList()
|
||||||
|
{
|
||||||
|
return app('json')->success($this->repository->getList($this->request->merId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/8
|
||||||
|
* @Time: 14:39
|
||||||
|
* @param validate $validate
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function create(validate $validate)
|
||||||
|
{
|
||||||
|
$data = $this->checkParams($validate);
|
||||||
|
$data['mer_id'] = $this->request->merId();
|
||||||
|
$this->repository->create($data);
|
||||||
|
return app('json')->success('添加成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/8
|
||||||
|
* @Time: 14:39
|
||||||
|
* @param $id
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function detail($id)
|
||||||
|
{
|
||||||
|
if(!$this->repository->merExists($this->request->merId(),$id))
|
||||||
|
return app('json')->fail('数据不存在');
|
||||||
|
return app('json')->success($this->repository->getOne($id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/8
|
||||||
|
* @Time: 14:39
|
||||||
|
* @param $id
|
||||||
|
* @param validate $validate
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function update($id,validate $validate)
|
||||||
|
{
|
||||||
|
$data = $this->checkParams($validate);
|
||||||
|
if(!$this->repository->merExists($this->request->merId(),$id))
|
||||||
|
return app('json')->fail('数据不存在');
|
||||||
|
$this->repository->update($id,$data,$this->request->merId());
|
||||||
|
|
||||||
|
return app('json')->success('编辑成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/8
|
||||||
|
* @Time: 14:39
|
||||||
|
* @param $id
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
if(!$this->repository->merExists($this->request->merId(),$id))
|
||||||
|
return app('json')->fail('数据不存在');
|
||||||
|
if($this->repository->merDefaultExists($this->request->merId(),$id))
|
||||||
|
return app('json')->fail('默认模板不能删除');
|
||||||
|
if($this->repository->getProductUse($this->request->merId(),$id))
|
||||||
|
return app('json')->fail('模板使用中,不能删除');
|
||||||
|
$this->repository->delete($id);
|
||||||
|
return app('json')->success('删除成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:Qinii
|
||||||
|
* @Date: 2020/5/8
|
||||||
|
* @Time: 14:39
|
||||||
|
* @param validate $validate
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function checkParams(validate $validate)
|
||||||
|
{
|
||||||
|
$data = $this->request->params(['name','type','appoint','undelivery','region','free','undelives','sort','info']);
|
||||||
|
$validate->check($data);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace app\controller\admin\store;
|
||||||
|
|
||||||
|
|
||||||
|
use crmeb\basic\BaseController;
|
||||||
|
use app\common\repositories\store\StoreAttrTemplateRepository;
|
||||||
|
use app\validate\merchant\StoreAttrTemplateValidate;
|
||||||
|
use think\App;
|
||||||
|
use think\db\exception\DataNotFoundException;
|
||||||
|
use think\db\exception\DbException;
|
||||||
|
use think\db\exception\ModelNotFoundException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class StoreAttrTemplate
|
||||||
|
* @package app\controller\merchant\store
|
||||||
|
* @author xaboy
|
||||||
|
* @day 2020-05-06
|
||||||
|
*/
|
||||||
|
class StoreAttrTemplate extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var StoreAttrTemplateRepository
|
||||||
|
*/
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StoreAttrTemplate constructor.
|
||||||
|
* @param App $app
|
||||||
|
* @param StoreAttrTemplateRepository $repository
|
||||||
|
*/
|
||||||
|
public function __construct(App $app, StoreAttrTemplateRepository $repository)
|
||||||
|
{
|
||||||
|
parent::__construct($app);
|
||||||
|
$this->repository = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
* @throws DbException
|
||||||
|
* @throws DataNotFoundException
|
||||||
|
* @throws ModelNotFoundException
|
||||||
|
* @author xaboy
|
||||||
|
* @day 2020-05-06
|
||||||
|
*/
|
||||||
|
public function lst()
|
||||||
|
{
|
||||||
|
[$page, $limit] = $this->getPage();
|
||||||
|
$data = $this->repository->getList($this->request->merId(), [], $page, $limit);
|
||||||
|
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getlist()
|
||||||
|
{
|
||||||
|
return app('json')->success($this->repository->list($this->request->merId()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param StoreAttrTemplateValidate $validate
|
||||||
|
* @return mixed
|
||||||
|
* @author xaboy
|
||||||
|
* @day 2020-05-06
|
||||||
|
*/
|
||||||
|
public function create(StoreAttrTemplateValidate $validate)
|
||||||
|
{
|
||||||
|
$data = $this->checkParams($validate);
|
||||||
|
$data['mer_id'] = $this->request->merId();
|
||||||
|
$this->repository->create($data);
|
||||||
|
|
||||||
|
return app('json')->success('添加成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $id
|
||||||
|
* @param StoreAttrTemplateValidate $validate
|
||||||
|
* @return mixed
|
||||||
|
* @throws DbException
|
||||||
|
* @author xaboy
|
||||||
|
* @day 2020-05-06
|
||||||
|
*/
|
||||||
|
public function update($id, StoreAttrTemplateValidate $validate)
|
||||||
|
{
|
||||||
|
$merId = $this->request->merId();
|
||||||
|
|
||||||
|
if (!$this->repository->merExists($merId, $id))
|
||||||
|
return app('json')->fail('数据不存在');
|
||||||
|
$data = $this->checkParams($validate);
|
||||||
|
$data['mer_id'] = $merId;
|
||||||
|
$this->repository->update($id, $data);
|
||||||
|
|
||||||
|
return app('json')->success('编辑成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $id
|
||||||
|
* @return mixed
|
||||||
|
* @throws DbException
|
||||||
|
* @author xaboy
|
||||||
|
* @day 2020-05-06
|
||||||
|
*/
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$merId = $this->request->merId();
|
||||||
|
if (!$this->repository->merExists($merId, $id))
|
||||||
|
return app('json')->fail('数据不存在');
|
||||||
|
$this->repository->delete($id, $merId);
|
||||||
|
|
||||||
|
return app('json')->success('删除成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param StoreAttrTemplateValidate $validate
|
||||||
|
* @return array
|
||||||
|
* @author xaboy
|
||||||
|
* @day 2020-05-06
|
||||||
|
*/
|
||||||
|
public function checkParams(StoreAttrTemplateValidate $validate)
|
||||||
|
{
|
||||||
|
$data = $this->request->params(['template_name', ['template_value', []]]);
|
||||||
|
$validate->check($data);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -44,7 +44,7 @@ class StoreProduct extends BaseController
|
||||||
$type = $this->request->param('type',1);
|
$type = $this->request->param('type',1);
|
||||||
$where = $this->request->params(['cate_id', 'keyword', 'mer_cate_id', 'pid','store_name','is_trader','us_status','product_id','star','sys_labels','hot_type','svip_price_type','is_ficti']);
|
$where = $this->request->params(['cate_id', 'keyword', 'mer_cate_id', 'pid','store_name','is_trader','us_status','product_id','star','sys_labels','hot_type','svip_price_type','is_ficti']);
|
||||||
$mer_id = $this->request->param('mer_id','');
|
$mer_id = $this->request->param('mer_id','');
|
||||||
$merId = $mer_id ? $mer_id : null;
|
$merId = (isset($mer_id) && $mer_id !== '') ? (int)$mer_id : null;
|
||||||
$where['is_gift_bag'] = 0;
|
$where['is_gift_bag'] = 0;
|
||||||
$_where = $this->repository->switchType($type, null,0);
|
$_where = $this->repository->switchType($type, null,0);
|
||||||
unset($_where['star']);
|
unset($_where['star']);
|
||||||
|
|
@ -243,8 +243,7 @@ class StoreProduct extends BaseController
|
||||||
*/
|
*/
|
||||||
public function changeUsed($id)
|
public function changeUsed($id)
|
||||||
{
|
{
|
||||||
if(!$this->repository->merExists(null,$id))
|
if(!$this->repository->merExists(null,$id)) return app('json')->fail('数据不存在');
|
||||||
return app('json')->fail('数据不存在');
|
|
||||||
$status = $this->request->param('status',0) == 1 ? 1 : 0;
|
$status = $this->request->param('status',0) == 1 ? 1 : 0;
|
||||||
$this->repository->switchShow($id,$status,'is_used',0);
|
$this->repository->switchShow($id,$status,'is_used',0);
|
||||||
return app('json')->success('修改成功');
|
return app('json')->success('修改成功');
|
||||||
|
|
@ -293,4 +292,74 @@ class StoreProduct extends BaseController
|
||||||
$this->repository->updates($ids,$data);
|
$this->repository->updates($ids,$data);
|
||||||
return app('json')->success('修改成功');
|
return app('json')->success('修改成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
* @return mixed
|
||||||
|
* @author Qinii
|
||||||
|
* @day 2020-06-24
|
||||||
|
*/
|
||||||
|
public function config()
|
||||||
|
{
|
||||||
|
$data = systemConfig(['extension_status','svip_switch_status','integral_status']);
|
||||||
|
$merData= merchantConfig($this->request->merId(),['mer_integral_status','mer_integral_rate','mer_svip_status','svip_store_rate']);
|
||||||
|
$svip_store_rate = $merData['svip_store_rate'] > 0 ? bcdiv($merData['svip_store_rate'],100,2) : 0;
|
||||||
|
$data['mer_svip_status'] = ($data['svip_switch_status'] && $merData['mer_svip_status'] != 0 ) ? 1 : 0;
|
||||||
|
$data['svip_store_rate'] = $svip_store_rate;
|
||||||
|
$data['integral_status'] = $data['integral_status'] && $merData['mer_integral_status'] ? 1 : 0;
|
||||||
|
$data['integral_rate'] = $merData['mer_integral_rate'] ?: 0;
|
||||||
|
// $data['delivery_way'] = $this->request->merchant()->delivery_way ? $this->request->merchant()->delivery_way : [2];
|
||||||
|
// $data['is_audit'] = $this->request->merchant()->is_audit;
|
||||||
|
$data['delivery_way'] = [2];
|
||||||
|
$data['is_audit'] = 0;
|
||||||
|
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function isFormatAttr($id){
|
||||||
|
$data = $this->request->params([
|
||||||
|
['attrs', []],
|
||||||
|
['items', []],
|
||||||
|
['product_type', 0]
|
||||||
|
]);
|
||||||
|
$data = $this->repository->isFormatAttr($data['attrs'],$id,$data['product_type']);
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总平台添加商品
|
||||||
|
public function create(){
|
||||||
|
$params = $this->request->params($this->repository::CREATE_PARAMS);
|
||||||
|
$data = $this->repository->checkParams($params,$this->request->merId());
|
||||||
|
$data['mer_id'] = $this->request->merId();
|
||||||
|
$data['admin_id'] = $this->request->merAdminId();
|
||||||
|
if ($data['is_gift_bag'] && !$this->repository->checkMerchantBagNumber($data['mer_id'])) return app('json')->fail('礼包数量超过数量限制');
|
||||||
|
$data['status'] = 1;
|
||||||
|
$data['mer_status'] = 1;
|
||||||
|
$data['rate'] = 3;
|
||||||
|
$this->repository->create($data,0);
|
||||||
|
return app('json')->success('添加成功');
|
||||||
|
}
|
||||||
|
// 总平台编辑总平台添加的商品
|
||||||
|
public function edit($id){
|
||||||
|
$params = $this->request->params($this->repository::CREATE_PARAMS);
|
||||||
|
$data = $this->repository->checkParams($params,$this->request->merId(), $id);
|
||||||
|
if (!$this->repository->merExists($this->request->merId(), $id)) return app('json')->fail('数据不存在');
|
||||||
|
$pro = $this->repository->getWhere(['product_id' => $id]);
|
||||||
|
if ($pro->status == -2) $data['status'] = 0;
|
||||||
|
else $data['status'] = 1;
|
||||||
|
$data['mer_status'] = 1;
|
||||||
|
$data['mer_id'] = $this->request->merId();
|
||||||
|
$this->repository->edit($id, $data, $this->request->merId(), 0);
|
||||||
|
return app('json')->success('编辑成功');
|
||||||
|
}
|
||||||
|
// 总平台商品下架 / 上架
|
||||||
|
public function changeStatus($id){
|
||||||
|
if(!$this->repository->merExists(null,$id)) return app('json')->fail('数据不存在');
|
||||||
|
$status = $this->request->param('status',0) == 1 ? 1 : 0;
|
||||||
|
|
||||||
|
$this->repository->switchShow($id,$status,'is_show',0);
|
||||||
|
return app('json')->success('修改成功');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -723,7 +723,7 @@ class ExcelService
|
||||||
'支付宝',
|
'支付宝',
|
||||||
'微信零钱',
|
'微信零钱',
|
||||||
];
|
];
|
||||||
$header = ['用户名','用户UID','提现金额','余额','审核状态','拒绝理由','提现方式','微信号','支付宝号','收款二维码地址','账户类型','持卡人','开户行','银行卡号'];
|
$header = ['用户名','用户UID','实际到账','余额','审核状态','拒绝理由','提现方式','微信号','支付宝号','收款二维码地址','账户类型','持卡人','开户行','银行卡号'];
|
||||||
$filename = '提现申请_'.time();
|
$filename = '提现申请_'.time();
|
||||||
$path = 'extract';
|
$path = 'extract';
|
||||||
$export = [];
|
$export = [];
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ Route::group(function () {
|
||||||
Route::get('product/:id', '/product')->name('systemCouponProduct')->option([
|
Route::get('product/:id', '/product')->name('systemCouponProduct')->option([
|
||||||
'_alias' => '商品列表',
|
'_alias' => '商品列表',
|
||||||
]);
|
]);
|
||||||
|
Route::get('select', '/select')->option([
|
||||||
|
'_alias' => '筛选',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
})->prefix('admin.store.Coupon')->option([
|
})->prefix('admin.store.Coupon')->option([
|
||||||
'_path' => '/marketing/coupon/list',
|
'_path' => '/marketing/coupon/list',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,44 @@ Route::group(function () {
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
//运费模板
|
||||||
|
Route::group('store/shipping', function () {
|
||||||
|
Route::get('lst', '/lst')->name('merchantStoreShippingTemplateLst')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
Route::get('list', '/getList')->option([
|
||||||
|
'_alias' => '列表 ',
|
||||||
|
]);
|
||||||
|
Route::post('create', '/create')->name('merchantStoreShippingTemplateCreate')->option([
|
||||||
|
'_alias' => '添加 ',
|
||||||
|
]);
|
||||||
|
Route::post('update/:id', '/update')->name('merchantStoreShippingTemplateUpdate')->option([
|
||||||
|
'_alias' => '编辑',
|
||||||
|
]);
|
||||||
|
Route::get('detail/:id', '/detail')->name('merchantStoreShippingTemplateDetail')->option([
|
||||||
|
'_alias' => '详情',
|
||||||
|
]);
|
||||||
|
Route::delete('delete/:id', '/delete')->name('merchantStoreShippingTemplateDelete')->option([
|
||||||
|
'_alias' => '删除',
|
||||||
|
]);
|
||||||
|
})->prefix('admin.store.ShippingTemplate')->option([
|
||||||
|
'_path' => '/config/freight/shippingTemplates',
|
||||||
|
'_auth' => true,
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
//地址信息
|
||||||
|
Route::get('system/city/lst', 'admin.store.shippingCity/lst')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
Route::get('v2/system/city/lst/:pid', 'admin.store.shippingCity/lstV2')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})->middleware(AllowOriginMiddleware::class)
|
})->middleware(AllowOriginMiddleware::class)
|
||||||
->middleware(AdminTokenMiddleware::class, true)
|
->middleware(AdminTokenMiddleware::class, true)
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,19 @@ Route::group(function () {
|
||||||
Route::post('temp/update/:id', '/update')->name('systemStoreParameterTemplateUpdate')->option([
|
Route::post('temp/update/:id', '/update')->name('systemStoreParameterTemplateUpdate')->option([
|
||||||
'_alias' => '编辑',
|
'_alias' => '编辑',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Route::get('temp/select', '/select')->option([
|
||||||
|
'_alias' => '筛选列表',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
Route::get('temp/show', '/show')->option([
|
||||||
|
'_alias' => '参数',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
})->prefix('admin.parameter.ParameterTemplate')->option([
|
})->prefix('admin.parameter.ParameterTemplate')->option([
|
||||||
'_path' => '/product/specs',
|
'_path' => '/product/specs',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//商品分类
|
//商品分类
|
||||||
Route::group('store/category', function () {
|
Route::group('store/category', function () {
|
||||||
Route::get('create/form', '/createForm')->name('systemStoreCategoryCreateForm')->option([
|
Route::get('create/form', '/createForm')->name('systemStoreCategoryCreateForm')->option([
|
||||||
|
|
@ -73,6 +81,14 @@ Route::group(function () {
|
||||||
'_alias' => '筛选',
|
'_alias' => '筛选',
|
||||||
'_auth' => false,
|
'_auth' => false,
|
||||||
]);
|
]);
|
||||||
|
Route::get('select', '/getTreeList')->option([
|
||||||
|
'_alias' => '树形',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
Route::get('brandlist', '/BrandList')->option([
|
||||||
|
'_alias' => '品牌列表',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
})->prefix('admin.store.StoreCategory')->option([
|
})->prefix('admin.store.StoreCategory')->option([
|
||||||
'_path' => '/product/classify',
|
'_path' => '/product/classify',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
|
|
@ -91,7 +107,6 @@ Route::group(function () {
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//品牌分类
|
//品牌分类
|
||||||
Route::group('store/brand/category', function () {
|
Route::group('store/brand/category', function () {
|
||||||
Route::get('create/form', '/createForm')->name('systemStoreBrandCategoryCreateForm')->option([
|
Route::get('create/form', '/createForm')->name('systemStoreBrandCategoryCreateForm')->option([
|
||||||
|
|
@ -126,7 +141,6 @@ Route::group(function () {
|
||||||
'_path' => '/product/band/brandClassify',
|
'_path' => '/product/band/brandClassify',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//品牌
|
//品牌
|
||||||
Route::group('store/brand', function () {
|
Route::group('store/brand', function () {
|
||||||
Route::get('create/form', '/createForm')->name('systemStoreBrandCreateForm')->option([
|
Route::get('create/form', '/createForm')->name('systemStoreBrandCreateForm')->option([
|
||||||
|
|
@ -158,9 +172,12 @@ Route::group(function () {
|
||||||
'_path' => '/product/band/brandList',
|
'_path' => '/product/band/brandList',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//商品
|
//商品
|
||||||
Route::group('store/product', function () {
|
Route::group('store/product', function () {
|
||||||
|
Route::get('config', '/config')->option([
|
||||||
|
'_alias' => '配置',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
Route::get('mer_select', '/lists')->option([
|
Route::get('mer_select', '/lists')->option([
|
||||||
'_alias' => '列表',
|
'_alias' => '列表',
|
||||||
'_auth' => false,
|
'_auth' => false,
|
||||||
|
|
@ -210,11 +227,23 @@ Route::group(function () {
|
||||||
Route::post('labels/:id', '/setLabels')->name('systemStoreProductLabels')->option([
|
Route::post('labels/:id', '/setLabels')->name('systemStoreProductLabels')->option([
|
||||||
'_alias' => '设置标签',
|
'_alias' => '设置标签',
|
||||||
]);
|
]);
|
||||||
|
Route::post('get_attr_value/:id', '/isFormatAttr')->name('merchantStoreProductFormatAttr')->option([
|
||||||
|
'_alias' => '获取规格',
|
||||||
|
]);
|
||||||
|
Route::post('create', '/create')->name('merchantStoreProductCreate')->option([
|
||||||
|
'_alias' => '添加',
|
||||||
|
]);
|
||||||
|
Route::post('edit/:id', '/edit')->name('merchantStoreProductUpdate')->option([
|
||||||
|
'_alias' => '编辑',
|
||||||
|
]);
|
||||||
|
Route::post('change_status/:id', '/changeStatus')->name('systemStoreProductChangeStatus')->option([
|
||||||
|
'_alias' => '下架/上架',
|
||||||
|
]);
|
||||||
|
|
||||||
})->prefix('admin.store.StoreProduct')->option([
|
})->prefix('admin.store.StoreProduct')->option([
|
||||||
'_path' => '/product/examine',
|
'_path' => '/product/examine',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//商品评价管理
|
//商品评价管理
|
||||||
Route::group('store/reply', function () {
|
Route::group('store/reply', function () {
|
||||||
Route::get('lst', '/lst')->name('systemProductReplyLst')->option([
|
Route::get('lst', '/lst')->name('systemProductReplyLst')->option([
|
||||||
|
|
@ -255,13 +284,15 @@ Route::group(function () {
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
//保障服务
|
//保障服务
|
||||||
Route::group('guarantee', function () {
|
Route::group('guarantee', function () {
|
||||||
Route::get('lst', '/lst')->name('systemGuaranteeLst')->option([
|
Route::get('lst', '/lst')->name('systemGuaranteeLst')->option([
|
||||||
'_alias' => '列表',
|
'_alias' => '列表',
|
||||||
]);
|
]);
|
||||||
|
Route::get('list','/list')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
Route::get('create/form', '/createForm')->name('systemGuaranteeCreateForm')->option([
|
Route::get('create/form', '/createForm')->name('systemGuaranteeCreateForm')->option([
|
||||||
'_alias' => '添加表单',
|
'_alias' => '添加表单',
|
||||||
'_auth' => false,
|
'_auth' => false,
|
||||||
|
|
@ -290,6 +321,7 @@ Route::group(function () {
|
||||||
Route::post('status/:id', '/switchStatus')->name('systemGuaranteeStatus')->option([
|
Route::post('status/:id', '/switchStatus')->name('systemGuaranteeStatus')->option([
|
||||||
'_alias' => '修改状态',
|
'_alias' => '修改状态',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
})->prefix('admin.store.Guarantee')->option([
|
})->prefix('admin.store.Guarantee')->option([
|
||||||
'_path' => '/product/guarantee',
|
'_path' => '/product/guarantee',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
|
|
@ -308,7 +340,6 @@ Route::group(function () {
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//商品标签
|
//商品标签
|
||||||
Route::group('product/label', function () {
|
Route::group('product/label', function () {
|
||||||
Route::get('lst', '/lst')->name('systemStoreProductLabelLst')->option([
|
Route::get('lst', '/lst')->name('systemStoreProductLabelLst')->option([
|
||||||
|
|
@ -347,7 +378,6 @@ Route::group(function () {
|
||||||
'_path' => '/product/label',
|
'_path' => '/product/label',
|
||||||
'_auth' => true,
|
'_auth' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Route::group('discounts/', function () {
|
Route::group('discounts/', function () {
|
||||||
Route::get('lst', '/lst')->name('systemStoreDiscountsLst')->option([
|
Route::get('lst', '/lst')->name('systemStoreDiscountsLst')->option([
|
||||||
'_alias' => '优惠套餐列表',
|
'_alias' => '优惠套餐列表',
|
||||||
|
|
@ -376,7 +406,6 @@ Route::group(function () {
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Route::group('price_rule/', function () {
|
Route::group('price_rule/', function () {
|
||||||
Route::get('lst', '/lst')->name('systemPriceRuleLst')->option([
|
Route::get('lst', '/lst')->name('systemPriceRuleLst')->option([
|
||||||
'_alias' => '价格说明列表',
|
'_alias' => '价格说明列表',
|
||||||
|
|
@ -411,6 +440,82 @@ Route::group(function () {
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
//复制商品
|
||||||
|
Route::group('store/productcopy', function () {
|
||||||
|
Route::get('lst', '/lst')->name('merchantStoreProductCopyLst')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
]);
|
||||||
|
Route::get('get', '/get')->name('merchantStoreProductCopyGet')->option([
|
||||||
|
'_alias' => '获取信息',
|
||||||
|
]);
|
||||||
|
Route::get('count', '/count')->name('merchantStoreProductCopyCount')->option([
|
||||||
|
'_alias' => '统计',
|
||||||
|
]);
|
||||||
|
Route::post('save', '/save')->name('merchantStoreProductCopySave')->option([
|
||||||
|
'_alias' => '保存',
|
||||||
|
]);
|
||||||
|
})->prefix('admin.store.ProductCopy')->option([
|
||||||
|
'_path' => '/product/list',
|
||||||
|
'_auth' => true,
|
||||||
|
]);
|
||||||
|
//产品规则模板
|
||||||
|
Route::group('store/attr/template', function () {
|
||||||
|
Route::get('lst', '/lst')->name('merchantStoreAttrTemplateLst')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
]);
|
||||||
|
Route::get('list', '/getlist')->option([
|
||||||
|
'_alias' => '筛选',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
Route::post('create', '/create')->name('merchantStoreAttrTemplateCreate')->option([
|
||||||
|
'_alias' => '添加 ',
|
||||||
|
]);
|
||||||
|
Route::delete(':id', '/delete')->name('merchantStoreAttrTemplateDelete')->option([
|
||||||
|
'_alias' => '删除',
|
||||||
|
]);
|
||||||
|
Route::post(':id', '/update')->name('merchantStoreAttrTemplateUpdate')->option([
|
||||||
|
'_alias' => '文件类型',
|
||||||
|
]);
|
||||||
|
})->prefix('admin.store.StoreAttrTemplate')->option([
|
||||||
|
'_path' => '/product/attr',
|
||||||
|
'_auth' => true,
|
||||||
|
]);
|
||||||
|
//保障服务模板
|
||||||
|
Route::group('guaranteeTemplate',function(){
|
||||||
|
Route::get('list','/list')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
Route::get('select','/select')->option([
|
||||||
|
'_alias' => '筛选',
|
||||||
|
'_auth' => false,
|
||||||
|
]);
|
||||||
|
Route::get('lst','/lst')->name('merchantGuaranteeLst')->option([
|
||||||
|
'_alias' => '列表',
|
||||||
|
]);
|
||||||
|
Route::post('create','/create')->name('smerchantGuaranteeCreate')->option([
|
||||||
|
'_alias' => '添加',
|
||||||
|
]);
|
||||||
|
Route::post('update/:id','/update')->name('merchantGuaranteeUpdate')->option([
|
||||||
|
'_alias' => '编辑',
|
||||||
|
]);
|
||||||
|
Route::get('detail/:id','/detail')->name('merchantGuaranteeDetail')->option([
|
||||||
|
'_alias' => '详情',
|
||||||
|
]);
|
||||||
|
Route::delete('delete/:id','/delete')->name('merchantGuaranteeDelete')->option([
|
||||||
|
'_alias' => '删除',
|
||||||
|
]);
|
||||||
|
Route::post('sort/:id','/sort')->name('merchantGuaranteeSort')->option([
|
||||||
|
'_alias' => '排序',
|
||||||
|
]);
|
||||||
|
Route::post('status/:id','/switchStatus')->name('merchantGuaranteeStatus')->option([
|
||||||
|
'_alias' => '修改状态',
|
||||||
|
]);
|
||||||
|
})->prefix('admin.store.GuaranteeTemplate')->option([
|
||||||
|
'_path' => '/config/guarantee',
|
||||||
|
'_auth' => true,
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
})->middleware(AllowOriginMiddleware::class)
|
})->middleware(AllowOriginMiddleware::class)
|
||||||
->middleware(AdminTokenMiddleware::class, true)
|
->middleware(AdminTokenMiddleware::class, true)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue