Browse Source

no message

sys 2 years ago
parent
commit
5ca5728018
100 changed files with 3757 additions and 1214 deletions
  1. 82 0
      app/Http/Controllers/BlockInfo/BlockInfosController.php
  2. 82 0
      app/Http/Controllers/BlockItem/BlockItemsController.php
  3. 82 0
      app/Http/Controllers/Broadcast/BroadcastsController.php
  4. 82 0
      app/Http/Controllers/CoinType/CoinTypesController.php
  5. 82 0
      app/Http/Controllers/MemberCoin/MemberCoinsController.php
  6. 30 0
      app/Http/Requests/BlockInfoCreateRequest.php
  7. 30 0
      app/Http/Requests/BlockInfoUpdateRequest.php
  8. 30 0
      app/Http/Requests/BlockItemsCreateRequest.php
  9. 30 0
      app/Http/Requests/BlockItemsUpdateRequest.php
  10. 30 0
      app/Http/Requests/BroadcastCreateRequest.php
  11. 30 0
      app/Http/Requests/BroadcastUpdateRequest.php
  12. 30 0
      app/Http/Requests/CoinTypeCreateRequest.php
  13. 30 0
      app/Http/Requests/CoinTypeUpdateRequest.php
  14. 30 0
      app/Http/Requests/MemberCoinsCreateRequest.php
  15. 30 0
      app/Http/Requests/MemberCoinsUpdateRequest.php
  16. 43 0
      app/Models/BlockInfo.php
  17. 57 0
      app/Models/BlockItems.php
  18. 79 0
      app/Models/Broadcast.php
  19. 41 0
      app/Models/CoinType.php
  20. 51 0
      app/Models/MemberCoins.php
  21. 24 0
      app/Presenters/BlockInfoPresenter.php
  22. 24 0
      app/Presenters/BlockItemsPresenter.php
  23. 24 0
      app/Presenters/BroadcastPresenter.php
  24. 24 0
      app/Presenters/CoinTypePresenter.php
  25. 24 0
      app/Presenters/MemberCoinsPresenter.php
  26. 5 0
      app/Providers/RepositoryServiceProvider.php
  27. 15 0
      app/Repositories/BlockInfoRepository.php
  28. 15 0
      app/Repositories/BlockItemsRepository.php
  29. 15 0
      app/Repositories/BroadcastRepository.php
  30. 15 0
      app/Repositories/CoinTypeRepository.php
  31. 57 0
      app/Repositories/Eloquent/BlockInfoRepositoryEloquent.php
  32. 57 0
      app/Repositories/Eloquent/BlockItemsRepositoryEloquent.php
  33. 57 0
      app/Repositories/Eloquent/BroadcastRepositoryEloquent.php
  34. 57 0
      app/Repositories/Eloquent/CoinTypeRepositoryEloquent.php
  35. 57 0
      app/Repositories/Eloquent/MemberCoinsRepositoryEloquent.php
  36. 15 0
      app/Repositories/MemberCoinsRepository.php
  37. 36 0
      app/Servers/Icon/Address.php
  38. 127 0
      app/Servers/Icon/EthereumRPC.php
  39. 244 0
      app/Servers/Icon/Utils.php
  40. 33 0
      app/Transformers/BlockInfoTransformer.php
  41. 33 0
      app/Transformers/BlockItemsTransformer.php
  42. 33 0
      app/Transformers/BroadcastTransformer.php
  43. 33 0
      app/Transformers/CoinTypeTransformer.php
  44. 33 0
      app/Transformers/MemberCoinsTransformer.php
  45. 24 0
      app/Validators/BlockInfoValidator.php
  46. 24 0
      app/Validators/BlockItemsValidator.php
  47. 24 0
      app/Validators/BroadcastValidator.php
  48. 24 0
      app/Validators/CoinTypeValidator.php
  49. 24 0
      app/Validators/MemberCoinsValidator.php
  50. 0 36
      database/migrations/2014_10_12_000000_create_users_table.php
  51. 0 32
      database/migrations/2014_10_12_100000_create_password_resets_table.php
  52. 0 53
      database/migrations/2018_01_01_000000_create_regions_table.php
  53. 0 36
      database/migrations/2020_11_13_162845_create_test_infos_table.php
  54. 0 39
      database/migrations/2020_11_13_162901_create_test_items_table.php
  55. 0 34
      database/migrations/2020_11_13_165843_create_test_items_table.php
  56. 0 34
      database/migrations/2020_11_13_171300_create_test_items_table.php
  57. 0 34
      database/migrations/2020_11_13_171609_create_test_items_table.php
  58. 0 34
      database/migrations/2020_11_16_105124_create_test_infos_table.php
  59. 0 34
      database/migrations/2020_11_16_105155_create_test_items_table.php
  60. 0 34
      database/migrations/2021_07_12_113210_create_broadcasts_table.php
  61. 0 34
      database/migrations/2021_07_12_113309_create_block_items_table.php
  62. 0 39
      database/migrations/2021_10_11_162752_create_shop_commissions_table.php
  63. 0 38
      database/migrations/2021_10_15_142625_create_shop_withdraws_table.php
  64. 0 39
      database/migrations/2021_10_15_142717_create_shop_bank_cards_table.php
  65. 0 35
      database/migrations/2021_10_16_092459_create_agency_sets_table.php
  66. 0 36
      database/migrations/2021_10_16_113818_create_qr_codes_table.php
  67. 0 36
      database/migrations/2021_10_18_150042_create_freight_cities_table.php
  68. 0 35
      database/migrations/2021_10_28_114900_create_invite_codes_table.php
  69. 0 36
      database/migrations/2021_10_28_160848_create_goods_shares_table.php
  70. 0 45
      database/migrations/2021_11_03_111713_create_used_goods_table.php
  71. 0 35
      database/migrations/2021_11_03_111759_create_used_imgs_table.php
  72. 0 52
      database/migrations/2021_11_03_111819_create_used_orders_table.php
  73. 0 34
      database/migrations/2021_11_06_163859_create_sensitive_words_table.php
  74. 0 40
      database/migrations/2021_11_08_144727_create_albums_table.php
  75. 0 42
      database/migrations/2021_11_09_140955_create_shop_sttles_table.php
  76. 0 45
      database/migrations/2021_11_10_153049_create_im_groups_table.php
  77. 0 43
      database/migrations/2021_11_10_153057_create_im_messages_table.php
  78. 0 41
      database/migrations/2021_11_11_174225_create_im_services_table.php
  79. 0 36
      database/migrations/2021_11_13_170123_create_templates_table.php
  80. 0 38
      database/migrations/2021_12_09_160647_create_electronic_orders_table.php
  81. 0 34
      database/migrations/2022_01_25_132241_create_money_records_table.php
  82. 36 0
      database/migrations/2022_10_18_091934_create_coin_types_table.php
  83. 41 0
      database/migrations/2022_10_18_091958_create_member_coins_table.php
  84. 4 1
      database/migrations/2022_10_18_092006_create_block_infos_table.php
  85. 44 0
      database/migrations/2022_10_18_092015_create_block_items_table.php
  86. 55 0
      database/migrations/2022_10_18_092853_create_broadcasts_table.php
  87. 26 0
      public/404.html
  88. 85 0
      resources/views/admins/blockInfos/create.blade.php
  89. 86 0
      resources/views/admins/blockInfos/edit.blade.php
  90. 156 0
      resources/views/admins/blockInfos/index.blade.php
  91. 85 0
      resources/views/admins/blockItems/create.blade.php
  92. 86 0
      resources/views/admins/blockItems/edit.blade.php
  93. 156 0
      resources/views/admins/blockItems/index.blade.php
  94. 85 0
      resources/views/admins/broadcasts/create.blade.php
  95. 86 0
      resources/views/admins/broadcasts/edit.blade.php
  96. 156 0
      resources/views/admins/broadcasts/index.blade.php
  97. 85 0
      resources/views/admins/coinTypes/create.blade.php
  98. 86 0
      resources/views/admins/coinTypes/edit.blade.php
  99. 156 0
      resources/views/admins/coinTypes/index.blade.php
  100. 85 0
      resources/views/admins/memberCoins/create.blade.php

+ 82 - 0
app/Http/Controllers/BlockInfo/BlockInfosController.php

@@ -0,0 +1,82 @@
+<?php
+
+namespace App\Http\Controllers\BlockInfo;
+
+use App\Http\Controllers\AdminBaseController;
+use App\Http\Requests\BlockInfoCreateRequest;
+use App\Http\Requests\BlockInfoUpdateRequest;
+use App\Repositories\Eloquent\BlockInfoRepositoryEloquent;
+use App\Validators\BlockInfoValidator;
+
+/**
+ * Class BlockInfosController.
+ *
+ * @package namespace App\Http\Controllers;
+ */
+class BlockInfosController extends AdminBaseController
+{
+    /**
+     * @var BlockInfoRepositoryEloquent
+     */
+    protected $repository;
+
+    /**
+     * @var BlockInfoValidator
+     */
+    protected $validator;
+
+    /**
+     * BlockInfosController constructor.
+     *
+     * @param BlockInfoRepositoryEloquent $repository
+     * @param BlockInfoValidator $validator
+     */
+    public function __construct(BlockInfoRepositoryEloquent $repository, BlockInfoValidator $validator)
+    {
+        parent::__construct($repository, $validator);
+    }
+
+    /**
+     * 数据检索
+     */
+     public function _indexScopeQuery()
+        {
+            $where = [];
+            $search = explode(";", request()->input('search', ""));
+            $start = $end = null;
+            $fieldSearchable=$this->repository->getFieldsSearchable();
+            foreach ($search as $value) {
+                if (!empty($value)) {
+                    list($one, $tow) = explode(":", $value);
+                    if (!empty($fieldSearchable[$one])) {
+                        if($fieldSearchable[$one]=='like')$tow="%{$tow}%";
+                        $where[]=[$one,$fieldSearchable[$one],$tow];
+                    } elseif ($one == 'start') {
+                        $start = $tow . " 00:00:00";
+                    } elseif ($one == 'end') {
+                        $end = $tow . " 23:59:59";
+                    } else {
+                        continue;
+                    }
+                }
+            }
+            return function ($query) use ($where, $start, $end) {
+
+                if ($start) $where[] = ['created_at', '>=', $start];
+                if ($end) $where[] = ['created_at', '<=', $end];
+                if ($where) {
+                    $query->where($where);
+                }
+
+            };
+        }
+
+   /**
+     * 数据更新
+     */
+    protected function _indexPost($datum)
+    {
+        return $datum;
+    }
+
+}

+ 82 - 0
app/Http/Controllers/BlockItem/BlockItemsController.php

@@ -0,0 +1,82 @@
+<?php
+
+namespace App\Http\Controllers\BlockItem;
+
+use App\Http\Controllers\AdminBaseController;
+use App\Http\Requests\BlockItemsCreateRequest;
+use App\Http\Requests\BlockItemsUpdateRequest;
+use App\Repositories\Eloquent\BlockItemsRepositoryEloquent;
+use App\Validators\BlockItemsValidator;
+
+/**
+ * Class BlockItemsController.
+ *
+ * @package namespace App\Http\Controllers;
+ */
+class BlockItemsController extends AdminBaseController
+{
+    /**
+     * @var BlockItemsRepositoryEloquent
+     */
+    protected $repository;
+
+    /**
+     * @var BlockItemsValidator
+     */
+    protected $validator;
+
+    /**
+     * BlockItemsController constructor.
+     *
+     * @param BlockItemsRepositoryEloquent $repository
+     * @param BlockItemsValidator $validator
+     */
+    public function __construct(BlockItemsRepositoryEloquent $repository, BlockItemsValidator $validator)
+    {
+        parent::__construct($repository, $validator);
+    }
+
+    /**
+     * 数据检索
+     */
+     public function _indexScopeQuery()
+        {
+            $where = [];
+            $search = explode(";", request()->input('search', ""));
+            $start = $end = null;
+            $fieldSearchable=$this->repository->getFieldsSearchable();
+            foreach ($search as $value) {
+                if (!empty($value)) {
+                    list($one, $tow) = explode(":", $value);
+                    if (!empty($fieldSearchable[$one])) {
+                        if($fieldSearchable[$one]=='like')$tow="%{$tow}%";
+                        $where[]=[$one,$fieldSearchable[$one],$tow];
+                    } elseif ($one == 'start') {
+                        $start = $tow . " 00:00:00";
+                    } elseif ($one == 'end') {
+                        $end = $tow . " 23:59:59";
+                    } else {
+                        continue;
+                    }
+                }
+            }
+            return function ($query) use ($where, $start, $end) {
+
+                if ($start) $where[] = ['created_at', '>=', $start];
+                if ($end) $where[] = ['created_at', '<=', $end];
+                if ($where) {
+                    $query->where($where);
+                }
+
+            };
+        }
+
+   /**
+     * 数据更新
+     */
+    protected function _indexPost($datum)
+    {
+        return $datum;
+    }
+
+}

+ 82 - 0
app/Http/Controllers/Broadcast/BroadcastsController.php

@@ -0,0 +1,82 @@
+<?php
+
+namespace App\Http\Controllers\Broadcast;
+
+use App\Http\Controllers\AdminBaseController;
+use App\Http\Requests\BroadcastCreateRequest;
+use App\Http\Requests\BroadcastUpdateRequest;
+use App\Repositories\Eloquent\BroadcastRepositoryEloquent;
+use App\Validators\BroadcastValidator;
+
+/**
+ * Class BroadcastsController.
+ *
+ * @package namespace App\Http\Controllers;
+ */
+class BroadcastsController extends AdminBaseController
+{
+    /**
+     * @var BroadcastRepositoryEloquent
+     */
+    protected $repository;
+
+    /**
+     * @var BroadcastValidator
+     */
+    protected $validator;
+
+    /**
+     * BroadcastsController constructor.
+     *
+     * @param BroadcastRepositoryEloquent $repository
+     * @param BroadcastValidator $validator
+     */
+    public function __construct(BroadcastRepositoryEloquent $repository, BroadcastValidator $validator)
+    {
+        parent::__construct($repository, $validator);
+    }
+
+    /**
+     * 数据检索
+     */
+     public function _indexScopeQuery()
+        {
+            $where = [];
+            $search = explode(";", request()->input('search', ""));
+            $start = $end = null;
+            $fieldSearchable=$this->repository->getFieldsSearchable();
+            foreach ($search as $value) {
+                if (!empty($value)) {
+                    list($one, $tow) = explode(":", $value);
+                    if (!empty($fieldSearchable[$one])) {
+                        if($fieldSearchable[$one]=='like')$tow="%{$tow}%";
+                        $where[]=[$one,$fieldSearchable[$one],$tow];
+                    } elseif ($one == 'start') {
+                        $start = $tow . " 00:00:00";
+                    } elseif ($one == 'end') {
+                        $end = $tow . " 23:59:59";
+                    } else {
+                        continue;
+                    }
+                }
+            }
+            return function ($query) use ($where, $start, $end) {
+
+                if ($start) $where[] = ['created_at', '>=', $start];
+                if ($end) $where[] = ['created_at', '<=', $end];
+                if ($where) {
+                    $query->where($where);
+                }
+
+            };
+        }
+
+   /**
+     * 数据更新
+     */
+    protected function _indexPost($datum)
+    {
+        return $datum;
+    }
+
+}

+ 82 - 0
app/Http/Controllers/CoinType/CoinTypesController.php

@@ -0,0 +1,82 @@
+<?php
+
+namespace App\Http\Controllers\CoinType;
+
+use App\Http\Controllers\AdminBaseController;
+use App\Http\Requests\CoinTypeCreateRequest;
+use App\Http\Requests\CoinTypeUpdateRequest;
+use App\Repositories\Eloquent\CoinTypeRepositoryEloquent;
+use App\Validators\CoinTypeValidator;
+
+/**
+ * Class CoinTypesController.
+ *
+ * @package namespace App\Http\Controllers;
+ */
+class CoinTypesController extends AdminBaseController
+{
+    /**
+     * @var CoinTypeRepositoryEloquent
+     */
+    protected $repository;
+
+    /**
+     * @var CoinTypeValidator
+     */
+    protected $validator;
+
+    /**
+     * CoinTypesController constructor.
+     *
+     * @param CoinTypeRepositoryEloquent $repository
+     * @param CoinTypeValidator $validator
+     */
+    public function __construct(CoinTypeRepositoryEloquent $repository, CoinTypeValidator $validator)
+    {
+        parent::__construct($repository, $validator);
+    }
+
+    /**
+     * 数据检索
+     */
+     public function _indexScopeQuery()
+        {
+            $where = [];
+            $search = explode(";", request()->input('search', ""));
+            $start = $end = null;
+            $fieldSearchable=$this->repository->getFieldsSearchable();
+            foreach ($search as $value) {
+                if (!empty($value)) {
+                    list($one, $tow) = explode(":", $value);
+                    if (!empty($fieldSearchable[$one])) {
+                        if($fieldSearchable[$one]=='like')$tow="%{$tow}%";
+                        $where[]=[$one,$fieldSearchable[$one],$tow];
+                    } elseif ($one == 'start') {
+                        $start = $tow . " 00:00:00";
+                    } elseif ($one == 'end') {
+                        $end = $tow . " 23:59:59";
+                    } else {
+                        continue;
+                    }
+                }
+            }
+            return function ($query) use ($where, $start, $end) {
+
+                if ($start) $where[] = ['created_at', '>=', $start];
+                if ($end) $where[] = ['created_at', '<=', $end];
+                if ($where) {
+                    $query->where($where);
+                }
+
+            };
+        }
+
+   /**
+     * 数据更新
+     */
+    protected function _indexPost($datum)
+    {
+        return $datum;
+    }
+
+}

+ 82 - 0
app/Http/Controllers/MemberCoin/MemberCoinsController.php

@@ -0,0 +1,82 @@
+<?php
+
+namespace App\Http\Controllers\MemberCoin;
+
+use App\Http\Controllers\AdminBaseController;
+use App\Http\Requests\MemberCoinsCreateRequest;
+use App\Http\Requests\MemberCoinsUpdateRequest;
+use App\Repositories\Eloquent\MemberCoinsRepositoryEloquent;
+use App\Validators\MemberCoinsValidator;
+
+/**
+ * Class MemberCoinsController.
+ *
+ * @package namespace App\Http\Controllers;
+ */
+class MemberCoinsController extends AdminBaseController
+{
+    /**
+     * @var MemberCoinsRepositoryEloquent
+     */
+    protected $repository;
+
+    /**
+     * @var MemberCoinsValidator
+     */
+    protected $validator;
+
+    /**
+     * MemberCoinsController constructor.
+     *
+     * @param MemberCoinsRepositoryEloquent $repository
+     * @param MemberCoinsValidator $validator
+     */
+    public function __construct(MemberCoinsRepositoryEloquent $repository, MemberCoinsValidator $validator)
+    {
+        parent::__construct($repository, $validator);
+    }
+
+    /**
+     * 数据检索
+     */
+     public function _indexScopeQuery()
+        {
+            $where = [];
+            $search = explode(";", request()->input('search', ""));
+            $start = $end = null;
+            $fieldSearchable=$this->repository->getFieldsSearchable();
+            foreach ($search as $value) {
+                if (!empty($value)) {
+                    list($one, $tow) = explode(":", $value);
+                    if (!empty($fieldSearchable[$one])) {
+                        if($fieldSearchable[$one]=='like')$tow="%{$tow}%";
+                        $where[]=[$one,$fieldSearchable[$one],$tow];
+                    } elseif ($one == 'start') {
+                        $start = $tow . " 00:00:00";
+                    } elseif ($one == 'end') {
+                        $end = $tow . " 23:59:59";
+                    } else {
+                        continue;
+                    }
+                }
+            }
+            return function ($query) use ($where, $start, $end) {
+
+                if ($start) $where[] = ['created_at', '>=', $start];
+                if ($end) $where[] = ['created_at', '<=', $end];
+                if ($where) {
+                    $query->where($where);
+                }
+
+            };
+        }
+
+   /**
+     * 数据更新
+     */
+    protected function _indexPost($datum)
+    {
+        return $datum;
+    }
+
+}

+ 30 - 0
app/Http/Requests/BlockInfoCreateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class BlockInfoCreateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/BlockInfoUpdateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class BlockInfoUpdateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/BlockItemsCreateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class BlockItemsCreateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/BlockItemsUpdateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class BlockItemsUpdateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/BroadcastCreateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class BroadcastCreateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/BroadcastUpdateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class BroadcastUpdateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/CoinTypeCreateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class CoinTypeCreateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/CoinTypeUpdateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class CoinTypeUpdateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/MemberCoinsCreateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class MemberCoinsCreateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
app/Http/Requests/MemberCoinsUpdateRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class MemberCoinsUpdateRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 43 - 0
app/Models/BlockInfo.php

@@ -0,0 +1,43 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+use Prettus\Repository\Contracts\Transformable;
+use Prettus\Repository\Traits\TransformableTrait;
+
+/**
+ * Class BlockInfo.
+ *
+ * @package namespace App\Models;
+ * @property int $id
+ * @property int $analyze 扫描高度
+ * @property int $num 最高高度
+ * @property string $coin_name coin_name
+ * @property string $coin_id coin_id
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo query()
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo whereAnalyze($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo whereCoinId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo whereCoinName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo whereNum($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockInfo whereUpdatedAt($value)
+ * @mixin \Eloquent
+ */
+class BlockInfo extends Model implements Transformable
+{
+    use TransformableTrait;
+
+    /**
+     * The attributes that are mass assignable.
+     *
+     * @var array
+     */
+    protected $guarded = ['id', 'updated_at', 'created_at'];
+
+}

+ 57 - 0
app/Models/BlockItems.php

@@ -0,0 +1,57 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+use Prettus\Repository\Contracts\Transformable;
+use Prettus\Repository\Traits\TransformableTrait;
+
+/**
+ * Class BlockItems.
+ *
+ * @package namespace App\Models;
+ * @property int $id
+ * @property int $m_id m_id
+ * @property int $coin_id coin_id
+ * @property int $block_num block_num
+ * @property float $money 余额
+ * @property string $from_a from_a
+ * @property string $hash hash
+ * @property string $to_a to_a
+ * @property string $to_type to_type
+ * @property string $fee_limit fee_limit
+ * @property string $coin_name coin_name
+ * @property string|null $pay_at
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems query()
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereBlockNum($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereCoinId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereCoinName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereFeeLimit($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereFromA($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereHash($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereMId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereMoney($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems wherePayAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereToA($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereToType($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|BlockItems whereUpdatedAt($value)
+ * @mixin \Eloquent
+ */
+class BlockItems extends Model implements Transformable
+{
+    use TransformableTrait;
+
+    /**
+     * The attributes that are mass assignable.
+     *
+     * @var array
+     */
+    protected $guarded = ['id', 'updated_at', 'created_at'];
+
+}

+ 79 - 0
app/Models/Broadcast.php

@@ -0,0 +1,79 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+use Prettus\Repository\Contracts\Transformable;
+use Prettus\Repository\Traits\TransformableTrait;
+
+/**
+ * Class Broadcast.
+ *
+ * @package namespace App\Models;
+ * @property int $id
+ * @property string $from from
+ * @property string $to to
+ * @property string $nonce nonce
+ * @property string $value value
+ * @property string $data data
+ * @property string $chain_id chain_id
+ * @property string $gas_price gas_price
+ * @property string $gas_limit gas_limit
+ * @property string $sign sign
+ * @property string $hash hash
+ * @property string $from_key from_key
+ * @property string $error error
+ * @property string $contract_address contract_address
+ * @property string $to_address to_address
+ * @property string $success success
+ * @property float $money 余额
+ * @property int $type type
+ * @property int $status status
+ * @property int $order_id order_id
+ * @property int $coin_id coin_id
+ * @property int $depend depend
+ * @property int $m_id m_id
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast query()
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereChainId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereCoinId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereContractAddress($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereData($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereDepend($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereError($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereFrom($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereFromKey($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereGasLimit($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereGasPrice($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereHash($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereMId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereMoney($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereNonce($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereOrderId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereSign($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereStatus($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereSuccess($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereTo($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereToAddress($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereType($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|Broadcast whereValue($value)
+ * @mixin \Eloquent
+ */
+class Broadcast extends Model implements Transformable
+{
+    use TransformableTrait;
+
+    /**
+     * The attributes that are mass assignable.
+     *
+     * @var array
+     */
+    protected $guarded = ['id', 'updated_at', 'created_at'];
+
+}

+ 41 - 0
app/Models/CoinType.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+use Prettus\Repository\Contracts\Transformable;
+use Prettus\Repository\Traits\TransformableTrait;
+
+/**
+ * Class CoinType.
+ *
+ * @package namespace App\Models;
+ * @property int $id
+ * @property string $coin_name 名称
+ * @property string $coin_logo logo
+ * @property int $status 状态
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType query()
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType whereCoinLogo($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType whereCoinName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType whereStatus($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|CoinType whereUpdatedAt($value)
+ * @mixin \Eloquent
+ */
+class CoinType extends Model implements Transformable
+{
+    use TransformableTrait;
+
+    /**
+     * The attributes that are mass assignable.
+     *
+     * @var array
+     */
+    protected $guarded = ['id', 'updated_at', 'created_at'];
+
+}

+ 51 - 0
app/Models/MemberCoins.php

@@ -0,0 +1,51 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+use Prettus\Repository\Contracts\Transformable;
+use Prettus\Repository\Traits\TransformableTrait;
+
+/**
+ * Class MemberCoins.
+ *
+ * @package namespace App\Models;
+ * @property int $id
+ * @property int $m_id m_id
+ * @property int $coin_id coin_id
+ * @property string $coin_name 币名
+ * @property float $num 余额
+ * @property float $lock_num 锁定数量
+ * @property string $address address
+ * @property string $private
+ * @property string $code_img
+ * @property \Illuminate\Support\Carbon|null $created_at
+ * @property \Illuminate\Support\Carbon|null $updated_at
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins query()
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereAddress($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereCodeImg($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereCoinId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereCoinName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereLockNum($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereMId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereNum($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins wherePrivate($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|MemberCoins whereUpdatedAt($value)
+ * @mixin \Eloquent
+ */
+class MemberCoins extends Model implements Transformable
+{
+    use TransformableTrait;
+
+    /**
+     * The attributes that are mass assignable.
+     *
+     * @var array
+     */
+    protected $guarded = ['id', 'updated_at', 'created_at'];
+
+}

+ 24 - 0
app/Presenters/BlockInfoPresenter.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Presenters;
+
+use App\Transformers\BlockInfoTransformer;
+use Prettus\Repository\Presenter\FractalPresenter;
+
+/**
+ * Class BlockInfoPresenter.
+ *
+ * @package namespace App\Presenters;
+ */
+class BlockInfoPresenter extends FractalPresenter
+{
+    /**
+     * Transformer
+     *
+     * @return \League\Fractal\TransformerAbstract
+     */
+    public function getTransformer()
+    {
+        return new BlockInfoTransformer();
+    }
+}

+ 24 - 0
app/Presenters/BlockItemsPresenter.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Presenters;
+
+use App\Transformers\BlockItemsTransformer;
+use Prettus\Repository\Presenter\FractalPresenter;
+
+/**
+ * Class BlockItemsPresenter.
+ *
+ * @package namespace App\Presenters;
+ */
+class BlockItemsPresenter extends FractalPresenter
+{
+    /**
+     * Transformer
+     *
+     * @return \League\Fractal\TransformerAbstract
+     */
+    public function getTransformer()
+    {
+        return new BlockItemsTransformer();
+    }
+}

+ 24 - 0
app/Presenters/BroadcastPresenter.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Presenters;
+
+use App\Transformers\BroadcastTransformer;
+use Prettus\Repository\Presenter\FractalPresenter;
+
+/**
+ * Class BroadcastPresenter.
+ *
+ * @package namespace App\Presenters;
+ */
+class BroadcastPresenter extends FractalPresenter
+{
+    /**
+     * Transformer
+     *
+     * @return \League\Fractal\TransformerAbstract
+     */
+    public function getTransformer()
+    {
+        return new BroadcastTransformer();
+    }
+}

+ 24 - 0
app/Presenters/CoinTypePresenter.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Presenters;
+
+use App\Transformers\CoinTypeTransformer;
+use Prettus\Repository\Presenter\FractalPresenter;
+
+/**
+ * Class CoinTypePresenter.
+ *
+ * @package namespace App\Presenters;
+ */
+class CoinTypePresenter extends FractalPresenter
+{
+    /**
+     * Transformer
+     *
+     * @return \League\Fractal\TransformerAbstract
+     */
+    public function getTransformer()
+    {
+        return new CoinTypeTransformer();
+    }
+}

+ 24 - 0
app/Presenters/MemberCoinsPresenter.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Presenters;
+
+use App\Transformers\MemberCoinsTransformer;
+use Prettus\Repository\Presenter\FractalPresenter;
+
+/**
+ * Class MemberCoinsPresenter.
+ *
+ * @package namespace App\Presenters;
+ */
+class MemberCoinsPresenter extends FractalPresenter
+{
+    /**
+     * Transformer
+     *
+     * @return \League\Fractal\TransformerAbstract
+     */
+    public function getTransformer()
+    {
+        return new MemberCoinsTransformer();
+    }
+}

+ 5 - 0
app/Providers/RepositoryServiceProvider.php

@@ -41,6 +41,11 @@ class RepositoryServiceProvider extends ServiceProvider
         $this->app->bind(\App\Repositories\WithdrawRepository::class, \App\Repositories\Eloquent\WithdrawRepositoryEloquent::class);
         $this->app->bind(\App\Repositories\WithdrawConfigRepository::class, \App\Repositories\Eloquent\WithdrawConfigRepositoryEloquent::class);
         $this->app->bind(\App\Repositories\InviteCodeRepository::class, \App\Repositories\Eloquent\InviteCodeRepositoryEloquent::class);
+        $this->app->bind(\App\Repositories\CoinTypeRepository::class, \App\Repositories\Eloquent\CoinTypeRepositoryEloquent::class);
+        $this->app->bind(\App\Repositories\MemberCoinsRepository::class, \App\Repositories\Eloquent\MemberCoinsRepositoryEloquent::class);
+        $this->app->bind(\App\Repositories\BlockInfoRepository::class, \App\Repositories\Eloquent\BlockInfoRepositoryEloquent::class);
+        $this->app->bind(\App\Repositories\BlockItemsRepository::class, \App\Repositories\Eloquent\BlockItemsRepositoryEloquent::class);
+        $this->app->bind(\App\Repositories\BroadcastRepository::class, \App\Repositories\Eloquent\BroadcastRepositoryEloquent::class);
         //:end-bindings:
     }
 }

+ 15 - 0
app/Repositories/BlockInfoRepository.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace App\Repositories;
+
+use Prettus\Repository\Contracts\RepositoryInterface;
+
+/**
+ * Interface BlockInfoRepository.
+ *
+ * @package namespace App\Repositories;
+ */
+interface BlockInfoRepository extends RepositoryInterface
+{
+    //
+}

+ 15 - 0
app/Repositories/BlockItemsRepository.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace App\Repositories;
+
+use Prettus\Repository\Contracts\RepositoryInterface;
+
+/**
+ * Interface BlockItemsRepository.
+ *
+ * @package namespace App\Repositories;
+ */
+interface BlockItemsRepository extends RepositoryInterface
+{
+    //
+}

+ 15 - 0
app/Repositories/BroadcastRepository.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace App\Repositories;
+
+use Prettus\Repository\Contracts\RepositoryInterface;
+
+/**
+ * Interface BroadcastRepository.
+ *
+ * @package namespace App\Repositories;
+ */
+interface BroadcastRepository extends RepositoryInterface
+{
+    //
+}

+ 15 - 0
app/Repositories/CoinTypeRepository.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace App\Repositories;
+
+use Prettus\Repository\Contracts\RepositoryInterface;
+
+/**
+ * Interface CoinTypeRepository.
+ *
+ * @package namespace App\Repositories;
+ */
+interface CoinTypeRepository extends RepositoryInterface
+{
+    //
+}

+ 57 - 0
app/Repositories/Eloquent/BlockInfoRepositoryEloquent.php

@@ -0,0 +1,57 @@
+<?php
+
+namespace App\Repositories\Eloquent;
+
+use Prettus\Repository\Eloquent\BaseRepository;
+use Prettus\Repository\Criteria\RequestCriteria;
+use App\Repositories\BlockInfoRepository;
+use App\Models\BlockInfo;
+use App\Validators\BlockInfoValidator;
+
+/**
+ * Class BlockInfoRepositoryEloquent.
+ *
+ * @package namespace App\Repositories\Eloquent;
+ */
+class BlockInfoRepositoryEloquent extends BaseRepository implements BlockInfoRepository
+{
+    /**
+     * 查询检索的字段
+     *
+     * @return string
+     */
+    protected $fieldSearchable = [
+        'id'                => '=',
+    ];
+
+    /**
+     * Specify Model class name
+     *
+     * @return string
+     */
+    public function model()
+    {
+        return BlockInfo::class;
+    }
+
+    /**
+    * Specify Validator class name
+    *
+    * @return mixed
+    */
+    public function validator()
+    {
+
+        return BlockInfoValidator::class;
+    }
+
+
+    /**
+     * Boot up the repository, pushing criteria
+     */
+    public function boot()
+    {
+        // $this->pushCriteria(app(RequestCriteria::class));
+    }
+
+}

+ 57 - 0
app/Repositories/Eloquent/BlockItemsRepositoryEloquent.php

@@ -0,0 +1,57 @@
+<?php
+
+namespace App\Repositories\Eloquent;
+
+use Prettus\Repository\Eloquent\BaseRepository;
+use Prettus\Repository\Criteria\RequestCriteria;
+use App\Repositories\BlockItemsRepository;
+use App\Models\BlockItems;
+use App\Validators\BlockItemsValidator;
+
+/**
+ * Class BlockItemsRepositoryEloquent.
+ *
+ * @package namespace App\Repositories\Eloquent;
+ */
+class BlockItemsRepositoryEloquent extends BaseRepository implements BlockItemsRepository
+{
+    /**
+     * 查询检索的字段
+     *
+     * @return string
+     */
+    protected $fieldSearchable = [
+        'id'                => '=',
+    ];
+
+    /**
+     * Specify Model class name
+     *
+     * @return string
+     */
+    public function model()
+    {
+        return BlockItems::class;
+    }
+
+    /**
+    * Specify Validator class name
+    *
+    * @return mixed
+    */
+    public function validator()
+    {
+
+        return BlockItemsValidator::class;
+    }
+
+
+    /**
+     * Boot up the repository, pushing criteria
+     */
+    public function boot()
+    {
+        // $this->pushCriteria(app(RequestCriteria::class));
+    }
+
+}

+ 57 - 0
app/Repositories/Eloquent/BroadcastRepositoryEloquent.php

@@ -0,0 +1,57 @@
+<?php
+
+namespace App\Repositories\Eloquent;
+
+use Prettus\Repository\Eloquent\BaseRepository;
+use Prettus\Repository\Criteria\RequestCriteria;
+use App\Repositories\BroadcastRepository;
+use App\Models\Broadcast;
+use App\Validators\BroadcastValidator;
+
+/**
+ * Class BroadcastRepositoryEloquent.
+ *
+ * @package namespace App\Repositories\Eloquent;
+ */
+class BroadcastRepositoryEloquent extends BaseRepository implements BroadcastRepository
+{
+    /**
+     * 查询检索的字段
+     *
+     * @return string
+     */
+    protected $fieldSearchable = [
+        'id'                => '=',
+    ];
+
+    /**
+     * Specify Model class name
+     *
+     * @return string
+     */
+    public function model()
+    {
+        return Broadcast::class;
+    }
+
+    /**
+    * Specify Validator class name
+    *
+    * @return mixed
+    */
+    public function validator()
+    {
+
+        return BroadcastValidator::class;
+    }
+
+
+    /**
+     * Boot up the repository, pushing criteria
+     */
+    public function boot()
+    {
+        // $this->pushCriteria(app(RequestCriteria::class));
+    }
+
+}

+ 57 - 0
app/Repositories/Eloquent/CoinTypeRepositoryEloquent.php

@@ -0,0 +1,57 @@
+<?php
+
+namespace App\Repositories\Eloquent;
+
+use Prettus\Repository\Eloquent\BaseRepository;
+use Prettus\Repository\Criteria\RequestCriteria;
+use App\Repositories\CoinTypeRepository;
+use App\Models\CoinType;
+use App\Validators\CoinTypeValidator;
+
+/**
+ * Class CoinTypeRepositoryEloquent.
+ *
+ * @package namespace App\Repositories\Eloquent;
+ */
+class CoinTypeRepositoryEloquent extends BaseRepository implements CoinTypeRepository
+{
+    /**
+     * 查询检索的字段
+     *
+     * @return string
+     */
+    protected $fieldSearchable = [
+        'id'                => '=',
+    ];
+
+    /**
+     * Specify Model class name
+     *
+     * @return string
+     */
+    public function model()
+    {
+        return CoinType::class;
+    }
+
+    /**
+    * Specify Validator class name
+    *
+    * @return mixed
+    */
+    public function validator()
+    {
+
+        return CoinTypeValidator::class;
+    }
+
+
+    /**
+     * Boot up the repository, pushing criteria
+     */
+    public function boot()
+    {
+        // $this->pushCriteria(app(RequestCriteria::class));
+    }
+
+}

+ 57 - 0
app/Repositories/Eloquent/MemberCoinsRepositoryEloquent.php

@@ -0,0 +1,57 @@
+<?php
+
+namespace App\Repositories\Eloquent;
+
+use Prettus\Repository\Eloquent\BaseRepository;
+use Prettus\Repository\Criteria\RequestCriteria;
+use App\Repositories\MemberCoinsRepository;
+use App\Models\MemberCoins;
+use App\Validators\MemberCoinsValidator;
+
+/**
+ * Class MemberCoinsRepositoryEloquent.
+ *
+ * @package namespace App\Repositories\Eloquent;
+ */
+class MemberCoinsRepositoryEloquent extends BaseRepository implements MemberCoinsRepository
+{
+    /**
+     * 查询检索的字段
+     *
+     * @return string
+     */
+    protected $fieldSearchable = [
+        'id'                => '=',
+    ];
+
+    /**
+     * Specify Model class name
+     *
+     * @return string
+     */
+    public function model()
+    {
+        return MemberCoins::class;
+    }
+
+    /**
+    * Specify Validator class name
+    *
+    * @return mixed
+    */
+    public function validator()
+    {
+
+        return MemberCoinsValidator::class;
+    }
+
+
+    /**
+     * Boot up the repository, pushing criteria
+     */
+    public function boot()
+    {
+        // $this->pushCriteria(app(RequestCriteria::class));
+    }
+
+}

+ 15 - 0
app/Repositories/MemberCoinsRepository.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace App\Repositories;
+
+use Prettus\Repository\Contracts\RepositoryInterface;
+
+/**
+ * Interface MemberCoinsRepository.
+ *
+ * @package namespace App\Repositories;
+ */
+interface MemberCoinsRepository extends RepositoryInterface
+{
+    //
+}

+ 36 - 0
app/Servers/Icon/Address.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace App\Servers\Icon;
+
+
+use Elliptic\EC;
+use kornrunner\Keccak;
+
+class Address
+{
+    public $address;
+    public $key;
+
+    /**
+     * @return array
+     * @throws
+     */
+    public static function generate()
+    {
+        $ec = new EC('secp256k1');
+
+        $pair = $ec->genKeyPair(); // 键值对
+
+        $priv = $pair->getPrivate('hex'); // 导出私钥
+
+        $pub = $pair->getPublic(false, 'hex'); // 导出公钥
+
+        $pub = substr($pub, 2); // 移除开头的04
+
+        $address = Keccak::hash(hex2bin($pub), 256); // 先转换为二进制, 再hash
+
+        $address = Utils::fixHex(substr($address, -40)); // hash之后, 取后40位, 开头填充0x
+
+        return ['key' => $priv, 'address' => $address];
+    }
+}

+ 127 - 0
app/Servers/Icon/EthereumRPC.php

@@ -0,0 +1,127 @@
+<?php
+
+namespace App\Servers\Icon;
+
+
+
+/**
+ * Class EthereumRPC
+ * @package common\models\ethereum
+ */
+class EthereumRPC
+{
+    /**
+     * @var string RPC URL
+     */
+    public $url='https://mainnet.infura.io/v3/b5cab4389fc04d749c961899b57384cb';
+
+    public $chainId='1';
+
+    // request id
+    protected $id = 0;
+
+    /**
+     * RPC timeout
+     * @var int
+     */
+    public $timeout = 60;
+
+    // 执行eth_call
+    public function call($params)
+    {
+        return $this->send('eth_call', [$params, 'latest']);
+    }
+
+    // 执行sendRawTransaction
+    public function sendTransaction($data, &$error = null)
+    {
+        return $this->send('sendTransaction', $data, $error);
+    }
+
+    // 执行sendRawTransaction
+    public function sendRawTransaction($sign, &$error = null)
+    {
+        return $this->send('eth_sendRawTransaction', [$sign], $error);
+    }
+
+    // 执行getTransactionReceipt
+    public function getTransactionReceipt($hash)
+    {
+        return $this->send('eth_getTransactionReceipt', [$hash]);
+    }
+
+    // 获取交易笔数
+    public function getTransactionCount($address)
+    {
+        return $this->send('eth_getTransactionCount', [$address, 'pending']);
+    }
+
+    // 获取gas单价
+    protected $gasPrice;
+
+    public function getGasPrice()
+    {
+        if ($this->gasPrice === null) {
+            $gasPrice = $this->send('eth_gasPrice');
+            $range = [15, 20]; // 单位gwei
+            $gasPrice = Utils::hex2dec($gasPrice);
+            $gasPrice = Utils::convertUnit($gasPrice, 'wei', 'gwei');
+            $gasPrice = max($gasPrice, $range[0]);
+            $gasPrice = min($gasPrice, $range[1]);
+            $gasPrice = Utils::convertUnit($gasPrice, 'gwei', 'wei');
+
+            $this->gasPrice = Utils::dec2hex($gasPrice);
+        }
+        return $this->gasPrice;
+    }
+
+    // 预估tx消耗的gas
+    public function estimateGas($tx)
+    {
+        $limit = $this->send('eth_estimateGas', [$tx]);
+        if (!$limit) {
+            $limit = 100000;
+        }
+        if(is_numeric($limit))$limit=Utils::dec2hex($limit);
+        return $limit;
+    }
+
+    // 获取eth余额
+    public function getBalance($address)
+    {
+        return $this->send('eth_getBalance', [$address, 'latest']);
+    }
+
+    /**
+     *
+     * @param string $method The method of jsonrpc
+     * @param array $params The params of jsonrpc
+     * @return bool|mixed
+     */
+    public function send($method, $params = [], &$error = null)
+    {
+        $query = [];
+        $query['jsonrpc'] = '2.0';
+        $query['method'] = $method;
+        $query['params'] = $params;
+        $query['id'] = ++$this->id;
+
+        $rawResp = Utils::post($this->url, json_encode($query), $this->timeout);
+        $resp = @json_decode($rawResp, true);
+        if ($resp === false || !is_array($resp)) {
+            $error = $resp;
+            return false;
+        }
+        if (isset($resp['error'])) {
+            $error = $resp['error'];
+            return false;
+        }
+
+        return $resp['result'];
+    }
+
+    public function __call($name, $params)
+    {
+        return $this->send($name, $params);
+    }
+}

+ 244 - 0
app/Servers/Icon/Utils.php

@@ -0,0 +1,244 @@
+<?php
+
+namespace App\Servers\Icon;
+
+use kornrunner\Keccak;
+
+/**
+ * Class Utils
+ * @package common\components\eth
+ */
+class Utils
+{
+    public static function fixHex($hex)
+    {
+        $hex = strtolower($hex);
+        $hex = substr($hex, 0, 2) === '0x' ? $hex : ('0x' . $hex);
+        if (strcmp($hex, '0x') === 0) {
+            $hex = '0x0';
+        }
+        return $hex;
+    }
+
+    /**
+     * @param string $url
+     * @param mixed $rawData
+     * @param int $timeout
+     * @return bool|string
+     */
+    public static function post($url, $rawData, $timeout = 3)
+    {
+        $options = [
+            CURLOPT_URL => $url,
+            CURLOPT_POST => true,
+            CURLOPT_RETURNTRANSFER => true,
+            CURLOPT_FOLLOWLOCATION => true,
+            CURLOPT_AUTOREFERER => true,
+            CURLOPT_HEADER => false,
+            CURLOPT_TIMEOUT => 5,
+            CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_0,
+            CURLOPT_HTTPHEADER => [
+                'Content-Type: application/json',
+                'Accept: application/json',
+            ],
+            CURLOPT_TIMEOUT => $timeout,
+            CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
+            CURLOPT_SSL_VERIFYHOST => false,
+            CURLOPT_SSL_VERIFYPEER => false,
+            CURLOPT_POSTFIELDS => $rawData,
+        ];
+        $ch = curl_init();
+        curl_setopt_array($ch, $options);
+        $rawResp = curl_exec($ch);
+//        $e=curl_error($ch);
+        dd($rawResp);
+        if ($rawResp === false) {
+            return false;
+        }
+        curl_close($ch);
+
+        return $rawResp;
+    }
+
+    /**
+     * Convert to wei
+     * @param string $fund eg: 1eth, 0.1gwei
+     * @return bool|string
+     */
+    public static function toWei($fund)
+    {
+        $pattern = '/^([\d]+(?:\.\d+)?)([a-zA-Z]+)/i';
+        if (!preg_match($pattern, $fund, $matches)) {
+            return false;
+        }
+
+        $fund = $matches[1];
+        $unit = strtolower($matches[2]);
+        return self::convertUnit($fund, $unit, 'wei');
+    }
+
+    /**
+     * Convert to eth
+     * @param string $fund eg: 567wei, 123gwei
+     * @return bool|string
+     */
+    public static function toEther($fund)
+    {
+        $pattern = '/^([\d]+(?:\.\d+)?)([a-zA-Z]+)/i';
+        if (!preg_match($pattern, $fund, $matches)) {
+            return false;
+        }
+
+        $fund = $matches[1];
+        $unit = strtolower($matches[2]);
+        return self::convertUnit($fund, $unit, 'eth');
+    }
+
+    public static function fund2int($fund, $decimal = 18)
+    {
+        $rate = "1" . str_repeat('0', $decimal);
+        return bcmul($fund, $rate);
+    }
+
+    public static function int2fund($int, $decimal = 18)
+    {
+        $rate = "1" . str_repeat('0', $decimal);
+        $result = bcdiv($int, $rate, 5);
+
+        if (strpos($result, '.') !== false) {
+            list($int, $dec) = explode('.', $result);
+            $dec = rtrim($dec, '0');
+            if ($dec !== '') {
+                $result = $int . '.' . $dec;
+            } else {
+                $result = $int;
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Ethereum units count against each other
+     * @param string $number
+     * @param string $from
+     * @param string $to
+     * @return bool|string
+     */
+    public static function convertUnit($number, $from, $to)
+    {
+        $units = [
+            'wei' => 0,
+            'kwei' => 3,
+            'mwei' => 6,
+            'gwei' => 9,
+            'microether' => 12,
+            'milliether' => 15,
+            'ether' => 18,
+            'eth' => 18,
+        ];
+        if (!isset($units[$from]) || !isset($units[$to])) {
+            return false;
+        }
+
+        $maxDecimal = max($units); // max scale
+        if ($units[$from] > $units[$to]) {
+            $operator = "1" . str_repeat("0", $units[$from] - $units[$to]);
+            $result = bcmul($number, $operator, $maxDecimal);
+        } elseif ($units[$from] == $units[$to]) {
+            $result = $number;
+        } else {
+            $operator = "1" . str_repeat("0", $units[$to] - $units[$from]);
+            $result = bcdiv($number, $operator, $maxDecimal);
+        }
+
+        // The number of excess decimal digits after removing the result
+        if (strpos($result, '.') !== false) {
+            list($int, $dec) = explode('.', $result);
+            $dec = rtrim($dec, '0');
+            if ($dec !== '') {
+                $result = $int . '.' . $dec;
+            } else {
+                $result = $int;
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * @param $method
+     * @param array $args
+     * @return false|string
+     */
+    public static function decodeSolMethod($method, $args = [])
+    {
+        $pattern = '/^[a-z0-9]+\(([^\)]+)\)$/i';
+        if (!preg_match($pattern, $method, $matched)) {
+            return false;
+        }
+        try {
+            $sign = substr(Keccak::hash($method, 256), 0, 8);
+            $params = explode(',', $matched[1]); // 分析参数
+            foreach ($params as $key => $param) {
+                $arg = $args[$key];
+
+                if (strpos($param, 'uint') !== false || strpos($param, 'int') !== false) {
+                    $paramSign = substr(self::dec2hex($arg), 2);
+                } elseif (strpos($param, 'address') !== false) {
+                    $paramSign = substr(self::fixHex($arg), 2);
+                } else {
+                    return false;
+                }
+
+                $sign .= str_pad($paramSign, 64, '0', STR_PAD_LEFT);
+            }
+
+            return self::fixHex($sign);
+        } catch (\Exception $e) {
+            return false;
+        }
+    }
+
+    public static function dec2hex($number)
+    {
+        $hexvalues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'];
+        $hexval = '';
+        while ($number != '0') {
+            $hexval = $hexvalues[bcmod($number, '16')] . $hexval;
+            $number = bcdiv($number, '16', 0);
+        }
+        return self::fixHex($hexval);
+    }
+
+    public static function hex2dec($number)
+    {
+        if (strpos($number, '0x') !== false) {
+            $number = substr($number, 2);
+        }
+        $number = strtoupper($number);
+        $decvalues = [
+            '0' => '0', '1' => '1', '2' => '2',
+            '3' => '3', '4' => '4', '5' => '5',
+            '6' => '6', '7' => '7', '8' => '8',
+            '9' => '9', 'A' => '10', 'B' => '11',
+            'C' => '12', 'D' => '13', 'E' => '14',
+            'F' => '15'
+        ];
+        $decval = '0';
+        $number = strrev($number);
+        for ($i = 0; $i < strlen($number); $i++) {
+            $decval = bcadd(bcmul(bcpow('16', $i, 0), $decvalues[$number{$i}]), $decval);
+        }
+        return $decval;
+    }
+
+    public static function prettyNum($number)
+    {
+        if ($number > 10000) {
+            $number = bcdiv($number, "10000", 2) . '万';
+        }
+
+        return $number;
+    }
+}

+ 33 - 0
app/Transformers/BlockInfoTransformer.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Transformers;
+
+use League\Fractal\TransformerAbstract;
+use App\Models\BlockInfo;
+
+/**
+ * Class BlockInfoTransformer.
+ *
+ * @package namespace App\Transformers;
+ */
+class BlockInfoTransformer extends TransformerAbstract
+{
+    /**
+     * Transform the BlockInfo entity.
+     *
+     * @param \App\Models\BlockInfo $model
+     *
+     * @return array
+     */
+    public function transform(BlockInfo $model)
+    {
+        return [
+            'id'         => (int) $model->id,
+
+            /* place your other model properties here */
+
+            'created_at' => $model->created_at,
+            'updated_at' => $model->updated_at
+        ];
+    }
+}

+ 33 - 0
app/Transformers/BlockItemsTransformer.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Transformers;
+
+use League\Fractal\TransformerAbstract;
+use App\Models\BlockItems;
+
+/**
+ * Class BlockItemsTransformer.
+ *
+ * @package namespace App\Transformers;
+ */
+class BlockItemsTransformer extends TransformerAbstract
+{
+    /**
+     * Transform the BlockItems entity.
+     *
+     * @param \App\Models\BlockItems $model
+     *
+     * @return array
+     */
+    public function transform(BlockItems $model)
+    {
+        return [
+            'id'         => (int) $model->id,
+
+            /* place your other model properties here */
+
+            'created_at' => $model->created_at,
+            'updated_at' => $model->updated_at
+        ];
+    }
+}

+ 33 - 0
app/Transformers/BroadcastTransformer.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Transformers;
+
+use League\Fractal\TransformerAbstract;
+use App\Models\Broadcast;
+
+/**
+ * Class BroadcastTransformer.
+ *
+ * @package namespace App\Transformers;
+ */
+class BroadcastTransformer extends TransformerAbstract
+{
+    /**
+     * Transform the Broadcast entity.
+     *
+     * @param \App\Models\Broadcast $model
+     *
+     * @return array
+     */
+    public function transform(Broadcast $model)
+    {
+        return [
+            'id'         => (int) $model->id,
+
+            /* place your other model properties here */
+
+            'created_at' => $model->created_at,
+            'updated_at' => $model->updated_at
+        ];
+    }
+}

+ 33 - 0
app/Transformers/CoinTypeTransformer.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Transformers;
+
+use League\Fractal\TransformerAbstract;
+use App\Models\CoinType;
+
+/**
+ * Class CoinTypeTransformer.
+ *
+ * @package namespace App\Transformers;
+ */
+class CoinTypeTransformer extends TransformerAbstract
+{
+    /**
+     * Transform the CoinType entity.
+     *
+     * @param \App\Models\CoinType $model
+     *
+     * @return array
+     */
+    public function transform(CoinType $model)
+    {
+        return [
+            'id'         => (int) $model->id,
+
+            /* place your other model properties here */
+
+            'created_at' => $model->created_at,
+            'updated_at' => $model->updated_at
+        ];
+    }
+}

+ 33 - 0
app/Transformers/MemberCoinsTransformer.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Transformers;
+
+use League\Fractal\TransformerAbstract;
+use App\Models\MemberCoins;
+
+/**
+ * Class MemberCoinsTransformer.
+ *
+ * @package namespace App\Transformers;
+ */
+class MemberCoinsTransformer extends TransformerAbstract
+{
+    /**
+     * Transform the MemberCoins entity.
+     *
+     * @param \App\Models\MemberCoins $model
+     *
+     * @return array
+     */
+    public function transform(MemberCoins $model)
+    {
+        return [
+            'id'         => (int) $model->id,
+
+            /* place your other model properties here */
+
+            'created_at' => $model->created_at,
+            'updated_at' => $model->updated_at
+        ];
+    }
+}

+ 24 - 0
app/Validators/BlockInfoValidator.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Validators;
+
+use \Prettus\Validator\Contracts\ValidatorInterface;
+use \Prettus\Validator\LaravelValidator;
+
+/**
+ * Class BlockInfoValidator.
+ *
+ * @package namespace App\Validators;
+ */
+class BlockInfoValidator extends LaravelValidator
+{
+    /**
+     * Validation Rules
+     *
+     * @var array
+     */
+    protected $rules = [
+        ValidatorInterface::RULE_CREATE => [],
+        ValidatorInterface::RULE_UPDATE => [],
+    ];
+}

+ 24 - 0
app/Validators/BlockItemsValidator.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Validators;
+
+use \Prettus\Validator\Contracts\ValidatorInterface;
+use \Prettus\Validator\LaravelValidator;
+
+/**
+ * Class BlockItemsValidator.
+ *
+ * @package namespace App\Validators;
+ */
+class BlockItemsValidator extends LaravelValidator
+{
+    /**
+     * Validation Rules
+     *
+     * @var array
+     */
+    protected $rules = [
+        ValidatorInterface::RULE_CREATE => [],
+        ValidatorInterface::RULE_UPDATE => [],
+    ];
+}

+ 24 - 0
app/Validators/BroadcastValidator.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Validators;
+
+use \Prettus\Validator\Contracts\ValidatorInterface;
+use \Prettus\Validator\LaravelValidator;
+
+/**
+ * Class BroadcastValidator.
+ *
+ * @package namespace App\Validators;
+ */
+class BroadcastValidator extends LaravelValidator
+{
+    /**
+     * Validation Rules
+     *
+     * @var array
+     */
+    protected $rules = [
+        ValidatorInterface::RULE_CREATE => [],
+        ValidatorInterface::RULE_UPDATE => [],
+    ];
+}

+ 24 - 0
app/Validators/CoinTypeValidator.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Validators;
+
+use \Prettus\Validator\Contracts\ValidatorInterface;
+use \Prettus\Validator\LaravelValidator;
+
+/**
+ * Class CoinTypeValidator.
+ *
+ * @package namespace App\Validators;
+ */
+class CoinTypeValidator extends LaravelValidator
+{
+    /**
+     * Validation Rules
+     *
+     * @var array
+     */
+    protected $rules = [
+        ValidatorInterface::RULE_CREATE => [],
+        ValidatorInterface::RULE_UPDATE => [],
+    ];
+}

+ 24 - 0
app/Validators/MemberCoinsValidator.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Validators;
+
+use \Prettus\Validator\Contracts\ValidatorInterface;
+use \Prettus\Validator\LaravelValidator;
+
+/**
+ * Class MemberCoinsValidator.
+ *
+ * @package namespace App\Validators;
+ */
+class MemberCoinsValidator extends LaravelValidator
+{
+    /**
+     * Validation Rules
+     *
+     * @var array
+     */
+    protected $rules = [
+        ValidatorInterface::RULE_CREATE => [],
+        ValidatorInterface::RULE_UPDATE => [],
+    ];
+}

+ 0 - 36
database/migrations/2014_10_12_000000_create_users_table.php

@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class CreateUsersTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('users', function (Blueprint $table) {
-            $table->bigIncrements('id');
-            $table->string('name');
-            $table->string('email')->unique();
-            $table->timestamp('email_verified_at')->nullable();
-            $table->string('password');
-            $table->rememberToken();
-            $table->timestamps();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('users');
-    }
-}

+ 0 - 32
database/migrations/2014_10_12_100000_create_password_resets_table.php

@@ -1,32 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class CreatePasswordResetsTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('password_resets', function (Blueprint $table) {
-            $table->string('email')->index();
-            $table->string('token');
-            $table->timestamp('created_at')->nullable();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('password_resets');
-    }
-}

+ 0 - 53
database/migrations/2018_01_01_000000_create_regions_table.php

@@ -1,53 +0,0 @@
-<?php
-
-use Cblink\Region\Region;
-use Illuminate\Support\Facades\DB;
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-use Lybc\PhpGB2260\GB2260;
-
-class CreateRegionsTable extends Migration
-{
-
-    public function up()
-    {
-        Schema::create('areas', function (Blueprint $table) {
-            $table->increments('id');
-            $table->unsignedInteger('parent_id')->nullable()->index();
-            $table->string('name');
-            $table->unsignedTinyInteger('type');
-            $table->unsignedInteger('code');
-        });
-
-        $region = new Region();
-
-        $provinces = $region->getRegionsWithCode();
-
-        foreach ($provinces as $province) {
-            $provinceId = DB::table('areas')->insertGetId([
-                'name' => $province['title'],
-                'code' => $province['ad_code'],
-                'type' => Region::PROVINCE,
-            ]);
-            foreach ($province['child'] as $city) {
-                $cityId = DB::table('areas')->insertGetId([
-                    'name' => $city['title'],
-                    'parent_id' => $provinceId,
-                    'code' => $city['ad_code'],
-                    'type' => Region::CITY,
-                ]);
-                $areas = array_map(function ($area) use ($cityId) {
-                    return ['name' => $area['title'], 'code' => $area['ad_code'], 'parent_id' => $cityId, 'type' => Region::AREA];
-                }, $city['child']);
-                DB::table('areas')->insert($areas);
-            }
-        }
-    }
-
-    public function down()
-    {
-        Schema::dropIfExists('areas');
-    }
-
-}

+ 0 - 36
database/migrations/2020_11_13_162845_create_test_infos_table.php

@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTestInfosTable.
- */
-class CreateTestInfosTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('test_infos', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('test_num')->default(0)->comment("测试功能数量");
-            $table->integer('test_ok_num')->default(0)->comment("测试成功数量");
-            $table->integer('test_no_num')->default(0)->comment("测试失败数量");
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('test_infos');
-	}
-}

+ 0 - 39
database/migrations/2020_11_13_162901_create_test_items_table.php

@@ -1,39 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTestItemsTable.
- */
-class CreateTestItemsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('test_items', function(Blueprint $table) {
-            $table->increments('id');
-            $table->string('title')->default('')->comment("测试单元标题");
-            $table->integer('assert_num')->default(0)->comment("断言数量");
-            $table->integer('assert_ok_num')->default(0)->comment("断言成功数量");
-            $table->integer('assert_no_num')->default(0)->comment("断言失败数量");
-            $table->text('assert_text')->comment("断言说明");
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('test_items');
-	}
-}

+ 0 - 34
database/migrations/2020_11_13_165843_create_test_items_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTestItemsTable.
- */
-class CreateTestItemsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('test_items', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('test_items');
-	}
-}

+ 0 - 34
database/migrations/2020_11_13_171300_create_test_items_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTestItemsTable.
- */
-class CreateTestItemsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('test_items', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('test_items');
-	}
-}

+ 0 - 34
database/migrations/2020_11_13_171609_create_test_items_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTestItemsTable.
- */
-class CreateTestItemsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('test_items', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('test_items');
-	}
-}

+ 0 - 34
database/migrations/2020_11_16_105124_create_test_infos_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTestInfosTable.
- */
-class CreateTestInfosTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('test_infos', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('test_infos');
-	}
-}

+ 0 - 34
database/migrations/2020_11_16_105155_create_test_items_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTestItemsTable.
- */
-class CreateTestItemsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('test_items', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('test_items');
-	}
-}

+ 0 - 34
database/migrations/2021_07_12_113210_create_broadcasts_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateBroadcastsTable.
- */
-class CreateBroadcastsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('broadcasts', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('broadcasts');
-	}
-}

+ 0 - 34
database/migrations/2021_07_12_113309_create_block_items_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateBlockItemsTable.
- */
-class CreateBlockItemsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('block_items', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('block_items');
-	}
-}

+ 0 - 39
database/migrations/2021_10_11_162752_create_shop_commissions_table.php

@@ -1,39 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateShopCommissionsTable.
- */
-class CreateShopCommissionsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('shop_commissions', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('shop_id')->index('shop_id')->comment('店铺ID');
-            $table->string('goods_name')->comment('商品名称');
-            $table->string('total_prices')->comment('商品名称');
-            $table->string('order_sn')->comment('订单编号');
-            $table->tinyInteger('type')->comment('1:下线分佣,2线上分佣');
-            $table->double('commission',12,2)->comment('商品名称');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('shop_commissions');
-	}
-}

+ 0 - 38
database/migrations/2021_10_15_142625_create_shop_withdraws_table.php

@@ -1,38 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateShopWithdrawsTable.
- */
-class CreateShopWithdrawsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('shop_withdraws', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('shop_id')->index('shop_id')->comment('店铺ID');
-            $table->tinyInteger('status')->index('status')->comment('状态');
-            $table->double('money',12,2)->comment('状态');
-            $table->double('service_money',12,2)->comment('手续费');
-            $table->double('withdraw_money',12,2)->comment('到账金额');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('shop_withdraws');
-	}
-}

+ 0 - 39
database/migrations/2021_10_15_142717_create_shop_bank_cards_table.php

@@ -1,39 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateShopBankCardsTable.
- */
-class CreateShopBankCardsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('shop_bank_cards', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('shop_id')->index('shop_id')->comment('店铺ID');
-            $table->integer('bank_num')->index('bank_num')->comment('银行卡号');
-            $table->string('bank_name')->comment('所属银行');
-            $table->string('bank_user')->comment('开户人');
-            $table->string('bank_address')->comment('开户行地址');
-            $table->tinyInteger('status')->index('status')->comment('状态');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('shop_bank_cards');
-	}
-}

+ 0 - 35
database/migrations/2021_10_16_092459_create_agency_sets_table.php

@@ -1,35 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateAgencySetsTable.
- */
-class CreateAgencySetsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('agency_sets', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('agency_num')->comment('代理人数限制');
-            $table->text('content')->comment('代理内容说明');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('agency_sets');
-	}
-}

+ 0 - 36
database/migrations/2021_10_16_113818_create_qr_codes_table.php

@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateQrCodesTable.
- */
-class CreateQrCodesTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('qr_codes', function(Blueprint $table) {
-            $table->increments('id');
-            $table->tinyInteger('code_type')->comment('二维码类型');
-            $table->string('code_title')->comment('二维码类型名称');
-            $table->string('code_img')->comment('二维码图片');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('qr_codes');
-	}
-}

+ 0 - 36
database/migrations/2021_10_18_150042_create_freight_cities_table.php

@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateFreightCitiesTable.
- */
-class CreateFreightCitiesTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('freight_cities', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('freight_id')->comment('模板ID');
-            $table->integer('item_id')->comment('明细ID');
-            $table->text('city_ids')->comment('城市ID');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('freight_cities');
-	}
-}

+ 0 - 35
database/migrations/2021_10_28_114900_create_invite_codes_table.php

@@ -1,35 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateInviteCodesTable.
- */
-class CreateInviteCodesTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('invite_codes', function (Blueprint $table) {
-            $table->increments('id');
-            $table->integer('code')->comment('编码');
-            $table->tinyInteger('status')->default(0)->index('status')->comment('状态');
-            $table->timestamps();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::drop('invite_codes');
-    }
-}

+ 0 - 36
database/migrations/2021_10_28_160848_create_goods_shares_table.php

@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateGoodsSharesTable.
- */
-class CreateGoodsSharesTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('goods_shares', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('goods_id')->default(0)->index('goods_id')->comment('商品ID');
-            $table->integer('m_id')->default(0)->index('m_id')->comment('会员ID');
-            $table->string('share_img')->default('')->comment('分享二维码');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('goods_shares');
-	}
-}

+ 0 - 45
database/migrations/2021_11_03_111713_create_used_goods_table.php

@@ -1,45 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateUsedGoodsTable.
- */
-class CreateUsedGoodsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('used_goods', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('m_id')->default(0)->index('m_id')->comment('会员ID');
-            $table->integer('province_id')->comment('省ID');
-            $table->integer('city_id')->comment('市ID');
-            $table->integer('area_id')->comment('区ID');
-            $table->string('city_name')->comment('城市名称');
-            $table->string('used_name')->comment('闲置说明(名称)');
-            $table->string('used_img')->comment('封面');
-            $table->tinyInteger('status')->index('status')->comment('0:下架,1:上架,2:交易锁定中');
-            $table->tinyInteger('deliver_type')->index('deliver_type')->comment('1:包邮,2:到付,3:自取');
-            $table->tinyInteger('is_del')->index('is_del')->comment('0:否,1:是');
-            $table->double('original_price',12,2)->comment('原价');
-            $table->double('price',12,2)->comment('售价');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('used_goods');
-	}
-}

+ 0 - 35
database/migrations/2021_11_03_111759_create_used_imgs_table.php

@@ -1,35 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateUsedImgsTable.
- */
-class CreateUsedImgsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('used_imgs', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('used_id')->default(0)->index('used_id')->comment('闲置商品ID');
-            $table->string('used_imgs')->comment('闲置商品照片');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('used_imgs');
-	}
-}

+ 0 - 52
database/migrations/2021_11_03_111819_create_used_orders_table.php

@@ -1,52 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateUsedOrdersTable.
- */
-class CreateUsedOrdersTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('used_orders', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('used_id')->default(0)->index('used_id')->comment('闲置商品ID');
-            $table->integer('sell_id')->default(0)->index('sell_id')->comment('卖家ID');
-            $table->integer('buy_id')->default(0)->index('buy_id')->comment('买家ID');
-            $table->integer('express_id')->default(0)->comment('快递公司ID');
-            $table->string('express_code')->default('')->comment('快递公司编号');
-            $table->string('express_numbers')->default('')->comment('快递单号');
-            $table->integer('province')->default(0)->comment('省');
-            $table->integer('city')->default(0)->comment('市');
-            $table->integer('area')->default(0)->comment('区');
-            $table->string('address')->default('')->comment('详细地址');
-            $table->string('consignee')->default('')->comment('收货人');
-            $table->string('consignee_tel')->default('')->comment('收货人电话');
-            $table->double('total_money',12,2)->comment('总价');
-            $table->string('used_name')->comment('闲置说明(名称)');
-            $table->timestamp('pay_time', 0)->nullable()->comment('支付时间');
-            $table->timestamp('confirm_time', 0)->nullable()->comment('收货时间');
-            $table->text('logistics_info')->comment('快递信息');
-            $table->tinyInteger('status')->index('status')->comment('1:待支付,2:交易中,3:已完成,4:已取消');
-            $table->tinyInteger('shipping_status')->index('shipping_status')->comment('0:无操作,1:待发货,2:已发货,3:已收货');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('used_orders');
-	}
-}

+ 0 - 34
database/migrations/2021_11_06_163859_create_sensitive_words_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateSensitiveWordsTable.
- */
-class CreateSensitiveWordsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('sensitive_words', function(Blueprint $table) {
-            $table->increments('id');
-            $table->string('word')->default('')->comment('敏感词语');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('sensitive_words');
-	}
-}

+ 0 - 40
database/migrations/2021_11_08_144727_create_albums_table.php

@@ -1,40 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateAlbumsTable.
- */
-class CreateAlbumsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('albums', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('m_id')->default(0)->index('m_id')->comment('会员ID');
-            $table->string('file_url')->comment('文件地址');
-            $table->string('cover_url')->comment('文件封面');
-            $table->string('time')->comment('视频文件时长');
-            $table->tinyInteger('file_type')->index('file_type')->comment('文件类型 1:照片,2:视频');
-            $table->tinyInteger('status')->default(0)->index('status')->comment('文件状态 0:待审,1:过审,2:人工审核中,3:审核不通过');
-            $table->tinyInteger('is_del')->default(0)->index('is_del')->comment('是否删除 0:否,1:是');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('albums');
-	}
-}

+ 0 - 42
database/migrations/2021_11_09_140955_create_shop_sttles_table.php

@@ -1,42 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateShopSttlesTable.
- */
-class CreateShopSttlesTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('shop_sttles', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('shop_id')->default(0)->index('shop_id')->comment('店铺ID');
-            $table->double('total_turnover',12,2)->comment('累计营业额');
-            $table->double('plan_turnover',12,2)->comment('计划营业额');
-            $table->double('owe_turnover',12,2)->comment('欠款营业额');
-            $table->double('replenish_turnover',12,2)->comment('补充业绩数量');
-            $table->double('performance',12,2)->comment('每日业绩');
-            $table->integer('date_num')->comment('业绩天数');
-            $table->integer('start_num')->comment('开始日期');
-            $table->tinyInteger('status')->default(0)->index('status')->comment('状态:0:未结算,1:完成,2:未完成,3:补齐');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('shop_sttles');
-	}
-}

+ 0 - 45
database/migrations/2021_11_10_153049_create_im_groups_table.php

@@ -1,45 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateImGroupsTable.
- */
-class CreateImGroupsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('im_groups', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('m_id')->default(0)->index('m_id')->comment('会员(发起人)ID');
-            $table->integer('shop_id')->default(0)->index('shop_id')->comment('店铺ID');
-            $table->integer('service_id')->default(0)->index('service_id')->comment('客服ID');
-			$table->integer('handle_id')->index('handle_id')->comment('处理该组消息(即接收)人ID');
-            $table->tinyInteger('group_type')->comment('消息组关系类型 1:用户与用户,2:用户与店铺,3:用户与平台');
-            $table->string('logo')->comment('接收人logo');
-            $table->string('name')->comment('接收人昵称');
-			$table->tinyInteger('text_type')->comment('最后一条消息内容类型 1:文字,2:图片');
-            $table->string('text')->comment('最后一条消息内容');
-			$table->timestamp('last_time')->comment('最后一条消息时间');
-            $table->tinyInteger('is_del')->default(0)->index('is_del')->comment('是否删除 0:否,1:是');
-            $table->timestamps();
-            $table->engine = 'InnoDB';
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('im_groups');
-	}
-}

+ 0 - 43
database/migrations/2021_11_10_153057_create_im_messages_table.php

@@ -1,43 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateImMessagesTable.
- */
-class CreateImMessagesTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('im_messages', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('group_id')->index('group_id')->comment('分组id');
-            $table->integer('m_id')->index('m_id')->comment('发送人会员ID');
-			$table->integer('handle_id')->index('handle_id')->comment('处理(接收)该条消息会员ID');
-            $table->integer('shop_id')->default(0)->index('shop_id')->comment('店铺ID');
-            $table->integer('service_id')->default(0)->index('service_id')->comment('客服ID');
-            $table->tinyInteger('text_type')->comment('消息内容类型 1:文字,2:图片');
-            $table->string('text')->comment('消息内容');
-            $table->tinyInteger('status')->default(0)->index('status')->comment('消息状态 0:未读,1:已读');
-            $table->tinyInteger('is_del')->default(0)->index('is_del')->comment('是否删除 0:否,1:是');
-            $table->timestamps();
-            $table->engine = 'InnoDB';
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('im_messages');
-	}
-}

+ 0 - 41
database/migrations/2021_11_11_174225_create_im_services_table.php

@@ -1,41 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateImServicesTable.
- */
-class CreateImServicesTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('im_services', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('m_id')->index('m_id')->comment('客服绑定的会员ID');
-            $table->string('nickname')->comment('客服昵称');
-            $table->string('head_img')->comment('客服头像');
-            $table->string('account')->index('account')->comment('客服账号');
-            $table->char('password',32)->comment('账号密码');
-			$table->char('encrypt',6)->comment('加密字符串');
-			$table->tinyInteger('status')->default(1)->index('status')->comment('客服状态 1:在线,2:下线');
-			$table->tinyInteger('is_del')->default(0)->index('is_del')->comment('是否删除 0:否,1:是');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('im_services');
-	}
-}

+ 0 - 36
database/migrations/2021_11_13_170123_create_templates_table.php

@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateTemplatesTable.
- */
-class CreateTemplatesTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('templates', function(Blueprint $table) {
-            $table->increments('id');
-            $table->string('template_id')->default('')->comment('微信模板消息ID');
-            $table->string('template_num')->default('')->comment('微信模板消息序号');
-            $table->string('msg')->default('')->comment('说明');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('templates');
-	}
-}

+ 0 - 38
database/migrations/2021_12_09_160647_create_electronic_orders_table.php

@@ -1,38 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateElectronicOrdersTable.
- */
-class CreateElectronicOrdersTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('electronic_orders', function(Blueprint $table) {
-            $table->increments('id');
-            $table->integer('order_id')->default('1')->comment('订单ID');
-            $table->string('order_sn')->default('')->comment('订单编码');
-            $table->tinyInteger('status')->default('1')->comment('1:成功,0:失败');
-            $table->tinyInteger('type')->default('1')->comment('1:生成订单,2:打印订单');
-            $table->text('content')->comment('返回内容');
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('electronic_orders');
-	}
-}

+ 0 - 34
database/migrations/2022_01_25_132241_create_money_records_table.php

@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-/**
- * Class CreateMoneyRecordsTable.
- */
-class CreateMoneyRecordsTable extends Migration
-{
-	/**
-	 * Run the migrations.
-	 *
-	 * @return void
-	 */
-	public function up()
-	{
-		Schema::create('money_records', function(Blueprint $table) {
-            $table->increments('id');
-
-            $table->timestamps();
-		});
-	}
-
-	/**
-	 * Reverse the migrations.
-	 *
-	 * @return void
-	 */
-	public function down()
-	{
-		Schema::drop('money_records');
-	}
-}

+ 36 - 0
database/migrations/2022_10_18_091934_create_coin_types_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+/**
+ * Class CreateCoinTypesTable.
+ */
+class CreateCoinTypesTable extends Migration
+{
+	/**
+	 * Run the migrations.
+	 *
+	 * @return void
+	 */
+	public function up()
+	{
+		Schema::create('coin_types', function(Blueprint $table) {
+            $table->increments('id');
+            $table->string('coin_name')->default('')->comment('名称');
+            $table->string('coin_logo')->default('')->comment('logo');
+            $table->tinyInteger('status')->default('1')->comment('状态');
+            $table->timestamps();
+		});
+	}
+
+	/**
+	 * Reverse the migrations.
+	 *
+	 * @return void
+	 */
+	public function down()
+	{
+		Schema::drop('coin_types');
+	}
+}

+ 41 - 0
database/migrations/2022_10_18_091958_create_member_coins_table.php

@@ -0,0 +1,41 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+/**
+ * Class CreateMemberCoinsTable.
+ */
+class CreateMemberCoinsTable extends Migration
+{
+	/**
+	 * Run the migrations.
+	 *
+	 * @return void
+	 */
+	public function up()
+	{
+		Schema::create('member_coins', function(Blueprint $table) {
+            $table->increments('id');
+            $table->integer('m_id')->index('m_id')->default('0')->comment('m_id');
+            $table->integer('coin_id')->index('coin_id')->default('0')->comment('coin_id');
+            $table->string('coin_name')->default('')->comment('币名');
+            $table->double('num',12,6)->default('0')->comment('余额');
+            $table->double('lock_num',12,6)->default('0')->comment('锁定数量');
+            $table->string('address')->default('')->comment('address');
+            $table->string('private')->default('')->comment('');
+            $table->string('code_img')->default('')->comment('');
+            $table->timestamps();
+		});
+	}
+
+	/**
+	 * Reverse the migrations.
+	 *
+	 * @return void
+	 */
+	public function down()
+	{
+		Schema::drop('member_coins');
+	}
+}

+ 4 - 1
database/migrations/2021_07_12_113252_create_block_infos_table.php → database/migrations/2022_10_18_092006_create_block_infos_table.php

@@ -17,7 +17,10 @@ class CreateBlockInfosTable extends Migration
 	{
 		Schema::create('block_infos', function(Blueprint $table) {
             $table->increments('id');
-
+            $table->integer('analyze')->comment('扫描高度');
+            $table->integer('num')->comment('最高高度');
+            $table->string('coin_name')->comment('coin_name');
+            $table->string('coin_id')->comment('coin_id');
             $table->timestamps();
 		});
 	}

+ 44 - 0
database/migrations/2022_10_18_092015_create_block_items_table.php

@@ -0,0 +1,44 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+/**
+ * Class CreateBlockItemsTable.
+ */
+class CreateBlockItemsTable extends Migration
+{
+	/**
+	 * Run the migrations.
+	 *
+	 * @return void
+	 */
+	public function up()
+	{
+		Schema::create('block_items', function(Blueprint $table) {
+            $table->increments('id');
+            $table->integer('m_id')->index('m_id')->default('0')->comment('m_id');
+            $table->integer('coin_id')->index('coin_id')->default('0')->comment('coin_id');
+            $table->integer('block_num')->default('0')->comment('block_num');
+            $table->double('money',12,6)->default('0')->comment('余额');
+            $table->string('from_a')->default('')->comment('from_a');
+            $table->string('hash')->default('')->comment('hash');
+            $table->string('to_a')->default('')->comment('to_a');
+            $table->string('to_type')->default('')->comment('to_type');
+            $table->string('fee_limit')->default('')->comment('fee_limit');
+            $table->string('coin_name')->default('')->comment('coin_name');
+            $table->timestamp('pay_at',0)->nullable();
+            $table->timestamps();
+		});
+	}
+
+	/**
+	 * Reverse the migrations.
+	 *
+	 * @return void
+	 */
+	public function down()
+	{
+		Schema::drop('block_items');
+	}
+}

+ 55 - 0
database/migrations/2022_10_18_092853_create_broadcasts_table.php

@@ -0,0 +1,55 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+/**
+ * Class CreateBroadcastsTable.
+ */
+class CreateBroadcastsTable extends Migration
+{
+	/**
+	 * Run the migrations.
+	 *
+	 * @return void
+	 */
+	public function up()
+	{
+		Schema::create('broadcasts', function(Blueprint $table) {
+            $table->increments('id');
+            $table->string('from')->default('')->comment('from');
+            $table->string('to')->default('')->comment('to');
+            $table->string('nonce')->default('')->comment('nonce');
+            $table->string('value')->default('')->comment('value');
+            $table->string('data')->default('')->comment('data');
+            $table->string('chain_id')->default('')->comment('chain_id');
+            $table->string('gas_price')->default('')->comment('gas_price');
+            $table->string('gas_limit')->default('')->comment('gas_limit');
+            $table->string('sign')->default('')->comment('sign');
+            $table->string('hash')->default('')->comment('hash');
+            $table->string('from_key')->default('')->comment('from_key');
+            $table->string('error')->default('')->comment('error');
+            $table->string('contract_address')->default('')->comment('contract_address');
+            $table->string('to_address')->default('')->comment('to_address');
+            $table->text('success')->comment('success');
+            $table->double('money',12,6)->default('0')->comment('余额');
+            $table->integer('type')->default('0')->comment('type');
+            $table->integer('status')->default('0')->comment('status');
+            $table->integer('order_id')->default('0')->comment('order_id');
+            $table->integer('coin_id')->default('0')->comment('coin_id');
+            $table->integer('depend')->default('0')->comment('depend');
+            $table->integer('m_id')->default('0')->comment('m_id');
+            $table->timestamps();
+		});
+	}
+
+	/**
+	 * Reverse the migrations.
+	 *
+	 * @return void
+	 */
+	public function down()
+	{
+		Schema::drop('broadcasts');
+	}
+}

+ 26 - 0
public/404.html

@@ -0,0 +1,26 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<title>404</title>
+<style>
+	body{
+		background-color:#444;
+		font-size:14px;
+	}
+	h3{
+		font-size:60px;
+		color:#eee;
+		text-align:center;
+		padding-top:30px;
+		font-weight:normal;
+	}
+</style>
+</head>
+
+<body>
+<h3>404锛屾偍璇锋眰鐨勬枃浠朵笉瀛樺湪!</h3>
+</body>
+</html>

+ 85 - 0
resources/views/admins/blockInfos/create.blade.php

@@ -0,0 +1,85 @@
+<div style="margin-top: 10px;" id="blockInfos-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        新增 - BlockInfo
+    </div>
+    <el-form action="{{route('admin.blockInfo.save')}}" method="post" id="form-create">
+        <!-- image -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'blockInfos'}" tips="图片建议(686*128)"></ui-file>
+        <!-- link -->
+{{--        <ui-input-text label="blockInfo链接" name="link" placeholder="blockInfo跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- show -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- sort -->
+        <ui-input-number label="排序" checked="checked" value="50" name="sort" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#blockInfos-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:1,   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     url:true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+    });
+</script>
+@include('layouts.admin.form_script')

+ 86 - 0
resources/views/admins/blockInfos/edit.blade.php

@@ -0,0 +1,86 @@
+<div style="margin-top: 10px;" id="blockInfos-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        编辑BlockInfo
+    </div>
+    <el-form action="{{route('admin.blockInfo.update',array('id'=>$model->id))}}" method="post" id="form-create">
+        <!-- 图片 -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'blockInfos'}" imageurl="{{$model->image}}" tips="图片大小建议(686*128)"></ui-file>
+        <!-- 链接 -->
+{{--        <ui-input-text label="链接" name="link" value="{{$model->link}}" placeholder="跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- 是否显示 -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- 排序 -->
+        <ui-input-number label="排序" checked="checked" name="sort" value="{{$model->sort}}" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#blockInfos-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:{{$model->status}},   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+        // 编辑保存变量
+        window.formDatum = $('form').serialize();
+    });
+</script>
+@include('layouts.admin.form_script')

+ 156 - 0
resources/views/admins/blockInfos/index.blade.php

@@ -0,0 +1,156 @@
+@extends('layouts.admin.app')
+@section('plug-css')
+    <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
+@endsection
+@section('crumbs')
+    <ol class="breadcrumb crumbs">
+        <li><a href="{{ route('admin.index') }}#">后台导航</a></li>
+        <li><a href="{{ route('admin.blockInfo.index') }}">后台BlockInfo首页</a></li>
+        <li class="active">BlockInfo列表</li>
+    </ol>
+@endsection
+
+@section('content')
+    <form id="searchForm" class="form-inline">
+        <div class="">
+            <div class="form-group">
+                <label for="name" class="label-css"> ID:</label>
+                <input class="form-control" type="text" name="id">
+            </div>
+            &ensp;&ensp;
+            <button type="button" class="btn btn-primary">查询</button>
+        </div>
+    </form>
+    <hr class="hr-css">
+    <div>
+        <div id="toolbar">
+            <div class="columns columns-left btn-group pull-left">
+                <a class="createForm" data-url="{{ route('admin.blockInfo.store') }}" data-title="create">
+                    <button class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&ensp;新增BlockInfo
+                    </button>
+                </a>
+                <a>
+                    <button id="deleteAll" data-url="{{ route('admin.blockInfo.destroys',['is_del'=>1]) }}" class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>&ensp;删除
+                    </button>
+                </a>
+            </div>
+        </div>
+        <table id="ContentTable"></table>
+    </div>
+@endsection
+
+@section('plug-js')
+    <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
+    <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
+@endsection
+
+@section('scripts')
+    <script>
+        $(function(){
+            BootStrapInit.init('tableBlockInfo','ContentTable',{
+                searchForm: 'searchForm',   // 表单搜索id 省略默认 'searchForm'
+                url: "{{ route('admin.blockInfo.ajax.index') }}",
+                method: 'post',
+                toolbar: '#toolbar',
+                idField: '',        // 指定主键列
+                uniqueId: "id",     // 这里需要指定当前查询表唯一主键字段
+                columns: [
+                    {
+                        checkbox: true,
+                        align: 'center',
+                        valign: 'middle'
+                    },
+                    {
+                        field: 'id',
+                        title: 'ID',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'image',
+                        title: 'Image',
+                        align: 'center',
+                        valign: 'middle',
+                        formatter:thumbFormatter
+                    },
+                    // {
+                    //     field: 'link',
+                    //     title: '链接',
+                    //     align: 'center',
+                    //     valign: 'middle'
+                    // },
+                    {
+                        field: 'status',
+                        title: '显示',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:yesOrNo,
+                        bool_data:{
+                            'class' : 'cursor',
+//                            'url'   : 'javascript:;',
+                            'table' : 'blockInfos'
+//                            'pk' : 'id'   // 主键名称不写默认id主键
+                        }
+                    },
+                    {
+                        field: 'sort',
+                        title: '排序',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:inputData,
+                        input_data: {
+//                        'class' : 'cursor',     // 当前样式
+//                        'url'   : 'javascript', // url存在 及请求指定地址修改数据
+                            'table' : 'blockInfos'   // url为空时采用,
+//                        'pk'    : 'id'          // 默认修改主键名称 不写 默认id为主键
+                        }
+                    },
+                    {
+                        field: 'created_at',
+                        title: '创建时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'updated_at',
+                        title: '更新时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        pkId: 'id',         // 当前主键id 兼容排序 field='id' 默认值id
+                        title: '操作',
+                        align: 'center',
+                        valign: 'middle',
+                        width: '185px',
+                        formatter:operateFormatter,
+                        btn_group:[
+                            {
+                                'name'  : '编辑',
+                                'class' : 'btn-primary createForm',
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.blockInfo.edit', ['id'=>'-val-'])}}'
+                            },
+                            {
+                                'name'  : '删除',
+                                'class' : 'btn-danger deleteBtn', // class标签 deleteBtn删除 layer弹出框
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.blockInfo.destroy', ['id'=>'-val-','is_del'=>1])}}'   // 选择按钮
+                            }
+                        ]
+                    }
+                ]
+            });
+        });
+    </script>
+@endsection

+ 85 - 0
resources/views/admins/blockItems/create.blade.php

@@ -0,0 +1,85 @@
+<div style="margin-top: 10px;" id="blockItems-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        新增 - BlockItem
+    </div>
+    <el-form action="{{route('admin.blockItem.save')}}" method="post" id="form-create">
+        <!-- image -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'blockItems'}" tips="图片建议(686*128)"></ui-file>
+        <!-- link -->
+{{--        <ui-input-text label="blockItem链接" name="link" placeholder="blockItem跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- show -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- sort -->
+        <ui-input-number label="排序" checked="checked" value="50" name="sort" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#blockItems-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:1,   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     url:true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+    });
+</script>
+@include('layouts.admin.form_script')

+ 86 - 0
resources/views/admins/blockItems/edit.blade.php

@@ -0,0 +1,86 @@
+<div style="margin-top: 10px;" id="blockItems-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        编辑BlockItem
+    </div>
+    <el-form action="{{route('admin.blockItem.update',array('id'=>$model->id))}}" method="post" id="form-create">
+        <!-- 图片 -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'blockItems'}" imageurl="{{$model->image}}" tips="图片大小建议(686*128)"></ui-file>
+        <!-- 链接 -->
+{{--        <ui-input-text label="链接" name="link" value="{{$model->link}}" placeholder="跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- 是否显示 -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- 排序 -->
+        <ui-input-number label="排序" checked="checked" name="sort" value="{{$model->sort}}" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#blockItems-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:{{$model->status}},   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+        // 编辑保存变量
+        window.formDatum = $('form').serialize();
+    });
+</script>
+@include('layouts.admin.form_script')

+ 156 - 0
resources/views/admins/blockItems/index.blade.php

@@ -0,0 +1,156 @@
+@extends('layouts.admin.app')
+@section('plug-css')
+    <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
+@endsection
+@section('crumbs')
+    <ol class="breadcrumb crumbs">
+        <li><a href="{{ route('admin.index') }}#">后台导航</a></li>
+        <li><a href="{{ route('admin.blockItem.index') }}">后台BlockItem首页</a></li>
+        <li class="active">BlockItem列表</li>
+    </ol>
+@endsection
+
+@section('content')
+    <form id="searchForm" class="form-inline">
+        <div class="">
+            <div class="form-group">
+                <label for="name" class="label-css"> ID:</label>
+                <input class="form-control" type="text" name="id">
+            </div>
+            &ensp;&ensp;
+            <button type="button" class="btn btn-primary">查询</button>
+        </div>
+    </form>
+    <hr class="hr-css">
+    <div>
+        <div id="toolbar">
+            <div class="columns columns-left btn-group pull-left">
+                <a class="createForm" data-url="{{ route('admin.blockItem.store') }}" data-title="create">
+                    <button class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&ensp;新增BlockItem
+                    </button>
+                </a>
+                <a>
+                    <button id="deleteAll" data-url="{{ route('admin.blockItem.destroys',['is_del'=>1]) }}" class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>&ensp;删除
+                    </button>
+                </a>
+            </div>
+        </div>
+        <table id="ContentTable"></table>
+    </div>
+@endsection
+
+@section('plug-js')
+    <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
+    <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
+@endsection
+
+@section('scripts')
+    <script>
+        $(function(){
+            BootStrapInit.init('tableBlockItem','ContentTable',{
+                searchForm: 'searchForm',   // 表单搜索id 省略默认 'searchForm'
+                url: "{{ route('admin.blockItem.ajax.index') }}",
+                method: 'post',
+                toolbar: '#toolbar',
+                idField: '',        // 指定主键列
+                uniqueId: "id",     // 这里需要指定当前查询表唯一主键字段
+                columns: [
+                    {
+                        checkbox: true,
+                        align: 'center',
+                        valign: 'middle'
+                    },
+                    {
+                        field: 'id',
+                        title: 'ID',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'image',
+                        title: 'Image',
+                        align: 'center',
+                        valign: 'middle',
+                        formatter:thumbFormatter
+                    },
+                    // {
+                    //     field: 'link',
+                    //     title: '链接',
+                    //     align: 'center',
+                    //     valign: 'middle'
+                    // },
+                    {
+                        field: 'status',
+                        title: '显示',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:yesOrNo,
+                        bool_data:{
+                            'class' : 'cursor',
+//                            'url'   : 'javascript:;',
+                            'table' : 'blockItems'
+//                            'pk' : 'id'   // 主键名称不写默认id主键
+                        }
+                    },
+                    {
+                        field: 'sort',
+                        title: '排序',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:inputData,
+                        input_data: {
+//                        'class' : 'cursor',     // 当前样式
+//                        'url'   : 'javascript', // url存在 及请求指定地址修改数据
+                            'table' : 'blockItems'   // url为空时采用,
+//                        'pk'    : 'id'          // 默认修改主键名称 不写 默认id为主键
+                        }
+                    },
+                    {
+                        field: 'created_at',
+                        title: '创建时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'updated_at',
+                        title: '更新时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        pkId: 'id',         // 当前主键id 兼容排序 field='id' 默认值id
+                        title: '操作',
+                        align: 'center',
+                        valign: 'middle',
+                        width: '185px',
+                        formatter:operateFormatter,
+                        btn_group:[
+                            {
+                                'name'  : '编辑',
+                                'class' : 'btn-primary createForm',
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.blockItem.edit', ['id'=>'-val-'])}}'
+                            },
+                            {
+                                'name'  : '删除',
+                                'class' : 'btn-danger deleteBtn', // class标签 deleteBtn删除 layer弹出框
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.blockItem.destroy', ['id'=>'-val-','is_del'=>1])}}'   // 选择按钮
+                            }
+                        ]
+                    }
+                ]
+            });
+        });
+    </script>
+@endsection

+ 85 - 0
resources/views/admins/broadcasts/create.blade.php

@@ -0,0 +1,85 @@
+<div style="margin-top: 10px;" id="broadcasts-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        新增 - Broadcast
+    </div>
+    <el-form action="{{route('admin.broadcast.save')}}" method="post" id="form-create">
+        <!-- image -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'broadcasts'}" tips="图片建议(686*128)"></ui-file>
+        <!-- link -->
+{{--        <ui-input-text label="broadcast链接" name="link" placeholder="broadcast跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- show -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- sort -->
+        <ui-input-number label="排序" checked="checked" value="50" name="sort" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#broadcasts-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:1,   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     url:true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+    });
+</script>
+@include('layouts.admin.form_script')

+ 86 - 0
resources/views/admins/broadcasts/edit.blade.php

@@ -0,0 +1,86 @@
+<div style="margin-top: 10px;" id="broadcasts-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        编辑Broadcast
+    </div>
+    <el-form action="{{route('admin.broadcast.update',array('id'=>$model->id))}}" method="post" id="form-create">
+        <!-- 图片 -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'broadcasts'}" imageurl="{{$model->image}}" tips="图片大小建议(686*128)"></ui-file>
+        <!-- 链接 -->
+{{--        <ui-input-text label="链接" name="link" value="{{$model->link}}" placeholder="跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- 是否显示 -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- 排序 -->
+        <ui-input-number label="排序" checked="checked" name="sort" value="{{$model->sort}}" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#broadcasts-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:{{$model->status}},   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+        // 编辑保存变量
+        window.formDatum = $('form').serialize();
+    });
+</script>
+@include('layouts.admin.form_script')

+ 156 - 0
resources/views/admins/broadcasts/index.blade.php

@@ -0,0 +1,156 @@
+@extends('layouts.admin.app')
+@section('plug-css')
+    <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
+@endsection
+@section('crumbs')
+    <ol class="breadcrumb crumbs">
+        <li><a href="{{ route('admin.index') }}#">后台导航</a></li>
+        <li><a href="{{ route('admin.broadcast.index') }}">后台Broadcast首页</a></li>
+        <li class="active">Broadcast列表</li>
+    </ol>
+@endsection
+
+@section('content')
+    <form id="searchForm" class="form-inline">
+        <div class="">
+            <div class="form-group">
+                <label for="name" class="label-css"> ID:</label>
+                <input class="form-control" type="text" name="id">
+            </div>
+            &ensp;&ensp;
+            <button type="button" class="btn btn-primary">查询</button>
+        </div>
+    </form>
+    <hr class="hr-css">
+    <div>
+        <div id="toolbar">
+            <div class="columns columns-left btn-group pull-left">
+                <a class="createForm" data-url="{{ route('admin.broadcast.store') }}" data-title="create">
+                    <button class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&ensp;新增Broadcast
+                    </button>
+                </a>
+                <a>
+                    <button id="deleteAll" data-url="{{ route('admin.broadcast.destroys',['is_del'=>1]) }}" class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>&ensp;删除
+                    </button>
+                </a>
+            </div>
+        </div>
+        <table id="ContentTable"></table>
+    </div>
+@endsection
+
+@section('plug-js')
+    <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
+    <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
+@endsection
+
+@section('scripts')
+    <script>
+        $(function(){
+            BootStrapInit.init('tableBroadcast','ContentTable',{
+                searchForm: 'searchForm',   // 表单搜索id 省略默认 'searchForm'
+                url: "{{ route('admin.broadcast.ajax.index') }}",
+                method: 'post',
+                toolbar: '#toolbar',
+                idField: '',        // 指定主键列
+                uniqueId: "id",     // 这里需要指定当前查询表唯一主键字段
+                columns: [
+                    {
+                        checkbox: true,
+                        align: 'center',
+                        valign: 'middle'
+                    },
+                    {
+                        field: 'id',
+                        title: 'ID',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'image',
+                        title: 'Image',
+                        align: 'center',
+                        valign: 'middle',
+                        formatter:thumbFormatter
+                    },
+                    // {
+                    //     field: 'link',
+                    //     title: '链接',
+                    //     align: 'center',
+                    //     valign: 'middle'
+                    // },
+                    {
+                        field: 'status',
+                        title: '显示',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:yesOrNo,
+                        bool_data:{
+                            'class' : 'cursor',
+//                            'url'   : 'javascript:;',
+                            'table' : 'broadcasts'
+//                            'pk' : 'id'   // 主键名称不写默认id主键
+                        }
+                    },
+                    {
+                        field: 'sort',
+                        title: '排序',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:inputData,
+                        input_data: {
+//                        'class' : 'cursor',     // 当前样式
+//                        'url'   : 'javascript', // url存在 及请求指定地址修改数据
+                            'table' : 'broadcasts'   // url为空时采用,
+//                        'pk'    : 'id'          // 默认修改主键名称 不写 默认id为主键
+                        }
+                    },
+                    {
+                        field: 'created_at',
+                        title: '创建时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'updated_at',
+                        title: '更新时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        pkId: 'id',         // 当前主键id 兼容排序 field='id' 默认值id
+                        title: '操作',
+                        align: 'center',
+                        valign: 'middle',
+                        width: '185px',
+                        formatter:operateFormatter,
+                        btn_group:[
+                            {
+                                'name'  : '编辑',
+                                'class' : 'btn-primary createForm',
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.broadcast.edit', ['id'=>'-val-'])}}'
+                            },
+                            {
+                                'name'  : '删除',
+                                'class' : 'btn-danger deleteBtn', // class标签 deleteBtn删除 layer弹出框
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.broadcast.destroy', ['id'=>'-val-','is_del'=>1])}}'   // 选择按钮
+                            }
+                        ]
+                    }
+                ]
+            });
+        });
+    </script>
+@endsection

+ 85 - 0
resources/views/admins/coinTypes/create.blade.php

@@ -0,0 +1,85 @@
+<div style="margin-top: 10px;" id="coinTypes-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        新增 - CoinType
+    </div>
+    <el-form action="{{route('admin.coinType.save')}}" method="post" id="form-create">
+        <!-- image -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'coinTypes'}" tips="图片建议(686*128)"></ui-file>
+        <!-- link -->
+{{--        <ui-input-text label="coinType链接" name="link" placeholder="coinType跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- show -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- sort -->
+        <ui-input-number label="排序" checked="checked" value="50" name="sort" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#coinTypes-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:1,   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     url:true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+    });
+</script>
+@include('layouts.admin.form_script')

+ 86 - 0
resources/views/admins/coinTypes/edit.blade.php

@@ -0,0 +1,86 @@
+<div style="margin-top: 10px;" id="coinTypes-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        编辑CoinType
+    </div>
+    <el-form action="{{route('admin.coinType.update',array('id'=>$model->id))}}" method="post" id="form-create">
+        <!-- 图片 -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'coinTypes'}" imageurl="{{$model->image}}" tips="图片大小建议(686*128)"></ui-file>
+        <!-- 链接 -->
+{{--        <ui-input-text label="链接" name="link" value="{{$model->link}}" placeholder="跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- 是否显示 -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- 排序 -->
+        <ui-input-number label="排序" checked="checked" name="sort" value="{{$model->sort}}" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#coinTypes-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:{{$model->status}},   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+        // 编辑保存变量
+        window.formDatum = $('form').serialize();
+    });
+</script>
+@include('layouts.admin.form_script')

+ 156 - 0
resources/views/admins/coinTypes/index.blade.php

@@ -0,0 +1,156 @@
+@extends('layouts.admin.app')
+@section('plug-css')
+    <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
+@endsection
+@section('crumbs')
+    <ol class="breadcrumb crumbs">
+        <li><a href="{{ route('admin.index') }}#">后台导航</a></li>
+        <li><a href="{{ route('admin.coinType.index') }}">后台CoinType首页</a></li>
+        <li class="active">CoinType列表</li>
+    </ol>
+@endsection
+
+@section('content')
+    <form id="searchForm" class="form-inline">
+        <div class="">
+            <div class="form-group">
+                <label for="name" class="label-css"> ID:</label>
+                <input class="form-control" type="text" name="id">
+            </div>
+            &ensp;&ensp;
+            <button type="button" class="btn btn-primary">查询</button>
+        </div>
+    </form>
+    <hr class="hr-css">
+    <div>
+        <div id="toolbar">
+            <div class="columns columns-left btn-group pull-left">
+                <a class="createForm" data-url="{{ route('admin.coinType.store') }}" data-title="create">
+                    <button class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&ensp;新增CoinType
+                    </button>
+                </a>
+                <a>
+                    <button id="deleteAll" data-url="{{ route('admin.coinType.destroys',['is_del'=>1]) }}" class="btn btn-default" type="button">
+                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>&ensp;删除
+                    </button>
+                </a>
+            </div>
+        </div>
+        <table id="ContentTable"></table>
+    </div>
+@endsection
+
+@section('plug-js')
+    <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
+    <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
+    <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
+@endsection
+
+@section('scripts')
+    <script>
+        $(function(){
+            BootStrapInit.init('tableCoinType','ContentTable',{
+                searchForm: 'searchForm',   // 表单搜索id 省略默认 'searchForm'
+                url: "{{ route('admin.coinType.ajax.index') }}",
+                method: 'post',
+                toolbar: '#toolbar',
+                idField: '',        // 指定主键列
+                uniqueId: "id",     // 这里需要指定当前查询表唯一主键字段
+                columns: [
+                    {
+                        checkbox: true,
+                        align: 'center',
+                        valign: 'middle'
+                    },
+                    {
+                        field: 'id',
+                        title: 'ID',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'image',
+                        title: 'Image',
+                        align: 'center',
+                        valign: 'middle',
+                        formatter:thumbFormatter
+                    },
+                    // {
+                    //     field: 'link',
+                    //     title: '链接',
+                    //     align: 'center',
+                    //     valign: 'middle'
+                    // },
+                    {
+                        field: 'status',
+                        title: '显示',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:yesOrNo,
+                        bool_data:{
+                            'class' : 'cursor',
+//                            'url'   : 'javascript:;',
+                            'table' : 'coinTypes'
+//                            'pk' : 'id'   // 主键名称不写默认id主键
+                        }
+                    },
+                    {
+                        field: 'sort',
+                        title: '排序',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true,
+                        formatter:inputData,
+                        input_data: {
+//                        'class' : 'cursor',     // 当前样式
+//                        'url'   : 'javascript', // url存在 及请求指定地址修改数据
+                            'table' : 'coinTypes'   // url为空时采用,
+//                        'pk'    : 'id'          // 默认修改主键名称 不写 默认id为主键
+                        }
+                    },
+                    {
+                        field: 'created_at',
+                        title: '创建时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        field: 'updated_at',
+                        title: '更新时间',
+                        align: 'center',
+                        valign: 'middle',
+                        sortable: true
+                    },
+                    {
+                        pkId: 'id',         // 当前主键id 兼容排序 field='id' 默认值id
+                        title: '操作',
+                        align: 'center',
+                        valign: 'middle',
+                        width: '185px',
+                        formatter:operateFormatter,
+                        btn_group:[
+                            {
+                                'name'  : '编辑',
+                                'class' : 'btn-primary createForm',
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.coinType.edit', ['id'=>'-val-'])}}'
+                            },
+                            {
+                                'name'  : '删除',
+                                'class' : 'btn-danger deleteBtn', // class标签 deleteBtn删除 layer弹出框
+                                'url'   : 'javascript:;',
+                                'confirm_url': '{{ route('admin.coinType.destroy', ['id'=>'-val-','is_del'=>1])}}'   // 选择按钮
+                            }
+                        ]
+                    }
+                ]
+            });
+        });
+    </script>
+@endsection

+ 85 - 0
resources/views/admins/memberCoins/create.blade.php

@@ -0,0 +1,85 @@
+<div style="margin-top: 10px;" id="memberCoins-app">
+    <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
+        新增 - MemberCoin
+    </div>
+    <el-form action="{{route('admin.memberCoin.save')}}" method="post" id="form-create">
+        <!-- image -->
+        <ui-file label="图片(686*128)" size="0.5" name="image" :data="{uploadName:'memberCoins'}" tips="图片建议(686*128)"></ui-file>
+        <!-- link -->
+{{--        <ui-input-text label="memberCoin链接" name="link" placeholder="memberCoin跳转链接" maxlength="255" tips="请输入有效的链接" autofocus="true"></ui-input-text>--}}
+        <!-- show -->
+        <ui-radio label="是否开启" :params="params" tips="控制前台是否显示"></ui-radio>
+        <!-- sort -->
+        <ui-input-number label="排序" checked="checked" value="50" name="sort" min="1" max="100" tips="控制前台显示顺序"></ui-input-number>
+        <ui-submit></ui-submit>
+    </el-form>
+</div>
+
+<script type="application/javascript">
+    $(function () {
+        // 注意:Vue组件一定放在jQuery.validator前面验证
+        new Vue({
+            el: '#memberCoins-app',
+            data :function () {
+                return {
+                    params: {
+                        // 注意:group和attr连个属性都不能省略 就算为空
+                        group: {},
+                        attr: {
+                            name: 'status',   // 当前checkbox框的name属性  【必填】
+                            radioCheck:1,   // 当前选中项 int | string   【必填】
+                            label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
+                            radios: [ // 每个checkbox 就是一个json对象     【必填】
+                                {
+                                    value:0,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '关闭',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                },
+                                {
+                                    value:1,      // 当前选中时值也就是value属性的值      【必填】
+                                    label: '开启',    // 当前提示文字                 【必填】
+                                    disable: false   // 是否禁止点击 默认:false 不禁止
+                                }
+                            ]
+                        }
+                    }
+                };
+            }
+        });
+        jQuery.validator.setDefaults({
+            debug: false,         // 调试模式true不会提交,false允许提交
+            success: "success",   // 匹配成功的class样式名称
+            errorElement: 'div'   // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
+        });
+        // 前台数据验证 验证需要设置window.form全局变量
+        window.form = $('#form-create').validate({
+            rules: {
+                image: {
+                    required: true,
+                    maxlength: 255,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                },
+                // link: {
+                //     required: true,
+                //     url:true,
+                //     maxlength: 255,
+                //     normalizer: function ( value ) {
+                //         return $.trim(value);
+                //     }
+                // },
+                show: {
+                    required: true
+                },
+                sort: {
+                    required: true,
+                    normalizer: function ( value ) {
+                        return $.trim(value);
+                    }
+                }
+            }
+        });
+    });
+</script>
+@include('layouts.admin.form_script')

Some files were not shown because too many files changed in this diff