mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 03:22:51 +08:00
完成将商品标签加入安装流程中,可以方便的测试表格选择器;
This commit is contained in:
@@ -4,6 +4,7 @@ namespace app\admin\service;
|
|||||||
|
|
||||||
use app\admin\model\MallCate;
|
use app\admin\model\MallCate;
|
||||||
use app\admin\model\MallGoods;
|
use app\admin\model\MallGoods;
|
||||||
|
use app\admin\model\MallTag;
|
||||||
use app\admin\model\SystemAdmin;
|
use app\admin\model\SystemAdmin;
|
||||||
use app\admin\model\SystemAuth;
|
use app\admin\model\SystemAuth;
|
||||||
use app\admin\model\SystemAuthNode;
|
use app\admin\model\SystemAuthNode;
|
||||||
@@ -51,6 +52,10 @@ class InitAdminService
|
|||||||
MallGoods::create($data_goods);
|
MallGoods::create($data_goods);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$list_tag = $this->requireData('MallTag');
|
||||||
|
|
||||||
|
$this->installData(MallTag::class, $list_tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initQuick()
|
public function initQuick()
|
||||||
|
|||||||
32
app/admin/service/initAdminData/MallTag.php
Normal file
32
app/admin/service/initAdminData/MallTag.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
$ul_mall_tag = array(
|
||||||
|
array(
|
||||||
|
"id" => 1,
|
||||||
|
"title" => "便宜",
|
||||||
|
"create_time" => 1657347818,
|
||||||
|
"update_time" => 1657347818,
|
||||||
|
"delete_time" => 0
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 2,
|
||||||
|
"title" => "售后",
|
||||||
|
"create_time" => 1657347825,
|
||||||
|
"update_time" => 1657347825,
|
||||||
|
"delete_time" => 0
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 3,
|
||||||
|
"title" => "黑科技",
|
||||||
|
"create_time" => 1657347836,
|
||||||
|
"update_time" => 1657347836,
|
||||||
|
"delete_time" => 0
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 4,
|
||||||
|
"title" => "大厂",
|
||||||
|
"create_time" => 1657347850,
|
||||||
|
"update_time" => 1657347850,
|
||||||
|
"delete_time" => 0
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return $ul_mall_tag;
|
||||||
@@ -142,7 +142,18 @@ $ul_system_menu = array(
|
|||||||
"target" => "_self",
|
"target" => "_self",
|
||||||
"sort" => 0,
|
"sort" => 0,
|
||||||
"status" => 1,
|
"status" => 1,
|
||||||
)
|
),
|
||||||
|
array(
|
||||||
|
"id" => 254,
|
||||||
|
"pid" => 249,
|
||||||
|
"title" => "商品标签",
|
||||||
|
"icon" => "fa fa-connectdevelop",
|
||||||
|
"href" => "mall.tag/index",
|
||||||
|
"params" => "",
|
||||||
|
"target" => "_self",
|
||||||
|
"sort" => 0,
|
||||||
|
"status" => 1,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,7 @@ class MallGoods extends Migrator
|
|||||||
->setComment('商品列表')
|
->setComment('商品列表')
|
||||||
->addColumn(Column::bigInteger('cate_id')->setUnsigned()->setComment('分类ID'))
|
->addColumn(Column::bigInteger('cate_id')->setUnsigned()->setComment('分类ID'))
|
||||||
->addColumn(Column::char('title', 20)->setDefault('')->setComment('商品名称'))
|
->addColumn(Column::char('title', 20)->setDefault('')->setComment('商品名称'))
|
||||||
|
->addColumn(Column::char('tag', 100)->setDefault('')->setComment('商品标签'))
|
||||||
->addColumn(Column::char('logo')->setComment('商品logo {image}'))
|
->addColumn(Column::char('logo')->setComment('商品logo {image}'))
|
||||||
->addColumn(Column::text('images')->setComment('商品图片 {images}'))
|
->addColumn(Column::text('images')->setComment('商品图片 {images}'))
|
||||||
->addColumn(Column::text('describe')->setComment('商品描述 {editor}'))
|
->addColumn(Column::text('describe')->setComment('商品描述 {editor}'))
|
||||||
|
|||||||
39
database/migrations/20220709061205_mall_tag.php
Normal file
39
database/migrations/20220709061205_mall_tag.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use think\migration\Migrator;
|
||||||
|
use think\migration\db\Column;
|
||||||
|
|
||||||
|
class MallTag extends Migrator
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Change Method.
|
||||||
|
*
|
||||||
|
* Write your reversible migrations using this method.
|
||||||
|
*
|
||||||
|
* More information on writing migrations is available here:
|
||||||
|
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||||
|
*
|
||||||
|
* The following commands can be used in this method and Phinx will
|
||||||
|
* automatically reverse them when rolling back:
|
||||||
|
*
|
||||||
|
* createTable
|
||||||
|
* renameTable
|
||||||
|
* addColumn
|
||||||
|
* renameColumn
|
||||||
|
* addIndex
|
||||||
|
* addForeignKey
|
||||||
|
*
|
||||||
|
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||||
|
* with the Table class.
|
||||||
|
*/
|
||||||
|
public function change()
|
||||||
|
{
|
||||||
|
$table = $this->table('mall_tag')
|
||||||
|
->setComment('商品标签')
|
||||||
|
->addColumn(Column::char('title', 20)->setDefault('')->setComment('商品名称'))
|
||||||
|
->addColumn(Column::integer('create_time')->setLimit(11)->setUnsigned()->setDefault(0)->setComment('创建时间'))
|
||||||
|
->addColumn(Column::integer('update_time')->setLimit(11)->setUnsigned()->setDefault(0))
|
||||||
|
->addColumn(Column::integer('delete_time')->setLimit(11)->setUnsigned()->setDefault(0))
|
||||||
|
->create();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user