diff --git a/crmeb/app/adminapi/controller/crud/WebsiteProducts.php b/crmeb/app/adminapi/controller/crud/WebsiteProducts.php new file mode 100644 index 0000000..851dd89 --- /dev/null +++ b/crmeb/app/adminapi/controller/crud/WebsiteProducts.php @@ -0,0 +1,222 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品 + * @author crud自动生成代码 + * @date 2025/04/22 + */ + +namespace app\adminapi\controller\crud; + +use app\adminapi\controller\AuthController; +use think\facade\App; +use app\services\crud\WebsiteProductsServices; + +/** + * Class WebsiteProducts + * @date 2025/04/22 + * @package app\adminapi\controller\crud + */ +class WebsiteProducts extends AuthController +{ + + /** + * @var WebsiteProductsServices + */ + protected $service; + + /** + * WebsiteProductsController constructor. + * @param App $app + * @param WebsiteProductsServices $service + */ + public function __construct(App $app, WebsiteProductsServices $service) + { + parent::__construct($app); + $this->service = $service; + } + + + /** + * 列表 + * @date 2025/04/22 + * @return \think\Response + */ + public function index() + { + $where = $this->request->getMore([ + ['title', ''], + ['en_title', ''], + ['profile', ''], + ['en_profile', ''], + ['content', ''], + ['en_content', ''], + ]); + return app('json')->success($this->service->getCrudListIndex($where)); + } + + /** + * 创建 + * @return \think\Response + * @date 2025/04/22 + */ + public function create() + { + return app('json')->success($this->service->getCrudForm()); + } + + /** + * 保存 + * @return \think\Response + * @date 2025/04/22 + */ + public function save() + { + $data = $this->request->postMore([ + ['image', ''], + ['images', ''], + ['title', ''], + ['en_title', ''], + ['profile', ''], + ['en_profile', ''], + ['content', ''], + ['en_content', ''], + ['create_time', date('Y-m-d H:i:s')], + ]); + + validate(\app\adminapi\validate\crud\WebsiteProductsValidate::class)->check($data); + + $data['images'] = json_encode($data['images']); + + $this->service->crudSave($data); + + return app('json')->success(100021); + } + + /** + * 编辑获取数据 + * @param $id + * @return \think\Response + * @date 2025/04/22 + */ + public function edit($id) + { + return app('json')->success($this->service->getCrudForm((int)$id)); + } + + /** + * 修改 + * @param $id + * @return \think\Response + * @date 2025/04/22 + */ + public function update($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $data = $this->request->postMore([ + ['image', ''], + ['images', ''], + ['title', ''], + ['en_title', ''], + ['profile', ''], + ['en_profile', ''], + ['content', ''], + ['en_content', ''], + + ]); + + validate(\app\adminapi\validate\crud\WebsiteProductsValidate::class)->check($data); + + $data['images'] = json_encode($data['images']); + + $this->service->crudUpdate((int)$id, $data); + + return app('json')->success(100001); + } + + /** + * 修改状态 + * @param $id + * @return \think\Response + * @date 2025/04/22 + */ + public function status($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $data = $this->request->postMore([ + ['field', ''], + ['value', ''] + ]); + + $filedAll = []; + + if (!in_array($data['field'], $filedAll)) { + return app('json')->fail(100100); + } + + if ($this->service->update(['id'=> $id], [$data['field']=> $data['value']])) { + return app('json')->success(100001); + } else { + return app('json')->fail(100100); + } + } + + /** + * 删除 + * @param $id + * @return \think\Response + * @date 2025/04/22 + */ + public function delete($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + if ($this->service->destroy((int)$id)) { + return app('json')->success(100002); + } else { + return app('json')->success(100008); + } + } + + /** + * 查看 + * @param $id + * @return \think\Response + * @date 2025/04/22 + */ + public function read($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $info = $this->service->get($id, ['*','`images` as images_label'], []); + if (!$info) { + return app('json')->fail(100100); + } + + return app('json')->success($info->toArray()); + } + + + +} diff --git a/crmeb/app/adminapi/controller/crud/WebsiteProductsCate.php b/crmeb/app/adminapi/controller/crud/WebsiteProductsCate.php new file mode 100644 index 0000000..bd3a5fa --- /dev/null +++ b/crmeb/app/adminapi/controller/crud/WebsiteProductsCate.php @@ -0,0 +1,199 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品分类 + * @author crud自动生成代码 + * @date 2025/04/28 + */ + +namespace app\adminapi\controller\crud; + +use app\adminapi\controller\AuthController; +use think\facade\App; +use app\services\crud\WebsiteProductsCateServices; + +/** + * Class WebsiteProductsCate + * @date 2025/04/28 + * @package app\adminapi\controller\crud + */ +class WebsiteProductsCate extends AuthController +{ + + /** + * @var WebsiteProductsCateServices + */ + protected $service; + + /** + * WebsiteProductsCateController constructor. + * @param App $app + * @param WebsiteProductsCateServices $service + */ + public function __construct(App $app, WebsiteProductsCateServices $service) + { + parent::__construct($app); + $this->service = $service; + } + + + /** + * 列表 + * @date 2025/04/28 + * @return \think\Response + */ + public function index() + { + $where = $this->request->getMore([ + ['name', ''], + ]); + return app('json')->success($this->service->getCrudListIndex($where)); + } + + /** + * 创建 + * @return \think\Response + * @date 2025/04/28 + */ + public function create() + { + return app('json')->success($this->service->getCrudForm()); + } + + /** + * 保存 + * @return \think\Response + * @date 2025/04/28 + */ + public function save() + { + $data = $this->request->postMore([ + ['name', ''], + + ]); + + validate(\app\adminapi\validate\crud\WebsiteProductsCateValidate::class)->check($data); + + $this->service->crudSave($data); + + return app('json')->success(100021); + } + + /** + * 编辑获取数据 + * @param $id + * @return \think\Response + * @date 2025/04/28 + */ + public function edit($id) + { + return app('json')->success($this->service->getCrudForm((int)$id)); + } + + /** + * 修改 + * @param $id + * @return \think\Response + * @date 2025/04/28 + */ + public function update($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $data = $this->request->postMore([ + ['name', ''], + + ]); + + validate(\app\adminapi\validate\crud\WebsiteProductsCateValidate::class)->check($data); + + $this->service->crudUpdate((int)$id, $data); + + return app('json')->success(100001); + } + + /** + * 修改状态 + * @param $id + * @return \think\Response + * @date 2025/04/28 + */ + public function status($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $data = $this->request->postMore([ + ['field', ''], + ['value', ''] + ]); + + $filedAll = []; + + if (!in_array($data['field'], $filedAll)) { + return app('json')->fail(100100); + } + + if ($this->service->update(['id'=> $id], [$data['field']=> $data['value']])) { + return app('json')->success(100001); + } else { + return app('json')->fail(100100); + } + } + + /** + * 删除 + * @param $id + * @return \think\Response + * @date 2025/04/28 + */ + public function delete($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + if ($this->service->destroy((int)$id)) { + return app('json')->success(100002); + } else { + return app('json')->success(100008); + } + } + + /** + * 查看 + * @param $id + * @return \think\Response + * @date 2025/04/28 + */ + public function read($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $info = $this->service->get($id, ['*'], []); + if (!$info) { + return app('json')->fail(100100); + } + + return app('json')->success($info->toArray()); + } + + + +} diff --git a/crmeb/app/adminapi/controller/crud/WebsiteProductsMessage.php b/crmeb/app/adminapi/controller/crud/WebsiteProductsMessage.php new file mode 100644 index 0000000..07a8c27 --- /dev/null +++ b/crmeb/app/adminapi/controller/crud/WebsiteProductsMessage.php @@ -0,0 +1,216 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 产品留言板 + * @author crud自动生成代码 + * @date 2025/04/21 + */ + +namespace app\adminapi\controller\crud; + +use app\adminapi\controller\AuthController; +use think\facade\App; +use app\services\crud\WebsiteProductsMessageServices; + +/** + * Class WebsiteProductsMessage + * @date 2025/04/21 + * @package app\adminapi\controller\crud + */ +class WebsiteProductsMessage extends AuthController +{ + + /** + * @var WebsiteProductsMessageServices + */ + protected $service; + + /** + * WebsiteProductsMessageController constructor. + * @param App $app + * @param WebsiteProductsMessageServices $service + */ + public function __construct(App $app, WebsiteProductsMessageServices $service) + { + parent::__construct($app); + $this->service = $service; + } + + + /** + * 列表 + * @date 2025/04/21 + * @return \think\Response + */ + public function index() + { + $where = $this->request->getMore([ + ['product_id', ''], + ['name', ''], + ['emil', ''], + ['mobile', ''], + ['company', ''], + ['subject', ''], + ]); + return app('json')->success($this->service->getCrudListIndex($where)); + } + + /** + * 创建 + * @return \think\Response + * @date 2025/04/21 + */ + public function create() + { + return app('json')->success($this->service->getCrudForm()); + } + + /** + * 保存 + * @return \think\Response + * @date 2025/04/21 + */ + public function save() + { + $data = $this->request->postMore([ + ['product_id', ''], + ['name', ''], + ['emil', ''], + ['mobile', ''], + ['company', ''], + ['subject', ''], + ['content', ''], + + ]); + + validate(\app\adminapi\validate\crud\WebsiteProductsMessageValidate::class)->check($data); + + $this->service->crudSave($data); + + return app('json')->success(100021); + } + + /** + * 编辑获取数据 + * @param $id + * @return \think\Response + * @date 2025/04/21 + */ + public function edit($id) + { + return app('json')->success($this->service->getCrudForm((int)$id)); + } + + /** + * 修改 + * @param $id + * @return \think\Response + * @date 2025/04/21 + */ + public function update($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $data = $this->request->postMore([ + ['product_id', ''], + ['name', ''], + ['emil', ''], + ['mobile', ''], + ['company', ''], + ['subject', ''], + ['content', ''], + + ]); + + validate(\app\adminapi\validate\crud\WebsiteProductsMessageValidate::class)->check($data); + + $this->service->crudUpdate((int)$id, $data); + + return app('json')->success(100001); + } + + /** + * 修改状态 + * @param $id + * @return \think\Response + * @date 2025/04/21 + */ + public function status($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $data = $this->request->postMore([ + ['field', ''], + ['value', ''] + ]); + + $filedAll = []; + + if (!in_array($data['field'], $filedAll)) { + return app('json')->fail(100100); + } + + if ($this->service->update(['id'=> $id], [$data['field']=> $data['value']])) { + return app('json')->success(100001); + } else { + return app('json')->fail(100100); + } + } + + /** + * 删除 + * @param $id + * @return \think\Response + * @date 2025/04/21 + */ + public function delete($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + if ($this->service->destroy((int)$id)) { + return app('json')->success(100002); + } else { + return app('json')->success(100008); + } + } + + /** + * 查看 + * @param $id + * @return \think\Response + * @date 2025/04/21 + */ + public function read($id) + { + if (!$id) { + return app('json')->fail(100100); + } + + $info = $this->service->get($id, ['*'], []); + if (!$info) { + return app('json')->fail(100100); + } + + return app('json')->success($info->toArray()); + } + + + +} diff --git a/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php b/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php index 6f5fe36..eb25af8 100644 --- a/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php +++ b/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php @@ -173,7 +173,7 @@ class SystemCrud extends AuthController if (!$data['tableName']) { return app('json')->fail(500042); } - +// var_dump($data); $this->services->createCrud($id, $data); return app('json')->success(500043); diff --git a/crmeb/app/adminapi/route/crud/website_products.php b/crmeb/app/adminapi/route/crud/website_products.php new file mode 100644 index 0000000..ca32e77 --- /dev/null +++ b/crmeb/app/adminapi/route/crud/website_products.php @@ -0,0 +1,23 @@ +option(['real_name' => '网站产品列表接口']); + +Route::get('crud/website_products/create', 'crud.WebsiteProducts/create')->option(['real_name' => '网站产品获取创建表单接口']); + +Route::post('crud/website_products', 'crud.WebsiteProducts/save')->option(['real_name' => '网站产品保存接口']); + +Route::get('crud/website_products/:id/edit', 'crud.WebsiteProducts/edit')->option(['real_name' => '网站产品获取修改表单接口']); + +Route::put('crud/website_products/:id', 'crud.WebsiteProducts/update')->option(['real_name' => '网站产品修改接口']); + +Route::put('crud/website_products/status/:id', 'crud.WebsiteProducts/status')->option(['real_name' => '网站产品修改状态接口']); + +Route::delete('crud/website_products/:id', 'crud.WebsiteProducts/delete')->option(['real_name' => '网站产品删除接口']); + +Route::get('crud/website_products/:id', 'crud.WebsiteProducts/read')->option(['real_name' => '网站产品查看接口']); + + + diff --git a/crmeb/app/adminapi/route/crud/website_products_cate.php b/crmeb/app/adminapi/route/crud/website_products_cate.php new file mode 100644 index 0000000..b1c3812 --- /dev/null +++ b/crmeb/app/adminapi/route/crud/website_products_cate.php @@ -0,0 +1,23 @@ +option(['real_name' => '网站产品分类列表接口']); + +Route::get('crud/website_products_cate/create', 'crud.WebsiteProductsCate/create')->option(['real_name' => '网站产品分类获取创建表单接口']); + +Route::post('crud/website_products_cate', 'crud.WebsiteProductsCate/save')->option(['real_name' => '网站产品分类保存接口']); + +Route::get('crud/website_products_cate/:id/edit', 'crud.WebsiteProductsCate/edit')->option(['real_name' => '网站产品分类获取修改表单接口']); + +Route::put('crud/website_products_cate/:id', 'crud.WebsiteProductsCate/update')->option(['real_name' => '网站产品分类修改接口']); + +Route::put('crud/website_products_cate/status/:id', 'crud.WebsiteProductsCate/status')->option(['real_name' => '网站产品分类修改状态接口']); + +Route::delete('crud/website_products_cate/:id', 'crud.WebsiteProductsCate/delete')->option(['real_name' => '网站产品分类删除接口']); + +Route::get('crud/website_products_cate/:id', 'crud.WebsiteProductsCate/read')->option(['real_name' => '网站产品分类查看接口']); + + + diff --git a/crmeb/app/adminapi/route/crud/website_products_message.php b/crmeb/app/adminapi/route/crud/website_products_message.php new file mode 100644 index 0000000..28be4f0 --- /dev/null +++ b/crmeb/app/adminapi/route/crud/website_products_message.php @@ -0,0 +1,23 @@ +option(['real_name' => '产品留言板列表接口']); + +Route::get('crud/website_products_message/create', 'crud.WebsiteProductsMessage/create')->option(['real_name' => '产品留言板获取创建表单接口']); + +Route::post('crud/website_products_message', 'crud.WebsiteProductsMessage/save')->option(['real_name' => '产品留言板保存接口']); + +Route::get('crud/website_products_message/:id/edit', 'crud.WebsiteProductsMessage/edit')->option(['real_name' => '产品留言板获取修改表单接口']); + +Route::put('crud/website_products_message/:id', 'crud.WebsiteProductsMessage/update')->option(['real_name' => '产品留言板修改接口']); + +Route::put('crud/website_products_message/status/:id', 'crud.WebsiteProductsMessage/status')->option(['real_name' => '产品留言板修改状态接口']); + +Route::delete('crud/website_products_message/:id', 'crud.WebsiteProductsMessage/delete')->option(['real_name' => '产品留言板删除接口']); + +Route::get('crud/website_products_message/:id', 'crud.WebsiteProductsMessage/read')->option(['real_name' => '产品留言板查看接口']); + + + diff --git a/crmeb/app/adminapi/validate/crud/WebsiteProductsCateValidate.php b/crmeb/app/adminapi/validate/crud/WebsiteProductsCateValidate.php new file mode 100644 index 0000000..5857872 --- /dev/null +++ b/crmeb/app/adminapi/validate/crud/WebsiteProductsCateValidate.php @@ -0,0 +1,53 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品分类 + * @author crud自动生成代码 + * @date 2025/04/28 16:44:50 + */ + +namespace app\adminapi\validate\crud; + + +use think\Validate; + +/** + * Class CrudValidate + * @date 2025/04/28 + * @package app\adminapi\validate\crud + */ +class WebsiteProductsCateValidate extends Validate +{ + + /** + * @var array + */ + protected $rule = [ + 'name'=> 'require', + ]; + + /** + * @var array + */ + protected $message = [ + 'name.require'=> '分类名称必须填写', + ]; + + /** + * @var array + */ + protected $scene = [ + + ]; +} diff --git a/crmeb/app/adminapi/validate/crud/WebsiteProductsMessageValidate.php b/crmeb/app/adminapi/validate/crud/WebsiteProductsMessageValidate.php new file mode 100644 index 0000000..8ab8a40 --- /dev/null +++ b/crmeb/app/adminapi/validate/crud/WebsiteProductsMessageValidate.php @@ -0,0 +1,57 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 产品留言板 + * @author crud自动生成代码 + * @date 2025/04/21 15:07:45 + */ + +namespace app\adminapi\validate\crud; + + +use think\Validate; + +/** + * Class CrudValidate + * @date 2025/04/21 + * @package app\adminapi\validate\crud + */ +class WebsiteProductsMessageValidate extends Validate +{ + + /** + * @var array + */ + protected $rule = [ + 'product_id'=> 'require', + 'name'=> 'require', + 'mobile'=> 'require', + ]; + + /** + * @var array + */ + protected $message = [ + 'product_id.require'=> '留言产品必须填写', + 'name.require'=> '姓名必须填写', + 'mobile.require'=> '电话必须填写', + ]; + + /** + * @var array + */ + protected $scene = [ + + ]; +} diff --git a/crmeb/app/adminapi/validate/crud/WebsiteProductsValidate.php b/crmeb/app/adminapi/validate/crud/WebsiteProductsValidate.php new file mode 100644 index 0000000..629646a --- /dev/null +++ b/crmeb/app/adminapi/validate/crud/WebsiteProductsValidate.php @@ -0,0 +1,67 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品 + * @author crud自动生成代码 + * @date 2025/04/22 11:27:33 + */ + +namespace app\adminapi\validate\crud; + + +use think\Validate; + +/** + * Class CrudValidate + * @date 2025/04/22 + * @package app\adminapi\validate\crud + */ +class WebsiteProductsValidate extends Validate +{ + + /** + * @var array + */ + protected $rule = [ + 'image'=> 'require', + 'images'=> 'require', + 'title'=> 'require', + 'en_title'=> 'require', + 'profile'=> 'require', + 'en_profile'=> 'require', + 'content'=> 'require', + 'en_content'=> 'require', + ]; + + /** + * @var array + */ + protected $message = [ + 'image.require'=> '列表头图必须填写', + 'images.require'=> '轮播图必须填写', + 'title.require'=> '标题必须填写', + 'en_title.require'=> '英文标题必须填写', + 'profile.require'=> '简介必须填写', + 'en_profile.require'=> '英文简介必须填写', + 'content.require'=> '产品详情必须填写', + 'en_content.require'=> '英文产品详情必须填写', + ]; + + /** + * @var array + */ + protected $scene = [ + + ]; +} diff --git a/crmeb/app/api/controller/v1/publics/WebsiteProductController.php b/crmeb/app/api/controller/v1/publics/WebsiteProductController.php new file mode 100644 index 0000000..6db9b0d --- /dev/null +++ b/crmeb/app/api/controller/v1/publics/WebsiteProductController.php @@ -0,0 +1,53 @@ +service = $service; + } + + + + /** + * 列表 + * @date 2025/02/21 + * @return \think\Response + */ + public function lst() + { + $where = []; + return app('json')->success($this->service->getCrudListIndex($where)); + } + + + /** + * 详情 + * @param $id + * @return mixed + * @throws \ReflectionException + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function details($id) + { + $info = $this->service->getInfo($id); + return app('json')->success($info); + } + +} \ No newline at end of file diff --git a/crmeb/app/api/controller/v1/publics/WebsiteProductMessageController.php b/crmeb/app/api/controller/v1/publics/WebsiteProductMessageController.php new file mode 100644 index 0000000..36559fd --- /dev/null +++ b/crmeb/app/api/controller/v1/publics/WebsiteProductMessageController.php @@ -0,0 +1,59 @@ +service = $service; + } + + + + /** + * 产品留言 + * @param Request $request + * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\ModelNotFoundException + * @throws \think\exception\DbException + */ + public function leave_word(Request $request) + { + $data = $request->postMore([ + ['name', ''], //姓名 + ['product_id', 0],//留言产品 + ['emil', ''], //电子邮箱 + ['mobile', ''], //电话 + ['company', ''], //公司 + ['subject', ''], //主题 + ['content', ''], + ['create_time', date('Y-m-d H:i:s')], + + ]); + + validate(\app\adminapi\validate\crud\WebsiteProductsMessageValidate::class)->check($data); + + $this->service->crudSave($data); + + return app('json')->success(100021); + } + + + + +} \ No newline at end of file diff --git a/crmeb/app/api/route/v1.php b/crmeb/app/api/route/v1.php index 2c021e5..fab758d 100644 --- a/crmeb/app/api/route/v1.php +++ b/crmeb/app/api/route/v1.php @@ -79,6 +79,16 @@ Route::group(function () { })->option(['parent' => 'activity_nologin', 'cate_name' => '公司历程']); + + Route::group(function () { + //文章分类类 + Route::get('websiteproduct/list', 'v1.publics.WebsiteProductController/lst')->name('websiteproductList')->option(['real_name' => '官网产品列表']);//文章分类列表 + Route::get('websiteproduct/details/:id', 'v1.publics.WebsiteProductController/details')->name('websiteproductDetails')->option(['real_name' => '官网产品详情']);//文章详情 + + Route::post('websiteproduct/leave_word', 'v1.publics.WebsiteProductMessageController/leave_word')->option(['real_name' => '官网产品留言保存接口']); + + })->option(['parent' => 'activity_nologin', 'cate_name' => '网站产品']); + })->option(['mark' => 'web_site_info', 'mark_name' => '官网']); diff --git a/crmeb/app/dao/crud/WebsiteProductsCateDao.php b/crmeb/app/dao/crud/WebsiteProductsCateDao.php new file mode 100644 index 0000000..db6db8a --- /dev/null +++ b/crmeb/app/dao/crud/WebsiteProductsCateDao.php @@ -0,0 +1,61 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品分类 + * @author crud自动生成代码 + * @date 2025/04/28 16:44:50 + */ + +namespace app\dao\crud; + + +use app\dao\BaseDao; +use app\model\crud\WebsiteProductsCate; + +/** + * Class WebsiteProductsCateDao + * @date 2025/04/28 + * @package app\dao\crud + */ +class WebsiteProductsCateDao extends BaseDao +{ + + /** + * 设置模型 + * @return string + * @date 2025/04/28 + */ + protected function setModel(): string + { + return WebsiteProductsCate::class; + } + /** + * 搜索 + * @param array $where + * @return \crmeb\basic\BaseModel + * @throws \ReflectionException + * @date {%DATE%} + */ + public function searchCrudModel(array $where = [], $field = ['*'], string $order = '', array $with = []) + { + return $this->getModel()->field($field)->when($order !== '', function ($query) use ($order) { + $query->order($order); + })->when($with, function ($query) use ($with) { + $query->with($with); + })->when(!empty($where['name']), function($query) use ($where) { + $query->whereLike('name', '%'.$where['name'].'%'); + }); + } + +} diff --git a/crmeb/app/dao/crud/WebsiteProductsDao.php b/crmeb/app/dao/crud/WebsiteProductsDao.php new file mode 100644 index 0000000..db04e06 --- /dev/null +++ b/crmeb/app/dao/crud/WebsiteProductsDao.php @@ -0,0 +1,89 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品 + * @author crud自动生成代码 + * @date 2025/04/22 11:27:33 + */ + +namespace app\dao\crud; + + +use app\dao\BaseDao; +use app\model\crud\WebsiteProducts; +use think\exception\ValidateException; + +/** + * Class WebsiteProductsDao + * @date 2025/04/22 + * @package app\dao\crud + */ +class WebsiteProductsDao extends BaseDao +{ + + /** + * 设置模型 + * @return string + * @date 2025/04/22 + */ + protected function setModel(): string + { + return WebsiteProducts::class; + } + + + /** + * 获取一条数据 + * @param $id + * @return mixed + */ + public function read($id) + { + $data = $this->search()->find($id); + if (!$data) throw new ValidateException('文章不存在'); +// $data['store_info'] = $data['storeInfo']; + return $data; + } + + + + /** + * 搜索 + * @param array $where + * @return \crmeb\basic\BaseModel + * @throws \ReflectionException + * @date {%DATE%} + */ + public function searchCrudModel(array $where = [], $field = ['*'], string $order = '', array $with = []) + { + return $this->getModel()->field($field)->when($order !== '', function ($query) use ($order) { + $query->order($order); + })->when($with, function ($query) use ($with) { + $query->with($with); + })->when(!empty($where['title']), function($query) use ($where) { + $query->whereLike('title', '%'.$where['title'].'%'); + })->when(!empty($where['en_title']), function($query) use ($where) { + $query->whereLike('en_title', '%'.$where['en_title'].'%'); + })->when(!empty($where['profile']), function($query) use ($where) { + $query->whereLike('profile', '%'.$where['profile'].'%'); + })->when(!empty($where['en_profile']), function($query) use ($where) { + $query->whereLike('en_profile', '%'.$where['en_profile'].'%'); + })->when(!empty($where['content']), function($query) use ($where) { + $query->whereLike('content', '%'.$where['content'].'%'); + })->when(!empty($where['en_content']), function($query) use ($where) { + $query->whereLike('en_content', '%'.$where['en_content'].'%'); + }); + } + +} diff --git a/crmeb/app/dao/crud/WebsiteProductsMessageDao.php b/crmeb/app/dao/crud/WebsiteProductsMessageDao.php new file mode 100644 index 0000000..64b0ce5 --- /dev/null +++ b/crmeb/app/dao/crud/WebsiteProductsMessageDao.php @@ -0,0 +1,71 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 产品留言板 + * @author crud自动生成代码 + * @date 2025/04/21 15:07:45 + */ + +namespace app\dao\crud; + + +use app\dao\BaseDao; +use app\model\crud\WebsiteProductsMessage; + +/** + * Class WebsiteProductsMessageDao + * @date 2025/04/21 + * @package app\dao\crud + */ +class WebsiteProductsMessageDao extends BaseDao +{ + + /** + * 设置模型 + * @return string + * @date 2025/04/21 + */ + protected function setModel(): string + { + return WebsiteProductsMessage::class; + } + /** + * 搜索 + * @param array $where + * @return \crmeb\basic\BaseModel + * @throws \ReflectionException + * @date {%DATE%} + */ + public function searchCrudModel(array $where = [], $field = ['*'], string $order = '', array $with = []) + { + return $this->getModel()->field($field)->when($order !== '', function ($query) use ($order) { + $query->order($order); + })->when($with, function ($query) use ($with) { + $query->with($with); + })->when(!empty($where['product_id']), function($query) use ($where) { + $query->where('product_id', '=', $where['product_id']); + })->when(!empty($where['name']), function($query) use ($where) { + $query->whereLike('name', '%'.$where['name'].'%'); + })->when(!empty($where['emil']), function($query) use ($where) { + $query->whereLike('emil', '%'.$where['emil'].'%'); + })->when(!empty($where['mobile']), function($query) use ($where) { + $query->whereLike('mobile', '%'.$where['mobile'].'%'); + })->when(!empty($where['company']), function($query) use ($where) { + $query->whereLike('company', '%'.$where['company'].'%'); + })->when(!empty($where['subject']), function($query) use ($where) { + $query->whereLike('subject', '%'.$where['subject'].'%'); + }); + } + +} diff --git a/crmeb/app/model/crud/WebsiteProducts.php b/crmeb/app/model/crud/WebsiteProducts.php new file mode 100644 index 0000000..d473c0d --- /dev/null +++ b/crmeb/app/model/crud/WebsiteProducts.php @@ -0,0 +1,57 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品 + * @author crud自动生成代码 + * @date 2025/04/22 11:27:33 + */ + +namespace app\model\crud; + + +use crmeb\basic\BaseModel; + +/** + * Class WebsiteProducts + * @date 2025/04/22 + * @package app\model\crud + */ +class WebsiteProducts extends BaseModel +{ + + /** + * 表名 + * @var string + */ + protected $name = 'website_products'; + + /** + * 主键 + * @var string + */ + protected $pk = 'id'; + + /** + * 轮播图获取器 + * @date 2025-04-22 + * @param string $value + * @return string + */ + public function getImagesLabelAttr($value) + { + $value = $value ? json_decode($value, true) : []; + return $value; + } + +} diff --git a/crmeb/app/model/crud/WebsiteProductsCate.php b/crmeb/app/model/crud/WebsiteProductsCate.php new file mode 100644 index 0000000..f1b61b3 --- /dev/null +++ b/crmeb/app/model/crud/WebsiteProductsCate.php @@ -0,0 +1,45 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品分类 + * @author crud自动生成代码 + * @date 2025/04/28 16:44:50 + */ + +namespace app\model\crud; + + +use crmeb\basic\BaseModel; + +/** + * Class WebsiteProductsCate + * @date 2025/04/28 + * @package app\model\crud + */ +class WebsiteProductsCate extends BaseModel +{ + + /** + * 表名 + * @var string + */ + protected $name = 'website_products_cate'; + + /** + * 主键 + * @var string + */ + protected $pk = 'id'; + +} diff --git a/crmeb/app/model/crud/WebsiteProductsMessage.php b/crmeb/app/model/crud/WebsiteProductsMessage.php new file mode 100644 index 0000000..143e078 --- /dev/null +++ b/crmeb/app/model/crud/WebsiteProductsMessage.php @@ -0,0 +1,56 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 产品留言板 + * @author crud自动生成代码 + * @date 2025/04/21 15:07:45 + */ + +namespace app\model\crud; + + +use crmeb\basic\BaseModel; + +/** + * Class WebsiteProductsMessage + * @date 2025/04/21 + * @package app\model\crud + */ +class WebsiteProductsMessage extends BaseModel +{ + + /** + * 表名 + * @var string + */ + protected $name = 'website_products_message'; + + /** + * 主键 + * @var string + */ + protected $pk = 'id'; + + + /** + * 留言产品一对一关联 + * @date 2025/04/21 + * @return \think\model\relation\HasOne + */ + public function productIdHasOne() + { + return $this->hasOne(\app\model\crud\WebsiteProducts::class, 'id', 'product_id'); + } + +} diff --git a/crmeb/app/services/crud/WebsiteProductsCateServices.php b/crmeb/app/services/crud/WebsiteProductsCateServices.php new file mode 100644 index 0000000..8451d73 --- /dev/null +++ b/crmeb/app/services/crud/WebsiteProductsCateServices.php @@ -0,0 +1,107 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品分类 + * @author crud自动生成代码 + * @date 2025/04/28 16:44:50 + */ + +namespace app\services\crud; + +use app\services\BaseServices; +use think\exception\ValidateException; +use app\dao\crud\WebsiteProductsCateDao; +use crmeb\services\FormBuilder; + +/** + * Class CrudService + * @date 2025/04/28 + * @package app\services\crud + */ +class WebsiteProductsCateServices extends BaseServices +{ + + /** + * WebsiteProductsCateServices constructor. + * @param WebsiteProductsCateDao $dao + */ + public function __construct(WebsiteProductsCateDao $dao) + { + $this->dao = $dao; + } + + /** + * 主页数据接口 + * @param array $where + * @return array + * @date 2025/04/28 + */ + public function getCrudListIndex(array $where = []) + { + [$page, $limit] = $this->getPageValue(); + $model = $this->dao->searchCrudModel($where, 'name,id', 'id desc', []); + + return ['count' => $model->count(), 'list' => $model->page($page ?: 1, $limit ?: 10)->select()->toArray()]; + } + + /** + * 编辑和获取表单 + * @date 2025/04/28 + * @param int $id + * @return array + */ + public function getCrudForm(int $id = 0) + { + $url = '/crud/website_products_cate'; + $info = []; + if ($id) { + $info = $this->dao->get($id); + if (!$info) { + throw new ValidateException(100026); + } + $url .= '/' . $id; + } + $rule = []; + + $rule[] = FormBuilder::input("name", "分类名称", $info["name"] ?? ''); + + return create_form('网站产品分类', $rule, $url, $id ? 'PUT' : 'POST'); + } + + /** + * 新增 + * @date 2025/04/28 + * @param array $data + * @return mixed + */ + public function crudSave(array $data) + { + return $this->dao->save($data); + } + + /** + * 修改 + * @date 2025/04/28 + * @param int $id + * @param array $data + * @return \crmeb\basic\BaseModel + */ + public function crudUpdate(int $id, array $data) + { + return $this->dao->update($id, $data); + } + + + +} diff --git a/crmeb/app/services/crud/WebsiteProductsMessageServices.php b/crmeb/app/services/crud/WebsiteProductsMessageServices.php new file mode 100644 index 0000000..c8f72ef --- /dev/null +++ b/crmeb/app/services/crud/WebsiteProductsMessageServices.php @@ -0,0 +1,113 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 产品留言板 + * @author crud自动生成代码 + * @date 2025/04/21 15:07:45 + */ + +namespace app\services\crud; + +use app\services\BaseServices; +use think\exception\ValidateException; +use app\dao\crud\WebsiteProductsMessageDao; +use crmeb\services\FormBuilder; + +/** + * Class CrudService + * @date 2025/04/21 + * @package app\services\crud + */ +class WebsiteProductsMessageServices extends BaseServices +{ + + /** + * WebsiteProductsMessageServices constructor. + * @param WebsiteProductsMessageDao $dao + */ + public function __construct(WebsiteProductsMessageDao $dao) + { + $this->dao = $dao; + } + + /** + * 主页数据接口 + * @param array $where + * @return array + * @date 2025/04/21 + */ + public function getCrudListIndex(array $where = []) + { + [$page, $limit] = $this->getPageValue(); + $model = $this->dao->searchCrudModel($where, 'product_id,name,emil,mobile,company,subject,id', 'id desc', ['productIdHasOne']); + + return ['count' => $model->count(), 'list' => $model->page($page ?: 1, $limit ?: 10)->select()->toArray()]; + } + + /** + * 编辑和获取表单 + * @date 2025/04/21 + * @param int $id + * @return array + */ + public function getCrudForm(int $id = 0) + { + $url = '/crud/website_products_message'; + $info = []; + if ($id) { + $info = $this->dao->get($id); + if (!$info) { + throw new ValidateException(100026); + } + $url .= '/' . $id; + } + $rule = []; + + $rule[] = FormBuilder::number("product_id", "留言产品", $info["product_id"] ?? ''); + $rule[] = FormBuilder::input("name", "姓名", $info["name"] ?? ''); + $rule[] = FormBuilder::input("emil", "电子邮箱", $info["emil"] ?? ''); + $rule[] = FormBuilder::input("mobile", "电话", $info["mobile"] ?? ''); + $rule[] = FormBuilder::input("company", "公司", $info["company"] ?? ''); + $rule[] = FormBuilder::input("subject", "主题", $info["subject"] ?? ''); + $rule[] = FormBuilder::textarea("content", "内容", $info["content"] ?? ''); + + return create_form('产品留言板', $rule, $url, $id ? 'PUT' : 'POST'); + } + + /** + * 新增 + * @date 2025/04/21 + * @param array $data + * @return mixed + */ + public function crudSave(array $data) + { + return $this->dao->save($data); + } + + /** + * 修改 + * @date 2025/04/21 + * @param int $id + * @param array $data + * @return \crmeb\basic\BaseModel + */ + public function crudUpdate(int $id, array $data) + { + return $this->dao->update($id, $data); + } + + + +} diff --git a/crmeb/app/services/crud/WebsiteProductsServices.php b/crmeb/app/services/crud/WebsiteProductsServices.php new file mode 100644 index 0000000..5a3b162 --- /dev/null +++ b/crmeb/app/services/crud/WebsiteProductsServices.php @@ -0,0 +1,150 @@ + + * +---------------------------------------------------------------------- + */ + +/** + * 网站产品 + * @author crud自动生成代码 + * @date 2025/04/22 11:27:33 + */ + +namespace app\services\crud; + +use app\services\BaseServices; +use crmeb\exceptions\AdminException; +use think\exception\ValidateException; +use app\dao\crud\WebsiteProductsDao; +use crmeb\services\FormBuilder; + +/** + * Class CrudService + * @date 2025/04/22 + * @package app\services\crud + */ +class WebsiteProductsServices extends BaseServices +{ + + /** + * WebsiteProductsServices constructor. + * @param WebsiteProductsDao $dao + */ + public function __construct(WebsiteProductsDao $dao) + { + $this->dao = $dao; + } + + + + /**获取一条数据 + * @param int $id + * @return mixed + */ + public function getInfo(int $id) + { + $info = $this->dao->read($id); +// $info->visit = intval($info['visit']) + 1; +// if (!$info->save()) +// throw new AdminException(400456); + if ($info) { + $info = $info->toArray(); + $info['images'] = json_decode($info['images'], true); + + +// $info['visit'] = (int)$info['visit']; +// $info['add_time'] = date('Y-m-d', $info['add_time']); + } + return $info; + } + + /** + * 主页数据接口 + * @param array $where + * @return array + * @date 2025/04/22 + */ + public function getCrudListIndex(array $where = []) + { + [$page, $limit] = $this->getPageValue(); + $model = $this->dao->searchCrudModel($where, 'image,`images` as images_label,title,en_title,id', 'id desc', []); +// $list = $model->page($page ?: 1, $limit ?: 10)->select()->toArray(); + +// foreach ($list as &$item){ +// +// $item['images'] = json_decode($item['images_label'], true); +// } + + return ['count' => $model->count(), 'list' => $model->page($page ?: 1, $limit ?: 10)->select()->toArray()]; + } + + /** + * 编辑和获取表单 + * @date 2025/04/22 + * @param int $id + * @return array + */ + public function getCrudForm(int $id = 0) + { + $url = '/crud/website_products'; + $info = []; + if ($id) { + $info = $this->dao->get($id); + if (!$info) { + throw new ValidateException(100026); + } + $url .= '/' . $id; + } + $rule = []; + + $rule[] = FormBuilder::frameImage('image', '列表头图', url(config('app.admin_prefix', 'admin') . '/widget.images/index', ['fodder' => 'image']), $info['image'] ?? '')->icon('el-icon-picture-outline')->width('950px')->height('560px')->Props(['footer' => false]); + if (isset($info['images'])) { + $pics = is_array($info['images']) ? $info['images'] : json_decode($info['images'], true); + } else { + $pics = []; + } + $pics = is_array($pics) ? $pics : []; + $rule[] = FormBuilder::frameImages('images', '轮播图', url(config('app.admin_prefix', 'admin') . '/widget.images/index', ['fodder' => 'images', 'type' => 'many', 'maxLength' => 10]), $pics)->maxLength(10)->icon('el-icon-picture-outline')->width('950px')->height('560px')->Props(['footer' => false])->required(); + $rule[] = FormBuilder::input("title", "标题", $info["title"] ?? ''); + $rule[] = FormBuilder::input("en_title", "英文标题", $info["en_title"] ?? ''); + $rule[] = FormBuilder::textarea("profile", "简介", $info["profile"] ?? ''); + $rule[] = FormBuilder::textarea("en_profile", "英文简介", $info["en_profile"] ?? ''); + $rule[] = FormBuilder::textarea("content", "产品详情", $info["content"] ?? ''); + $rule[] = FormBuilder::textarea("en_content", "英文产品详情", $info["en_content"] ?? ''); + + return create_form('网站产品', $rule, $url, $id ? 'PUT' : 'POST'); + } + + /** + * 新增 + * @date 2025/04/22 + * @param array $data + * @return mixed + */ + public function crudSave(array $data) + { + return $this->dao->save($data); + } + + /** + * 修改 + * @date 2025/04/22 + * @param int $id + * @param array $data + * @return \crmeb\basic\BaseModel + */ + public function crudUpdate(int $id, array $data) + { + return $this->dao->update($id, $data); + } + + + +} diff --git a/template/admin/src/api/crud/websiteProducts.js b/template/admin/src/api/crud/websiteProducts.js new file mode 100644 index 0000000..0871eea --- /dev/null +++ b/template/admin/src/api/crud/websiteProducts.js @@ -0,0 +1,112 @@ +// +---------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +---------------------------------------------------------------------- +// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved. +// +---------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +---------------------------------------------------------------------- +// | Author: CRMEB Team +// +---------------------------------------------------------------------- + +import request from '@/libs/request'; + +/** + * 获取列表数据 + * @param params + * @return {*} + */ +export function getWebsiteProductsListApi(params) { + return request({ + url: 'crud/website_products', + method: 'get', + params, + }); +} + +/** + * 获取添加表单数据 + * @return {*} + */ +export function getWebsiteProductsCreateApi() { + return request({ + url: 'crud/website_products/create', + method: 'get', + }); +} + +/** + * 添加数据 + * @param data + * @return {*} + */ +export function websiteProductsSaveApi(data) { + return request({ + url: 'crud/website_products', + method: 'post', + data + }); +} + +/** + * 获取编辑表单数据 + * @param id + * @return {*} + */ +export function getWebsiteProductsEditApi(id) { + return request({ + url: `crud/website_products/${id}/edit`, + method: 'get' + }); +} + +/** + * 修改数据 + * @param id + * @return {*} + */ +export function websiteProductsUpdateApi(id, data) { + return request({ + url: `crud/website_products/${id}`, + method: 'put', + data + }); +} + +/** + * 修改状态 + * @param id + * @return {*} + */ +export function websiteProductsStatusApi(id, data) { + return request({ + url: `crud/website_products/status/${id}`, + method: 'put', + data + }); +} + +/** + * 删除数据 + * @param id + * @return {*} + */ +export function websiteProductsDeleteApi(id) { + return request({ + url: `crud/website_products/${id}`, + method: 'delete' + }); +} + +/** + * 获取数据 + * @param id + * @return {*} + */ +export function getWebsiteProductsReadApi(id) { + return request({ + url: `crud/website_products/${id}`, + method: 'get' + }); +} + + diff --git a/template/admin/src/api/crud/websiteProductsMessage.js b/template/admin/src/api/crud/websiteProductsMessage.js new file mode 100644 index 0000000..ca90e3b --- /dev/null +++ b/template/admin/src/api/crud/websiteProductsMessage.js @@ -0,0 +1,112 @@ +// +---------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +---------------------------------------------------------------------- +// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved. +// +---------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +---------------------------------------------------------------------- +// | Author: CRMEB Team +// +---------------------------------------------------------------------- + +import request from '@/libs/request'; + +/** + * 获取列表数据 + * @param params + * @return {*} + */ +export function getWebsiteProductsMessageListApi(params) { + return request({ + url: 'crud/website_products_message', + method: 'get', + params, + }); +} + +/** + * 获取添加表单数据 + * @return {*} + */ +export function getWebsiteProductsMessageCreateApi() { + return request({ + url: 'crud/website_products_message/create', + method: 'get', + }); +} + +/** + * 添加数据 + * @param data + * @return {*} + */ +export function websiteProductsMessageSaveApi(data) { + return request({ + url: 'crud/website_products_message', + method: 'post', + data + }); +} + +/** + * 获取编辑表单数据 + * @param id + * @return {*} + */ +export function getWebsiteProductsMessageEditApi(id) { + return request({ + url: `crud/website_products_message/${id}/edit`, + method: 'get' + }); +} + +/** + * 修改数据 + * @param id + * @return {*} + */ +export function websiteProductsMessageUpdateApi(id, data) { + return request({ + url: `crud/website_products_message/${id}`, + method: 'put', + data + }); +} + +/** + * 修改状态 + * @param id + * @return {*} + */ +export function websiteProductsMessageStatusApi(id, data) { + return request({ + url: `crud/website_products_message/status/${id}`, + method: 'put', + data + }); +} + +/** + * 删除数据 + * @param id + * @return {*} + */ +export function websiteProductsMessageDeleteApi(id) { + return request({ + url: `crud/website_products_message/${id}`, + method: 'delete' + }); +} + +/** + * 获取数据 + * @param id + * @return {*} + */ +export function getWebsiteProductsMessageReadApi(id) { + return request({ + url: `crud/website_products_message/${id}`, + method: 'get' + }); +} + + diff --git a/template/admin/src/pages/crud/websiteProducts/index.vue b/template/admin/src/pages/crud/websiteProducts/index.vue new file mode 100644 index 0000000..c86d05b --- /dev/null +++ b/template/admin/src/pages/crud/websiteProducts/index.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/template/admin/src/pages/crud/websiteProductsMessage/index.vue b/template/admin/src/pages/crud/websiteProductsMessage/index.vue new file mode 100644 index 0000000..56bec7c --- /dev/null +++ b/template/admin/src/pages/crud/websiteProductsMessage/index.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/template/admin/src/router/modules/crud/websiteProducts.js b/template/admin/src/router/modules/crud/websiteProducts.js new file mode 100644 index 0000000..0463938 --- /dev/null +++ b/template/admin/src/router/modules/crud/websiteProducts.js @@ -0,0 +1,39 @@ +// +--------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +--------------------------------------------------------------------- +// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved. +// +--------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +--------------------------------------------------------------------- +// | Author: CRMEB Team +// +--------------------------------------------------------------------- + +import LayoutMain from '@/layout'; +import setting from '@/setting' + +let routePre = setting.routePre + +const meta = { + auth: true, +} + +const pre = 'website_products_' + +export default { + path: `${routePre}`, + name: 'crud_website_products', + header: '', + meta, + component: LayoutMain, + children: [ + { + path: 'crud/website_products', + name: `${pre}list`, + meta: { + auth: ['website_products-crud-list-index'], + title: '网站产品管理', + }, + component: () => import('@/pages/crud/websiteProducts/index'), + }, + ], +} diff --git a/template/admin/src/router/modules/crud/websiteProductsMessage.js b/template/admin/src/router/modules/crud/websiteProductsMessage.js new file mode 100644 index 0000000..439ddd7 --- /dev/null +++ b/template/admin/src/router/modules/crud/websiteProductsMessage.js @@ -0,0 +1,39 @@ +// +--------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +--------------------------------------------------------------------- +// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved. +// +--------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +--------------------------------------------------------------------- +// | Author: CRMEB Team +// +--------------------------------------------------------------------- + +import LayoutMain from '@/layout'; +import setting from '@/setting' + +let routePre = setting.routePre + +const meta = { + auth: true, +} + +const pre = 'website_products_message_' + +export default { + path: `${routePre}`, + name: 'crud_website_products_message', + header: '', + meta, + component: LayoutMain, + children: [ + { + path: 'crud/website_products_message', + name: `${pre}list`, + meta: { + auth: ['website_products_message-crud-list-index'], + title: '产品留言板', + }, + component: () => import('@/pages/crud/websiteProductsMessage/index'), + }, + ], +}