소스 검색

Merge branch 'master' of http://192.168.2.52:10880/igamebox/mtb_dcatadmin_plus

igb 3 일 전
부모
커밋
a4a3e79027

+ 9 - 2
.env.dev

@@ -1,11 +1,11 @@
 APP_NAME=Laravel
 #上线时需要改成prod
-APP_ENV=local
+APP_ENV=local.dev
 APP_KEY=base64:bdomFa+r6S774rRyFNeb4pCBxVe4WbuzAzk+LyP86+k=
 #上线时需要改成false
 APP_DEBUG=true
 #后台网站根域名,暂时未用到
-APP_URL=http://localhost
+APP_URL=https://localhost:8011
 #是否https
 ADMIN_HTTPS=false
 
@@ -90,3 +90,10 @@ MAIL_CC_ADDRESS=""
 ALBUM_RPC_URL=https://album-prime-control.mietubl.com.cn/rpc
 ALBUM_RPC_SECRET=MtbSecretVBUC
 ALBUM_OSS_URL=https://mietublcom.oss-cn-hongkong.aliyuncs.com
+
+#分销商后台地址 (社媒对接用到)
+DIST_SITE_URL=http://127.0.0.1:8011
+#facebook社媒对接配置
+SSM_FACEBOOK_APP_ID=1351316886010052
+SSM_FACEBOOK_APP_SECRET=2cb7b0669ee1da3107bf800b687c35d5
+

+ 125 - 0
app/Console/Commands/SyncBrFix.php

@@ -0,0 +1,125 @@
+<?php
+
+namespace App\Console\Commands;
+
+use Carbon\Carbon;
+use Illuminate\Console\Command;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\File;
+use Symfony\Component\DomCrawler\Crawler;
+
+
+/**
+ * 导入相册内容到产品表
+ * php artisan sync:brsiteFix
+ */
+class SyncBrFix extends Command
+{
+    /**
+     * The name and signature of the console command.
+     *
+     * @var string
+     */
+    protected $signature = 'sync:brsiteFix';
+
+    /**
+     * The console command description.
+     *
+     * @var string
+     */
+    protected $description = 'Command description';
+
+
+    public function handle()
+    {
+
+        $sqlFile = fopen('update_products.sql', 'a') or die("无法创建SQL文件");
+
+        $ossHost = 'https://mietubl-website.oss-accelerate.aliyuncs.com';
+        //$ossHost = 'https://mietubl-dev.oss-accelerate.aliyuncs.com';
+        $baseUrl = 'https://mietubloficial.com.br';
+        $urlList = [
+            ['slug'=>'tws', 'url'=>'/tws/'],
+            ['slug'=>'protetor-de-tela-de-vidro-temperado', 'url'=>'/protetor-de-tela-de-vidro-temperado/'],
+            ['slug'=>'protetor-da-tela-do-tablet', 'url'=>'/protetor-da-tela-do-tablet/'],
+            ['slug'=>'maquina-de-corte-de-protetor-de-tela', 'url'=>'/maquina-de-corte-de-protetor-de-tela/'],
+
+            ['slug'=>'folhas-de-protetor-de-tela-de-hidrogel', 'url'=>'/folhas-de-protetor-de-tela-de-hidrogel/'],
+
+            ['slug'=>'lightning', 'url'=>'/lightning/'],
+            ['slug'=>'type-c', 'url'=>'/type-c/'],
+            ['slug'=>'micro-usb', 'url'=>'/micro-usb/'],
+            ['slug'=>'fones-de-ouvido-auricular-com-fio', 'url'=>'/fones-de-ouvido-auricular-com-fio/'],
+            ['slug'=>'fones-de-ouvido', 'url'=>'/fones-de-ouvido/'],
+            ['slug'=>'alto-falantes-bluetooth', 'url'=>'/alto-falantes-bluetooth/'],
+            ['slug'=>'carregador-de-parede', 'url'=>'/carregador-de-parede/'],
+            ['slug'=>'produtos-perifericos', 'url'=>'/produtos-perifericos/'],
+        ];
+
+        foreach ($urlList as $entry) {
+            try {
+                $category = DB::table('dist_product_category')
+                    ->where('slug', $entry['slug'])
+                    ->where('dist_id', 3)
+                    ->first();
+
+                if (!$category) {
+                    echo "分类未找到,slug: {$entry['slug']}\n";
+                    continue;
+                }
+                echo "分类 {$category->name} \n";
+                if ($entry['slug'] == 'produtos-perifericos') {
+                    $detailUrls = ['https://mietubloficial.com.br/produto/mini-impressora-de-pele-para-celular-mtb-pp01/'];
+                } else {
+                    $html = file_get_contents($baseUrl . $entry['url']);
+                    $listCrawler = new Crawler($html);
+                    $detailUrls = $listCrawler->filter('.elementor-shortcode a')->extract(['href']);
+
+                }
+                foreach ($detailUrls as $detailUrl) {
+
+                    $detailHtml = file_get_contents($detailUrl);
+                    $detailCrawler = new Crawler($detailHtml);
+
+                    // 解析基础数据
+                    $title = $detailCrawler->filter('.product_title')->text();
+
+                    // 插入产品获取ID
+                    $productId = DB::table('dist_product')->where('title', $title)->where('dist_id', 3)->first();
+                    if (!$productId) {
+                        echo "产品未找到,title: {$title}\n";
+                        continue;
+                    }
+
+                    // 1. 去除最后一个字符(仅当末尾是斜杠时)
+                    $trimmedUrl = substr($detailUrl, 0, -1);
+                    // 2. 分割路径并取末段
+                    $path = parse_url($trimmedUrl, PHP_URL_PATH);
+                    $segments = explode('/', $path);
+                    $slug = end($segments);
+
+                    // 生成更新SQL
+                    $escapedTitle = addslashes($title); // 转义特殊字符
+                    $escapedSlug = addslashes($slug);
+
+                    $sql = "UPDATE dist_product SET seo_title = title,slug = '{$escapedSlug}' WHERE title = '{$title}' AND dist_id = 3;\n";
+
+                    // 写入SQL文件
+                    fwrite($sqlFile, $sql);
+                    echo "生成SQL:{$sql}\n";
+
+
+
+                    echo "处理主图完成,下一个产品 \n";
+                    echo "------------------------------------------\n";
+                }
+
+            } catch (\Exception $e) {
+                echo "数据采集失败: " . $e->getMessage() . "\n";
+                continue;
+            }
+        }
+        dd('所有处理完成');
+    }
+
+}

+ 45 - 0
app/Distributor/Actions/SmmAddAccount.php

@@ -0,0 +1,45 @@
+<?php
+namespace App\Distributor\Actions;
+
+use App\Distributor\Forms\ImportProduct;
+use Dcat\Admin\Grid\Tools\AbstractTool;
+use Dcat\Admin\Widgets\Modal;
+use App\Distributor\Forms\SmmAddAccount as SmmAddAccountForm;
+
+class SmmAddAccount extends AbstractTool
+{
+    protected $style = 'btn btn-primary';
+
+    protected $title = 'add_platform_account';
+
+    public function title()
+    {
+        return '<i class="feather icon-user-plus"></i> &nbsp;'.admin_trans('admin.add_platform_account');
+    }
+
+    public function render()
+    {
+        // 实例化表单类
+        $form = SmmAddAccountForm::make();
+
+        return Modal::make()
+            ->lg()
+            ->title(admin_trans_label($this->title))
+            ->body($form)
+            // 因为此处使用了表单异步加载功能,所以一定要用 onLoad 方法
+            // 如果是非异步方式加载表单,则需要改成 onShow 方法
+            ->button($this->getButtonHTML());
+    }
+
+    protected function getButtonHTML()
+    {
+        $title= $this->title();
+        return <<<HTML
+        <button class="btn btn-success">
+            <i class="feather"></i> {$title}
+        </button>
+        HTML;
+    }
+
+
+}

+ 58 - 0
app/Distributor/Controllers/SmmUserAccountController.php

@@ -0,0 +1,58 @@
+<?php
+
+namespace App\Distributor\Controllers;
+
+use App\Distributor\Actions\SmmAddAccount;
+use App\Distributor\Repositories\SmmUserAccount;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+use Dcat\Admin\Layout\Content;
+use Dcat\Admin\Admin;
+
+class SmmUserAccountController extends AdminController
+{
+    /**
+     * page index
+     */
+    public function index(Content $content)
+    {
+        return $content
+            ->header('帐号管理')
+            ->description('全部')
+            ->body($this->grid());
+    }
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new SmmUserAccount(), function (Grid $grid) {
+            $grid->column('id')->sortable();
+            $grid->column('user_name');
+            $grid->column('access_token');
+            $grid->column('media_name');
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->panel();
+                $filter->expand();
+                $filter->like('user_name')->width(2);
+            });
+            //授权按钮
+            // 传入数组
+            $grid->rightTools([
+                new SmmAddAccount(),
+            ]);
+
+            $grid->disableCreateButton();
+            $grid->disableEditButton();
+            $grid->model()->where('dist_id', getDistributorId())->orderBy('media_name', 'asc')->orderBy('id', 'desc');
+        });
+    }
+
+}

+ 61 - 0
app/Distributor/Forms/SmmAddAccount.php

@@ -0,0 +1,61 @@
+<?php
+
+namespace App\Distributor\Forms;
+use App\Distributor\Repositories\DistProductCategory;
+use App\Distributor\Repositories\RpcAlbum;
+use App\Libraries\CommonHelper;
+use App\Models\DistProduct;
+use App\Models\DistProductImage;
+use App\Services\SmmService;
+use Dcat\Admin\Widgets\Form;
+
+
+class SmmAddAccount extends Form
+{
+    public function handle(array $input)
+    {
+        // 处理表单提交逻辑
+        $mediaName = $input['media_name'];
+        if ($mediaName) {
+            //跳转到媒体受权页面
+            $ssmService = new SmmService($mediaName);
+            $result = $ssmService->login();
+            if ($result['status']) {
+                // 返回 JS 代码触发新窗口打开
+                $url = $result['data']['url'];
+                return $this->response()->script(
+                    "window.open('{$url}', '_blank')"
+                );
+            }
+            return $this
+                ->response()
+                ->error('获取授权失败,请检查媒体名称是否正确');
+        } else {
+            return $this
+                ->response()
+                ->error('媒体名称不能为空');
+        }
+    }
+
+
+    /**
+     * Build a form here.
+     */
+    public function form()
+    {
+        // 设置隐藏表单,传递用户id
+        $this->select('media_name')
+            ->options(config('dictionary.media_list'))
+            ->required();
+    }
+
+    /**
+     * The data of the form.
+     *
+     * @return array
+     */
+    public function default()
+    {
+        return [];
+    }
+}

+ 16 - 0
app/Distributor/Repositories/SmmUserAccount.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace App\Distributor\Repositories;
+
+use App\Models\SmmUserAccount as Model;
+use Dcat\Admin\Repositories\EloquentRepository;
+
+class SmmUserAccount extends EloquentRepository
+{
+    /**
+     * Model.
+     *
+     * @var string
+     */
+    protected $eloquentClass = Model::class;
+}

+ 2 - 0
app/Distributor/routes.php

@@ -76,6 +76,8 @@ Route::group([
     //宣传资料
     $router->get('site-album', 'SiteAlbumController@index');
     $router->get('site-album/{id}', 'SiteAlbumController@show');
+    //社媒账号管理
+    $router->get('ssm-user-account', 'SmmUserAccountController@index');
 
 });
 

+ 2 - 0
app/Libraries/RpcClient.php

@@ -25,6 +25,7 @@ class RpcClient
         $payload = $payload.$apiKey;
         $signature = hash_hmac('sha256', $payload, $apiSecret);
         $clientHost = env('ALBUM_RPC_URL');
+
         $httpClient = new HttpClient($clientHost);
         $httpClient = $httpClient->withTimeout(self::$timeout);
         $client = new Client($clientHost,false,$httpClient);
@@ -35,6 +36,7 @@ class RpcClient
             ]);
             return $result;
         } catch (\Exception $e) {
+            dd($e->getMessage());
             return ['status'=>false,'msg'=>$e->getMessage(),'data'=>[]];
         }
     }

+ 14 - 0
app/Models/SmmUserAccount.php

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

+ 96 - 0
app/Services/Contracts/SmmPlatformInterface.php

@@ -0,0 +1,96 @@
+<?php
+
+namespace App\Services\Contracts;
+
+//社交媒体管理平台接口
+use Illuminate\Http\Request;
+
+interface SmmPlatformInterface
+{
+    /*
+     * OAuth 2.0 授权登录
+     * 返回
+     * ['status'=>true,'data'=>'https://example.com/fb-callback.php']
+     * or
+     * ['status'=>false,'data'=>'授权失败']
+     */
+    public function login();
+
+    /*
+     * OAuth 2.0 授权回调
+     * 授权成功后,得到access_token,refresh_token等信息, 保存到数据库中
+     * 授权成功后,
+     * 返回 [
+     * 'status'=>true,
+     * 'data' => ['access_token' => 'xxxxx','user_name' => 'yyyyy',]
+     * ]
+     * or
+     * 返回 [
+     * 'status'=>false,
+     * 'data' => '回调失败'
+     * ]
+     */
+    public function loginCallback(Request $request);
+
+    /*
+     * 发布图片帖子
+     * $message 帖子内容
+     * $imagePath 图片路径, 如:/path/to/image.jpg
+     * $accountIds 帖子发布账号ID列表,smm_user_account表中的id字段, 如:[1,2,3]
+     * 返回发布结果:
+     * [
+     *  'status' => true,
+     *  'data' => [
+     *      'page_post_id' => 123, //帖子ID
+     *      'image_video_url' => 'https://example.com/image.jpg', //帖子图片URL
+     *   ]
+     * ]
+     * or
+     * [
+     *  'status' => false,
+     *  'data' => '发布失败'
+     * ]
+     */
+    public function postImage($message,$imagePath);
+
+    /*
+     * 发布视频帖子
+     * $message 帖子内容
+     * $videoPath 视频路径, 如:/path/to/video.mp4
+     * $accountIds 帖子发布账号ID列表,smm_user_account表中的id字段, 如:[1,2,3]
+     * 返回发布结果:
+     * [
+     *  'page_post_id' => 123, //帖子ID
+     *  'image_video_url' => 'https://example.com/video.mp4', //帖子图片URL
+     * ]
+     */
+    public function postVideo($message,$videoPath);
+
+    /*
+     * 获取帖评论列表
+     * $postId 帖子ID
+     * 返回评论列表:
+     * [
+     *  'status' => true,
+     *  'data' => [
+     *  [
+     * ]
+     * or
+     * [
+     *  'status' => false,
+     *  'data' => '获取评论失败'
+     * ]
+     */
+    public function getComments($postId);
+
+    /*
+     * 回复帖子评论
+     * $commentId 评论ID
+     */
+    public function replyToComment($commentId);
+
+    /*
+     * 删除帖子评论
+     */
+    public function deleteComment($commentId);
+}

+ 118 - 0
app/Services/Smm/FacebookService.php

@@ -0,0 +1,118 @@
+<?php
+
+namespace App\Services\Smm;
+use App\Services\Contracts\SmmPlatformInterface;
+use Illuminate\Http\Request;
+use Facebook\Facebook;
+
+
+class FacebookService implements SmmPlatformInterface
+{
+    public $fb = null;
+    public $pageAccessToken = null;
+
+    public function __construct() {
+        $this->fb = new Facebook([
+            'app_id' => env('SSM_FACEBOOK_APP_ID'), // 替换为您的App ID
+            'app_secret' => env('SSM_FACEBOOK_APP_SECRET'), // 替换为您的App Secret
+            'default_graph_version' => 'v12.0', // 使用当前版本
+        ]);
+        //$this->pageAccessToken = $pageAccessToken;
+    }
+
+    /*
+     * OAuth 2.0 授权登录
+     * 返回授权地址:https://example.com/fb-callback.php
+     */
+    public function login()
+    {
+        // 实现Facebook登录逻辑
+        $helper = $this->fb->getRedirectLoginHelper();
+        $permissions = ['publish_pages'];
+        $distSiteUrl = env('DIST_SITE_URL');
+        $loginUrl = $helper->getLoginUrl($distSiteUrl.'/callback/facebook', $permissions);
+        return ['status'=>true, 'data' => ['login_url'=>$loginUrl]];
+    }
+
+    /*
+     * OAuth 2.0 授权回调
+     * 授权成功后,得到access_token,refresh_token等信息, 保存到数据库中
+     * 授权成功后,返回回调需要的数据
+     */
+    public function loginCallback(Request $request)
+    {
+        // 实现Facebook回调处理
+        $helper = $this->fb->getRedirectLoginHelper();
+        try {
+            $accessToken = $helper->getAccessToken();
+        } catch (Facebook\Exceptions\FacebookResponseException $e) {
+            return ['status' => false, 'data' => 'Graph API错误:' . $e->getMessage()];
+        } catch (Facebook\Exceptions\FacebookSDKException $e) {
+            return ['status' => false, 'data' => 'SDK错误:' . $e->getMessage()];
+        }
+        if (isset($accessToken)) {
+            // 可选:将短期令牌转换为长期令牌(有效期约60天)
+            $oAuth2Client = $this->fb->getOAuth2Client();
+            $longLivedAccessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
+            return ['status' => true, 'data' => ['access_token' => $longLivedAccessToken]];
+        } else {
+            return ['status' => false, 'data' => '无法获取访问令牌'];
+        }
+    }
+
+    public function postImage($message,$imagePath) {
+        try {
+            $response = $this->fb->post(
+                '/me/photos',
+                [
+                    'source' => $this->fb->fileToUpload($imagePath), // 上传图片文件
+                    'message' => $message,                    // 添加描述
+                ],
+                $this->userAccessToken
+            );
+            $graphNode = $response->getGraphNode();
+            return ['status' => true, 'data' => ['id' => $graphNode['id']]];
+        } catch (Facebook\Exceptions\FacebookResponseException $e) {
+            $errorMsg  = 'Graph API错误:' . $e->getMessage();
+        } catch (Facebook\Exceptions\FacebookSDKException $e) {
+            $errorMsg = 'SDK错误:' . $e->getMessage();
+        }
+        return ['status'=>false,'data' => $errorMsg];
+    }
+
+
+    public function postVideo($message,$videoPath) {
+        try {
+            $response = $this->fb->post(
+                '/me/videos',
+                [
+                    'source' => $this->fb->fileToUpload($videoPath), // 上传视频文件
+                    'title' => $message,                        // 添加标题
+                    'description' => '',            // 添加描述
+                ],
+                $this->userAccessToken
+            );
+            $graphNode = $response->getGraphNode();
+            return ['status' => true, 'data' => ['id' => $graphNode['id']]];
+        } catch (Facebook\Exceptions\FacebookResponseException $e) {
+            $errorMsg = 'Graph API错误:' . $e->getMessage();
+        } catch (Facebook\Exceptions\FacebookSDKException $e) {
+            $errorMsg = 'SDK错误:' . $e->getMessage();
+        }
+        return ['status'=>false,'data' => $errorMsg];
+    }
+
+    public function getComments($postId) {
+
+    }
+
+    public function replyToComment($commentId) {
+
+    }
+
+    public function deleteComment($commentId) {
+
+    }
+
+
+}

+ 48 - 0
app/Services/SmmService.php

@@ -0,0 +1,48 @@
+<?php
+
+namespace App\Services;
+
+use App\Services\Contracts\SmmPlatformInterface;
+use InvalidArgumentException;
+
+class SmmService
+{
+    protected SmmPlatformInterface $platform;
+
+    public function __construct(string $platform)
+    {
+        $this->platform = $this->resolvePlatform($platform);
+    }
+
+    protected function resolvePlatform(string $platform): SmmPlatformInterface
+    {
+        $className = $this->getPlatformClassName($platform);
+
+
+        if (!class_exists($className)) {
+            throw new InvalidArgumentException("Platform [{$platform}] not supported");
+        }
+
+        $instance = new $className();
+
+        if (!$instance instanceof SmmPlatformInterface) {
+            throw new \RuntimeException("Platform [{$platform}] must implement SmmPlatformInterface");
+        }
+
+        return $instance;
+    }
+
+    protected function getPlatformClassName(string $platform): string {
+        $platform = ucfirst(strtolower($platform));
+        return "App\\Services\\Smm\\{$platform}Service";
+    }
+
+    // 代理调用平台方法
+    public function __call(string $method, array $arguments) {
+        if (method_exists($this->platform, $method)) {
+            return $this->platform->{$method}(...$arguments);
+        }
+
+        throw new \BadMethodCallException("Method [{$method}] not found on platform");
+    }
+}

+ 1 - 0
composer.json

@@ -8,6 +8,7 @@
         "php": "^8.0.2",
         "alphasnow/aliyun-oss-laravel": "^4.7",
         "dcat-plus/laravel-admin": "^1.2",
+        "facebook/graph-sdk": "^5.1",
         "fguillot/json-rpc": "^1.3",
         "guzzlehttp/guzzle": "^7.2",
         "laravel/framework": "^9.19",

+ 67 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "d5c6237309a497437a44985e037d1c19",
+    "content-hash": "23de1a3cb4c1fc0b34eaccbfde64ac12",
     "packages": [
         {
             "name": "aliyuncs/oss-sdk-php",
@@ -1047,6 +1047,72 @@
             ],
             "time": "2023-10-06T06:47:41+00:00"
         },
+        {
+            "name": "facebook/graph-sdk",
+            "version": "5.1.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/facebook/php-graph-sdk.git",
+                "reference": "38fd7187a6704d3ab14ded2f3a534ac4ee6f3481"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/facebook/php-graph-sdk/zipball/38fd7187a6704d3ab14ded2f3a534ac4ee6f3481",
+                "reference": "38fd7187a6704d3ab14ded2f3a534ac4ee6f3481",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-mbstring": "*",
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "guzzlehttp/guzzle": "~5.0",
+                "mockery/mockery": "~0.8",
+                "phpunit/phpunit": "~4.0"
+            },
+            "suggest": {
+                "guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Facebook\\": "src/Facebook/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Facebook Platform"
+            ],
+            "authors": [
+                {
+                    "name": "Facebook",
+                    "homepage": "https://github.com/facebook/facebook-php-sdk-v4/contributors"
+                }
+            ],
+            "description": "Facebook SDK for PHP",
+            "homepage": "https://github.com/facebook/facebook-php-sdk-v4",
+            "keywords": [
+                "facebook",
+                "sdk"
+            ],
+            "support": {
+                "issues": "https://github.com/facebook/php-graph-sdk/issues",
+                "source": "https://github.com/facebook/php-graph-sdk/tree/5.1.4"
+            },
+            "abandoned": true,
+            "time": "2016-05-13T17:28:30+00:00"
+        },
         {
             "name": "fguillot/json-rpc",
             "version": "v1.3.0",

+ 12 - 0
config/dictionary.php

@@ -103,4 +103,16 @@ return [
         1 => 'pending_approval',
         2 => 'published',
     ],
+
+    //媒体列表
+    'media_list'=>[
+        'Facebook' => 'Facebook',
+        'Instagram' => 'Instagram',
+        'YouTube' => 'YouTube',
+        'Twitter' => 'Twitter',
+        'TikTok' => 'TikTok',
+        'Pinterest' => 'Pinterest',
+    ]
+
+
 ];

+ 1 - 1
config/distributor.php

@@ -200,7 +200,7 @@ return [
     |--------------------------------------------------------------------------
     */
     'helpers' => [
-        'enable' => false,
+        'enable' => true,
     ],
 
     /*

+ 672 - 0
dcat_admin_ide_helper.php

@@ -0,0 +1,672 @@
+<?php
+
+/**
+ * A helper file for Dcat Admin, to provide autocomplete information to your IDE
+ *
+ * This file should not be included in your code, only analyzed by your IDE!
+ *
+ * @author jqh <841324345@qq.com>
+ */
+namespace Dcat\Admin {
+    use Illuminate\Support\Collection;
+
+    /**
+     * @property Grid\Column|Collection width
+     * @property Grid\Column|Collection id
+     * @property Grid\Column|Collection name
+     * @property Grid\Column|Collection type
+     * @property Grid\Column|Collection version
+     * @property Grid\Column|Collection detail
+     * @property Grid\Column|Collection created_at
+     * @property Grid\Column|Collection updated_at
+     * @property Grid\Column|Collection is_enabled
+     * @property Grid\Column|Collection parent_id
+     * @property Grid\Column|Collection order
+     * @property Grid\Column|Collection icon
+     * @property Grid\Column|Collection uri
+     * @property Grid\Column|Collection extension
+     * @property Grid\Column|Collection permission_id
+     * @property Grid\Column|Collection menu_id
+     * @property Grid\Column|Collection slug
+     * @property Grid\Column|Collection http_method
+     * @property Grid\Column|Collection http_path
+     * @property Grid\Column|Collection role_id
+     * @property Grid\Column|Collection user_id
+     * @property Grid\Column|Collection value
+     * @property Grid\Column|Collection username
+     * @property Grid\Column|Collection password
+     * @property Grid\Column|Collection avatar
+     * @property Grid\Column|Collection remember_token
+     * @property Grid\Column|Collection language
+     * @property Grid\Column|Collection path_id
+     * @property Grid\Column|Collection content
+     * @property Grid\Column|Collection cover
+     * @property Grid\Column|Collection photo
+     * @property Grid\Column|Collection poster
+     * @property Grid\Column|Collection video
+     * @property Grid\Column|Collection cert
+     * @property Grid\Column|Collection detail_cn
+     * @property Grid\Column|Collection pdf
+     * @property Grid\Column|Collection deleted_at
+     * @property Grid\Column|Collection path
+     * @property Grid\Column|Collection path_md5
+     * @property Grid\Column|Collection status
+     * @property Grid\Column|Collection weigh
+     * @property Grid\Column|Collection alpha_2
+     * @property Grid\Column|Collection country_name_en
+     * @property Grid\Column|Collection country_name_zh
+     * @property Grid\Column|Collection seo_keywords
+     * @property Grid\Column|Collection seo_description
+     * @property Grid\Column|Collection sku
+     * @property Grid\Column|Collection category_id
+     * @property Grid\Column|Collection issuance_date
+     * @property Grid\Column|Collection enabled
+     * @property Grid\Column|Collection parameters
+     * @property Grid\Column|Collection is_pinned
+     * @property Grid\Column|Collection seo_title
+     * @property Grid\Column|Collection parameter_id
+     * @property Grid\Column|Collection remark
+     * @property Grid\Column|Collection image_url
+     * @property Grid\Column|Collection product_id
+     * @property Grid\Column|Collection video_url
+     * @property Grid\Column|Collection cover_image
+     * @property Grid\Column|Collection client_code
+     * @property Grid\Column|Collection dist_contact_number
+     * @property Grid\Column|Collection dist_email
+     * @property Grid\Column|Collection secondary_domain
+     * @property Grid\Column|Collection country
+     * @property Grid\Column|Collection country_alpha_2
+     * @property Grid\Column|Collection country_lang
+     * @property Grid\Column|Collection address
+     * @property Grid\Column|Collection service_hotline
+     * @property Grid\Column|Collection whats_app
+     * @property Grid\Column|Collection facebook
+     * @property Grid\Column|Collection instagram
+     * @property Grid\Column|Collection youtube
+     * @property Grid\Column|Collection linkedin
+     * @property Grid\Column|Collection tiktok
+     * @property Grid\Column|Collection site_name
+     * @property Grid\Column|Collection company_name
+     * @property Grid\Column|Collection appearance_id
+     * @property Grid\Column|Collection custom_domain
+     * @property Grid\Column|Collection domain_type
+     * @property Grid\Column|Collection logo
+     * @property Grid\Column|Collection copy_right
+     * @property Grid\Column|Collection statistics_js
+     * @property Grid\Column|Collection company_address
+     * @property Grid\Column|Collection owned_appearances
+     * @property Grid\Column|Collection album_folder
+     * @property Grid\Column|Collection key
+     * @property Grid\Column|Collection dist_id
+     * @property Grid\Column|Collection describe
+     * @property Grid\Column|Collection imported
+     * @property Grid\Column|Collection folder
+     * @property Grid\Column|Collection original_table
+     * @property Grid\Column|Collection data
+     * @property Grid\Column|Collection template_version
+     * @property Grid\Column|Collection template_update_code
+     * @property Grid\Column|Collection template_local_code
+     * @property Grid\Column|Collection file_name
+     * @property Grid\Column|Collection file_path
+     * @property Grid\Column|Collection template_code
+     * @property Grid\Column|Collection current_content
+     * @property Grid\Column|Collection previous_content
+     * @property Grid\Column|Collection variable_name
+     * @property Grid\Column|Collection variable_value
+     * @property Grid\Column|Collection variable_type
+     * @property Grid\Column|Collection variable_code
+     * @property Grid\Column|Collection order_number
+     * @property Grid\Column|Collection customer_name
+     * @property Grid\Column|Collection email
+     * @property Grid\Column|Collection consulting_products
+     * @property Grid\Column|Collection freight_forwarder
+     * @property Grid\Column|Collection business_model
+     * @property Grid\Column|Collection ip_address
+     * @property Grid\Column|Collection allocate_time
+     * @property Grid\Column|Collection referer_url
+     * @property Grid\Column|Collection sender_id
+     * @property Grid\Column|Collection target_type
+     * @property Grid\Column|Collection target_ids
+     * @property Grid\Column|Collection review_reply
+     * @property Grid\Column|Collection message_id
+     * @property Grid\Column|Collection is_read
+     * @property Grid\Column|Collection token
+     * @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 expires_at
+     * @property Grid\Column|Collection banner_url
+     * @property Grid\Column|Collection position
+     * @property Grid\Column|Collection subtitle
+     * @property Grid\Column|Collection menu_type
+     * @property Grid\Column|Collection menu_config
+     * @property Grid\Column|Collection menu_location
+     * @property Grid\Column|Collection author
+     * @property Grid\Column|Collection post_date
+     * @property Grid\Column|Collection page_type
+     * @property Grid\Column|Collection template_file
+     * @property Grid\Column|Collection pages_id
+     * @property Grid\Column|Collection tag_id
+     * @property Grid\Column|Collection flyer_type
+     * @property Grid\Column|Collection send_type
+     * @property Grid\Column|Collection send_time
+     * @property Grid\Column|Collection send_content
+     * @property Grid\Column|Collection account_ids
+     * @property Grid\Column|Collection message
+     * @property Grid\Column|Collection flyer_url
+     * @property Grid\Column|Collection flyer_id
+     * @property Grid\Column|Collection account_id
+     * @property Grid\Column|Collection request_content
+     * @property Grid\Column|Collection response_content
+     * @property Grid\Column|Collection api_name
+     * @property Grid\Column|Collection page_post_id
+     * @property Grid\Column|Collection post_type
+     * @property Grid\Column|Collection image_video_url
+     * @property Grid\Column|Collection user_name
+     * @property Grid\Column|Collection access_token
+     * @property Grid\Column|Collection media_name
+     *
+     * @method Grid\Column|Collection width(string $label = null)
+     * @method Grid\Column|Collection id(string $label = null)
+     * @method Grid\Column|Collection name(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 created_at(string $label = null)
+     * @method Grid\Column|Collection updated_at(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 order(string $label = null)
+     * @method Grid\Column|Collection icon(string $label = null)
+     * @method Grid\Column|Collection uri(string $label = null)
+     * @method Grid\Column|Collection extension(string $label = null)
+     * @method Grid\Column|Collection permission_id(string $label = null)
+     * @method Grid\Column|Collection menu_id(string $label = null)
+     * @method Grid\Column|Collection slug(string $label = null)
+     * @method Grid\Column|Collection http_method(string $label = null)
+     * @method Grid\Column|Collection http_path(string $label = null)
+     * @method Grid\Column|Collection role_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 username(string $label = null)
+     * @method Grid\Column|Collection password(string $label = null)
+     * @method Grid\Column|Collection avatar(string $label = null)
+     * @method Grid\Column|Collection remember_token(string $label = null)
+     * @method Grid\Column|Collection language(string $label = null)
+     * @method Grid\Column|Collection path_id(string $label = null)
+     * @method Grid\Column|Collection content(string $label = null)
+     * @method Grid\Column|Collection cover(string $label = null)
+     * @method Grid\Column|Collection photo(string $label = null)
+     * @method Grid\Column|Collection poster(string $label = null)
+     * @method Grid\Column|Collection video(string $label = null)
+     * @method Grid\Column|Collection cert(string $label = null)
+     * @method Grid\Column|Collection detail_cn(string $label = null)
+     * @method Grid\Column|Collection pdf(string $label = null)
+     * @method Grid\Column|Collection deleted_at(string $label = null)
+     * @method Grid\Column|Collection path(string $label = null)
+     * @method Grid\Column|Collection path_md5(string $label = null)
+     * @method Grid\Column|Collection status(string $label = null)
+     * @method Grid\Column|Collection weigh(string $label = null)
+     * @method Grid\Column|Collection alpha_2(string $label = null)
+     * @method Grid\Column|Collection country_name_en(string $label = null)
+     * @method Grid\Column|Collection country_name_zh(string $label = null)
+     * @method Grid\Column|Collection seo_keywords(string $label = null)
+     * @method Grid\Column|Collection seo_description(string $label = null)
+     * @method Grid\Column|Collection sku(string $label = null)
+     * @method Grid\Column|Collection category_id(string $label = null)
+     * @method Grid\Column|Collection issuance_date(string $label = null)
+     * @method Grid\Column|Collection enabled(string $label = null)
+     * @method Grid\Column|Collection parameters(string $label = null)
+     * @method Grid\Column|Collection is_pinned(string $label = null)
+     * @method Grid\Column|Collection seo_title(string $label = null)
+     * @method Grid\Column|Collection parameter_id(string $label = null)
+     * @method Grid\Column|Collection remark(string $label = null)
+     * @method Grid\Column|Collection image_url(string $label = null)
+     * @method Grid\Column|Collection product_id(string $label = null)
+     * @method Grid\Column|Collection video_url(string $label = null)
+     * @method Grid\Column|Collection cover_image(string $label = null)
+     * @method Grid\Column|Collection client_code(string $label = null)
+     * @method Grid\Column|Collection dist_contact_number(string $label = null)
+     * @method Grid\Column|Collection dist_email(string $label = null)
+     * @method Grid\Column|Collection secondary_domain(string $label = null)
+     * @method Grid\Column|Collection country(string $label = null)
+     * @method Grid\Column|Collection country_alpha_2(string $label = null)
+     * @method Grid\Column|Collection country_lang(string $label = null)
+     * @method Grid\Column|Collection address(string $label = null)
+     * @method Grid\Column|Collection service_hotline(string $label = null)
+     * @method Grid\Column|Collection whats_app(string $label = null)
+     * @method Grid\Column|Collection facebook(string $label = null)
+     * @method Grid\Column|Collection instagram(string $label = null)
+     * @method Grid\Column|Collection youtube(string $label = null)
+     * @method Grid\Column|Collection linkedin(string $label = null)
+     * @method Grid\Column|Collection tiktok(string $label = null)
+     * @method Grid\Column|Collection site_name(string $label = null)
+     * @method Grid\Column|Collection company_name(string $label = null)
+     * @method Grid\Column|Collection appearance_id(string $label = null)
+     * @method Grid\Column|Collection custom_domain(string $label = null)
+     * @method Grid\Column|Collection domain_type(string $label = null)
+     * @method Grid\Column|Collection logo(string $label = null)
+     * @method Grid\Column|Collection copy_right(string $label = null)
+     * @method Grid\Column|Collection statistics_js(string $label = null)
+     * @method Grid\Column|Collection company_address(string $label = null)
+     * @method Grid\Column|Collection owned_appearances(string $label = null)
+     * @method Grid\Column|Collection album_folder(string $label = null)
+     * @method Grid\Column|Collection key(string $label = null)
+     * @method Grid\Column|Collection dist_id(string $label = null)
+     * @method Grid\Column|Collection describe(string $label = null)
+     * @method Grid\Column|Collection imported(string $label = null)
+     * @method Grid\Column|Collection folder(string $label = null)
+     * @method Grid\Column|Collection original_table(string $label = null)
+     * @method Grid\Column|Collection data(string $label = null)
+     * @method Grid\Column|Collection template_version(string $label = null)
+     * @method Grid\Column|Collection template_update_code(string $label = null)
+     * @method Grid\Column|Collection template_local_code(string $label = null)
+     * @method Grid\Column|Collection file_name(string $label = null)
+     * @method Grid\Column|Collection file_path(string $label = null)
+     * @method Grid\Column|Collection template_code(string $label = null)
+     * @method Grid\Column|Collection current_content(string $label = null)
+     * @method Grid\Column|Collection previous_content(string $label = null)
+     * @method Grid\Column|Collection variable_name(string $label = null)
+     * @method Grid\Column|Collection variable_value(string $label = null)
+     * @method Grid\Column|Collection variable_type(string $label = null)
+     * @method Grid\Column|Collection variable_code(string $label = null)
+     * @method Grid\Column|Collection order_number(string $label = null)
+     * @method Grid\Column|Collection customer_name(string $label = null)
+     * @method Grid\Column|Collection email(string $label = null)
+     * @method Grid\Column|Collection consulting_products(string $label = null)
+     * @method Grid\Column|Collection freight_forwarder(string $label = null)
+     * @method Grid\Column|Collection business_model(string $label = null)
+     * @method Grid\Column|Collection ip_address(string $label = null)
+     * @method Grid\Column|Collection allocate_time(string $label = null)
+     * @method Grid\Column|Collection referer_url(string $label = null)
+     * @method Grid\Column|Collection sender_id(string $label = null)
+     * @method Grid\Column|Collection target_type(string $label = null)
+     * @method Grid\Column|Collection target_ids(string $label = null)
+     * @method Grid\Column|Collection review_reply(string $label = null)
+     * @method Grid\Column|Collection message_id(string $label = null)
+     * @method Grid\Column|Collection is_read(string $label = null)
+     * @method Grid\Column|Collection token(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 expires_at(string $label = null)
+     * @method Grid\Column|Collection banner_url(string $label = null)
+     * @method Grid\Column|Collection position(string $label = null)
+     * @method Grid\Column|Collection subtitle(string $label = null)
+     * @method Grid\Column|Collection menu_type(string $label = null)
+     * @method Grid\Column|Collection menu_config(string $label = null)
+     * @method Grid\Column|Collection menu_location(string $label = null)
+     * @method Grid\Column|Collection author(string $label = null)
+     * @method Grid\Column|Collection post_date(string $label = null)
+     * @method Grid\Column|Collection page_type(string $label = null)
+     * @method Grid\Column|Collection template_file(string $label = null)
+     * @method Grid\Column|Collection pages_id(string $label = null)
+     * @method Grid\Column|Collection tag_id(string $label = null)
+     * @method Grid\Column|Collection flyer_type(string $label = null)
+     * @method Grid\Column|Collection send_type(string $label = null)
+     * @method Grid\Column|Collection send_time(string $label = null)
+     * @method Grid\Column|Collection send_content(string $label = null)
+     * @method Grid\Column|Collection account_ids(string $label = null)
+     * @method Grid\Column|Collection message(string $label = null)
+     * @method Grid\Column|Collection flyer_url(string $label = null)
+     * @method Grid\Column|Collection flyer_id(string $label = null)
+     * @method Grid\Column|Collection account_id(string $label = null)
+     * @method Grid\Column|Collection request_content(string $label = null)
+     * @method Grid\Column|Collection response_content(string $label = null)
+     * @method Grid\Column|Collection api_name(string $label = null)
+     * @method Grid\Column|Collection page_post_id(string $label = null)
+     * @method Grid\Column|Collection post_type(string $label = null)
+     * @method Grid\Column|Collection image_video_url(string $label = null)
+     * @method Grid\Column|Collection user_name(string $label = null)
+     * @method Grid\Column|Collection access_token(string $label = null)
+     * @method Grid\Column|Collection media_name(string $label = null)
+     */
+    class Grid {}
+
+    class MiniGrid extends Grid {}
+
+    /**
+     * @property Show\Field|Collection width
+     * @property Show\Field|Collection id
+     * @property Show\Field|Collection name
+     * @property Show\Field|Collection type
+     * @property Show\Field|Collection version
+     * @property Show\Field|Collection detail
+     * @property Show\Field|Collection created_at
+     * @property Show\Field|Collection updated_at
+     * @property Show\Field|Collection is_enabled
+     * @property Show\Field|Collection parent_id
+     * @property Show\Field|Collection order
+     * @property Show\Field|Collection icon
+     * @property Show\Field|Collection uri
+     * @property Show\Field|Collection extension
+     * @property Show\Field|Collection permission_id
+     * @property Show\Field|Collection menu_id
+     * @property Show\Field|Collection slug
+     * @property Show\Field|Collection http_method
+     * @property Show\Field|Collection http_path
+     * @property Show\Field|Collection role_id
+     * @property Show\Field|Collection user_id
+     * @property Show\Field|Collection value
+     * @property Show\Field|Collection username
+     * @property Show\Field|Collection password
+     * @property Show\Field|Collection avatar
+     * @property Show\Field|Collection remember_token
+     * @property Show\Field|Collection language
+     * @property Show\Field|Collection path_id
+     * @property Show\Field|Collection content
+     * @property Show\Field|Collection cover
+     * @property Show\Field|Collection photo
+     * @property Show\Field|Collection poster
+     * @property Show\Field|Collection video
+     * @property Show\Field|Collection cert
+     * @property Show\Field|Collection detail_cn
+     * @property Show\Field|Collection pdf
+     * @property Show\Field|Collection deleted_at
+     * @property Show\Field|Collection path
+     * @property Show\Field|Collection path_md5
+     * @property Show\Field|Collection status
+     * @property Show\Field|Collection weigh
+     * @property Show\Field|Collection alpha_2
+     * @property Show\Field|Collection country_name_en
+     * @property Show\Field|Collection country_name_zh
+     * @property Show\Field|Collection seo_keywords
+     * @property Show\Field|Collection seo_description
+     * @property Show\Field|Collection sku
+     * @property Show\Field|Collection category_id
+     * @property Show\Field|Collection issuance_date
+     * @property Show\Field|Collection enabled
+     * @property Show\Field|Collection parameters
+     * @property Show\Field|Collection is_pinned
+     * @property Show\Field|Collection seo_title
+     * @property Show\Field|Collection parameter_id
+     * @property Show\Field|Collection remark
+     * @property Show\Field|Collection image_url
+     * @property Show\Field|Collection product_id
+     * @property Show\Field|Collection video_url
+     * @property Show\Field|Collection cover_image
+     * @property Show\Field|Collection client_code
+     * @property Show\Field|Collection dist_contact_number
+     * @property Show\Field|Collection dist_email
+     * @property Show\Field|Collection secondary_domain
+     * @property Show\Field|Collection country
+     * @property Show\Field|Collection country_alpha_2
+     * @property Show\Field|Collection country_lang
+     * @property Show\Field|Collection address
+     * @property Show\Field|Collection service_hotline
+     * @property Show\Field|Collection whats_app
+     * @property Show\Field|Collection facebook
+     * @property Show\Field|Collection instagram
+     * @property Show\Field|Collection youtube
+     * @property Show\Field|Collection linkedin
+     * @property Show\Field|Collection tiktok
+     * @property Show\Field|Collection site_name
+     * @property Show\Field|Collection company_name
+     * @property Show\Field|Collection appearance_id
+     * @property Show\Field|Collection custom_domain
+     * @property Show\Field|Collection domain_type
+     * @property Show\Field|Collection logo
+     * @property Show\Field|Collection copy_right
+     * @property Show\Field|Collection statistics_js
+     * @property Show\Field|Collection company_address
+     * @property Show\Field|Collection owned_appearances
+     * @property Show\Field|Collection album_folder
+     * @property Show\Field|Collection key
+     * @property Show\Field|Collection dist_id
+     * @property Show\Field|Collection describe
+     * @property Show\Field|Collection imported
+     * @property Show\Field|Collection folder
+     * @property Show\Field|Collection original_table
+     * @property Show\Field|Collection data
+     * @property Show\Field|Collection template_version
+     * @property Show\Field|Collection template_update_code
+     * @property Show\Field|Collection template_local_code
+     * @property Show\Field|Collection file_name
+     * @property Show\Field|Collection file_path
+     * @property Show\Field|Collection template_code
+     * @property Show\Field|Collection current_content
+     * @property Show\Field|Collection previous_content
+     * @property Show\Field|Collection variable_name
+     * @property Show\Field|Collection variable_value
+     * @property Show\Field|Collection variable_type
+     * @property Show\Field|Collection variable_code
+     * @property Show\Field|Collection order_number
+     * @property Show\Field|Collection customer_name
+     * @property Show\Field|Collection email
+     * @property Show\Field|Collection consulting_products
+     * @property Show\Field|Collection freight_forwarder
+     * @property Show\Field|Collection business_model
+     * @property Show\Field|Collection ip_address
+     * @property Show\Field|Collection allocate_time
+     * @property Show\Field|Collection referer_url
+     * @property Show\Field|Collection sender_id
+     * @property Show\Field|Collection target_type
+     * @property Show\Field|Collection target_ids
+     * @property Show\Field|Collection review_reply
+     * @property Show\Field|Collection message_id
+     * @property Show\Field|Collection is_read
+     * @property Show\Field|Collection token
+     * @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 expires_at
+     * @property Show\Field|Collection banner_url
+     * @property Show\Field|Collection position
+     * @property Show\Field|Collection subtitle
+     * @property Show\Field|Collection menu_type
+     * @property Show\Field|Collection menu_config
+     * @property Show\Field|Collection menu_location
+     * @property Show\Field|Collection author
+     * @property Show\Field|Collection post_date
+     * @property Show\Field|Collection page_type
+     * @property Show\Field|Collection template_file
+     * @property Show\Field|Collection pages_id
+     * @property Show\Field|Collection tag_id
+     * @property Show\Field|Collection flyer_type
+     * @property Show\Field|Collection send_type
+     * @property Show\Field|Collection send_time
+     * @property Show\Field|Collection send_content
+     * @property Show\Field|Collection account_ids
+     * @property Show\Field|Collection message
+     * @property Show\Field|Collection flyer_url
+     * @property Show\Field|Collection flyer_id
+     * @property Show\Field|Collection account_id
+     * @property Show\Field|Collection request_content
+     * @property Show\Field|Collection response_content
+     * @property Show\Field|Collection api_name
+     * @property Show\Field|Collection page_post_id
+     * @property Show\Field|Collection post_type
+     * @property Show\Field|Collection image_video_url
+     * @property Show\Field|Collection user_name
+     * @property Show\Field|Collection access_token
+     * @property Show\Field|Collection media_name
+     *
+     * @method Show\Field|Collection width(string $label = null)
+     * @method Show\Field|Collection id(string $label = null)
+     * @method Show\Field|Collection name(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 created_at(string $label = null)
+     * @method Show\Field|Collection updated_at(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 order(string $label = null)
+     * @method Show\Field|Collection icon(string $label = null)
+     * @method Show\Field|Collection uri(string $label = null)
+     * @method Show\Field|Collection extension(string $label = null)
+     * @method Show\Field|Collection permission_id(string $label = null)
+     * @method Show\Field|Collection menu_id(string $label = null)
+     * @method Show\Field|Collection slug(string $label = null)
+     * @method Show\Field|Collection http_method(string $label = null)
+     * @method Show\Field|Collection http_path(string $label = null)
+     * @method Show\Field|Collection role_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 username(string $label = null)
+     * @method Show\Field|Collection password(string $label = null)
+     * @method Show\Field|Collection avatar(string $label = null)
+     * @method Show\Field|Collection remember_token(string $label = null)
+     * @method Show\Field|Collection language(string $label = null)
+     * @method Show\Field|Collection path_id(string $label = null)
+     * @method Show\Field|Collection content(string $label = null)
+     * @method Show\Field|Collection cover(string $label = null)
+     * @method Show\Field|Collection photo(string $label = null)
+     * @method Show\Field|Collection poster(string $label = null)
+     * @method Show\Field|Collection video(string $label = null)
+     * @method Show\Field|Collection cert(string $label = null)
+     * @method Show\Field|Collection detail_cn(string $label = null)
+     * @method Show\Field|Collection pdf(string $label = null)
+     * @method Show\Field|Collection deleted_at(string $label = null)
+     * @method Show\Field|Collection path(string $label = null)
+     * @method Show\Field|Collection path_md5(string $label = null)
+     * @method Show\Field|Collection status(string $label = null)
+     * @method Show\Field|Collection weigh(string $label = null)
+     * @method Show\Field|Collection alpha_2(string $label = null)
+     * @method Show\Field|Collection country_name_en(string $label = null)
+     * @method Show\Field|Collection country_name_zh(string $label = null)
+     * @method Show\Field|Collection seo_keywords(string $label = null)
+     * @method Show\Field|Collection seo_description(string $label = null)
+     * @method Show\Field|Collection sku(string $label = null)
+     * @method Show\Field|Collection category_id(string $label = null)
+     * @method Show\Field|Collection issuance_date(string $label = null)
+     * @method Show\Field|Collection enabled(string $label = null)
+     * @method Show\Field|Collection parameters(string $label = null)
+     * @method Show\Field|Collection is_pinned(string $label = null)
+     * @method Show\Field|Collection seo_title(string $label = null)
+     * @method Show\Field|Collection parameter_id(string $label = null)
+     * @method Show\Field|Collection remark(string $label = null)
+     * @method Show\Field|Collection image_url(string $label = null)
+     * @method Show\Field|Collection product_id(string $label = null)
+     * @method Show\Field|Collection video_url(string $label = null)
+     * @method Show\Field|Collection cover_image(string $label = null)
+     * @method Show\Field|Collection client_code(string $label = null)
+     * @method Show\Field|Collection dist_contact_number(string $label = null)
+     * @method Show\Field|Collection dist_email(string $label = null)
+     * @method Show\Field|Collection secondary_domain(string $label = null)
+     * @method Show\Field|Collection country(string $label = null)
+     * @method Show\Field|Collection country_alpha_2(string $label = null)
+     * @method Show\Field|Collection country_lang(string $label = null)
+     * @method Show\Field|Collection address(string $label = null)
+     * @method Show\Field|Collection service_hotline(string $label = null)
+     * @method Show\Field|Collection whats_app(string $label = null)
+     * @method Show\Field|Collection facebook(string $label = null)
+     * @method Show\Field|Collection instagram(string $label = null)
+     * @method Show\Field|Collection youtube(string $label = null)
+     * @method Show\Field|Collection linkedin(string $label = null)
+     * @method Show\Field|Collection tiktok(string $label = null)
+     * @method Show\Field|Collection site_name(string $label = null)
+     * @method Show\Field|Collection company_name(string $label = null)
+     * @method Show\Field|Collection appearance_id(string $label = null)
+     * @method Show\Field|Collection custom_domain(string $label = null)
+     * @method Show\Field|Collection domain_type(string $label = null)
+     * @method Show\Field|Collection logo(string $label = null)
+     * @method Show\Field|Collection copy_right(string $label = null)
+     * @method Show\Field|Collection statistics_js(string $label = null)
+     * @method Show\Field|Collection company_address(string $label = null)
+     * @method Show\Field|Collection owned_appearances(string $label = null)
+     * @method Show\Field|Collection album_folder(string $label = null)
+     * @method Show\Field|Collection key(string $label = null)
+     * @method Show\Field|Collection dist_id(string $label = null)
+     * @method Show\Field|Collection describe(string $label = null)
+     * @method Show\Field|Collection imported(string $label = null)
+     * @method Show\Field|Collection folder(string $label = null)
+     * @method Show\Field|Collection original_table(string $label = null)
+     * @method Show\Field|Collection data(string $label = null)
+     * @method Show\Field|Collection template_version(string $label = null)
+     * @method Show\Field|Collection template_update_code(string $label = null)
+     * @method Show\Field|Collection template_local_code(string $label = null)
+     * @method Show\Field|Collection file_name(string $label = null)
+     * @method Show\Field|Collection file_path(string $label = null)
+     * @method Show\Field|Collection template_code(string $label = null)
+     * @method Show\Field|Collection current_content(string $label = null)
+     * @method Show\Field|Collection previous_content(string $label = null)
+     * @method Show\Field|Collection variable_name(string $label = null)
+     * @method Show\Field|Collection variable_value(string $label = null)
+     * @method Show\Field|Collection variable_type(string $label = null)
+     * @method Show\Field|Collection variable_code(string $label = null)
+     * @method Show\Field|Collection order_number(string $label = null)
+     * @method Show\Field|Collection customer_name(string $label = null)
+     * @method Show\Field|Collection email(string $label = null)
+     * @method Show\Field|Collection consulting_products(string $label = null)
+     * @method Show\Field|Collection freight_forwarder(string $label = null)
+     * @method Show\Field|Collection business_model(string $label = null)
+     * @method Show\Field|Collection ip_address(string $label = null)
+     * @method Show\Field|Collection allocate_time(string $label = null)
+     * @method Show\Field|Collection referer_url(string $label = null)
+     * @method Show\Field|Collection sender_id(string $label = null)
+     * @method Show\Field|Collection target_type(string $label = null)
+     * @method Show\Field|Collection target_ids(string $label = null)
+     * @method Show\Field|Collection review_reply(string $label = null)
+     * @method Show\Field|Collection message_id(string $label = null)
+     * @method Show\Field|Collection is_read(string $label = null)
+     * @method Show\Field|Collection token(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 expires_at(string $label = null)
+     * @method Show\Field|Collection banner_url(string $label = null)
+     * @method Show\Field|Collection position(string $label = null)
+     * @method Show\Field|Collection subtitle(string $label = null)
+     * @method Show\Field|Collection menu_type(string $label = null)
+     * @method Show\Field|Collection menu_config(string $label = null)
+     * @method Show\Field|Collection menu_location(string $label = null)
+     * @method Show\Field|Collection author(string $label = null)
+     * @method Show\Field|Collection post_date(string $label = null)
+     * @method Show\Field|Collection page_type(string $label = null)
+     * @method Show\Field|Collection template_file(string $label = null)
+     * @method Show\Field|Collection pages_id(string $label = null)
+     * @method Show\Field|Collection tag_id(string $label = null)
+     * @method Show\Field|Collection flyer_type(string $label = null)
+     * @method Show\Field|Collection send_type(string $label = null)
+     * @method Show\Field|Collection send_time(string $label = null)
+     * @method Show\Field|Collection send_content(string $label = null)
+     * @method Show\Field|Collection account_ids(string $label = null)
+     * @method Show\Field|Collection message(string $label = null)
+     * @method Show\Field|Collection flyer_url(string $label = null)
+     * @method Show\Field|Collection flyer_id(string $label = null)
+     * @method Show\Field|Collection account_id(string $label = null)
+     * @method Show\Field|Collection request_content(string $label = null)
+     * @method Show\Field|Collection response_content(string $label = null)
+     * @method Show\Field|Collection api_name(string $label = null)
+     * @method Show\Field|Collection page_post_id(string $label = null)
+     * @method Show\Field|Collection post_type(string $label = null)
+     * @method Show\Field|Collection image_video_url(string $label = null)
+     * @method Show\Field|Collection user_name(string $label = null)
+     * @method Show\Field|Collection access_token(string $label = null)
+     * @method Show\Field|Collection media_name(string $label = null)
+     */
+    class Show {}
+
+    /**
+     * @method \App\Exceptions\Form\MultipleCutImage multipleCutImage(...$params)
+     * @method \App\Exceptions\Form\CutImage cutImage(...$params)
+     * @method \Dcat\Admin\Form\Extend\Distpicker\Form\Distpicker distpicker(...$params)
+     * @method \Dcat\Admin\Form\Extend\Diyforms\Form\DiyForm diyForm(...$params)
+     */
+    class Form {}
+
+}
+
+namespace Dcat\Admin\Grid {
+    /**
+     * @method $this distpicker(...$params)
+     */
+    class Column {}
+
+    /**
+     * @method \Dcat\Admin\Form\Extend\Distpicker\Filter\DistpickerFilter distpicker(...$params)
+     */
+    class Filter {}
+}
+
+namespace Dcat\Admin\Show {
+    /**
+     * @method $this diyForm(...$params)
+     */
+    class Field {}
+}

+ 1 - 0
lang/en/admin.php

@@ -259,4 +259,5 @@ return [
     'banner_list' => 'Banner List',
     'crop_the_image' => 'Crop the Image',
     'promotional_materials' => 'Promotional Materials',
+    'add_platform_account' => 'Add Platform Account',
 ];

+ 1 - 0
lang/en/global.php

@@ -208,6 +208,7 @@ return [
         'pending_approval'      => 'Pending Approval',
         'distributor_name'      => 'Distributor Name',
         'product_audit'         => 'Product Audit',
+        'add_platform_account' => 'Add Platform Account',
     ],
     'options' => [
         //

+ 1 - 0
lang/zh_CN/admin.php

@@ -261,4 +261,5 @@ return [
     'crop_the_image' => '裁剪图片',
     'promotional_materials' => '宣传资料',
     'save' => '保存',
+    'add_platform_account' => '添加平台账号',
 ];

+ 1 - 0
lang/zh_CN/global.php

@@ -217,6 +217,7 @@ return [
         'distributor_name'      => '分销商名称',
         'audit_success'      => '审核成功',
         'product_audit'      => '产品审核',
+        'add_platform_account' => '添加平台账号',
     ],
     'options' => [
         //