Merge branch 'dev' of https://gitea.lihaink.cn/mkm/shop-new into dev
This commit is contained in:
commit
3ded469859
@ -34,9 +34,11 @@ class AllowOriginMiddleware extends BaseMiddleware
|
|||||||
'Access-Control-Allow-Origin' => '*',
|
'Access-Control-Allow-Origin' => '*',
|
||||||
'Access-Control-Allow-Headers' => 'X-Token, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With,Form-type,Referer,Connection,Content-Length,Host,Origin,Authorization,Authori-zation,Accept,Accept-Encoding,uuid',
|
'Access-Control-Allow-Headers' => 'X-Token, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With,Form-type,Referer,Connection,Content-Length,Host,Origin,Authorization,Authori-zation,Accept,Accept-Encoding,uuid',
|
||||||
//,Host,Origin,Authorization,Authori-zation,Accept,Accept-Encoding
|
//,Host,Origin,Authorization,Authori-zation,Accept,Accept-Encoding
|
||||||
//'Access-Control-Allow-Headers' => '*',
|
// 'Access-Control-Allow-Headers' => '*',
|
||||||
'Access-Control-Allow-Methods' => 'GET,POST,PATCH,PUT,DELETE,OPTIONS',
|
'Access-Control-Allow-Methods' => 'GET,POST,PATCH,PUT,DELETE,OPTIONS',
|
||||||
'Access-Control-Max-Age' => '1728000'
|
'Access-Control-Max-Age' => '1728000',
|
||||||
|
'Access-Control-Allow-Credentials' => 'true',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function before(Request $request)
|
public function before(Request $request)
|
||||||
@ -53,6 +55,7 @@ class AllowOriginMiddleware extends BaseMiddleware
|
|||||||
|
|
||||||
public function after(Response $response)
|
public function after(Response $response)
|
||||||
{
|
{
|
||||||
|
|
||||||
$response->header($this->header);
|
$response->header($this->header);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
38
app/common/repositories/store/SupplyTakeRepository.php
Normal file
38
app/common/repositories/store/SupplyTakeRepository.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
namespace app\common\repositories\store;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\repositories\system\config\ConfigValueRepository;
|
||||||
|
|
||||||
|
class SupplyTakeRepository
|
||||||
|
{
|
||||||
|
public function get($merId)
|
||||||
|
{
|
||||||
|
return merchantConfig($merId, [
|
||||||
|
'mer_take_status', 'mer_take_name', 'mer_take_phone', 'mer_take_address', 'mer_take_location', 'mer_take_day', 'mer_take_time'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set($merId, array $data)
|
||||||
|
{
|
||||||
|
$configValueRepository = app()->make(ConfigValueRepository::class);
|
||||||
|
$configValueRepository->setFormData($data, $merId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function has($merId)
|
||||||
|
{
|
||||||
|
return merchantConfig($merId, 'mer_take_status') == '1';
|
||||||
|
}
|
||||||
|
}
|
@ -208,4 +208,28 @@ class Menu extends BaseController
|
|||||||
return 0 == $v['pid'];
|
return 0 == $v['pid'];
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**供应
|
||||||
|
* @return mixed
|
||||||
|
* @author xaboy
|
||||||
|
* @day 2020-04-10
|
||||||
|
*/
|
||||||
|
public function supplyMenus()
|
||||||
|
{
|
||||||
|
$pre = '/' . config('admin.merchant_prefix');
|
||||||
|
$merchant = $this->request->merchant();
|
||||||
|
if ($this->request->adminInfo()->level) {
|
||||||
|
$menus = $this->repository->ruleByMenuList($this->request->adminRule(), $this->merchant);
|
||||||
|
} else {
|
||||||
|
$menus = $merchant->type_id ? $this->repository->typesByValidMenuList($merchant->type_id) : $this->repository->getValidMenuList($this->merchant);
|
||||||
|
}
|
||||||
|
foreach ($menus as $k => $menu) {
|
||||||
|
|
||||||
|
$menu['path'] = $pre . $menu['path'];
|
||||||
|
$menus[$k] = $menu;
|
||||||
|
}
|
||||||
|
return app('json')->success(array_values(array_filter(formatCategory($menus, 'id'), function ($v) {
|
||||||
|
return 0 == $v['pid'];
|
||||||
|
})));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,12 +279,12 @@ class Common extends BaseController
|
|||||||
return app('json')->success($data);
|
return app('json')->success($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMerchantCount()
|
public function getSupplyCount()
|
||||||
{
|
{
|
||||||
return app('json')->success(app()->make(CountRepository::class)->getMerchantCount($this->request->merId()));
|
return app('json')->success(app()->make(CountRepository::class)->getMerchantCount($this->request->merId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMerchantTodo()
|
public function getSupplyTodo()
|
||||||
{
|
{
|
||||||
return app('json')->success(app()->make(CountRepository::class)->getMerchantTodo($this->request->merId()));
|
return app('json')->success(app()->make(CountRepository::class)->getMerchantTodo($this->request->merId()));
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store;
|
namespace app\controller\supply\store;
|
||||||
|
|
||||||
use app\common\repositories\store\ExcelRepository;
|
use app\common\repositories\store\ExcelRepository;
|
||||||
use crmeb\exceptions\UploadException;
|
use crmeb\exceptions\UploadException;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store;
|
namespace app\controller\supply\store;
|
||||||
|
|
||||||
|
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store;
|
namespace app\controller\supply\store;
|
||||||
|
|
||||||
use app\common\repositories\store\order\StoreImportDeliveryRepository;
|
use app\common\repositories\store\order\StoreImportDeliveryRepository;
|
||||||
use crmeb\jobs\ImportSpreadsheetExcelJob;
|
use crmeb\jobs\ImportSpreadsheetExcelJob;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store;
|
namespace app\controller\supply\store;
|
||||||
|
|
||||||
use app\common\repositories\store\StorePrinterRepository;
|
use app\common\repositories\store\StorePrinterRepository;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store;
|
namespace app\controller\supply\store;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductReplyRepository;
|
use app\common\repositories\store\product\ProductReplyRepository;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store\broadcast;
|
namespace app\controller\supply\store\broadcast;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\broadcast\BroadcastAssistantRepository;
|
use app\common\repositories\store\broadcast\BroadcastAssistantRepository;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store\broadcast;
|
namespace app\controller\supply\store\broadcast;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\broadcast\BroadcastGoodsRepository;
|
use app\common\repositories\store\broadcast\BroadcastGoodsRepository;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store\broadcast;
|
namespace app\controller\supply\store\broadcast;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\broadcast\BroadcastAssistantRepository;
|
use app\common\repositories\store\broadcast\BroadcastAssistantRepository;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store\coupon;
|
namespace app\controller\supply\store\coupon;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\coupon\StoreCouponSendRepository;
|
use app\common\repositories\store\coupon\StoreCouponSendRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store\coupon;
|
namespace app\controller\supply\store\coupon;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\coupon\StoreCouponSendRepository;
|
use app\common\repositories\store\coupon\StoreCouponSendRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\delivery;
|
namespace app\controller\supply\store\delivery;
|
||||||
|
|
||||||
use app\common\repositories\delivery\DeliveryOrderRepository;
|
use app\common\repositories\delivery\DeliveryOrderRepository;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\delivery;
|
namespace app\controller\supply\store\delivery;
|
||||||
|
|
||||||
use app\common\repositories\system\serve\ServeOrderRepository;
|
use app\common\repositories\system\serve\ServeOrderRepository;
|
||||||
use crmeb\services\DeliverySevices;
|
use crmeb\services\DeliverySevices;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\validate\supply\store\guarantee;
|
namespace app\controller\supply\store\guarantee;
|
||||||
|
|
||||||
use app\common\repositories\store\GuaranteeRepository;
|
use app\common\repositories\store\GuaranteeRepository;
|
||||||
use app\common\repositories\store\GuaranteeTemplateRepository;
|
use app\common\repositories\store\GuaranteeTemplateRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\order;
|
namespace app\controller\supply\store\order;
|
||||||
|
|
||||||
use app\common\repositories\store\order\SupplyReconciliationRepository;
|
use app\common\repositories\store\order\SupplyReconciliationRepository;
|
||||||
use app\common\repositories\store\order\StoreOrderRepository;
|
use app\common\repositories\store\order\StoreOrderRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\order;
|
namespace app\controller\supply\store\order;
|
||||||
|
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\order;
|
namespace app\controller\supply\store\order;
|
||||||
|
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\order;
|
namespace app\controller\supply\store\order;
|
||||||
|
|
||||||
use app\common\repositories\store\order\SupplyReconciliationRepository;
|
use app\common\repositories\store\order\SupplyReconciliationRepository;
|
||||||
use app\common\repositories\store\order\StoreOrderProductRepository;
|
use app\common\repositories\store\order\StoreOrderProductRepository;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\StoreDiscountRepository;
|
use app\common\repositories\store\product\StoreDiscountRepository;
|
||||||
use app\validate\supply\StoreDiscountsValidate;
|
use app\validate\supply\StoreDiscountsValidate;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\order\StoreCartRepository;
|
use app\common\repositories\store\order\StoreCartRepository;
|
||||||
use app\common\repositories\store\product\ProductAttrValueRepository;
|
use app\common\repositories\store\product\ProductAttrValueRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductAssistRepository as repository;
|
use app\common\repositories\store\product\ProductAssistRepository as repository;
|
||||||
use app\common\repositories\store\product\ProductRepository;
|
use app\common\repositories\store\product\ProductRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductAssistSetRepository as repository;
|
use app\common\repositories\store\product\ProductAssistSetRepository as repository;
|
||||||
use app\common\repositories\store\product\ProductAssistUserRepository;
|
use app\common\repositories\store\product\ProductAssistUserRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\system\supply\SupplyRepository;
|
use app\common\repositories\system\supply\SupplyRepository;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductRepository;
|
use app\common\repositories\store\product\ProductRepository;
|
||||||
use app\common\repositories\store\product\SpuRepository;
|
use app\common\repositories\store\product\SpuRepository;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductGroupUserRepository;
|
use app\common\repositories\store\product\ProductGroupUserRepository;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductLabelRepository;
|
use app\common\repositories\store\product\ProductLabelRepository;
|
||||||
use app\validate\admin\ProductLabelValidate;
|
use app\validate\admin\ProductLabelValidate;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductPresellRepository as repository;
|
use app\common\repositories\store\product\ProductPresellRepository as repository;
|
||||||
use app\common\repositories\store\product\ProductRepository;
|
use app\common\repositories\store\product\ProductRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductLabelRepository;
|
use app\common\repositories\store\product\ProductLabelRepository;
|
||||||
use app\common\repositories\store\product\SpuRepository;
|
use app\common\repositories\store\product\SpuRepository;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace app\validate\supply\store\product;
|
namespace app\controller\supply\store\product;
|
||||||
|
|
||||||
use app\common\repositories\store\product\ProductUnitRepository as repository;
|
use app\common\repositories\store\product\ProductUnitRepository as repository;
|
||||||
use app\validate\admin\ProductUnitValidate;
|
use app\validate\admin\ProductUnitValidate;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\store\service;
|
namespace app\controller\supply\store\service;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\service\StoreServiceLogRepository;
|
use app\common\repositories\store\service\StoreServiceLogRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\service;
|
namespace app\controller\supply\store\service;
|
||||||
|
|
||||||
use app\common\repositories\store\service\StoreServiceReplyRepository;
|
use app\common\repositories\store\service\StoreServiceReplyRepository;
|
||||||
use app\validate\supply\ServiceReplyValidate;
|
use app\validate\supply\ServiceReplyValidate;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\shipping;
|
namespace app\controller\supply\store\shipping;
|
||||||
|
|
||||||
use app\common\repositories\store\CityAreaRepository;
|
use app\common\repositories\store\CityAreaRepository;
|
||||||
use Overtrue\Pinyin\Pinyin;
|
use Overtrue\Pinyin\Pinyin;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\shipping;
|
namespace app\controller\supply\store\shipping;
|
||||||
|
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\shipping;
|
namespace app\controller\supply\store\shipping;
|
||||||
|
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\shipping;
|
namespace app\controller\supply\store\shipping;
|
||||||
|
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\store\shipping;
|
namespace app\controller\supply\store\shipping;
|
||||||
|
|
||||||
use think\App;
|
use think\App;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -11,42 +11,42 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system;
|
namespace app\controller\supply\system;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\store\MerchantTakeRepository;
|
use app\common\repositories\store\SupplyTakeRepository;
|
||||||
use app\common\repositories\store\product\ProductRepository;
|
use app\common\repositories\store\product\ProductRepository;
|
||||||
use app\common\repositories\system\config\ConfigValueRepository;
|
use app\common\repositories\system\config\ConfigValueRepository;
|
||||||
use app\common\repositories\system\operate\OperateLogRepository;
|
use app\common\repositories\system\operate\OperateLogRepository;
|
||||||
use app\common\repositories\system\serve\ServeOrderRepository;
|
use app\common\repositories\system\serve\ServeOrderRepository;
|
||||||
use app\common\repositories\user\UserBillRepository;
|
use app\common\repositories\user\UserBillRepository;
|
||||||
use app\validate\merchant\MerchantTakeValidate;
|
use app\validate\supply\MerchantTakeValidate;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
use app\common\repositories\system\merchant\MerchantRepository;
|
use app\common\repositories\system\supply\SupplyRepository;
|
||||||
use app\validate\merchant\MerchantUpdateValidate;
|
use app\validate\supply\MerchantUpdateValidate;
|
||||||
use crmeb\jobs\ChangeMerchantStatusJob;
|
use crmeb\jobs\ChangeSupplyStatusJob;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\facade\Queue;
|
use think\facade\Queue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Merchant
|
* Class Supply
|
||||||
* @package app\controller\merchant\system
|
* @package app\controller\Supply\system
|
||||||
* @author xaboy
|
* @author xaboy
|
||||||
* @day 2020/6/25
|
* @day 2020/6/25
|
||||||
*/
|
*/
|
||||||
class Merchant extends BaseController
|
class Supply extends BaseController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var MerchantRepository
|
* @var SupplyRepository
|
||||||
*/
|
*/
|
||||||
protected $repository;
|
protected $repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merchant constructor.
|
* Merchant constructor.
|
||||||
* @param App $app
|
* @param App $app
|
||||||
* @param MerchantRepository $repository
|
* @param SupplyRepository $repository
|
||||||
*/
|
*/
|
||||||
public function __construct(App $app, MerchantRepository $repository)
|
public function __construct(App $app, SupplyRepository $repository)
|
||||||
{
|
{
|
||||||
parent::__construct($app);
|
parent::__construct($app);
|
||||||
$this->repository = $repository;
|
$this->repository = $repository;
|
||||||
@ -69,7 +69,7 @@ class Merchant extends BaseController
|
|||||||
* @author xaboy
|
* @author xaboy
|
||||||
* @day 2020/6/25
|
* @day 2020/6/25
|
||||||
*/
|
*/
|
||||||
public function update(MerchantUpdateValidate $validate, MerchantTakeValidate $takeValidate, MerchantTakeRepository $repository)
|
public function update(MerchantUpdateValidate $validate, MerchantTakeValidate $takeValidate, SupplyTakeRepository $repository)
|
||||||
{
|
{
|
||||||
$type = $this->request->param('type',1);
|
$type = $this->request->param('type',1);
|
||||||
$merchant = $this->request->merchant();
|
$merchant = $this->request->merchant();
|
||||||
@ -138,7 +138,7 @@ class Merchant extends BaseController
|
|||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Queue::push(ChangeMerchantStatusJob::class, $this->request->merId());
|
Queue::push(ChangeSupplyStatusJob::class, $this->request->merId());
|
||||||
return app('json')->success('修改成功');
|
return app('json')->success('修改成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ class Merchant extends BaseController
|
|||||||
* @author xaboy
|
* @author xaboy
|
||||||
* @day 2020/7/21
|
* @day 2020/7/21
|
||||||
*/
|
*/
|
||||||
public function info(MerchantTakeRepository $repository)
|
public function info(SupplyTakeRepository $repository)
|
||||||
{
|
{
|
||||||
$merchant = $this->request->merchant();
|
$merchant = $this->request->merchant();
|
||||||
$adminInfo = $this->request->adminInfo();
|
$adminInfo = $this->request->adminInfo();
|
||||||
@ -168,12 +168,12 @@ class Merchant extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param MerchantTakeRepository $repository
|
* @param SupplyTakeRepository $repository
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @author xaboy
|
* @author xaboy
|
||||||
* @day 2020/8/1
|
* @day 2020/8/1
|
||||||
*/
|
*/
|
||||||
public function takeInfo(MerchantTakeRepository $repository)
|
public function takeInfo(SupplyTakeRepository $repository)
|
||||||
{
|
{
|
||||||
$merId = $this->request->merId();
|
$merId = $this->request->merId();
|
||||||
return app('json')->success($repository->get($merId) + systemConfig(['tx_map_key']));
|
return app('json')->success($repository->get($merId) + systemConfig(['tx_map_key']));
|
||||||
@ -181,12 +181,12 @@ class Merchant extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param MerchantTakeValidate $validate
|
* @param MerchantTakeValidate $validate
|
||||||
* @param MerchantTakeRepository $repository
|
* @param SupplyTakeRepository $repository
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @author xaboy
|
* @author xaboy
|
||||||
* @day 2020/8/1
|
* @day 2020/8/1
|
||||||
*/
|
*/
|
||||||
public function take(MerchantTakeValidate $validate, MerchantTakeRepository $repository)
|
public function take(MerchantTakeValidate $validate, SupplyTakeRepository $repository)
|
||||||
{
|
{
|
||||||
$data = $this->request->params(['mer_take_status', 'mer_take_name', 'mer_take_phone', 'mer_take_address', 'mer_take_location', 'mer_take_day', 'mer_take_time']);
|
$data = $this->request->params(['mer_take_status', 'mer_take_name', 'mer_take_phone', 'mer_take_address', 'mer_take_location', 'mer_take_day', 'mer_take_time']);
|
||||||
$validate->check($data);
|
$validate->check($data);
|
@ -11,28 +11,28 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system;
|
namespace app\controller\supply\system;
|
||||||
|
|
||||||
use app\validate\merchant\MerchantApplymentsValidate;
|
use app\validate\supply\MerchantApplymentsValidate;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\facade\Config;
|
use think\facade\Config;
|
||||||
use think\facade\Queue;
|
use think\facade\Queue;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
use app\common\repositories\system\merchant\MerchantApplymentsRepository;
|
use app\common\repositories\system\supply\SupplyApplymentsRepository;
|
||||||
|
|
||||||
class MerchantApplyments extends BaseController
|
class SupplyApplyments extends BaseController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var MerchantRepository
|
* @var SupplyRepository
|
||||||
*/
|
*/
|
||||||
protected $repository;
|
protected $repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merchant constructor.
|
* Supply constructor.
|
||||||
* @param App $app
|
* @param App $app
|
||||||
* @param MerchantRepository $repository
|
* @param MerchantRepository $repository
|
||||||
*/
|
*/
|
||||||
public function __construct(App $app, MerchantApplymentsRepository $repository)
|
public function __construct(App $app, SupplyApplymentsRepository $repository)
|
||||||
{
|
{
|
||||||
parent::__construct($app);
|
parent::__construct($app);
|
||||||
$this->repository = $repository;
|
$this->repository = $repository;
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system\admin;
|
namespace app\controller\supply\system\admin;
|
||||||
|
|
||||||
|
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system\admin;
|
namespace app\controller\supply\system\admin;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\system\auth\RoleRepository;
|
use app\common\repositories\system\auth\RoleRepository;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system\auth;
|
namespace app\controller\supply\system\auth;
|
||||||
|
|
||||||
|
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\system\diy;
|
namespace app\controller\supply\system\diy;
|
||||||
|
|
||||||
use app\common\repositories\article\ArticleRepository;
|
use app\common\repositories\article\ArticleRepository;
|
||||||
use app\common\repositories\store\product\ProductRepository;
|
use app\common\repositories\store\product\ProductRepository;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\validate\supply\system\financial;
|
namespace app\controller\supply\system\financial;
|
||||||
|
|
||||||
use app\common\repositories\system\financial\FinancialRepository;
|
use app\common\repositories\system\financial\FinancialRepository;
|
||||||
use app\validate\supply\MerchantFinancialAccountValidate;
|
use app\validate\supply\MerchantFinancialAccountValidate;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system\notice;
|
namespace app\controller\supply\system\notice;
|
||||||
|
|
||||||
|
|
||||||
use app\common\repositories\system\notice\SystemNoticeLogRepository;
|
use app\common\repositories\system\notice\SystemNoticeLogRepository;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\supply\system\openapi;
|
namespace app\controller\supply\system\openapi;
|
||||||
|
|
||||||
use app\common\repositories\openapi\OpenAuthRepository;
|
use app\common\repositories\openapi\OpenAuthRepository;
|
||||||
use app\validate\supply\OpenAuthValidate;
|
use app\validate\supply\OpenAuthValidate;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system\serve;
|
namespace app\controller\supply\system\serve;
|
||||||
|
|
||||||
use app\common\repositories\system\config\ConfigValueRepository;
|
use app\common\repositories\system\config\ConfigValueRepository;
|
||||||
use app\common\repositories\system\serve\ServeOrderRepository;
|
use app\common\repositories\system\serve\ServeOrderRepository;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\validate\supply\system\serve;
|
namespace app\controller\supply\system\serve;
|
||||||
|
|
||||||
use app\common\repositories\system\serve\ServeMealRepository;
|
use app\common\repositories\system\serve\ServeMealRepository;
|
||||||
use app\common\repositories\system\serve\ServeOrderRepository;
|
use app\common\repositories\system\serve\ServeOrderRepository;
|
||||||
|
@ -23,9 +23,11 @@ return [
|
|||||||
'captcha_exp' => 30, //30分钟
|
'captcha_exp' => 30, //30分钟
|
||||||
'admin_prefix' => 'admin',
|
'admin_prefix' => 'admin',
|
||||||
'merchant_prefix' => 'merchant',
|
'merchant_prefix' => 'merchant',
|
||||||
|
'supply_prefix' => 'supply',
|
||||||
'service_prefix' => 'kefu',
|
'service_prefix' => 'kefu',
|
||||||
'api_admin_prefix' => 'sys',
|
'api_admin_prefix' => 'sys',
|
||||||
'api_merchant_prefix' => 'mer',
|
'api_merchant_prefix' => 'mer',
|
||||||
|
'api_supply_prefix' => 'sply',
|
||||||
'api_service_prefix' => 'ser',
|
'api_service_prefix' => 'ser',
|
||||||
'api_openapi_prefix' => 'openapi',
|
'api_openapi_prefix' => 'openapi',
|
||||||
'vic_word_status' => 0,
|
'vic_word_status' => 0,
|
||||||
|
44
route/supply.php
Normal file
44
route/supply.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\middleware\AllowOriginMiddleware;
|
||||||
|
use app\common\middleware\CheckSiteOpenMiddleware;
|
||||||
|
use app\common\middleware\InstallMiddleware;
|
||||||
|
use think\facade\Route;
|
||||||
|
use app\common\middleware\RequestLockMiddleware;
|
||||||
|
|
||||||
|
Route::group(config('admin.supply_prefix'), function () {
|
||||||
|
Route::miss(function () {
|
||||||
|
$DB = DIRECTORY_SEPARATOR;
|
||||||
|
return view(app()->getRootPath() . 'public' . $DB . 'mer.html');
|
||||||
|
});
|
||||||
|
})->middleware(InstallMiddleware::class)
|
||||||
|
->middleware(CheckSiteOpenMiddleware::class);
|
||||||
|
|
||||||
|
Route::group(config('admin.api_supply_prefix') . '/', function () {
|
||||||
|
$path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR.'supply';
|
||||||
|
$files = scandir($path);
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if($file != '.' && $file != '..'){
|
||||||
|
include $path . DIRECTORY_SEPARATOR . $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Route::miss(function () {
|
||||||
|
return app('json')->fail('接口不存在');
|
||||||
|
})->middleware(AllowOriginMiddleware::class);
|
||||||
|
})
|
||||||
|
->option([
|
||||||
|
'_lock' => true
|
||||||
|
])
|
||||||
|
->middleware(InstallMiddleware::class)
|
||||||
|
->middleware(CheckSiteOpenMiddleware::class)
|
||||||
|
->middleware(RequestLockMiddleware::class);
|
Loading…
x
Reference in New Issue
Block a user