3 次代码提交 97f86cbc64 ... 25f9ba3f77

作者 SHA1 备注 提交日期
  xiansin 25f9ba3f77 feat: 后台 2 年之前
  xiansin abc206ba4d feat: admin init 2 年之前
  xiansin 7859af64fa feat: 本地化 2 年之前
共有 67 个文件被更改,包括 2326 次插入1332 次删除
  1. 2 2
      server/.env.example
  2. 34 0
      server/app/Admin/Actions/Form/ResetPasswordForm.php
  3. 41 0
      server/app/Admin/Actions/Grid/ResetPassword.php
  4. 125 0
      server/app/Admin/Controllers/AccountController.php
  5. 74 0
      server/app/Admin/Controllers/BannerController.php
  6. 71 0
      server/app/Admin/Controllers/ContactController.php
  7. 24 0
      server/app/Admin/Controllers/DashBoardController.php
  8. 66 0
      server/app/Admin/Controllers/ProductCategoryController.php
  9. 186 0
      server/app/Admin/Controllers/ProductController.php
  10. 108 0
      server/app/Admin/Controllers/ProductHotController.php
  11. 102 0
      server/app/Admin/Controllers/ProductSpecController.php
  12. 71 0
      server/app/Admin/Controllers/ProductSpecGroupController.php
  13. 68 0
      server/app/Admin/Controllers/SettingController.php
  14. 125 0
      server/app/Admin/Controllers/ShowroomCaseController.php
  15. 77 0
      server/app/Admin/Controllers/ShowroomController.php
  16. 98 0
      server/app/Admin/Controllers/UserController.php
  17. 44 0
      server/app/Admin/routes.php
  18. 22 0
      server/app/Casts/DelimiterCast.php
  19. 0 190
      server/app/Helper/ByteDance.php
  20. 0 183
      server/app/Helper/Kuaishou.php
  21. 0 9
      server/app/Helper/UniPlatform/BaseAPI.php
  22. 0 151
      server/app/Helper/UniPlatform/BaseUniPlatform.php
  23. 0 29
      server/app/Helper/UniPlatform/Bytedance/ByteDanceAPI.php
  24. 0 81
      server/app/Helper/UniPlatform/Bytedance/Payment.php
  25. 0 30
      server/app/Helper/UniPlatform/Kuaishou/KuaishouAPI.php
  26. 0 85
      server/app/Helper/UniPlatform/Kuaishou/Payment.php
  27. 14 0
      server/app/Models/Account.php
  28. 3 3
      server/app/Models/Banner.php
  29. 38 0
      server/app/Models/Contact.php
  30. 73 0
      server/app/Models/Product.php
  31. 49 0
      server/app/Models/ProductCategory.php
  32. 52 0
      server/app/Models/ProductHot.php
  33. 52 0
      server/app/Models/ProductSpec.php
  34. 56 0
      server/app/Models/ProductSpecGroup.php
  35. 2 16
      server/app/Models/Setting.php
  36. 38 0
      server/app/Models/Showroom.php
  37. 58 0
      server/app/Models/ShowroomCase.php
  38. 12 38
      server/app/Models/User.php
  39. 1 1
      server/config/app.php
  40. 5 35
      server/config/global.php
  41. 120 464
      server/dcat_admin_ide_helper.php
  42. 18 0
      server/resources/lang/zh/account.php
  43. 17 0
      server/resources/lang/zh/banner.php
  44. 16 0
      server/resources/lang/zh/contact.php
  45. 17 0
      server/resources/lang/zh/product-category.php
  46. 19 0
      server/resources/lang/zh/product-hot.php
  47. 16 0
      server/resources/lang/zh/product-sku.php
  48. 17 0
      server/resources/lang/zh/product-spec-group.php
  49. 20 0
      server/resources/lang/zh/product-spec.php
  50. 24 0
      server/resources/lang/zh/product.php
  51. 14 0
      server/resources/lang/zh/setting.php
  52. 18 0
      server/resources/lang/zh/showroom-case.php
  53. 15 0
      server/resources/lang/zh/showroom.php
  54. 8 9
      server/resources/lang/zh/user.php
  55. 17 0
      server/resources/lang/zh_CN/account.php
  56. 15 0
      server/resources/lang/zh_CN/banner.php
  57. 14 0
      server/resources/lang/zh_CN/contact.php
  58. 15 0
      server/resources/lang/zh_CN/product-category.php
  59. 15 0
      server/resources/lang/zh_CN/product-hot.php
  60. 16 0
      server/resources/lang/zh_CN/product-sku.php
  61. 13 0
      server/resources/lang/zh_CN/product-spec-group.php
  62. 16 0
      server/resources/lang/zh_CN/product-spec.php
  63. 23 0
      server/resources/lang/zh_CN/product.php
  64. 13 0
      server/resources/lang/zh_CN/setting.php
  65. 17 0
      server/resources/lang/zh_CN/showroom-case.php
  66. 14 0
      server/resources/lang/zh_CN/showroom.php
  67. 8 6
      server/resources/lang/zh_CN/user.php

+ 2 - 2
server/.env.example

@@ -18,8 +18,8 @@ LOG_LEVEL=debug
 DB_CONNECTION=mysql
 DB_CONNECTION=mysql
 DB_HOST=127.0.0.1
 DB_HOST=127.0.0.1
 DB_PORT=3306
 DB_PORT=3306
-DB_DATABASE=zhangsiye_db
-DB_USERNAME=zhangsiye_db
+DB_DATABASE=jichuangshe_db
+DB_USERNAME=jichuangshe_db
 DB_PASSWORD=
 DB_PASSWORD=
 DB_PREFIX=t_
 DB_PREFIX=t_
 
 

+ 34 - 0
server/app/Admin/Actions/Form/ResetPasswordForm.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace App\Admin\Actions\Form;
+
+use App\Models\Account;
+use Dcat\Admin\Contracts\LazyRenderable;
+use Dcat\Admin\Traits\LazyWidget;
+use Dcat\Admin\Widgets\Form;
+
+class ResetPasswordForm extends Form implements LazyRenderable
+{
+    use LazyWidget;
+
+    //弹窗表单
+    public function form()
+    {
+        $id = isset($this->payload['id']) ? $this->payload['id'] : 0;
+        $this->hidden('id')->value($id);
+        $this->password('password', '密码')->required();
+    }
+
+    //点击表单处理
+    public function handle(array $input)
+    {
+        try {
+            $account = Account::find($input['id']);
+            $account->password =  \Hash::make($input['password']);;
+            $account->save();
+        } catch (\Exception $exception) {
+            return $this->response()->error($exception->getMessage());
+        }
+        return $this->response()->success('success')->refresh();
+    }
+}

+ 41 - 0
server/app/Admin/Actions/Grid/ResetPassword.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace App\Admin\Actions\Grid;
+
+use App\Admin\Actions\Form\ResetPasswordForm;
+use App\Models\Account;
+use Dcat\Admin\Actions\Response;
+use Dcat\Admin\Form\AbstractTool;
+use Dcat\Admin\Grid\RowAction;
+use Dcat\Admin\Traits\HasPermissions;
+use Dcat\Admin\Widgets\Modal;
+use Illuminate\Contracts\Auth\Authenticatable;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Http\Request;
+
+class ResetPassword extends AbstractTool
+{
+    /**
+     * @return string
+     */
+    protected $title = '重置密码';
+
+    protected $model;
+
+    public function __construct(string $model = null, $id = 0)
+    {
+        $this->model = $model;
+        $this->title = '<i class="feather icon-lock"></i> ' . $this->title;
+        $this->id = $id;
+    }
+
+    public function render()
+    {
+        $form = ResetPasswordForm::make()->payload(['id' => $this->id]);
+        return Modal::make()
+            ->lg()
+            ->title($this->title)
+            ->body($form)
+            ->button($this->title);
+    }
+}

+ 125 - 0
server/app/Admin/Controllers/AccountController.php

@@ -0,0 +1,125 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Admin\Actions\Grid\ResetPassword;
+use App\Models\Account;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class AccountController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new Account(), function (Grid $grid) {
+            $grid->column('id')->sortable();
+            $grid->column('user_name');
+            $grid->column('type')
+                ->using(config('global.user_type'))
+                ->label(['info','primary','success']);;
+            $grid->column('account');
+            $grid->column('status')
+                ->using(config('global.user_status'))
+                ->label(['danger','success'])->switch();
+            $grid->column('remark')->editable();
+            $grid->column('created_at');
+            $grid->actions(function (Grid\Displayers\Actions $actions) {
+                $actions->append(new ResetPassword(Account::class, $actions->row->id));
+            });
+
+            $grid->disableViewButton();
+
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new Account(), function (Show $show) {
+            $show->field('id');
+            $show->field('user_name');
+            $show->field('account');
+            $show->field('password');
+            $show->field('type');
+            $show->field('remark');
+            $show->field('status');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new Account(), function (Form $form) {
+            $form->display('id');
+            $form->text('user_name')->required();
+            $form->mobile('account')
+                ->placeholder('手机号')
+                ->required()
+                ->rules(function ($form) {
+                    // 如果不是编辑状态,则添加字段唯一验证
+                    if (!$form->model()->id) {
+                        return 'unique:accounts';
+                    }
+                });
+            $form->password('password')
+                ->placeholder('默认123456');
+            $form->radio('type')
+                ->options(config('global.user_type'))
+                ->default(1);
+            $form->radio('status')
+                ->options(config('global.user_status'))
+                ->default(1);
+            $form->textarea('remark');
+
+            $form->display('created_at');
+            //$form->display('updated_at');
+
+            $form->saving(function (Form $form) {
+                // 如果不是编辑状态 不填写密码默认123456
+                if (!$form->model()->id) {
+                     if(!$form->password){
+                         $form->password = \Hash::make(123456);
+                     }else{
+                         $form->password = \Hash::make($form->password);
+                     }
+                }else{
+                    if ($form->password && $form->model()->password != $form->password) {
+                        $form->password = \Hash::make($form->password);
+                    }
+
+                    if (! $form->password) {
+                        $form->deleteInput('password');
+                    }
+                }
+
+            });
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+
+        });
+    }
+}

+ 74 - 0
server/app/Admin/Controllers/BannerController.php

@@ -0,0 +1,74 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Banner;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class BannerController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new Banner(), function (Grid $grid) {
+            $grid->column('id')->sortable();
+            $grid->column('name');
+            $grid->column('image');
+            $grid->column('sort');
+            $grid->column('is_opened');
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+        
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->equal('id');
+        
+            });
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new Banner(), function (Show $show) {
+            $show->field('id');
+            $show->field('name');
+            $show->field('image');
+            $show->field('sort');
+            $show->field('is_opened');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new Banner(), function (Form $form) {
+            $form->display('id');
+            $form->text('name');
+            $form->text('image');
+            $form->text('sort');
+            $form->text('is_opened');
+        
+            $form->display('created_at');
+            $form->display('updated_at');
+        });
+    }
+}

+ 71 - 0
server/app/Admin/Controllers/ContactController.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Contact;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ContactController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new Contact(), function (Grid $grid) {
+            $grid->column('id')->sortable();
+            $grid->column('name');
+            $grid->column('phone_num');
+            $grid->column('wechat_num');
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+        
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->equal('id');
+        
+            });
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new Contact(), function (Show $show) {
+            $show->field('id');
+            $show->field('name');
+            $show->field('phone_num');
+            $show->field('wechat_num');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new Contact(), function (Form $form) {
+            $form->display('id');
+            $form->text('name');
+            $form->text('phone_num');
+            $form->text('wechat_num');
+        
+            $form->display('created_at');
+            $form->display('updated_at');
+        });
+    }
+}

+ 24 - 0
server/app/Admin/Controllers/DashBoardController.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Admin\Metrics\Examples;
+use App\Http\Controllers\Controller;
+use Dcat\Admin\Http\Controllers\Dashboard;
+use Dcat\Admin\Layout\Column;
+use Dcat\Admin\Layout\Content;
+use Dcat\Admin\Layout\Row;
+use Dcat\Admin\Widgets\Card;
+
+class DashBoardController extends Controller
+{
+    public function view(Content $content)
+    {
+        return $content->body('<div style="text-align: center; font-size: 28px; font-weight: 300">欢迎进入极创社管理后台</div>');
+    }
+
+    public function download(Content $content)
+    {
+        return $content->body('<div style="text-align: center; font-size: 28px; font-weight: 300">欢迎进入极创社管理后台</div>');
+    }
+}

+ 66 - 0
server/app/Admin/Controllers/ProductCategoryController.php

@@ -0,0 +1,66 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\ProductCategory;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ProductCategoryController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new ProductCategory(), function (Grid $grid) {
+            $grid->model()->orderByDesc('sort');
+            $grid->column('id')->sortable();
+            $grid->column('name');
+            $grid->column('level')->using(config('global.cat_level'));
+            $grid->column('is_opened')->switch();
+            $grid->column('sort')->editable();
+            $grid->column('created_at');
+            $grid->disableViewButton();
+        });
+    }
+
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new ProductCategory(), function (Form $form) {
+            $form->display('id');
+            $form->radio('level')
+                ->when(2, function (Form $form){
+                    $options = ProductCategory::select(['id','name'])
+                        ->where('level',1)
+                        ->get()
+                        ->pluck('name', 'id');
+                    $form->select('pid')->options($options);
+                })
+                ->options(config('global.cat_level'))
+                ->default(1);
+            $form->text('name')->required();
+            $form->radio('is_opened')
+                ->options(config('global.bool_status'))
+                ->default(1);
+            $form->number('sort');
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+        });
+    }
+}

+ 186 - 0
server/app/Admin/Controllers/ProductController.php

@@ -0,0 +1,186 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Product;
+use App\Models\ProductCategory;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ProductController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(Product::with('cate'), function (Grid $grid) {
+            $grid->model()->orderByDesc('sort');
+            $grid->column('id')->sortable();
+            $grid->column('name')->label('info');
+            $grid->column('cate_id')->display(function (){
+                return $this->cate->name;
+            })->label('success');
+            $grid->column('cover_img')->image('',80);
+            $grid->column('cases')->display(function (){
+                $html = '';
+                foreach ($this->cases as $case){
+                    $html .= '<img data-action="preview-img" src="'.$case.'"
+style="max-width:80px;max-height:80px;cursor:pointer"
+class="img img-thumbnail">';
+                }
+                return $html;
+            });
+            $grid->column('tech_param')->display(function (){
+                $html = '';
+                foreach ($this->tech_param as $key => $tech_param){
+                    $index = $key+1;
+                    $html .= "<a href='{$tech_param}' download target='_blank'>参数文件{$index}</a><br>";
+                }
+                return $html;
+            });
+            $grid->column('cad_model')->display(function (){
+                $html = '';
+                foreach ($this->cad_model as $key => $tech_param){
+                    $index = $key+1;
+                    $html .= "<a href='{$tech_param}' download target='_blank'>CAD模型{$index}</a><br>";
+                }
+                return $html;
+            });
+            $grid->column('cad_design')->display(function (){
+                $html = '';
+                foreach ($this->cad_design as $key => $tech_param){
+                    $index = $key+1;
+                    $html .= "<a href='{$tech_param}' download target='_blank'>CAD设计$index</a><br>";
+                }
+                return $html;
+            });
+            $grid->column('su_model')->display(function (){
+                $html = '';
+                foreach ($this->su_model as $key => $tech_param){
+                    $index = $key+1;
+                    $html .= "<a href='{$tech_param}' download target='_blank'>SU模型{$index}</a><br>";
+                }
+                return $html;
+            });
+            $grid->column('other')->display(function (){
+                $html = '';
+                foreach ($this->other as $key => $tech_param){
+                    $index = $key+1;
+                    $html .= "<a href='{$tech_param}' download target='_blank'>其他文件{$index}</a><br>";
+                }
+                return $html;
+            });
+            $grid->column('is_opened')->switch();
+            $grid->column('sort')->editable();
+            $grid->column('created_at');
+
+            $grid->actions(function (Grid\Displayers\Actions $actions) {
+                $id = $actions->getKey();
+                // append一个操作
+                $actions->append('<a href="/admin/product/'.$id.'/spec"><i class="fa fa-align-left"></i> 规格管理</a>');
+            });
+
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->panel();
+                $filter->like('name')->width(2);
+            });
+
+            $grid->disableViewButton();
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new Product(), function (Show $show) {
+            $show->field('id');
+            $show->field('name');
+            $show->field('cover_img');
+            $show->field('cases');
+            $show->field('origin_price');
+            $show->field('sale_price');
+            $show->field('sort');
+            $show->field('is_opened');
+            $show->field('tech_param');
+            $show->field('cad_model');
+            $show->field('cad_design');
+            $show->field('su_model');
+            $show->field('other');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new Product(), function (Form $form) {
+            $form->display('id');
+            $cates = ProductCategory::select(['id','name'])->where('is_opened',1)->get()->toArray();
+            $form->select('cate_id')
+                ->options(array_column($cates,'name','id'))
+                ->required();;
+            $form->text('name')->required();;;
+            $form->image('cover_img')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4)
+                ->required();
+            $form->multipleImage('cases')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->multipleFile('tech_param')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->multipleFile('cad_model')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->multipleFile('cad_design')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->multipleFile('su_model')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->multipleFile('other')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->radio('is_opened')->options(config('global.bool_status'))->default(1);
+            $form->number('sort');
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+        });
+    }
+}

+ 108 - 0
server/app/Admin/Controllers/ProductHotController.php

@@ -0,0 +1,108 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Product;
+use App\Models\ProductCategory;
+use App\Models\ProductHot;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ProductHotController extends AdminController
+{
+    const TYPE_normal = 'normal'; // 普通用户
+    const TYPE_VIP = 'vip'; // VIP/设计师
+
+    protected $types = ['normal' => 1, 'vip' => 2];
+
+    protected $type = 1;
+
+    public function __construct()
+    {
+        $route = \request()->route();
+        $arr = explode("/",$route->uri);
+        $this->type = $this->types[$arr[2]]??1;
+    }
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(ProductHot::with(['product']), function (Grid $grid) {
+            $grid->model()->orderByDesc('sort');
+            $grid->model()->where('type', $this->type);
+            $grid->column('id')->sortable();
+            $grid->column('cover_img')->image('',80);
+            $grid->column('product_id')->display(function (){
+                return $this->product->name;
+            });
+            $grid->column('is_opened')->switch();
+            $grid->column('sort')->editable();
+            $grid->column('created_at');
+
+//            $grid->filter(function (Grid\Filter $filter) {
+//                $filter->equal('id');
+//
+//            });
+            $grid->disableViewButton();
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new ProductHot(), function (Show $show) {
+            $show->field('id');
+            $show->field('type');
+            $show->field('product_id');
+            $show->field('sort');
+            $show->field('is_opened');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new ProductHot(), function (Form $form) {
+            $form->display('id');
+            $form->hidden('type')->value($this->type);
+            $cates = Product::select(['id','name'])->where('is_opened',1)->get()->toArray();
+            $form->select('product_id')
+                ->options(array_column($cates,'name','id'))
+                ->required();
+            $form->image('cover_img')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4)
+                ->required();
+            $form->radio('is_opened')->options(config('global.bool_status'))->default(1);
+            $form->number('sort');
+
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+        });
+    }
+}

+ 102 - 0
server/app/Admin/Controllers/ProductSpecController.php

@@ -0,0 +1,102 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\ProductSpec;
+use App\Models\ProductSpecGroup;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Layout\Content;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ProductSpecController extends AdminController
+{
+
+    protected $product_id;
+
+    public function __construct()
+    {
+        $route = \request()->route();
+        $this->product_id = $route->parameters['id'];
+
+    }
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(ProductSpec::with('group.product'), function (Grid $grid) {
+            $grid->model()->orderByDesc('group_id')->orderByDesc('sort');
+            $grid->column('id')->sortable();
+            $grid->column('product','产品')->display(function (){
+                return $this->group->product->name;
+            })->label('info');
+            $grid->column('group_id')->display(function (){
+                return $this->group->name;
+            })->label('success');
+            $grid->column('name')->label('primary');
+            $grid->column('sale_price')->editable();
+            $grid->column('is_opened')->switch();
+            $grid->column('sort')->editable();
+            $grid->column('created_at');
+
+            $url = admin_url('/product/'.$this->product_id.'/specGroup');
+            $grid->tools('<a href="'.$url.'" class="btn btn-primary btn-outline" style="position: absolute;right: 118px;">
+<i class="fa fa-align-justify"></i> 规格组管理</a>');
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new ProductSpec(), function (Show $show) {
+            $show->field('id');
+            $show->field('group_id');
+            $show->field('name');
+            $show->field('cover_img');
+            $show->field('origin_price');
+            $show->field('sale_price');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new ProductSpec(), function (Form $form) {
+            $form->display('id');
+            $cates = ProductSpecGroup::select(['id','name'])->where('is_opened',1)->get()->toArray();
+            $form->radio('group_id')
+                ->options(array_column($cates,'name','id'))
+                ->required();
+
+            $form->text('name')->required();
+            $form->decimal('sale_price')->required();
+            $form->radio('is_opened')->options(config('global.bool_status'))->default(1);
+            $form->number('sort');
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+
+        });
+    }
+}

+ 71 - 0
server/app/Admin/Controllers/ProductSpecGroupController.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\ProductSpecGroup;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ProductSpecGroupController extends AdminController
+{
+    protected $product_id;
+
+    public function __construct()
+    {
+        $route = \request()->route();
+        $this->product_id = $route->parameters['id'];
+    }
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(ProductSpecGroup::with('product'), function (Grid $grid) {
+            $grid->model()->orderByDesc('sort');
+            $grid->column('id')->sortable();
+            $grid->column('product_id')->display(function (){
+                return $this->product->name;
+            })->label('info');
+            $grid->column('name')->label('success');
+            $grid->column('is_opened')->switch();
+            $grid->column('sort')->editable();
+            $grid->column('created_at');
+
+            $url = admin_url('/product/'.$this->product_id.'/spec');
+            $grid->tools('<a href="'.$url.'" class="btn btn-primary btn-outline" style="position: absolute;right: 118px;">
+<i class="fa fa-align-left"></i> 规格管理</a>');
+
+            $grid->disableViewButton();
+        });
+    }
+
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new ProductSpecGroup(), function (Form $form) {
+            $form->display('id');
+            $form->hidden('product_id')->value($this->product_id);
+            $form->text('name')->required();
+
+            $form->radio('is_opened')->options(config('global.bool_status'))->default(1);
+            $form->number('sort');
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+        });
+    }
+}

+ 68 - 0
server/app/Admin/Controllers/SettingController.php

@@ -0,0 +1,68 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Setting;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class SettingController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new Setting(), function (Grid $grid) {
+            $grid->column('id')->sortable();
+            $grid->column('name');
+            $grid->column('logo');
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+        
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->equal('id');
+        
+            });
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new Setting(), function (Show $show) {
+            $show->field('id');
+            $show->field('name');
+            $show->field('logo');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new Setting(), function (Form $form) {
+            $form->display('id');
+            $form->text('name');
+            $form->text('logo');
+        
+            $form->display('created_at');
+            $form->display('updated_at');
+        });
+    }
+}

+ 125 - 0
server/app/Admin/Controllers/ShowroomCaseController.php

@@ -0,0 +1,125 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Showroom;
+use App\Models\ShowroomCase;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ShowroomCaseController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(ShowroomCase::with('showroom'), function (Grid $grid) {
+            $grid->column('id')->sortable();
+            $grid->column('showroom_id','展厅名称')->display(function (){
+                return $this->showroom->name;
+            });
+            $grid->column('name');
+            $grid->column('videos')->display(function (){
+                $html = '';
+                foreach ($this->videos as $key => $video){
+                    $html .= "<video src='{$video}' width='200' controls>";
+                }
+                return $html;
+            });
+            $grid->column('images')->display(function (){
+                $html = '';
+                foreach ($this->images as $image){
+                    $html .= '<img data-action="preview-img" src="'.$image.'"
+style="max-width:80px;max-height:80px;cursor:pointer"
+class="img img-thumbnail">';
+                }
+                return $html;
+            });
+            $grid->column('sort')->editable();
+            $grid->column('is_opened')->switch();
+            $grid->column('created_at');
+
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->panel();
+                $filter->like('name')->width(2);
+                $filter->equal('showroom_id','展厅')->select(function (){
+                    return Showroom::select(['id','name'])->get()->pluck('name','id')->toArray();
+                })->width(2);
+
+            });
+
+            $grid->disableViewButton();
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new ShowroomCase(), function (Show $show) {
+            $show->field('id');
+            $show->field('showroom_id');
+            $show->field('name');
+            $show->field('videos');
+            $show->field('images');
+            $show->field('sort');
+            $show->field('is_opened');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new ShowroomCase(), function (Form $form) {
+            $form->display('id');
+            $cates = Showroom::select(['id','name'])
+                ->where('is_opened',1)->get()->toArray();
+            $form->select('showroom_id')
+                ->options(array_column($cates,'name','id'))
+                ->required();;
+            $form->text('name')->required();
+            $form->multipleFile('videos')->saveFullUrl()
+                ->mimeTypes('video/*')
+                ->chunkSize(4096)
+                ->maxSize(1024 * 1024)
+                ->uniqueName()
+                ->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->multipleImage('images')->saveFullUrl()
+                ->uniqueName()->autoUpload()
+                ->autoSave(false)
+                ->removable(false)
+                ->width(4);
+            $form->number('sort');
+            $form->radio('is_opened')
+                ->options(config('global.bool_status'))
+                ->default(1);
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+
+        });
+    }
+}

+ 77 - 0
server/app/Admin/Controllers/ShowroomController.php

@@ -0,0 +1,77 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Showroom;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class ShowroomController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new Showroom(), function (Grid $grid) {
+            $grid->model()->orderByDesc('sort');
+            $grid->column('id')->sortable();
+            $grid->column('name');
+            $grid->column('sort')->editable();
+            $grid->column('is_opened')->switch();
+
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->panel();
+                $filter->like('name')->width(2);
+
+            });
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new Showroom(), function (Show $show) {
+            $show->field('id');
+            $show->field('name');
+            $show->field('sort');
+            $show->field('is_opened');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new Showroom(), function (Form $form) {
+            $form->display('id');
+            $form->text('name')->required();
+            $form->number('sort');
+            $form->radio('is_opened')
+                ->options(config('global.bool_status'))
+                ->default(1);
+
+            $form->disableViewButton();
+            $form->disableDeleteButton();
+            $form->disableListButton();
+            $form->disableEditingCheck();
+            $form->disableViewCheck();
+            $form->disableCreatingCheck();
+        });
+    }
+}

+ 98 - 0
server/app/Admin/Controllers/UserController.php

@@ -0,0 +1,98 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\User;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+
+class UserController extends AdminController
+{
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new User(), function (Grid $grid) {
+            $grid->column('id')->sortable();
+            $grid->column('nickname');
+            $grid->column('avatar');
+            $grid->column('password');
+            $grid->column('email');
+            $grid->column('mobile');
+            $grid->column('open_id');
+            $grid->column('union_id');
+            $grid->column('status');
+            $grid->column('email_verified_at');
+            $grid->column('remember_token');
+            $grid->column('remark');
+            $grid->column('type');
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->equal('id');
+
+            });
+        });
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new User(), function (Show $show) {
+            $show->field('id');
+            $show->field('nickname');
+            $show->field('avatar');
+            $show->field('password');
+            $show->field('email');
+            $show->field('mobile');
+            $show->field('open_id');
+            $show->field('union_id');
+            $show->field('status');
+            $show->field('email_verified_at');
+            $show->field('remember_token');
+            $show->field('remark');
+            $show->field('type');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new User(), function (Form $form) {
+            $form->display('id');
+            $form->text('nickname');
+            $form->text('avatar');
+            $form->text('password');
+            $form->text('email');
+            $form->text('mobile');
+            $form->text('open_id');
+            $form->text('union_id');
+            $form->text('status');
+            $form->text('email_verified_at');
+            $form->text('remember_token');
+            $form->text('remark');
+            $form->text('type');
+
+            $form->display('created_at');
+            $form->display('updated_at');
+        });
+    }
+}

+ 44 - 0
server/app/Admin/routes.php

@@ -13,5 +13,49 @@ Route::group([
 ], function (Router $router) {
 ], function (Router $router) {
 
 
     $router->get('/', 'HomeController@index');
     $router->get('/', 'HomeController@index');
+    //
+    $router->get('dashboard/view', 'DashBoardController@view');
+    // 下载数据
+    $router->get('dashboard/download', 'DashBoardController@download');
 
 
+    // 账号
+    $router->resource('account','AccountController');
+
+    // 产品管理
+    $router->group(['prefix' => 'product'], function (Router $router){
+        // 产品
+        $router->resource('list','ProductController');
+        // 产品分类
+        $router->resource('categories','ProductCategoryController');
+        // 规格
+        $router->resource('{id}/spec','ProductSpecController');
+        // 规格组
+        $router->resource('{id}/specGroup','ProductSpecGroupController');
+    });
+    // 案例管理
+    $router->group(['prefix' => 'cases'], function (Router $router){
+        // 展厅
+        $router->resource('showroom','ShowroomController');
+        // 应用案例
+        $router->resource('list','ShowroomCaseController');
+    });
+
+    // 爆款管理
+    $router->group(['prefix' => 'hot'], function (Router $router){
+        // 普通客服
+        $router->resource('normal','ProductHotController');
+        // VIP/设计师
+        $router->resource('vip','ProductHotController');
+    });
+
+    // 系统设置
+    $router->group(['prefix' => 'system'], function (Router $router){
+        // 普通客服
+        $router->resource('register/banner','BannerController');
+        // VIP/设计师
+        $router->resource('register/contact','ContactController');
+
+        // VIP/设计师
+        $router->resource('setting/logo','SettingController');
+    });
 });
 });

+ 22 - 0
server/app/Casts/DelimiterCast.php

@@ -0,0 +1,22 @@
+<?php
+namespace App\Casts;
+
+use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
+
+class DelimiterCast  implements CastsAttributes
+{
+   public function get($model, string $key, $value, array $attributes)
+   {
+       $arr = explode(';', $value);
+       foreach ($arr as &$item){
+           $item = is_numeric($item) ? $item * 1: $item;
+       }
+       unset($item);
+       return $arr;
+   }
+
+    public function set($model, string $key, $value, array $attributes)
+    {
+        return collect($value)->implode(';');
+    }
+}

+ 0 - 190
server/app/Helper/ByteDance.php

@@ -1,190 +0,0 @@
-<?php
-
-namespace App\Helper;
-
-use App\Helper\UniPlatform\BaseAPI;
-use App\Helper\UniPlatform\BaseUniPlatform;
-use GuzzleHttp\Client;
-use GuzzleHttp\Exception\GuzzleException;
-
-/**
- * Class ByteDance
- *
- * @package App\Helper
- * @property-read  string $appId
- * @property-read  string $slat
- * @property-read  string $secret
- * @property-read  string $token
- * @property-read  string $accessTokenFile
- * @property-read  string $accessToken
- * @property-read  string $noticeUrl
- * @property-read  string $validTimestamp
- */
-class ByteDance extends BaseUniPlatform
-{
-
-    public function __construct(BaseAPI $api)
-    {
-        $this->API  = $api;
-    }
-
-    /**
-     * 获取 access token
-     * @throws \Exception
-     */
-    protected function getAccessToken() : string
-    {
-        $res = $this->post($this->API::ACCESS_TOKEN, [
-            'grant_type' => 'client_credential',
-            'appid'      => $this->appId,
-            'secret'     => $this->secret,
-        ]);
-        if (!empty($res['err_no'])) {
-            throw new \Exception('获取access token 错误');
-        }
-
-        file_put_contents($this->accessTokenFile, json_encode([
-            'access_token' => $res['access_token'],
-            'expires_at'   => $res['expiresAt']
-        ]));
-
-        return $res['access_token'];
-    }
-
-    /**
-     * @param $outOrderNo
-     * @param $totalAmount
-     * @param $openId
-     * @return array|mixed
-     * @throws \Exception
-     */
-    public function createOrder($outOrderNo, $totalAmount, $openId): array
-    {
-        $data = [
-            'app_id'       => $this->appId,
-            'out_order_no' => $outOrderNo,
-            'total_amount' => intval($totalAmount * 100),
-            'subject'      => "订单号:".$outOrderNo,
-            'body'         => '抖音担保支付',
-            'valid_time'   => $this->validTimestamp,
-            'sign'         => $this->secret
-            //'notify_url'   => $notifyUrl, // 可以不设置 使用小程序后台设置的回调
-        ];
-        $data = array_filter($data);
-        $data['sign'] = $this->getSign($data);
-
-        return $this->post(
-            $this->API::CREATE_ORDER,
-            $data
-        );
-    }
-
-    /**
-     * @param array  $data
-     * @return string
-     */
-    public function getSign(array $data)
-    {
-        $rList = [];
-        foreach ($data as $k => $v) {
-            if ($k == "other_settle_params" || $k == "app_id" || $k == "sign" || $k == "thirdparty_id")
-                continue;
-            $value = trim(strval($v));
-            $len = strlen($value);
-            if ($len > 1 && substr($value, 0, 1) == "\"" && substr($value, $len, $len - 1) == "\"")
-                $value = substr($value, 1, $len - 1);
-            $value = trim($value);
-            if ($value == "" || $value == "null")
-                continue;
-            array_push($rList, $value);
-        }
-        array_push($rList, $this->slat);
-        sort($rList, SORT_STRING);
-        return md5(implode('&', $rList));
-    }
-
-    /**
-     * @param array  $data
-     * @return string
-     */
-    public function getNotifySign(array $data)
-    {
-        $filtered = [];
-        foreach ($data as $key => $value) {
-            if (in_array($key, ['msg_signature', 'type'])) {
-                continue;
-            }
-            $value = trim(strval($value));
-            $len = strlen($value);
-            if ($len > 1 && substr($value, 0, 1) == "\"" && substr($value, $len, $len - 1) == "\"")
-                $value = substr($value, 1, $len - 1);
-            $filtered[] =
-                is_string($value)
-                    ? trim($value)
-                    : $value;
-        }
-        $filtered[] = trim($this->token);
-        sort($filtered, SORT_STRING);
-        return sha1(trim(implode('', $filtered)));
-    }
-
-
-    /**
-     * @param string $code
-     * @return array|mixed
-     * @throws \Exception
-     */
-    public function login($code = ''): array
-    {
-        return $this->post($this->API::LOGIN, [
-            'appid'      => $this->appId,
-            'secret'     => $this->secret,
-            'code'       => $code,
-        ]);
-    }
-
-    /**
-     * 接口请求
-     *
-     * @param string $uri
-     * @param array  $data
-     * @return array|mixed
-     * @throws \Exception
-     */
-    protected function post($uri = '', $data = []) : array
-    {
-        try {
-            $client = new Client();
-            $res = $client->post($uri, [
-                'verify'  => false,
-                'headers' => ['Content-Type' => 'application/json'],
-                'body'    => json_encode($data)
-            ]);
-            $stringBody = (string)$res->getBody();
-            $res = json_decode($stringBody, true);
-
-            if(!empty($res['err_no'])){
-                throw new \Exception("请求字节跳动API接口错误,错误码:{$res['err_no']},错误信息:{$res['err_tips']}");
-            }
-            return $res['data'];
-        } catch (GuzzleException $e) {
-            \Log::error($e->getMessage());
-            throw new \Exception($e->getMessage());
-        }
-    }
-
-    protected function setAccessFileDir(): void
-    {
-        $this->accessTokenDir = storage_path('app/bytedance');
-    }
-
-    protected function setAccessFilePath(): void
-    {
-        $this->accessTokenFile = storage_path('app/bytedance/bytedance_access_token.json');
-    }
-
-    protected function setNoticeUrl(): void
-    {
-        $this->noticeUrl = env('APP_URL').'/api/pay/bytedance/notify';
-    }
-}

+ 0 - 183
server/app/Helper/Kuaishou.php

@@ -1,183 +0,0 @@
-<?php
-namespace App\Helper;
-use App\Helper\UniPlatform\BaseAPI;
-use App\Helper\UniPlatform\BaseUniPlatform;
-use Carbon\Carbon;
-use GuzzleHttp\Client;
-use GuzzleHttp\Exception\GuzzleException;
-
-/**
- * Class Kuaishou
- *
- * @package App\Helper
- * @property-read  string $appId
- * @property-read  string $slat
- * @property-read  string $secret
- * @property-read  string $token
- * @property-read  string $accessTokenFile
- * @property-read  string $accessToken
- * @property-read  string $noticeUrl
- * @property-read  string $validTimestamp
- */
-class Kuaishou extends BaseUniPlatform
-{
-    public function __construct(BaseAPI $api)
-    {
-        $this->API  = $api;
-    }
-
-    /**
-     * @param string $code
-     * @return array|mixed
-     * @throws \Exception
-     */
-    public function login($code = ''): array
-    {
-        return $this->post($this->API::LOGIN, [
-            'app_id'       => $this->appId,
-            'app_secret'   => $this->secret,
-            'js_code'      => $code,
-        ]);
-    }
-
-
-    public function createOrder($outOrderNo, $totalAmount, $openId): array
-    {
-        $data = [
-            'app_id'        => $this->appId,
-            'out_order_no'  => $outOrderNo,
-            'open_id'       => $openId,
-            'total_amount'  => intval($totalAmount * 100),
-            'subject'       => "订单号:".$outOrderNo,
-            'detail'        => '快手担保支付',
-            'type'          => 1233, // @url https://mp.kuaishou.com/docs/operate/platformAgreement/epayServiceCharge.html
-            'expire_time'   => $this->validTimestamp,
-            'notify_url'    => $this->noticeUrl
-        ];
-        $data['sign'] = $this->getSign($data);
-        $url = $this->API::CREATE_ORDER.'?'.http_build_query([
-                'app_id' => $this->appId,
-                'access_token' =>  $this->accessToken,
-            ]);
-        $res  = $this->post(
-            $url,
-            $data,
-            'json'
-        );
-
-        return  [
-            'order_id' => $res['order_info']['order_no'],
-            'order_token' => $res['order_info']['order_info_token']
-        ];
-    }
-
-
-    /**
-     * @param array  $data
-     * @return string
-     */
-    public function getSign(array $data)
-    {
-        $filterArray = ['sign','access_token'];
-        $rList = array();
-        foreach ($data as $k => $v) {
-            if (in_array($k, $filterArray))
-                continue;
-            $value = trim(strval($v));
-            $len = strlen($value);
-            if ($len > 1 && substr($value, 0, 1) == "\"" && substr($value, $len, $len - 1) == "\"")
-                $value = substr($value, 1, $len - 1);
-            $value = trim($value);
-            if ($value == "" || $value == "null")
-                continue;
-            array_push($rList, "$k=$value");
-        }
-        sort($rList, SORT_STRING);
-        $str = implode('&', $rList);
-        $str .= $this->secret;
-        return md5($str);
-    }
-
-
-    protected function getAccessToken(): string
-    {
-        $res = $this->post($this->API::ACCESS_TOKEN, [
-            'app_id'      => $this->appId,
-            'app_secret'  => $this->secret,
-            'grant_type'  => 'client_credentials',
-        ]);
-        if (!isset($res['result']) || $res['result'] != 1) {
-            throw new \Exception('获取access token 错误');
-        }
-
-        file_put_contents($this->accessTokenFile, json_encode([
-            'access_token' => $res['access_token'],
-            'expires_at'   => Carbon::now()->timestamp + $res['expires_in']
-        ]));
-
-        return $res['access_token'];
-    }
-
-    protected function setAccessFileDir(): void
-    {
-        $this->accessTokenDir = storage_path('app/kuaishou');
-    }
-
-    protected function setAccessFilePath(): void
-    {
-        $this->accessTokenFile = storage_path('app/kuaishou/kuaishou_access_token.json');
-    }
-
-
-    public function getNotifySign(array $data)
-    {
-        $req = file_get_contents('php://input');
-        $str = $req.$this->secret;
-        return md5($str);
-    }
-
-    /**
-     * @param string $uri
-     * @param array  $data
-     * @param string $type
-     * @return array
-     * @throws \Exception
-     */
-    protected function post($uri = '', $data = [], $type = 'urlencoded'): array
-    {
-        try {
-            $client = new Client();
-            if($type == 'urlencoded'){
-                $url = $uri.'?'.http_build_query($data);
-                $options = [
-                    'verify'  => false,
-                    'headers' => ['Content-Type' => 'x-www-form-urlencoded'],
-                ];
-            }else{
-                $url = $uri;
-                $options = [
-                    'verify'  => false,
-                    'headers' => ['Content-Type' => 'application/json'],
-                    'body' => json_encode($data)
-                ];
-            }
-            $res = $client->post($url, $options);
-            $stringBody = (string)$res->getBody();
-            $res = json_decode($stringBody, true);
-
-            if(!isset($res['result']) || $res['result'] != 1){
-                throw new \Exception("请求快手API接口错误,错误码:{$res['result']},错误信息:{$res['error_msg']}");
-            }
-            return $res;
-        } catch (GuzzleException $e) {
-            \Log::error($e->getMessage());
-            throw new \Exception($e->getMessage());
-        }
-    }
-
-    protected function setNoticeUrl(): void
-    {
-        $this->noticeUrl = env('APP_URL').'/api/pay/kuaishou/notify';
-    }
-
-}

+ 0 - 9
server/app/Helper/UniPlatform/BaseAPI.php

@@ -1,9 +0,0 @@
-<?php
-namespace App\Helper\UniPlatform;
-
-abstract class BaseAPI
-{
-    const ACCESS_TOKEN = '';
-    const LOGIN = '';
-    const CREATE_ORDER = '';
-}

+ 0 - 151
server/app/Helper/UniPlatform/BaseUniPlatform.php

@@ -1,151 +0,0 @@
-<?php
-namespace App\Helper\UniPlatform;
-
-/**
- * Class ByteDance
- *
- * @package App\Helper
- * @property-read  string $appId
- * @property-read  string $slat
- * @property-read  string $secret
- * @property-read  string $token
- * @property-read  string $accessTokenDir
- * @property-read  string $accessTokenFile
- * @property-read  string $accessToken
- * @property-read  string $noticeUrl
- * @property-read  string $validTimestamp
- * @property-read  BaseAPI $API
- */
-abstract class BaseUniPlatform
-{
-    protected $appId = null;
-    protected $secret = null;
-    protected $slat = null;
-    protected $token = null;
-
-
-    protected $accessTokenDir = null;
-    protected $accessTokenFile = null;
-    protected $accessToken = null;
-    protected $noticeUrl = null;
-    //订单过期时间(秒);
-    protected $validTimestamp = 24 * 60 * 60;
-
-    protected $API;
-
-    /**
-     * @param array $config
-     * @return $this
-     */
-    public function factory($config = [])
-    {
-        $this->appId = $config['app_id'];
-        $this->secret = $config['app_secret'];
-        $this->slat = isset($config['slat']) ? $config['slat'] : null;
-        $this->token = isset($config['token']) ?  $config['token'] : null;
-
-        $this->setAccessFileDir();
-        $this->setAccessFilePath();
-        $this->setNoticeUrl();
-        $this->accessToken = $this->checkAccessToken();
-
-        return $this;
-    }
-
-
-    /**
-     * @param string $sessionKey
-     * @param string $iv
-     * @param string $encrypted
-     * @return array
-     * @throws \Exception
-     */
-    public function decryptData(string $sessionKey, string $iv, string $encrypted): array
-    {
-        $decrypted =  openssl_decrypt(
-            base64_decode($encrypted,true),
-            'AES-128-CBC',
-            base64_decode($sessionKey),
-            OPENSSL_RAW_DATA,
-            base64_decode($iv)
-        );
-        $decrypted = json_decode($decrypted,true);
-        if(empty($decrypted)){
-            throw new \Exception('解密数据错误');
-        }
-
-        return $decrypted;
-    }
-
-
-
-    /**
-     * 校验access token 是否过期
-     * @return mixed
-     */
-    protected function checkAccessToken()
-    {
-        try {
-            $dir = $this->accessTokenDir;
-            if (!is_dir($dir)) mkdir($dir, 0755);
-            if (!is_file($this->accessTokenFile)) touch($this->accessTokenFile);
-
-            $accessToken = file_get_contents($this->accessTokenFile);
-            $accessToken = $accessToken ? json_decode($accessToken,true) : null;
-            if (empty($accessToken) || $accessToken['expires_at'] < time()) {
-                $accessToken = $this->getAccessToken();
-            }else{
-                $accessToken = $accessToken['access_token'];
-            }
-            return $accessToken;
-        } catch (\Exception $e) {
-
-        }
-    }
-
-
-
-    /**
-     * 登陆
-     * @param $code
-     * @return array
-     */
-    protected abstract function login($code): array ;
-
-    /**
-     * 接口请求
-     * @param string $uri
-     * @param array  $data
-     * @return array
-     */
-    protected abstract function post($uri = '', $data = []): array ;
-
-    /**
-     * 获取Access token
-     * @return string
-     */
-    protected abstract function getAccessToken(): string ;
-
-
-    /**
-     * 创建支付订单
-     *
-     * @param $outOrderNo
-     * @param $totalAmount
-     * @param $openId
-     * @return array
-     */
-    abstract public function createOrder($outOrderNo, $totalAmount, $openId): array ;
-
-    /**
-     * 设置 access token 目录
-     */
-    protected abstract function setAccessFileDir(): void;
-
-    /**
-     * 设置 access token路径
-     */
-    protected abstract function setAccessFilePath(): void;
-
-    protected abstract function setNoticeUrl(): void;
-}

+ 0 - 29
server/app/Helper/UniPlatform/Bytedance/ByteDanceAPI.php

@@ -1,29 +0,0 @@
-<?php
-namespace App\Helper\UniPlatform\Bytedance;
-
-use App\Helper\UniPlatform\BaseAPI;
-
-define('BASE_URL','https://developer.toutiao.com/api/apps/v2');
-define('PAY_URL','https://developer.toutiao.com/api/apps');
-final class ByteDanceAPI extends BaseAPI
-{
-
-
-    /**
-     * 获取 ACCESS_TOKEN
-     * @url https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/interface-request-credential/get-access-token
-     */
-    const ACCESS_TOKEN = BASE_URL.'/token';
-
-    /**
-     * 登陆
-     * @url https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/log-in/code-2-session
-     */
-    const LOGIN = BASE_URL.'/jscode2session';
-
-    /**
-     * 支付下单
-     * @url https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/ecpay/introduction
-     */
-    const CREATE_ORDER = PAY_URL.'/ecpay/v1/create_order';
-}

+ 0 - 81
server/app/Helper/UniPlatform/Bytedance/Payment.php

@@ -1,81 +0,0 @@
-<?php
-
-namespace App\Helper\UniPlatform\Bytedance;
-
-use App\Helper\ByteDance;
-use App\Models\Pay;
-use Carbon\Carbon;
-
-/**
- * Class Payment
- *
- * @package App\Helper\Bytedance
- * @property-read ByteDance $app
- */
-class Payment
-{
-
-    private $app;
-
-    private $fail = null;
-
-
-    public function __construct(ByteDance $app)
-    {
-        $this->app = $app;
-    }
-
-    /**
-     * 支付通知
-     * @param \Closure $closure
-     * @return \Illuminate\Http\JsonResponse
-     */
-    public function payNotify(\Closure $closure)
-    {
-        try {
-            call_user_func($closure, $this->getNoticeData() ,[$this, 'fail']);
-        }catch (\Exception $e){
-            $this->fail($e->getMessage());
-        }
-
-        return $this->toResponse();
-    }
-
-    public function fail($msg)
-    {
-        $this->fail = $msg;
-    }
-
-    /**
-     * 获取支付通知数据
-     * @return mixed
-     * @throws \Exception
-     */
-    private function getNoticeData()
-    {
-        $notify = \request()->all();
-        //$notify = '{"msg":"{\"appid\":\"tt5b312d8cc40f46b701\",\"cp_orderno\":\"10022082800824490007\",\"cp_extra\":\"\",\"way\":\"2\",\"channel_no\":\"2022082822001477591433078541\",\"channel_gateway_no\":\"\",\"payment_order_no\":\"PCP2022082822540531221069106962\",\"out_channel_order_no\":\"2022082822001477591433078541\",\"total_amount\":1,\"status\":\"SUCCESS\",\"seller_uid\":\"71227862181355706950\",\"extra\":\"\",\"item_id\":\"\",\"paid_at\":1661698458,\"message\":\"\",\"order_id\":\"7136939355201063205\",\"trade_item_list\":null,\"ec_pay_trade_no\":\"NEP2022082822540409483061846962\"}","msg_signature":"804a60e48936b14a739230cef21fe6204427732e","nonce":"78","timestamp":"1661698459","type":"payment"}';
-        //获取订单信息
-        //$notify = json_decode($notify,true);
-        \Log::info('抖音支付回调==>'.json_encode($notify,JSON_UNESCAPED_SLASHES));
-
-        if($notify['msg_signature'] !== $this->app->getNotifySign($notify)){
-            throw new \Exception('签名验证错误');
-        }
-
-        return json_decode($notify['msg'], true);
-    }
-
-    /**
-     * 返回数据
-     * @return \Illuminate\Http\JsonResponse
-     */
-    private function toResponse()
-    {
-        $data = [
-            'err_no'    => is_null($this->fail) ? 0  : 1,
-            'err_tips'  => is_null($this->fail) ? 'success' : $this->fail
-        ];
-        return response()->json($data);
-    }
-}

+ 0 - 30
server/app/Helper/UniPlatform/Kuaishou/KuaishouAPI.php

@@ -1,30 +0,0 @@
-<?php
-namespace App\Helper\UniPlatform\Kuaishou;
-
-use App\Helper\UniPlatform\BaseAPI;
-define('BASE_URL','https://open.kuaishou.com/oauth2');
-define('PAY_URL','https://open.kuaishou.com/openapi/mp/developer');
-
-
-final class KuaishouAPI extends BaseAPI
-{
-
-
-    /**
-     * 获取 ACCESS_TOKEN
-     * @url https://mp.kuaishou.com/docs/develop/server/getAccessToken.html
-     */
-    const ACCESS_TOKEN = BASE_URL.'/access_token';
-
-    /**
-     * 登陆
-     * @url https://mp.kuaishou.com/docs/develop/server/code2Session.html
-     */
-    const LOGIN = BASE_URL.'/mp/code2session';
-
-    /**
-     * 支付下单
-     * @url https://mp.kuaishou.com/docs/develop/server/epay/interfaceDefinition.html
-     */
-    const CREATE_ORDER = PAY_URL.'/epay/create_order';
-}

+ 0 - 85
server/app/Helper/UniPlatform/Kuaishou/Payment.php

@@ -1,85 +0,0 @@
-<?php
-
-namespace App\Helper\UniPlatform\Kuaishou;
-
-use App\Helper\Kuaishou;
-use App\Models\Pay;
-use Carbon\Carbon;
-
-/**
- * Class Payment
- *
- * @package App\Helper\Bytedance
- * @property-read Kuaishou $app
- */
-class Payment
-{
-
-    private $app;
-
-    private $messageId = '';
-
-    private $fail = null;
-
-
-    public function __construct(Kuaishou $app)
-    {
-        $this->app = $app;
-    }
-
-    /**
-     * 支付通知
-     * @param \Closure $closure
-     * @return \Illuminate\Http\JsonResponse
-     */
-    public function payNotify(\Closure $closure)
-    {
-        try {
-            call_user_func($closure, $this->getNoticeData() ,[$this, 'fail']);
-        }catch (\Exception $e){
-            $this->fail($e->getMessage());
-        }
-
-        return $this->toResponse();
-    }
-
-    public function fail($msg)
-    {
-        $this->fail = $msg;
-    }
-
-    /**
-     * 获取支付通知数据
-     * @return mixed
-     * @throws \Exception
-     */
-    private function getNoticeData()
-    {
-        $notify = \request()->all();
-        $kwaisign = \request()->header('kwaisign');
-
-        $this->messageId = $notify['message_id'];
-        //获取订单信息
-        $notify = array_merge($notify,['kwaisign' => $kwaisign]);
-        \Log::info('快手支付回调==>'.json_encode($notify,JSON_UNESCAPED_SLASHES));
-        if($kwaisign !== $this->app->getNotifySign($notify)){
-            throw new \Exception('签名验证错误');
-        }
-
-        return $notify['data'];
-    }
-
-    /**
-     * 返回数据
-     * @return \Illuminate\Http\JsonResponse
-     */
-    private function toResponse()
-    {
-        $data = [
-            'result'        => is_null($this->fail) ? 1  : 0,
-            'message_id'    => $this->messageId,
-            'fail'          => $this->fail
-        ];
-        return response()->json($data);
-    }
-}

+ 14 - 0
server/app/Models/Account.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Account extends Model
+{
+	use HasDateTimeFormatter;
+
+    protected $table = 'accounts';
+}

+ 3 - 3
server/app/Models/Banner.php

@@ -11,9 +11,9 @@ use Illuminate\Database\Eloquent\Model;
  *
  *
  * @property int $id
  * @property int $id
  * @property string $name 名称
  * @property string $name 名称
- * @property string $image 图
+ * @property string $image 图
  * @property int $sort 排序
  * @property int $sort 排序
- * @property int $status 是否启用
+ * @property int $is_opened 是否启用
  * @property \Illuminate\Support\Carbon|null $updated_at
  * @property \Illuminate\Support\Carbon|null $updated_at
  * @property \Illuminate\Support\Carbon|null $deleted_at
  * @property \Illuminate\Support\Carbon|null $deleted_at
  * @property \Illuminate\Support\Carbon|null $created_at
  * @property \Illuminate\Support\Carbon|null $created_at
@@ -25,9 +25,9 @@ use Illuminate\Database\Eloquent\Model;
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereDeletedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereDeletedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereId($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereId($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereImage($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereImage($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Banner whereIsOpened($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereName($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereName($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereSort($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereSort($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Banner whereStatus($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereUpdatedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Banner whereUpdatedAt($value)
  * @method static \Illuminate\Database\Query\Builder|Banner withTrashed()
  * @method static \Illuminate\Database\Query\Builder|Banner withTrashed()
  * @method static \Illuminate\Database\Query\Builder|Banner withoutTrashed()
  * @method static \Illuminate\Database\Query\Builder|Banner withoutTrashed()

+ 38 - 0
server/app/Models/Contact.php

@@ -0,0 +1,38 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * App\Models\Contact
+ *
+ * @property int $id
+ * @property string $name 名称
+ * @property string $phone_num 手机号
+ * @property string $wechat_num 微信号
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact newQuery()
+ * @method static \Illuminate\Database\Query\Builder|Contact onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact query()
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact wherePhoneNum($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Contact whereWechatNum($value)
+ * @method static \Illuminate\Database\Query\Builder|Contact withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|Contact withoutTrashed()
+ * @mixin \Eloquent
+ */
+class Contact extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+    }

+ 73 - 0
server/app/Models/Product.php

@@ -0,0 +1,73 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * App\Models\Product
+ *
+ * @property int $id
+ * @property string $name 名称
+ * @property string $cover_img 封面图
+ * @property string $cases 案例
+ * @property string $origin_price 原价
+ * @property string $sale_price 现价
+ * @property int $sort 排序越大越靠前
+ * @property int $is_opened 上架状态 0-下架 1-上架
+ * @property string $tech_param 集数参数文件
+ * @property string $cad_model CAD模型文件
+ * @property string $cad_design CAD设计文件
+ * @property string $su_model SU模型文件
+ * @property string $other 其他文件
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|Product newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|Product newQuery()
+ * @method static \Illuminate\Database\Query\Builder|Product onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|Product query()
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereCadDesign($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereCadModel($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereCases($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereCoverImg($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereIsOpened($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereOriginPrice($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereOther($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereSalePrice($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereSort($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereSuModel($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereTechParam($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Query\Builder|Product withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|Product withoutTrashed()
+ * @mixin \Eloquent
+ * @property int $cate_id 分类ID
+ * @property-read \App\Models\ProductCategory|null $cate
+ * @method static \Illuminate\Database\Eloquent\Builder|Product whereCateId($value)
+ */
+class Product extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+
+    protected $casts = [
+        'cases' => 'json',
+        'tech_param' => 'json',
+        'cad_model' => 'json',
+        'cad_design' => 'json',
+        'su_model' => 'json',
+        'other' => 'json',
+    ];
+
+    public function cate(): \Illuminate\Database\Eloquent\Relations\BelongsTo
+    {
+        return $this->belongsTo(ProductCategory::class,'cate_id','id');
+    }
+ }

+ 49 - 0
server/app/Models/ProductCategory.php

@@ -0,0 +1,49 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * App\Models\ProductCategory
+ *
+ * @property int $id
+ * @property string $name 名称
+ * @property int $level 分类级别
+ * @property int|null $pid 父id
+ * @property int $sort 排序越大越靠前
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory newQuery()
+ * @method static \Illuminate\Database\Query\Builder|ProductCategory onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory query()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory whereLevel($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory wherePid($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory whereSort($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductCategory whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Query\Builder|ProductCategory withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|ProductCategory withoutTrashed()
+ * @mixin \Eloquent
+ * @property-read ProductCategory|null $parent
+ */
+class ProductCategory extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+
+    protected $table = 'product_categories';
+
+    public function parent(): \Illuminate\Database\Eloquent\Relations\BelongsTo
+    {
+        return $this->belongsTo(ProductCategory::class,'pid','id');
+    }
+
+}

+ 52 - 0
server/app/Models/ProductHot.php

@@ -0,0 +1,52 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * App\Models\ProductHot
+ *
+ * @property int $id
+ * @property int $type 1- 普通用户 2-vip客户/设计师
+ * @property string|null $product_id 产品列表
+ * @property int $sort 排序越大越靠前
+ * @property int $is_opened 是否启用 0-否 1-是
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot newQuery()
+ * @method static \Illuminate\Database\Query\Builder|ProductHot onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot query()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereIsOpened($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereProductId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereSort($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereType($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Query\Builder|ProductHot withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|ProductHot withoutTrashed()
+ * @mixin \Eloquent
+ * @property string $cover_img 爆款图片
+ * @property-read \App\Models\Product|null $product
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductHot whereCoverImg($value)
+ */
+class ProductHot extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+
+    protected $table = 'product_hots';
+
+    public function product(): BelongsTo
+    {
+        return $this->belongsTo(Product::class,'product_id','id');
+    }
+
+}

+ 52 - 0
server/app/Models/ProductSpec.php

@@ -0,0 +1,52 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * App\Models\ProductSpec
+ *
+ * @property int $id
+ * @property int $group_id 分组ID
+ * @property string $name 名称
+ * @property string $cover_img 封面图
+ * @property string $origin_price 原价
+ * @property string $sale_price 现价
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec newQuery()
+ * @method static \Illuminate\Database\Query\Builder|ProductSpec onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec query()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereCoverImg($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereGroupId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereOriginPrice($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereSalePrice($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpec whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Query\Builder|ProductSpec withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|ProductSpec withoutTrashed()
+ * @mixin \Eloquent
+ * @property-read \App\Models\ProductSpecGroup|null $group
+ */
+class ProductSpec extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+
+    protected $table = 'product_specs';
+
+    public function group(): BelongsTo
+    {
+        return $this->belongsTo(ProductSpecGroup::class,'group_id','id');
+    }
+
+}

+ 56 - 0
server/app/Models/ProductSpecGroup.php

@@ -0,0 +1,56 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\Relations\HasMany;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+
+/**
+ * App\Models\ProductSpecGroup
+ *
+ * @property int $id
+ * @property int $product_id 产品ID
+ * @property string $name 名称
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup newQuery()
+ * @method static \Illuminate\Database\Query\Builder|ProductSpecGroup onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup query()
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup whereProductId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ProductSpecGroup whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Query\Builder|ProductSpecGroup withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|ProductSpecGroup withoutTrashed()
+ * @mixin \Eloquent
+ * @property-read \App\Models\Product|null $product
+ * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProductSpec[] $specs
+ * @property-read int|null $specs_count
+ */
+class ProductSpecGroup extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+
+    protected $table = 'product_spec_groups';
+
+
+    public function product(): BelongsTo
+    {
+        return $this->belongsTo(Product::class,'product_id','id');
+    }
+
+    public function specs(): HasMany
+    {
+        return $this->hasMany(ProductSpec::class,'group_id','id');
+    }
+
+}

+ 2 - 16
server/app/Models/Setting.php

@@ -2,6 +2,7 @@
 
 
 namespace App\Models;
 namespace App\Models;
 
 
+use Dcat\Admin\Traits\HasDateTimeFormatter;
 use Illuminate\Database\Eloquent\Factories\HasFactory;
 use Illuminate\Database\Eloquent\Factories\HasFactory;
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Database\Eloquent\Model;
 
 
@@ -11,36 +12,21 @@ use Illuminate\Database\Eloquent\Model;
  * @property int $id
  * @property int $id
  * @property string $name 小程序名称
  * @property string $name 小程序名称
  * @property string $logo 小程序logo
  * @property string $logo 小程序logo
- * @property string $contact 联系电话
- * @property string $tips 小程序提示
- * @property int $vip_role 会员权限
- * @property int $is_watch_auto_pay 观看自动支付
- * @property string $recharge_bg_img 封面图
- * @property string $recharge_button_txt 按钮文案
- * @property string|null $recharge_desc 充值说明
- * @property string|null $nav_seting 导航栏设置 json
  * @property \Illuminate\Support\Carbon|null $updated_at
  * @property \Illuminate\Support\Carbon|null $updated_at
  * @property string|null $deleted_at
  * @property string|null $deleted_at
  * @property \Illuminate\Support\Carbon|null $created_at
  * @property \Illuminate\Support\Carbon|null $created_at
  * @method static \Illuminate\Database\Eloquent\Builder|Setting newModelQuery()
  * @method static \Illuminate\Database\Eloquent\Builder|Setting newModelQuery()
  * @method static \Illuminate\Database\Eloquent\Builder|Setting newQuery()
  * @method static \Illuminate\Database\Eloquent\Builder|Setting newQuery()
  * @method static \Illuminate\Database\Eloquent\Builder|Setting query()
  * @method static \Illuminate\Database\Eloquent\Builder|Setting query()
- * @method static \Illuminate\Database\Eloquent\Builder|Setting whereContact($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereCreatedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereCreatedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereDeletedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereDeletedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereId($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Setting whereIsWatchAutoPay($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereLogo($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereLogo($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereName($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereName($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Setting whereNavSeting($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Setting whereRechargeBgImg($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Setting whereRechargeButtonTxt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Setting whereRechargeDesc($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Setting whereTips($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereUpdatedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|Setting whereUpdatedAt($value)
  * @mixin \Eloquent
  * @mixin \Eloquent
  */
  */
 class Setting extends Model
 class Setting extends Model
 {
 {
-    use HasFactory;
+    use HasFactory,HasDateTimeFormatter;
 }
 }

+ 38 - 0
server/app/Models/Showroom.php

@@ -0,0 +1,38 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * App\Models\Showroom
+ *
+ * @property int $id
+ * @property string $name 名称
+ * @property int $sort 排序越大越靠前
+ * @property int $is_opened 是否启用 0-否 1-是
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom newQuery()
+ * @method static \Illuminate\Database\Query\Builder|Showroom onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom query()
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom whereIsOpened($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom whereSort($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Showroom whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Query\Builder|Showroom withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|Showroom withoutTrashed()
+ * @mixin \Eloquent
+ */
+class Showroom extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+    }

+ 58 - 0
server/app/Models/ShowroomCase.php

@@ -0,0 +1,58 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * App\Models\ShowroomCase
+ *
+ * @property int $id
+ * @property int $showroom_id 展厅ID
+ * @property string $name 名称
+ * @property string|null $videos 案例视频
+ * @property string|null $images 案例图片
+ * @property int $sort 排序越大越靠前
+ * @property int $is_opened 是否启用 0-否 1-是
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property \Illuminate\Support\Carbon|null $deleted_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase newQuery()
+ * @method static \Illuminate\Database\Query\Builder|ShowroomCase onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase query()
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereImages($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereIsOpened($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereShowroomId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereSort($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShowroomCase whereVideos($value)
+ * @method static \Illuminate\Database\Query\Builder|ShowroomCase withTrashed()
+ * @method static \Illuminate\Database\Query\Builder|ShowroomCase withoutTrashed()
+ * @mixin \Eloquent
+ * @property-read \App\Models\Showroom|null $showroom
+ */
+class ShowroomCase extends Model
+{
+	use HasDateTimeFormatter;
+    use SoftDeletes;
+
+    protected $table = 'showroom_cases';
+
+    protected $casts = [
+        'videos' => 'json',
+        'images' => 'json',
+    ];
+
+    public function showroom(): \Illuminate\Database\Eloquent\Relations\BelongsTo
+    {
+        return $this->belongsTo(Showroom::class,'showroom_id','id');
+    }
+
+}

+ 12 - 38
server/app/Models/User.php

@@ -8,27 +8,30 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
 use Illuminate\Notifications\Notifiable;
 use Illuminate\Notifications\Notifiable;
 use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;
 use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;
 
 
+
 /**
 /**
  * App\Models\User
  * App\Models\User
  *
  *
  * @property int $id
  * @property int $id
- * @property string $nickname
- * @property string $avatar
- * @property string $password
+ * @property string $nickname 昵称
+ * @property string $avatar 头像
+ * @property string $password 密码
  * @property string $email
  * @property string $email
- * @property string $mobile
- * @property string $open_id
+ * @property string $mobile 手机号
+ * @property string $open_id openid
  * @property string $union_id
  * @property string $union_id
- * @property int $status
+ * @property int $status 状态 1-正常 0-禁用
  * @property string|null $email_verified_at
  * @property string|null $email_verified_at
  * @property string|null $remember_token
  * @property string|null $remember_token
+ * @property string|null $remark 备注
+ * @property int $type 用户类型 1-普通用户 2-VIP 3-设计师
  * @property \Illuminate\Support\Carbon|null $created_at
  * @property \Illuminate\Support\Carbon|null $created_at
  * @property \Illuminate\Support\Carbon|null $updated_at
  * @property \Illuminate\Support\Carbon|null $updated_at
+ * @property-read \App\Models\UserInfo|null $info
  * @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
  * @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
  * @property-read int|null $notifications_count
  * @property-read int|null $notifications_count
  * @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
  * @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
  * @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
  * @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
- * @method static \Illuminate\Database\Query\Builder|User onlyTrashed()
  * @method static \Illuminate\Database\Eloquent\Builder|User query()
  * @method static \Illuminate\Database\Eloquent\Builder|User query()
  * @method static \Illuminate\Database\Eloquent\Builder|User whereAvatar($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereAvatar($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value)
@@ -39,22 +42,13 @@ use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;
  * @method static \Illuminate\Database\Eloquent\Builder|User whereNickname($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereNickname($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereOpenId($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereOpenId($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|User whereRemark($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereStatus($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereStatus($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|User whereType($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereUnionId($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereUnionId($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value)
  * @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value)
- * @method static \Illuminate\Database\Query\Builder|User withTrashed()
- * @method static \Illuminate\Database\Query\Builder|User withoutTrashed()
  * @mixin \Eloquent
  * @mixin \Eloquent
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property-read \App\Models\UserInfo|null $info
- * @method static \Illuminate\Database\Eloquent\Builder|User whereDeletedAt($value)
- * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserConsumeRecord[] $consumeRecords
- * @property-read int|null $consume_records_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserRechargeRecord[] $rechargeRecords
- * @property-read int|null $recharge_records_count
- * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserVipRecord[] $vipRecords
- * @property-read int|null $vip_records_count
  */
  */
 class User extends Authenticatable implements JWTSubject
 class User extends Authenticatable implements JWTSubject
 {
 {
@@ -110,24 +104,4 @@ class User extends Authenticatable implements JWTSubject
     {
     {
         $this->attributes['password'] = bcrypt($value);
         $this->attributes['password'] = bcrypt($value);
     }
     }
-
-    public function info()
-    {
-        return $this->belongsTo(UserInfo::class,'id','user_id');
-    }
-
-    public function consumeRecords()
-    {
-        return $this->hasMany(UserConsumeRecord::class,'user_id','id');
-    }
-
-    public function rechargeRecords()
-    {
-        return $this->hasMany(UserRechargeRecord::class,'user_id','id');
-    }
-
-    public function vipRecords()
-    {
-        return $this->hasMany(UserVipRecord::class,'user_id','id');
-    }
 }
 }

+ 1 - 1
server/config/app.php

@@ -69,7 +69,7 @@ return [
     |
     |
     */
     */
 
 
-    'timezone' => 'Asia/Shanghai',
+    'timezone' => env('APP_TIMEZONE','UTC'),
 
 
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------

+ 5 - 35
server/config/global.php

@@ -4,41 +4,11 @@
  */
  */
 return [
 return [
     // 平台
     // 平台
-    'platform' => [1 => '抖音', 2 => '快手'],
-    // 短剧状态
-    'episode_status' => ['持续更新中','已完结'],
-    // 短剧免费
-    'episode_free' => ['付费','免费'],
-    // 短剧上架状态
-    'episode_opend' => ['已下架','销售中'],
-    // 是否状态
-    'bool_status' => ['否','是'],
-    // 会员权限
-    'vip_role' => [ 1 => '会员可查看所有视频', 2 => '会员只能查看指定视频'],
-    // 会员权限
-    'open_sign' => ['关闭签到', '开启签到'],
-    // 消费类型
-    'consume_type' => [1 => '充值', 2 => '消费', 3 => '签到'],
+    'user_type' => [ 1=>'普通用户', 2=>'VIP', 3=>'设计师'],
+    //
+    'user_status' => [ 0=>'禁用', 1=>'启用'],
     // 分类
     // 分类
     'cat_level' => [1 => '一级分类', 2 => '二级分类'],
     'cat_level' => [1 => '一级分类', 2 => '二级分类'],
-    // 支付状态
-    'order_status' => [
-        0 =>'未付款',
-        1 =>'已完成',
-        2 =>'已取消',
-        3 => '已关闭'
-    ],
-    // 签到设置
-    'sign_config' => [
-        1 => ['name' => '第一天', 'award' => 3],
-        2 => ['name' => '第二天', 'award' => 6],
-        3 => ['name' => '第三天', 'award' => 10],
-        4 => ['name' => '第四天', 'award' => 15],
-        5 => ['name' => '第五天', 'award' => 20],
-        6 => ['name' => '第六天', 'award' => 30],
-        7 => ['name' => '第七天', 'award' => 50],
-    ],
-    'pay_type' => [
-        1 => '微信支付', 2  => '支付宝支付', 10 => '抖音支付', 11 => '快手支付'
-    ],
+    // 是否状态
+    'bool_status' => ['否','是'],
 ];
 ];

+ 120 - 464
server/dcat_admin_ide_helper.php

@@ -12,12 +12,17 @@ namespace Dcat\Admin {
 
 
     /**
     /**
      * @property Grid\Column|Collection id
      * @property Grid\Column|Collection id
-     * @property Grid\Column|Collection name
+     * @property Grid\Column|Collection user_name
+     * @property Grid\Column|Collection account
+     * @property Grid\Column|Collection password
      * @property Grid\Column|Collection type
      * @property Grid\Column|Collection type
-     * @property Grid\Column|Collection version
-     * @property Grid\Column|Collection detail
+     * @property Grid\Column|Collection remark
+     * @property Grid\Column|Collection status
      * @property Grid\Column|Collection created_at
      * @property Grid\Column|Collection created_at
      * @property Grid\Column|Collection updated_at
      * @property Grid\Column|Collection updated_at
+     * @property Grid\Column|Collection name
+     * @property Grid\Column|Collection version
+     * @property Grid\Column|Collection detail
      * @property Grid\Column|Collection is_enabled
      * @property Grid\Column|Collection is_enabled
      * @property Grid\Column|Collection parent_id
      * @property Grid\Column|Collection parent_id
      * @property Grid\Column|Collection order
      * @property Grid\Column|Collection order
@@ -33,141 +38,55 @@ namespace Dcat\Admin {
      * @property Grid\Column|Collection user_id
      * @property Grid\Column|Collection user_id
      * @property Grid\Column|Collection value
      * @property Grid\Column|Collection value
      * @property Grid\Column|Collection username
      * @property Grid\Column|Collection username
-     * @property Grid\Column|Collection password
      * @property Grid\Column|Collection avatar
      * @property Grid\Column|Collection avatar
      * @property Grid\Column|Collection remember_token
      * @property Grid\Column|Collection remember_token
      * @property Grid\Column|Collection image
      * @property Grid\Column|Collection image
      * @property Grid\Column|Collection sort
      * @property Grid\Column|Collection sort
-     * @property Grid\Column|Collection status
+     * @property Grid\Column|Collection is_opened
      * @property Grid\Column|Collection deleted_at
      * @property Grid\Column|Collection deleted_at
-     * @property Grid\Column|Collection md5
-     * @property Grid\Column|Collection path
-     * @property Grid\Column|Collection url
-     * @property Grid\Column|Collection class
-     * @property Grid\Column|Collection size
-     * @property Grid\Column|Collection file_type
-     * @property Grid\Column|Collection download
-     * @property Grid\Column|Collection klass
-     * @property Grid\Column|Collection objid
-     * @property Grid\Column|Collection key
-     * @property Grid\Column|Collection expiration
-     * @property Grid\Column|Collection group
-     * @property Grid\Column|Collection comment
-     * @property Grid\Column|Collection pid
-     * @property Grid\Column|Collection short_name
-     * @property Grid\Column|Collection grade
-     * @property Grid\Column|Collection city_code
-     * @property Grid\Column|Collection zip_code
-     * @property Grid\Column|Collection merger_name
-     * @property Grid\Column|Collection lng
-     * @property Grid\Column|Collection lat
-     * @property Grid\Column|Collection pinyin
-     * @property Grid\Column|Collection uuid
-     * @property Grid\Column|Collection connection
-     * @property Grid\Column|Collection queue
-     * @property Grid\Column|Collection payload
-     * @property Grid\Column|Collection exception
-     * @property Grid\Column|Collection failed_at
      * @property Grid\Column|Collection migration
      * @property Grid\Column|Collection migration
      * @property Grid\Column|Collection batch
      * @property Grid\Column|Collection batch
-     * @property Grid\Column|Collection category_id
-     * @property Grid\Column|Collection platform
-     * @property Grid\Column|Collection cover_img
-     * @property Grid\Column|Collection is_opend
-     * @property Grid\Column|Collection is_vip_watch
-     * @property Grid\Column|Collection share_count
-     * @property Grid\Column|Collection free_episodes
-     * @property Grid\Column|Collection paid_episodes
-     * @property Grid\Column|Collection episodes_price
-     * @property Grid\Column|Collection episodes_id
-     * @property Grid\Column|Collection is_free
-     * @property Grid\Column|Collection sale_price
-     * @property Grid\Column|Collection answer
-     * @property Grid\Column|Collection look_num
+     * @property Grid\Column|Collection phone_num
+     * @property Grid\Column|Collection wechat_num
      * @property Grid\Column|Collection email
      * @property Grid\Column|Collection email
      * @property Grid\Column|Collection token
      * @property Grid\Column|Collection token
-     * @property Grid\Column|Collection pay_id
-     * @property Grid\Column|Collection pay_type
-     * @property Grid\Column|Collection pay_dt
-     * @property Grid\Column|Collection order_fee
-     * @property Grid\Column|Collection discount_fee
-     * @property Grid\Column|Collection handling_fee
-     * @property Grid\Column|Collection prepay_id
-     * @property Grid\Column|Collection serial_number
-     * @property Grid\Column|Collection pay_error
-     * @property Grid\Column|Collection setting_id
-     * @property Grid\Column|Collection mini_app_id
-     * @property Grid\Column|Collection mini_app_key
-     * @property Grid\Column|Collection wechat_app_id
-     * @property Grid\Column|Collection wechat_app_key
-     * @property Grid\Column|Collection wechat_apiclient_key
-     * @property Grid\Column|Collection wechat_apiclient_cert
-     * @property Grid\Column|Collection alipay_app_id
-     * @property Grid\Column|Collection alipay_app_key
-     * @property Grid\Column|Collection alipay_app_secret
-     * @property Grid\Column|Collection douyin_app_id
-     * @property Grid\Column|Collection douyin_app_key
-     * @property Grid\Column|Collection douyin_app_secret
-     * @property Grid\Column|Collection tokenable_type
-     * @property Grid\Column|Collection tokenable_id
-     * @property Grid\Column|Collection abilities
-     * @property Grid\Column|Collection last_used_at
-     * @property Grid\Column|Collection price
-     * @property Grid\Column|Collection gold
-     * @property Grid\Column|Collection gift
-     * @property Grid\Column|Collection code
-     * @property Grid\Column|Collection parent_code
-     * @property Grid\Column|Collection full_name
+     * @property Grid\Column|Collection level
+     * @property Grid\Column|Collection pid
+     * @property Grid\Column|Collection cover_img
+     * @property Grid\Column|Collection product_id
+     * @property Grid\Column|Collection group_id
+     * @property Grid\Column|Collection origin_price
+     * @property Grid\Column|Collection sale_price
+     * @property Grid\Column|Collection cate_id
+     * @property Grid\Column|Collection cases
+     * @property Grid\Column|Collection tech_param
+     * @property Grid\Column|Collection cad_model
+     * @property Grid\Column|Collection cad_design
+     * @property Grid\Column|Collection su_model
+     * @property Grid\Column|Collection other
      * @property Grid\Column|Collection logo
      * @property Grid\Column|Collection logo
-     * @property Grid\Column|Collection contact
-     * @property Grid\Column|Collection tips
-     * @property Grid\Column|Collection vip_role
-     * @property Grid\Column|Collection is_open_sign
-     * @property Grid\Column|Collection is_watch_auto_pay
-     * @property Grid\Column|Collection recharge_bg_img
-     * @property Grid\Column|Collection recharge_button_txt
-     * @property Grid\Column|Collection recharge_desc
-     * @property Grid\Column|Collection prefix
-     * @property Grid\Column|Collection event
-     * @property Grid\Column|Collection mobile
-     * @property Grid\Column|Collection verify_key
-     * @property Grid\Column|Collection sms_code
-     * @property Grid\Column|Collection sms_result
-     * @property Grid\Column|Collection episode_id
-     * @property Grid\Column|Collection before
-     * @property Grid\Column|Collection change
-     * @property Grid\Column|Collection current
-     * @property Grid\Column|Collection remark
-     * @property Grid\Column|Collection order_id
-     * @property Grid\Column|Collection list_id
-     * @property Grid\Column|Collection discount
-     * @property Grid\Column|Collection statust
-     * @property Grid\Column|Collection content
-     * @property Grid\Column|Collection file
-     * @property Grid\Column|Collection integral
-     * @property Grid\Column|Collection total_integral
-     * @property Grid\Column|Collection is_vip
-     * @property Grid\Column|Collection start_at
-     * @property Grid\Column|Collection end_at
-     * @property Grid\Column|Collection opend_at
-     * @property Grid\Column|Collection recharge_id
-     * @property Grid\Column|Collection combo_id
-     * @property Grid\Column|Collection desc
-     * @property Grid\Column|Collection date
-     * @property Grid\Column|Collection award
-     * @property Grid\Column|Collection valid_day
+     * @property Grid\Column|Collection showroom_id
+     * @property Grid\Column|Collection videos
+     * @property Grid\Column|Collection images
      * @property Grid\Column|Collection nickname
      * @property Grid\Column|Collection nickname
+     * @property Grid\Column|Collection mobile
      * @property Grid\Column|Collection open_id
      * @property Grid\Column|Collection open_id
      * @property Grid\Column|Collection union_id
      * @property Grid\Column|Collection union_id
+     * @property Grid\Column|Collection account_id
      * @property Grid\Column|Collection email_verified_at
      * @property Grid\Column|Collection email_verified_at
      *
      *
      * @method Grid\Column|Collection id(string $label = null)
      * @method Grid\Column|Collection id(string $label = null)
-     * @method Grid\Column|Collection name(string $label = null)
+     * @method Grid\Column|Collection user_name(string $label = null)
+     * @method Grid\Column|Collection account(string $label = null)
+     * @method Grid\Column|Collection password(string $label = null)
      * @method Grid\Column|Collection type(string $label = null)
      * @method Grid\Column|Collection type(string $label = null)
-     * @method Grid\Column|Collection version(string $label = null)
-     * @method Grid\Column|Collection detail(string $label = null)
+     * @method Grid\Column|Collection remark(string $label = null)
+     * @method Grid\Column|Collection status(string $label = null)
      * @method Grid\Column|Collection created_at(string $label = null)
      * @method Grid\Column|Collection created_at(string $label = null)
      * @method Grid\Column|Collection updated_at(string $label = null)
      * @method Grid\Column|Collection updated_at(string $label = null)
+     * @method Grid\Column|Collection name(string $label = null)
+     * @method Grid\Column|Collection version(string $label = null)
+     * @method Grid\Column|Collection detail(string $label = null)
      * @method Grid\Column|Collection is_enabled(string $label = null)
      * @method Grid\Column|Collection is_enabled(string $label = null)
      * @method Grid\Column|Collection parent_id(string $label = null)
      * @method Grid\Column|Collection parent_id(string $label = null)
      * @method Grid\Column|Collection order(string $label = null)
      * @method Grid\Column|Collection order(string $label = null)
@@ -183,132 +102,41 @@ namespace Dcat\Admin {
      * @method Grid\Column|Collection user_id(string $label = null)
      * @method Grid\Column|Collection user_id(string $label = null)
      * @method Grid\Column|Collection value(string $label = null)
      * @method Grid\Column|Collection value(string $label = null)
      * @method Grid\Column|Collection username(string $label = null)
      * @method Grid\Column|Collection username(string $label = null)
-     * @method Grid\Column|Collection password(string $label = null)
      * @method Grid\Column|Collection avatar(string $label = null)
      * @method Grid\Column|Collection avatar(string $label = null)
      * @method Grid\Column|Collection remember_token(string $label = null)
      * @method Grid\Column|Collection remember_token(string $label = null)
      * @method Grid\Column|Collection image(string $label = null)
      * @method Grid\Column|Collection image(string $label = null)
      * @method Grid\Column|Collection sort(string $label = null)
      * @method Grid\Column|Collection sort(string $label = null)
-     * @method Grid\Column|Collection status(string $label = null)
+     * @method Grid\Column|Collection is_opened(string $label = null)
      * @method Grid\Column|Collection deleted_at(string $label = null)
      * @method Grid\Column|Collection deleted_at(string $label = null)
-     * @method Grid\Column|Collection md5(string $label = null)
-     * @method Grid\Column|Collection path(string $label = null)
-     * @method Grid\Column|Collection url(string $label = null)
-     * @method Grid\Column|Collection class(string $label = null)
-     * @method Grid\Column|Collection size(string $label = null)
-     * @method Grid\Column|Collection file_type(string $label = null)
-     * @method Grid\Column|Collection download(string $label = null)
-     * @method Grid\Column|Collection klass(string $label = null)
-     * @method Grid\Column|Collection objid(string $label = null)
-     * @method Grid\Column|Collection key(string $label = null)
-     * @method Grid\Column|Collection expiration(string $label = null)
-     * @method Grid\Column|Collection group(string $label = null)
-     * @method Grid\Column|Collection comment(string $label = null)
-     * @method Grid\Column|Collection pid(string $label = null)
-     * @method Grid\Column|Collection short_name(string $label = null)
-     * @method Grid\Column|Collection grade(string $label = null)
-     * @method Grid\Column|Collection city_code(string $label = null)
-     * @method Grid\Column|Collection zip_code(string $label = null)
-     * @method Grid\Column|Collection merger_name(string $label = null)
-     * @method Grid\Column|Collection lng(string $label = null)
-     * @method Grid\Column|Collection lat(string $label = null)
-     * @method Grid\Column|Collection pinyin(string $label = null)
-     * @method Grid\Column|Collection uuid(string $label = null)
-     * @method Grid\Column|Collection connection(string $label = null)
-     * @method Grid\Column|Collection queue(string $label = null)
-     * @method Grid\Column|Collection payload(string $label = null)
-     * @method Grid\Column|Collection exception(string $label = null)
-     * @method Grid\Column|Collection failed_at(string $label = null)
      * @method Grid\Column|Collection migration(string $label = null)
      * @method Grid\Column|Collection migration(string $label = null)
      * @method Grid\Column|Collection batch(string $label = null)
      * @method Grid\Column|Collection batch(string $label = null)
-     * @method Grid\Column|Collection category_id(string $label = null)
-     * @method Grid\Column|Collection platform(string $label = null)
-     * @method Grid\Column|Collection cover_img(string $label = null)
-     * @method Grid\Column|Collection is_opend(string $label = null)
-     * @method Grid\Column|Collection is_vip_watch(string $label = null)
-     * @method Grid\Column|Collection share_count(string $label = null)
-     * @method Grid\Column|Collection free_episodes(string $label = null)
-     * @method Grid\Column|Collection paid_episodes(string $label = null)
-     * @method Grid\Column|Collection episodes_price(string $label = null)
-     * @method Grid\Column|Collection episodes_id(string $label = null)
-     * @method Grid\Column|Collection is_free(string $label = null)
-     * @method Grid\Column|Collection sale_price(string $label = null)
-     * @method Grid\Column|Collection answer(string $label = null)
-     * @method Grid\Column|Collection look_num(string $label = null)
+     * @method Grid\Column|Collection phone_num(string $label = null)
+     * @method Grid\Column|Collection wechat_num(string $label = null)
      * @method Grid\Column|Collection email(string $label = null)
      * @method Grid\Column|Collection email(string $label = null)
      * @method Grid\Column|Collection token(string $label = null)
      * @method Grid\Column|Collection token(string $label = null)
-     * @method Grid\Column|Collection pay_id(string $label = null)
-     * @method Grid\Column|Collection pay_type(string $label = null)
-     * @method Grid\Column|Collection pay_dt(string $label = null)
-     * @method Grid\Column|Collection order_fee(string $label = null)
-     * @method Grid\Column|Collection discount_fee(string $label = null)
-     * @method Grid\Column|Collection handling_fee(string $label = null)
-     * @method Grid\Column|Collection prepay_id(string $label = null)
-     * @method Grid\Column|Collection serial_number(string $label = null)
-     * @method Grid\Column|Collection pay_error(string $label = null)
-     * @method Grid\Column|Collection setting_id(string $label = null)
-     * @method Grid\Column|Collection mini_app_id(string $label = null)
-     * @method Grid\Column|Collection mini_app_key(string $label = null)
-     * @method Grid\Column|Collection wechat_app_id(string $label = null)
-     * @method Grid\Column|Collection wechat_app_key(string $label = null)
-     * @method Grid\Column|Collection wechat_apiclient_key(string $label = null)
-     * @method Grid\Column|Collection wechat_apiclient_cert(string $label = null)
-     * @method Grid\Column|Collection alipay_app_id(string $label = null)
-     * @method Grid\Column|Collection alipay_app_key(string $label = null)
-     * @method Grid\Column|Collection alipay_app_secret(string $label = null)
-     * @method Grid\Column|Collection douyin_app_id(string $label = null)
-     * @method Grid\Column|Collection douyin_app_key(string $label = null)
-     * @method Grid\Column|Collection douyin_app_secret(string $label = null)
-     * @method Grid\Column|Collection tokenable_type(string $label = null)
-     * @method Grid\Column|Collection tokenable_id(string $label = null)
-     * @method Grid\Column|Collection abilities(string $label = null)
-     * @method Grid\Column|Collection last_used_at(string $label = null)
-     * @method Grid\Column|Collection price(string $label = null)
-     * @method Grid\Column|Collection gold(string $label = null)
-     * @method Grid\Column|Collection gift(string $label = null)
-     * @method Grid\Column|Collection code(string $label = null)
-     * @method Grid\Column|Collection parent_code(string $label = null)
-     * @method Grid\Column|Collection full_name(string $label = null)
+     * @method Grid\Column|Collection level(string $label = null)
+     * @method Grid\Column|Collection pid(string $label = null)
+     * @method Grid\Column|Collection cover_img(string $label = null)
+     * @method Grid\Column|Collection product_id(string $label = null)
+     * @method Grid\Column|Collection group_id(string $label = null)
+     * @method Grid\Column|Collection origin_price(string $label = null)
+     * @method Grid\Column|Collection sale_price(string $label = null)
+     * @method Grid\Column|Collection cate_id(string $label = null)
+     * @method Grid\Column|Collection cases(string $label = null)
+     * @method Grid\Column|Collection tech_param(string $label = null)
+     * @method Grid\Column|Collection cad_model(string $label = null)
+     * @method Grid\Column|Collection cad_design(string $label = null)
+     * @method Grid\Column|Collection su_model(string $label = null)
+     * @method Grid\Column|Collection other(string $label = null)
      * @method Grid\Column|Collection logo(string $label = null)
      * @method Grid\Column|Collection logo(string $label = null)
-     * @method Grid\Column|Collection contact(string $label = null)
-     * @method Grid\Column|Collection tips(string $label = null)
-     * @method Grid\Column|Collection vip_role(string $label = null)
-     * @method Grid\Column|Collection is_open_sign(string $label = null)
-     * @method Grid\Column|Collection is_watch_auto_pay(string $label = null)
-     * @method Grid\Column|Collection recharge_bg_img(string $label = null)
-     * @method Grid\Column|Collection recharge_button_txt(string $label = null)
-     * @method Grid\Column|Collection recharge_desc(string $label = null)
-     * @method Grid\Column|Collection prefix(string $label = null)
-     * @method Grid\Column|Collection event(string $label = null)
-     * @method Grid\Column|Collection mobile(string $label = null)
-     * @method Grid\Column|Collection verify_key(string $label = null)
-     * @method Grid\Column|Collection sms_code(string $label = null)
-     * @method Grid\Column|Collection sms_result(string $label = null)
-     * @method Grid\Column|Collection episode_id(string $label = null)
-     * @method Grid\Column|Collection before(string $label = null)
-     * @method Grid\Column|Collection change(string $label = null)
-     * @method Grid\Column|Collection current(string $label = null)
-     * @method Grid\Column|Collection remark(string $label = null)
-     * @method Grid\Column|Collection order_id(string $label = null)
-     * @method Grid\Column|Collection list_id(string $label = null)
-     * @method Grid\Column|Collection discount(string $label = null)
-     * @method Grid\Column|Collection statust(string $label = null)
-     * @method Grid\Column|Collection content(string $label = null)
-     * @method Grid\Column|Collection file(string $label = null)
-     * @method Grid\Column|Collection integral(string $label = null)
-     * @method Grid\Column|Collection total_integral(string $label = null)
-     * @method Grid\Column|Collection is_vip(string $label = null)
-     * @method Grid\Column|Collection start_at(string $label = null)
-     * @method Grid\Column|Collection end_at(string $label = null)
-     * @method Grid\Column|Collection opend_at(string $label = null)
-     * @method Grid\Column|Collection recharge_id(string $label = null)
-     * @method Grid\Column|Collection combo_id(string $label = null)
-     * @method Grid\Column|Collection desc(string $label = null)
-     * @method Grid\Column|Collection date(string $label = null)
-     * @method Grid\Column|Collection award(string $label = null)
-     * @method Grid\Column|Collection valid_day(string $label = null)
+     * @method Grid\Column|Collection showroom_id(string $label = null)
+     * @method Grid\Column|Collection videos(string $label = null)
+     * @method Grid\Column|Collection images(string $label = null)
      * @method Grid\Column|Collection nickname(string $label = null)
      * @method Grid\Column|Collection nickname(string $label = null)
+     * @method Grid\Column|Collection mobile(string $label = null)
      * @method Grid\Column|Collection open_id(string $label = null)
      * @method Grid\Column|Collection open_id(string $label = null)
      * @method Grid\Column|Collection union_id(string $label = null)
      * @method Grid\Column|Collection union_id(string $label = null)
+     * @method Grid\Column|Collection account_id(string $label = null)
      * @method Grid\Column|Collection email_verified_at(string $label = null)
      * @method Grid\Column|Collection email_verified_at(string $label = null)
      */
      */
     class Grid {}
     class Grid {}
@@ -317,12 +145,17 @@ namespace Dcat\Admin {
 
 
     /**
     /**
      * @property Show\Field|Collection id
      * @property Show\Field|Collection id
-     * @property Show\Field|Collection name
+     * @property Show\Field|Collection user_name
+     * @property Show\Field|Collection account
+     * @property Show\Field|Collection password
      * @property Show\Field|Collection type
      * @property Show\Field|Collection type
-     * @property Show\Field|Collection version
-     * @property Show\Field|Collection detail
+     * @property Show\Field|Collection remark
+     * @property Show\Field|Collection status
      * @property Show\Field|Collection created_at
      * @property Show\Field|Collection created_at
      * @property Show\Field|Collection updated_at
      * @property Show\Field|Collection updated_at
+     * @property Show\Field|Collection name
+     * @property Show\Field|Collection version
+     * @property Show\Field|Collection detail
      * @property Show\Field|Collection is_enabled
      * @property Show\Field|Collection is_enabled
      * @property Show\Field|Collection parent_id
      * @property Show\Field|Collection parent_id
      * @property Show\Field|Collection order
      * @property Show\Field|Collection order
@@ -338,141 +171,55 @@ namespace Dcat\Admin {
      * @property Show\Field|Collection user_id
      * @property Show\Field|Collection user_id
      * @property Show\Field|Collection value
      * @property Show\Field|Collection value
      * @property Show\Field|Collection username
      * @property Show\Field|Collection username
-     * @property Show\Field|Collection password
      * @property Show\Field|Collection avatar
      * @property Show\Field|Collection avatar
      * @property Show\Field|Collection remember_token
      * @property Show\Field|Collection remember_token
      * @property Show\Field|Collection image
      * @property Show\Field|Collection image
      * @property Show\Field|Collection sort
      * @property Show\Field|Collection sort
-     * @property Show\Field|Collection status
+     * @property Show\Field|Collection is_opened
      * @property Show\Field|Collection deleted_at
      * @property Show\Field|Collection deleted_at
-     * @property Show\Field|Collection md5
-     * @property Show\Field|Collection path
-     * @property Show\Field|Collection url
-     * @property Show\Field|Collection class
-     * @property Show\Field|Collection size
-     * @property Show\Field|Collection file_type
-     * @property Show\Field|Collection download
-     * @property Show\Field|Collection klass
-     * @property Show\Field|Collection objid
-     * @property Show\Field|Collection key
-     * @property Show\Field|Collection expiration
-     * @property Show\Field|Collection group
-     * @property Show\Field|Collection comment
-     * @property Show\Field|Collection pid
-     * @property Show\Field|Collection short_name
-     * @property Show\Field|Collection grade
-     * @property Show\Field|Collection city_code
-     * @property Show\Field|Collection zip_code
-     * @property Show\Field|Collection merger_name
-     * @property Show\Field|Collection lng
-     * @property Show\Field|Collection lat
-     * @property Show\Field|Collection pinyin
-     * @property Show\Field|Collection uuid
-     * @property Show\Field|Collection connection
-     * @property Show\Field|Collection queue
-     * @property Show\Field|Collection payload
-     * @property Show\Field|Collection exception
-     * @property Show\Field|Collection failed_at
      * @property Show\Field|Collection migration
      * @property Show\Field|Collection migration
      * @property Show\Field|Collection batch
      * @property Show\Field|Collection batch
-     * @property Show\Field|Collection category_id
-     * @property Show\Field|Collection platform
-     * @property Show\Field|Collection cover_img
-     * @property Show\Field|Collection is_opend
-     * @property Show\Field|Collection is_vip_watch
-     * @property Show\Field|Collection share_count
-     * @property Show\Field|Collection free_episodes
-     * @property Show\Field|Collection paid_episodes
-     * @property Show\Field|Collection episodes_price
-     * @property Show\Field|Collection episodes_id
-     * @property Show\Field|Collection is_free
-     * @property Show\Field|Collection sale_price
-     * @property Show\Field|Collection answer
-     * @property Show\Field|Collection look_num
+     * @property Show\Field|Collection phone_num
+     * @property Show\Field|Collection wechat_num
      * @property Show\Field|Collection email
      * @property Show\Field|Collection email
      * @property Show\Field|Collection token
      * @property Show\Field|Collection token
-     * @property Show\Field|Collection pay_id
-     * @property Show\Field|Collection pay_type
-     * @property Show\Field|Collection pay_dt
-     * @property Show\Field|Collection order_fee
-     * @property Show\Field|Collection discount_fee
-     * @property Show\Field|Collection handling_fee
-     * @property Show\Field|Collection prepay_id
-     * @property Show\Field|Collection serial_number
-     * @property Show\Field|Collection pay_error
-     * @property Show\Field|Collection setting_id
-     * @property Show\Field|Collection mini_app_id
-     * @property Show\Field|Collection mini_app_key
-     * @property Show\Field|Collection wechat_app_id
-     * @property Show\Field|Collection wechat_app_key
-     * @property Show\Field|Collection wechat_apiclient_key
-     * @property Show\Field|Collection wechat_apiclient_cert
-     * @property Show\Field|Collection alipay_app_id
-     * @property Show\Field|Collection alipay_app_key
-     * @property Show\Field|Collection alipay_app_secret
-     * @property Show\Field|Collection douyin_app_id
-     * @property Show\Field|Collection douyin_app_key
-     * @property Show\Field|Collection douyin_app_secret
-     * @property Show\Field|Collection tokenable_type
-     * @property Show\Field|Collection tokenable_id
-     * @property Show\Field|Collection abilities
-     * @property Show\Field|Collection last_used_at
-     * @property Show\Field|Collection price
-     * @property Show\Field|Collection gold
-     * @property Show\Field|Collection gift
-     * @property Show\Field|Collection code
-     * @property Show\Field|Collection parent_code
-     * @property Show\Field|Collection full_name
+     * @property Show\Field|Collection level
+     * @property Show\Field|Collection pid
+     * @property Show\Field|Collection cover_img
+     * @property Show\Field|Collection product_id
+     * @property Show\Field|Collection group_id
+     * @property Show\Field|Collection origin_price
+     * @property Show\Field|Collection sale_price
+     * @property Show\Field|Collection cate_id
+     * @property Show\Field|Collection cases
+     * @property Show\Field|Collection tech_param
+     * @property Show\Field|Collection cad_model
+     * @property Show\Field|Collection cad_design
+     * @property Show\Field|Collection su_model
+     * @property Show\Field|Collection other
      * @property Show\Field|Collection logo
      * @property Show\Field|Collection logo
-     * @property Show\Field|Collection contact
-     * @property Show\Field|Collection tips
-     * @property Show\Field|Collection vip_role
-     * @property Show\Field|Collection is_open_sign
-     * @property Show\Field|Collection is_watch_auto_pay
-     * @property Show\Field|Collection recharge_bg_img
-     * @property Show\Field|Collection recharge_button_txt
-     * @property Show\Field|Collection recharge_desc
-     * @property Show\Field|Collection prefix
-     * @property Show\Field|Collection event
-     * @property Show\Field|Collection mobile
-     * @property Show\Field|Collection verify_key
-     * @property Show\Field|Collection sms_code
-     * @property Show\Field|Collection sms_result
-     * @property Show\Field|Collection episode_id
-     * @property Show\Field|Collection before
-     * @property Show\Field|Collection change
-     * @property Show\Field|Collection current
-     * @property Show\Field|Collection remark
-     * @property Show\Field|Collection order_id
-     * @property Show\Field|Collection list_id
-     * @property Show\Field|Collection discount
-     * @property Show\Field|Collection statust
-     * @property Show\Field|Collection content
-     * @property Show\Field|Collection file
-     * @property Show\Field|Collection integral
-     * @property Show\Field|Collection total_integral
-     * @property Show\Field|Collection is_vip
-     * @property Show\Field|Collection start_at
-     * @property Show\Field|Collection end_at
-     * @property Show\Field|Collection opend_at
-     * @property Show\Field|Collection recharge_id
-     * @property Show\Field|Collection combo_id
-     * @property Show\Field|Collection desc
-     * @property Show\Field|Collection date
-     * @property Show\Field|Collection award
-     * @property Show\Field|Collection valid_day
+     * @property Show\Field|Collection showroom_id
+     * @property Show\Field|Collection videos
+     * @property Show\Field|Collection images
      * @property Show\Field|Collection nickname
      * @property Show\Field|Collection nickname
+     * @property Show\Field|Collection mobile
      * @property Show\Field|Collection open_id
      * @property Show\Field|Collection open_id
      * @property Show\Field|Collection union_id
      * @property Show\Field|Collection union_id
+     * @property Show\Field|Collection account_id
      * @property Show\Field|Collection email_verified_at
      * @property Show\Field|Collection email_verified_at
      *
      *
      * @method Show\Field|Collection id(string $label = null)
      * @method Show\Field|Collection id(string $label = null)
-     * @method Show\Field|Collection name(string $label = null)
+     * @method Show\Field|Collection user_name(string $label = null)
+     * @method Show\Field|Collection account(string $label = null)
+     * @method Show\Field|Collection password(string $label = null)
      * @method Show\Field|Collection type(string $label = null)
      * @method Show\Field|Collection type(string $label = null)
-     * @method Show\Field|Collection version(string $label = null)
-     * @method Show\Field|Collection detail(string $label = null)
+     * @method Show\Field|Collection remark(string $label = null)
+     * @method Show\Field|Collection status(string $label = null)
      * @method Show\Field|Collection created_at(string $label = null)
      * @method Show\Field|Collection created_at(string $label = null)
      * @method Show\Field|Collection updated_at(string $label = null)
      * @method Show\Field|Collection updated_at(string $label = null)
+     * @method Show\Field|Collection name(string $label = null)
+     * @method Show\Field|Collection version(string $label = null)
+     * @method Show\Field|Collection detail(string $label = null)
      * @method Show\Field|Collection is_enabled(string $label = null)
      * @method Show\Field|Collection is_enabled(string $label = null)
      * @method Show\Field|Collection parent_id(string $label = null)
      * @method Show\Field|Collection parent_id(string $label = null)
      * @method Show\Field|Collection order(string $label = null)
      * @method Show\Field|Collection order(string $label = null)
@@ -488,132 +235,41 @@ namespace Dcat\Admin {
      * @method Show\Field|Collection user_id(string $label = null)
      * @method Show\Field|Collection user_id(string $label = null)
      * @method Show\Field|Collection value(string $label = null)
      * @method Show\Field|Collection value(string $label = null)
      * @method Show\Field|Collection username(string $label = null)
      * @method Show\Field|Collection username(string $label = null)
-     * @method Show\Field|Collection password(string $label = null)
      * @method Show\Field|Collection avatar(string $label = null)
      * @method Show\Field|Collection avatar(string $label = null)
      * @method Show\Field|Collection remember_token(string $label = null)
      * @method Show\Field|Collection remember_token(string $label = null)
      * @method Show\Field|Collection image(string $label = null)
      * @method Show\Field|Collection image(string $label = null)
      * @method Show\Field|Collection sort(string $label = null)
      * @method Show\Field|Collection sort(string $label = null)
-     * @method Show\Field|Collection status(string $label = null)
+     * @method Show\Field|Collection is_opened(string $label = null)
      * @method Show\Field|Collection deleted_at(string $label = null)
      * @method Show\Field|Collection deleted_at(string $label = null)
-     * @method Show\Field|Collection md5(string $label = null)
-     * @method Show\Field|Collection path(string $label = null)
-     * @method Show\Field|Collection url(string $label = null)
-     * @method Show\Field|Collection class(string $label = null)
-     * @method Show\Field|Collection size(string $label = null)
-     * @method Show\Field|Collection file_type(string $label = null)
-     * @method Show\Field|Collection download(string $label = null)
-     * @method Show\Field|Collection klass(string $label = null)
-     * @method Show\Field|Collection objid(string $label = null)
-     * @method Show\Field|Collection key(string $label = null)
-     * @method Show\Field|Collection expiration(string $label = null)
-     * @method Show\Field|Collection group(string $label = null)
-     * @method Show\Field|Collection comment(string $label = null)
-     * @method Show\Field|Collection pid(string $label = null)
-     * @method Show\Field|Collection short_name(string $label = null)
-     * @method Show\Field|Collection grade(string $label = null)
-     * @method Show\Field|Collection city_code(string $label = null)
-     * @method Show\Field|Collection zip_code(string $label = null)
-     * @method Show\Field|Collection merger_name(string $label = null)
-     * @method Show\Field|Collection lng(string $label = null)
-     * @method Show\Field|Collection lat(string $label = null)
-     * @method Show\Field|Collection pinyin(string $label = null)
-     * @method Show\Field|Collection uuid(string $label = null)
-     * @method Show\Field|Collection connection(string $label = null)
-     * @method Show\Field|Collection queue(string $label = null)
-     * @method Show\Field|Collection payload(string $label = null)
-     * @method Show\Field|Collection exception(string $label = null)
-     * @method Show\Field|Collection failed_at(string $label = null)
      * @method Show\Field|Collection migration(string $label = null)
      * @method Show\Field|Collection migration(string $label = null)
      * @method Show\Field|Collection batch(string $label = null)
      * @method Show\Field|Collection batch(string $label = null)
-     * @method Show\Field|Collection category_id(string $label = null)
-     * @method Show\Field|Collection platform(string $label = null)
-     * @method Show\Field|Collection cover_img(string $label = null)
-     * @method Show\Field|Collection is_opend(string $label = null)
-     * @method Show\Field|Collection is_vip_watch(string $label = null)
-     * @method Show\Field|Collection share_count(string $label = null)
-     * @method Show\Field|Collection free_episodes(string $label = null)
-     * @method Show\Field|Collection paid_episodes(string $label = null)
-     * @method Show\Field|Collection episodes_price(string $label = null)
-     * @method Show\Field|Collection episodes_id(string $label = null)
-     * @method Show\Field|Collection is_free(string $label = null)
-     * @method Show\Field|Collection sale_price(string $label = null)
-     * @method Show\Field|Collection answer(string $label = null)
-     * @method Show\Field|Collection look_num(string $label = null)
+     * @method Show\Field|Collection phone_num(string $label = null)
+     * @method Show\Field|Collection wechat_num(string $label = null)
      * @method Show\Field|Collection email(string $label = null)
      * @method Show\Field|Collection email(string $label = null)
      * @method Show\Field|Collection token(string $label = null)
      * @method Show\Field|Collection token(string $label = null)
-     * @method Show\Field|Collection pay_id(string $label = null)
-     * @method Show\Field|Collection pay_type(string $label = null)
-     * @method Show\Field|Collection pay_dt(string $label = null)
-     * @method Show\Field|Collection order_fee(string $label = null)
-     * @method Show\Field|Collection discount_fee(string $label = null)
-     * @method Show\Field|Collection handling_fee(string $label = null)
-     * @method Show\Field|Collection prepay_id(string $label = null)
-     * @method Show\Field|Collection serial_number(string $label = null)
-     * @method Show\Field|Collection pay_error(string $label = null)
-     * @method Show\Field|Collection setting_id(string $label = null)
-     * @method Show\Field|Collection mini_app_id(string $label = null)
-     * @method Show\Field|Collection mini_app_key(string $label = null)
-     * @method Show\Field|Collection wechat_app_id(string $label = null)
-     * @method Show\Field|Collection wechat_app_key(string $label = null)
-     * @method Show\Field|Collection wechat_apiclient_key(string $label = null)
-     * @method Show\Field|Collection wechat_apiclient_cert(string $label = null)
-     * @method Show\Field|Collection alipay_app_id(string $label = null)
-     * @method Show\Field|Collection alipay_app_key(string $label = null)
-     * @method Show\Field|Collection alipay_app_secret(string $label = null)
-     * @method Show\Field|Collection douyin_app_id(string $label = null)
-     * @method Show\Field|Collection douyin_app_key(string $label = null)
-     * @method Show\Field|Collection douyin_app_secret(string $label = null)
-     * @method Show\Field|Collection tokenable_type(string $label = null)
-     * @method Show\Field|Collection tokenable_id(string $label = null)
-     * @method Show\Field|Collection abilities(string $label = null)
-     * @method Show\Field|Collection last_used_at(string $label = null)
-     * @method Show\Field|Collection price(string $label = null)
-     * @method Show\Field|Collection gold(string $label = null)
-     * @method Show\Field|Collection gift(string $label = null)
-     * @method Show\Field|Collection code(string $label = null)
-     * @method Show\Field|Collection parent_code(string $label = null)
-     * @method Show\Field|Collection full_name(string $label = null)
+     * @method Show\Field|Collection level(string $label = null)
+     * @method Show\Field|Collection pid(string $label = null)
+     * @method Show\Field|Collection cover_img(string $label = null)
+     * @method Show\Field|Collection product_id(string $label = null)
+     * @method Show\Field|Collection group_id(string $label = null)
+     * @method Show\Field|Collection origin_price(string $label = null)
+     * @method Show\Field|Collection sale_price(string $label = null)
+     * @method Show\Field|Collection cate_id(string $label = null)
+     * @method Show\Field|Collection cases(string $label = null)
+     * @method Show\Field|Collection tech_param(string $label = null)
+     * @method Show\Field|Collection cad_model(string $label = null)
+     * @method Show\Field|Collection cad_design(string $label = null)
+     * @method Show\Field|Collection su_model(string $label = null)
+     * @method Show\Field|Collection other(string $label = null)
      * @method Show\Field|Collection logo(string $label = null)
      * @method Show\Field|Collection logo(string $label = null)
-     * @method Show\Field|Collection contact(string $label = null)
-     * @method Show\Field|Collection tips(string $label = null)
-     * @method Show\Field|Collection vip_role(string $label = null)
-     * @method Show\Field|Collection is_open_sign(string $label = null)
-     * @method Show\Field|Collection is_watch_auto_pay(string $label = null)
-     * @method Show\Field|Collection recharge_bg_img(string $label = null)
-     * @method Show\Field|Collection recharge_button_txt(string $label = null)
-     * @method Show\Field|Collection recharge_desc(string $label = null)
-     * @method Show\Field|Collection prefix(string $label = null)
-     * @method Show\Field|Collection event(string $label = null)
-     * @method Show\Field|Collection mobile(string $label = null)
-     * @method Show\Field|Collection verify_key(string $label = null)
-     * @method Show\Field|Collection sms_code(string $label = null)
-     * @method Show\Field|Collection sms_result(string $label = null)
-     * @method Show\Field|Collection episode_id(string $label = null)
-     * @method Show\Field|Collection before(string $label = null)
-     * @method Show\Field|Collection change(string $label = null)
-     * @method Show\Field|Collection current(string $label = null)
-     * @method Show\Field|Collection remark(string $label = null)
-     * @method Show\Field|Collection order_id(string $label = null)
-     * @method Show\Field|Collection list_id(string $label = null)
-     * @method Show\Field|Collection discount(string $label = null)
-     * @method Show\Field|Collection statust(string $label = null)
-     * @method Show\Field|Collection content(string $label = null)
-     * @method Show\Field|Collection file(string $label = null)
-     * @method Show\Field|Collection integral(string $label = null)
-     * @method Show\Field|Collection total_integral(string $label = null)
-     * @method Show\Field|Collection is_vip(string $label = null)
-     * @method Show\Field|Collection start_at(string $label = null)
-     * @method Show\Field|Collection end_at(string $label = null)
-     * @method Show\Field|Collection opend_at(string $label = null)
-     * @method Show\Field|Collection recharge_id(string $label = null)
-     * @method Show\Field|Collection combo_id(string $label = null)
-     * @method Show\Field|Collection desc(string $label = null)
-     * @method Show\Field|Collection date(string $label = null)
-     * @method Show\Field|Collection award(string $label = null)
-     * @method Show\Field|Collection valid_day(string $label = null)
+     * @method Show\Field|Collection showroom_id(string $label = null)
+     * @method Show\Field|Collection videos(string $label = null)
+     * @method Show\Field|Collection images(string $label = null)
      * @method Show\Field|Collection nickname(string $label = null)
      * @method Show\Field|Collection nickname(string $label = null)
+     * @method Show\Field|Collection mobile(string $label = null)
      * @method Show\Field|Collection open_id(string $label = null)
      * @method Show\Field|Collection open_id(string $label = null)
      * @method Show\Field|Collection union_id(string $label = null)
      * @method Show\Field|Collection union_id(string $label = null)
+     * @method Show\Field|Collection account_id(string $label = null)
      * @method Show\Field|Collection email_verified_at(string $label = null)
      * @method Show\Field|Collection email_verified_at(string $label = null)
      */
      */
     class Show {}
     class Show {}

+ 18 - 0
server/resources/lang/zh/account.php

@@ -0,0 +1,18 @@
+
+<?php
+return [
+    'labels' => [
+        'Account' => '账号',
+        'account' => '账号',
+    ],
+    'fields' => [
+        'user_name' => '用户名',
+        'account' => '账号',
+        'password' => '密码',
+        'type' => '用户类型',
+        'remark' => '备注',
+        'status' => '状态',
+    ],
+    'options' => [
+    ],
+];

+ 17 - 0
server/resources/lang/zh/banner.php

@@ -0,0 +1,17 @@
+<?php
+return [
+    'labels' => [
+        'Banner' => '轮播图',
+        'banner' => '轮播图',
+        'system' => '系统管理',
+        'register' => '注册页设置',
+    ],
+    'fields' => [
+        'name' => '名称',
+        'image' => '图片',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 16 - 0
server/resources/lang/zh/contact.php

@@ -0,0 +1,16 @@
+<?php
+return [
+    'labels' => [
+        'Contact' => '联系人',
+        'contact' => '联系人',
+        'system' => '系统管理',
+        'register' => '注册页设置',
+    ],
+    'fields' => [
+        'name' => '姓名',
+        'phone_num' => '手机号',
+        'wechat_num' => '微信号',
+    ],
+    'options' => [
+    ],
+];

+ 17 - 0
server/resources/lang/zh/product-category.php

@@ -0,0 +1,17 @@
+<?php
+return [
+    'labels' => [
+        'product' => '产品',
+        'categories' => '分类',
+        'ProductCategory' => '产品分类',
+    ],
+    'fields' => [
+        'name' => '名称',
+        'level' => '分类级别',
+        'pid' => '父分类',
+        'sort' => '排序',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 19 - 0
server/resources/lang/zh/product-hot.php

@@ -0,0 +1,19 @@
+<?php
+return [
+    'labels' => [
+        'ProductHot' => '爆款产品',
+        'product-hot' => '爆款产品',
+        'hot' => '爆款产品',
+        'normal' => '普通用户爆款',
+        'vip' => 'VIP/设计师爆款',
+    ],
+    'fields' => [
+        'type' => '1- 普通用户 2-vip客户/设计师',
+        'cover_img' => '爆款图片',
+        'product_id' => '产品',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 16 - 0
server/resources/lang/zh/product-sku.php

@@ -0,0 +1,16 @@
+<?php 
+return [
+    'labels' => [
+        'ProductSku' => 'ProductSku',
+        'product-sku' => 'ProductSku',
+    ],
+    'fields' => [
+        'product_id' => '产品ID',
+        'name' => '名称',
+        'cover_img' => '封面图',
+        'origin_price' => '原价',
+        'sale_price' => '现价',
+    ],
+    'options' => [
+    ],
+];

+ 17 - 0
server/resources/lang/zh/product-spec-group.php

@@ -0,0 +1,17 @@
+<?php
+return [
+    'labels' => [
+        'ProductSpecGroup' => '产品规格组',
+        'product-spec-group' => '产品规格组',
+        'product' => '产品',
+        'specGroup' => '规格组',
+    ],
+    'fields' => [
+        'product_id' => '产品名称',
+        'name' => '名称',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 20 - 0
server/resources/lang/zh/product-spec.php

@@ -0,0 +1,20 @@
+<?php
+return [
+    'labels' => [
+        'ProductSpec' => '产品规格',
+        'product-spec' => '产品规格',
+        'product' => '产品',
+        'spec' => '规格',
+    ],
+    'fields' => [
+        'group_id' => '规格分组',
+        'name' => '名称',
+        'cover_img' => '封面图',
+        'origin_price' => '原价',
+        'sale_price' => '价格',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 24 - 0
server/resources/lang/zh/product.php

@@ -0,0 +1,24 @@
+<?php
+return [
+    'labels' => [
+        'Product' => '产品',
+        'product' => '产品',
+    ],
+    'fields' => [
+        'name' => '产品名称',
+        'cate_id' => '产品分类',
+        'cover_img' => '产品截面图',
+        'cases' => '案例',
+        'origin_price' => '原价',
+        'sale_price' => '现价',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '上架状态',
+        'tech_param' => '集数参数文件',
+        'cad_model' => 'CAD模型文件',
+        'cad_design' => 'CAD设计文件',
+        'su_model' => 'SU模型文件',
+        'other' => '其他文件',
+    ],
+    'options' => [
+    ],
+];

+ 14 - 0
server/resources/lang/zh/setting.php

@@ -0,0 +1,14 @@
+<?php
+return [
+    'labels' => [
+        'Setting' => '设置',
+        'setting' => '设置',
+        'system' => '系统管理',
+    ],
+    'fields' => [
+        'name' => '小程序名称',
+        'logo' => '小程序logo',
+    ],
+    'options' => [
+    ],
+];

+ 18 - 0
server/resources/lang/zh/showroom-case.php

@@ -0,0 +1,18 @@
+<?php
+return [
+    'labels' => [
+        'ShowroomCase' => '应用案例',
+        'showroom-case' => '应用案例',
+        'cases' => '案例'
+    ],
+    'fields' => [
+        'showroom_id' => '展厅ID',
+        'name' => '名称',
+        'videos' => '案例视频',
+        'images' => '案例图片',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 15 - 0
server/resources/lang/zh/showroom.php

@@ -0,0 +1,15 @@
+<?php
+return [
+    'labels' => [
+        'Showroom' => '展厅',
+        'showroom' => '展厅',
+        'cases' => '案例'
+    ],
+    'fields' => [
+        'name' => '名称',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 8 - 9
server/resources/lang/zh/user.php

@@ -1,24 +1,23 @@
 <?php
 <?php
 return [
 return [
     'labels' => [
     'labels' => [
-        'market' => '营销',
-        'member' => '会员',
-        'users' => '用户',
-        'User' => '用户',
-        'user' => '用户',
+        'User' => '账号',
+        'user' => '账号',
+        'account' => '账号',
     ],
     ],
     'fields' => [
     'fields' => [
         'nickname' => '昵称',
         'nickname' => '昵称',
         'avatar' => '头像',
         'avatar' => '头像',
-        'password' => 'password',
+        'password' => '密码',
         'email' => 'email',
         'email' => 'email',
         'mobile' => '手机号',
         'mobile' => '手机号',
-        'open_id' => 'open_id',
+        'open_id' => 'openid',
         'union_id' => 'union_id',
         'union_id' => 'union_id',
-        'status' => 'status',
+        'status' => '状态 1-正常 0-禁用',
         'email_verified_at' => 'email_verified_at',
         'email_verified_at' => 'email_verified_at',
         'remember_token' => 'remember_token',
         'remember_token' => 'remember_token',
-        'created_at' => '注册时间',
+        'remark' => '备注',
+        'type' => '用户类型 1-普通用户 2-VIP 3-设计师',
     ],
     ],
     'options' => [
     'options' => [
     ],
     ],

+ 17 - 0
server/resources/lang/zh_CN/account.php

@@ -0,0 +1,17 @@
+<?php 
+return [
+    'labels' => [
+        'Account' => 'Account',
+        'account' => 'Account',
+    ],
+    'fields' => [
+        'user_name' => '用户名',
+        'account' => '账号',
+        'password' => '密码',
+        'type' => '用户类型 1-普通用户 2-VIP 3-设计师',
+        'remark' => '备注',
+        'status' => '状态 1-正常 0-禁用',
+    ],
+    'options' => [
+    ],
+];

+ 15 - 0
server/resources/lang/zh_CN/banner.php

@@ -0,0 +1,15 @@
+<?php 
+return [
+    'labels' => [
+        'Banner' => 'Banner',
+        'banner' => 'Banner',
+    ],
+    'fields' => [
+        'name' => '名称',
+        'image' => '图片',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 14 - 0
server/resources/lang/zh_CN/contact.php

@@ -0,0 +1,14 @@
+<?php 
+return [
+    'labels' => [
+        'Contact' => 'Contact',
+        'contact' => 'Contact',
+    ],
+    'fields' => [
+        'name' => '姓名',
+        'phone_num' => '手机号',
+        'wechat_num' => '微信号',
+    ],
+    'options' => [
+    ],
+];

+ 15 - 0
server/resources/lang/zh_CN/product-category.php

@@ -0,0 +1,15 @@
+<?php 
+return [
+    'labels' => [
+        'ProductCategory' => 'ProductCategory',
+        'product-category' => 'ProductCategory',
+    ],
+    'fields' => [
+        'name' => '名称',
+        'level' => '分类级别',
+        'pid' => '父分类',
+        'sort' => '排序(越大越靠前)',
+    ],
+    'options' => [
+    ],
+];

+ 15 - 0
server/resources/lang/zh_CN/product-hot.php

@@ -0,0 +1,15 @@
+<?php 
+return [
+    'labels' => [
+        'ProductHot' => 'ProductHot',
+        'product-hot' => 'ProductHot',
+    ],
+    'fields' => [
+        'type' => '1- 普通用户 2-vip客户/设计师',
+        'product_id' => '产品',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 16 - 0
server/resources/lang/zh_CN/product-sku.php

@@ -0,0 +1,16 @@
+<?php 
+return [
+    'labels' => [
+        'ProductSku' => 'ProductSku',
+        'product-sku' => 'ProductSku',
+    ],
+    'fields' => [
+        'product_id' => '产品ID',
+        'name' => '名称',
+        'cover_img' => '封面图',
+        'origin_price' => '原价',
+        'sale_price' => '现价',
+    ],
+    'options' => [
+    ],
+];

+ 13 - 0
server/resources/lang/zh_CN/product-spec-group.php

@@ -0,0 +1,13 @@
+<?php 
+return [
+    'labels' => [
+        'ProductSpecGroup' => 'ProductSpecGroup',
+        'product-spec-group' => 'ProductSpecGroup',
+    ],
+    'fields' => [
+        'product_id' => '产品ID',
+        'name' => '名称',
+    ],
+    'options' => [
+    ],
+];

+ 16 - 0
server/resources/lang/zh_CN/product-spec.php

@@ -0,0 +1,16 @@
+<?php 
+return [
+    'labels' => [
+        'ProductSpec' => 'ProductSpec',
+        'product-spec' => 'ProductSpec',
+    ],
+    'fields' => [
+        'group_id' => '分组ID',
+        'name' => '名称',
+        'cover_img' => '封面图',
+        'origin_price' => '原价',
+        'sale_price' => '现价',
+    ],
+    'options' => [
+    ],
+];

+ 23 - 0
server/resources/lang/zh_CN/product.php

@@ -0,0 +1,23 @@
+<?php 
+return [
+    'labels' => [
+        'Product' => 'Product',
+        'product' => 'Product',
+    ],
+    'fields' => [
+        'name' => '名称',
+        'cover_img' => '封面图',
+        'cases' => '案例',
+        'origin_price' => '原价',
+        'sale_price' => '现价',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '上架状态',
+        'tech_param' => '集数参数文件',
+        'cad_model' => 'CAD模型文件',
+        'cad_design' => 'CAD设计文件',
+        'su_model' => 'SU模型文件',
+        'other' => '其他文件',
+    ],
+    'options' => [
+    ],
+];

+ 13 - 0
server/resources/lang/zh_CN/setting.php

@@ -0,0 +1,13 @@
+<?php 
+return [
+    'labels' => [
+        'Setting' => 'Setting',
+        'setting' => 'Setting',
+    ],
+    'fields' => [
+        'name' => '小程序名称',
+        'logo' => '小程序logo',
+    ],
+    'options' => [
+    ],
+];

+ 17 - 0
server/resources/lang/zh_CN/showroom-case.php

@@ -0,0 +1,17 @@
+<?php 
+return [
+    'labels' => [
+        'ShowroomCase' => 'ShowroomCase',
+        'showroom-case' => 'ShowroomCase',
+    ],
+    'fields' => [
+        'showroom_id' => '展厅ID',
+        'name' => '名称',
+        'videos' => '案例视频',
+        'images' => '案例图片',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 14 - 0
server/resources/lang/zh_CN/showroom.php

@@ -0,0 +1,14 @@
+<?php 
+return [
+    'labels' => [
+        'Showroom' => 'Showroom',
+        'showroom' => 'Showroom',
+    ],
+    'fields' => [
+        'name' => '名称',
+        'sort' => '排序(越大越靠前)',
+        'is_opened' => '是否启用',
+    ],
+    'options' => [
+    ],
+];

+ 8 - 6
server/resources/lang/zh_CN/user.php

@@ -5,16 +5,18 @@ return [
         'user' => 'User',
         'user' => 'User',
     ],
     ],
     'fields' => [
     'fields' => [
-        'nickname' => 'nickname',
-        'avatar' => 'avatar',
-        'password' => 'password',
+        'nickname' => '昵称',
+        'avatar' => '头像',
+        'password' => '密码',
         'email' => 'email',
         'email' => 'email',
-        'mobile' => 'mobile',
-        'open_id' => 'open_id',
+        'mobile' => '手机号',
+        'open_id' => 'openid',
         'union_id' => 'union_id',
         'union_id' => 'union_id',
-        'status' => 'status',
+        'status' => '状态 1-正常 0-禁用',
         'email_verified_at' => 'email_verified_at',
         'email_verified_at' => 'email_verified_at',
         'remember_token' => 'remember_token',
         'remember_token' => 'remember_token',
+        'remark' => '备注',
+        'type' => '用户类型 1-普通用户 2-VIP 3-设计师',
     ],
     ],
     'options' => [
     'options' => [
     ],
     ],