Skip to content

Commit 0dea018

Browse files
committed
release
1 parent dce0a30 commit 0dea018

20 files changed

Lines changed: 168 additions & 26 deletions

File tree

module/Banner/Admin/Controller/BannerController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use ModStart\Grid\GridFilter;
1212
use ModStart\Support\Concern\HasFields;
1313
use Module\Banner\Type\BannerPosition;
14-
use Module\Banner\Type\BannerPositionRemark;
1514
use Module\Banner\Type\BannerType;
1615
use Module\Banner\Util\BannerUtil;
1716

@@ -26,7 +25,9 @@ protected function crud(AdminCRUDBuilder $builder)
2625
->field(function ($builder) {
2726
/** @var HasFields $builder */
2827
$builder->id('id', 'ID');
29-
$builder->select('position', '位置')->optionType(BannerPositionRemark::class);
28+
$position = $builder->select('position', '位置')
29+
->optionType(BannerPosition::class)
30+
->whenHelps(BannerPosition::whenHelps());
3031
$builder->image('image', '图片');
3132
$builder->radio('type', '样式类型')
3233
->optionType(BannerType::class)

module/Banner/Docs/module/content.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,17 @@
7272
```php
7373
class XxxBannerPositionBiz extends \Module\Banner\Biz\AbstractBannerPositionBiz
7474
{
75-
public function name()
76-
{
75+
public function name() {
7776
return 'Xxx';
7877
}
7978

80-
public function title()
81-
{
79+
public function title() {
8280
return '特定位置';
8381
}
82+
83+
public function remark() {
84+
return '特定位置的轮播';
85+
}
8486
}
8587
```
8688

module/Banner/Docs/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.9.0 位置备注提示选择优化,支持自定义位置备注
2+
3+
- 新增:位置备注提示选择优化,支持自定义位置备注
4+
5+
---
6+
17
## 1.8.0 轮播图获取支持仅图片过滤方法,视频 Banner 概率不播放问题
28

39
- 新增:轮播图获取支持仅图片过滤方法

module/Banner/Type/BannerPosition.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,15 @@ public static function getList()
1717
BannerPositionBiz::allMap()
1818
);
1919
}
20+
21+
public static function whenHelps()
22+
{
23+
$whenHelps = [];
24+
foreach (BannerPositionBiz::listAll() as $bizer) {
25+
if ($bizer->remark()) {
26+
$whenHelps[$bizer->name()] = $bizer->remark();
27+
}
28+
}
29+
return $whenHelps;
30+
}
2031
}

module/Banner/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"require": [
1212
"Vendor:>=3.0.0"
1313
],
14-
"modstartVersion": ">=3.9.0",
14+
"modstartVersion": ">=4.0.0",
1515
"title": "通用轮播",
16-
"version": "1.8.0",
16+
"version": "1.9.0",
1717
"author": "官方",
1818
"description": "提供多位置轮播图片基础管理功能",
1919
"config": {

module/Cms/Core/ModuleServiceProvider.php

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
use Illuminate\Events\Dispatcher;
66
use Illuminate\Support\ServiceProvider;
77
use ModStart\Admin\Config\AdminMenu;
8-
use ModStart\Admin\Widget\DashboardItemA;
8+
use ModStart\Admin\Widget\DashboardItem;
99
use ModStart\Core\Dao\ModelUtil;
1010
use ModStart\Core\Util\TreeUtil;
1111
use ModStart\Layout\Row;
1212
use ModStart\Module\ModuleClassLoader;
1313
use Module\Banner\Biz\BannerPositionBiz;
14+
use Module\Cms\Model\CmsCat;
15+
use Module\Cms\Model\CmsContent;
16+
use Module\Cms\Model\CmsModel;
1417
use Module\Cms\Provider\CmsHomePageProvider;
1518
use Module\Cms\Provider\Theme\CmsThemeProvider;
1619
use Module\Cms\Provider\Theme\DefaultThemeProvider;
@@ -130,21 +133,34 @@ public function boot(Dispatcher $events)
130133

131134
AdminWidgetDashboard::registerIcon(function (Row $row) {
132135
$models = CmsModelUtil::all();
136+
$contents = [];
133137
foreach ($models as $model) {
134-
$row->column(3, DashboardItemA::makeIconNumberTitle(
135-
'iconfont icon-details', ModelUtil::count('cms_content', ['modelId' => $model['id']]), $model['title'],
136-
modstart_admin_url('cms/content/' . $model['id'])
137-
));
138+
$contents[] = [
139+
'title' => $model['title'],
140+
'value' => ModelUtil::count(CmsContent::class, ['modelId' => $model['id']]),
141+
'url' => modstart_admin_url('cms/content/' . $model['id'])
142+
];
138143
}
139-
$row->column(3, DashboardItemA::makeIconNumberTitle(
140-
'iconfont icon-list-alt', ModelUtil::count('cms_cat'), '栏目数',
141-
modstart_admin_url('cms/cat')
144+
$row->flexColumn(DashboardItem::makeTitleDataList(
145+
'iconfont icon-description',
146+
'CMS内容',
147+
$contents
142148
));
143-
$row->column(3, DashboardItemA::makeIconNumberTitle(
144-
'iconfont icon-credit',
145-
ModelUtil::count('cms_model'),
146-
'模型数',
147-
modstart_admin_url('cms/model')
149+
$row->flexColumn(DashboardItem::makeTitleDataList(
150+
'iconfont icon-description',
151+
'CMS管理',
152+
[
153+
[
154+
'title' => '栏目数',
155+
'value' => ModelUtil::count(CmsCat::class),
156+
'url' => modstart_admin_url('cms/cat')
157+
],
158+
[
159+
'title' => '模型数',
160+
'value' => ModelUtil::count(CmsModel::class),
161+
'url' => modstart_admin_url('cms/model')
162+
],
163+
]
148164
));
149165
});
150166

module/Cms/Docs/release.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 3.8.0
22

33
- 新增:CMS表单提交支持验证码配置,拦截恶意信息提交
4+
- 新增:后台首页报表统计功能升级
45
- 修复:审核状态编辑异常问题修复
56

67
---

module/Cms/Model/CmsModel.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
4+
namespace Module\Cms\Model;
5+
6+
7+
use Illuminate\Database\Eloquent\Model;
8+
9+
class CmsModel extends Model
10+
{
11+
protected $table = 'cms_model';
12+
}

module/Vendor/Util/UniappUtil.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public static function build($dir)
6464
'"/static/' => 'window.__msCDN+"vendor/' . $module . '/static/',
6565
// "url('/static/image/dialog-bg.png')"
6666
'"url(\'/static/' => '"url(\'"+window.__msCDN+"vendor/' . $module . '/static/',
67+
// Path:"static/
68+
'Path:"static/' => 'Path:window.__msCDN+"vendor/' . $module . '/static/',
6769
];
6870
$files = glob('dist/build/h5/static/js/*.js');
6971
foreach ($files as $file) {

public/asset/common/admin.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)