Skip to content

Commit 5ac00e7

Browse files
committed
bugfix: 博客评论审核状态文案错误修复
1 parent b77a98f commit 5ac00e7

File tree

136 files changed

+1312
-609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1312
-609
lines changed

config/module.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
'Blog' => [
1717
'enable' => true,
1818
],
19+
// 'AdminApi' => [
20+
// 'enable' => true,
21+
// ],
22+
// 'BlogAdminApi' => [
23+
// 'enable' => true,
24+
// ],
1925
'Nav' => [
2026
'enable' => true,
2127
'config' => [

env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ APP_DEBUG=true
33
APP_KEY=4LmYVxyQ0twIjPtNguwEgxDN68oEhBYH
44

55
DB_HOST=localhost
6+
DB_PORT=3306
67
DB_DATABASE=database
78
DB_USERNAME=root
89
DB_PASSWORD=123456

module/Banner/Admin/Controller/BannerController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Illuminate\Routing\Controller;
88
use ModStart\Admin\Concern\HasAdminQuickCRUD;
99
use ModStart\Admin\Layout\AdminCRUDBuilder;
10-
use ModStart\Detail\Detail;
1110
use ModStart\Form\Form;
1211
use ModStart\Grid\GridFilter;
1312
use ModStart\Support\Concern\HasFields;
@@ -41,6 +40,7 @@ protected function crud(AdminCRUDBuilder $builder)
4140

4241
$context->video('video', '视频');
4342
})->required();
43+
$builder->color('backgroundColor', '背景色');
4444
$builder->link('link', '链接');
4545
$builder->display('created_at', L('Created At'))->listable(false);
4646
$builder->display('updated_at', L('Updated At'))->listable(false);

module/Banner/Asset/style/banner.css

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

module/Banner/Biz/BannerPositionBiz.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace Module\Banner\Biz;
55

66

7-
use Module\Vendor\Biz\BizTrait;
7+
use Module\Vendor\Provider\BizTrait;
88

99
class BannerPositionBiz
1010
{

module/Banner/Docs/release.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
## 1.6.0
1+
## 1.6.0 快速渲染方式,轮播图Container模式,浏览器自适应更新
22

33
- 新增:快速渲染方式
44
- 新增:手机自适应宽高比
5+
- 新增:轮播图增加背景颜色和container模式,适配大屏模式的显示
56
- 优化:浏览器自适应或尺寸变更时自动更新
67
- 修复:导航轮播适配最新版本方法调用
78

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
use Illuminate\Database\Schema\Blueprint;
4+
use Illuminate\Database\Migrations\Migration;
5+
use ModStart\Core\Dao\ModelUtil;
6+
use Module\Banner\Type\BannerType;
7+
8+
class ModifyBannerAddBackgroundColor extends Migration
9+
{
10+
11+
public function up()
12+
{
13+
Schema::table('banner', function (Blueprint $table) {
14+
$table->string('backgroundColor', 20)->nullable()->comment('背景色');
15+
});
16+
}
17+
18+
19+
public function down()
20+
{
21+
}
22+
}

module/Banner/View/pc/public/banner.blade.php

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,54 @@
1515
if(!isset($round)){
1616
$round = false;
1717
}
18+
if(!isset($container)){
19+
$container = false;
20+
}
1821
?>
1922
{!! \ModStart\ModStart::css('asset/vendor/swiper/swiper.css') !!}
2023
{!! \ModStart\ModStart::js('asset/vendor/swiper/swiper.js') !!}
2124
{!! \ModStart\ModStart::css('vendor/Banner/style/banner.css') !!}
22-
<div class="ub-banner ratio-{{$bannerRatio}} {{$mobileBannerRatio}}" id="{{$bannerId}}">
25+
<div class="ub-banner ratio-{{$bannerRatio}} {{$mobileBannerRatio}} {{$container?'container':''}}" id="{{$bannerId}}">
2326
<div class="swiper-container">
2427
<div class="swiper-wrapper">
2528
@if(empty($banners))
26-
<div class="swiper-slide {{$round?'tw-rounded':''}}" style="background-image:url('/placeholder/{{$bannerSize}}');"></div>
27-
<div class="swiper-slide {{$round?'tw-rounded':''}}" style="background-image:url('/placeholder/{{$bannerSize}}');"></div>
28-
<div class="swiper-slide {{$round?'tw-rounded':''}}" style="background-image:url('/placeholder/{{$bannerSize}}');"></div>
29+
@for($i=0;$i<3;$i++)
30+
<div class="swiper-slide {{$round?'tw-rounded':''}}" style="background-color:#EEE;">
31+
<div class="cover" style="background-image:url('/placeholder/{{$bannerSize}}');"></div>
32+
</div>
33+
@endfor
2934
@else
30-
@foreach($banners as $banner)
31-
@if($banner['type']==\Module\Banner\Type\BannerType::IMAGE)
35+
@foreach($banners as $b)
36+
@if($b['type']==\Module\Banner\Type\BannerType::IMAGE)
3237
<a class="swiper-slide {{$round?'tw-rounded':''}}"
33-
style="background-image:url({{\ModStart\Core\Assets\AssetsUtil::fix($banner['image'])}});"
34-
@if($banner['link']) href="{{$banner['link']}}" target="_blank" @else href="javascript:;" @endif></a>
35-
@elseif($banner['type']==\Module\Banner\Type\BannerType::IMAGE_TITLE_SLOGAN_LINK)
36-
<div class="swiper-slide {{$round?'tw-rounded':''}} a" style="background-image:url({{\ModStart\Core\Assets\AssetsUtil::fix($banner['image'])}});">
37-
<div class="content @if(!empty($banner['colorReverse'])) reverse @endif">
38-
<div class="title">{{$banner['title']}}</div>
39-
<div class="slogan">
40-
@foreach(explode("\n",trim($banner['slogan'])) as $line)
41-
<div class="line">{{$line}}</div>
42-
@endforeach
38+
style="background-color:{{$b['backgroundColor']?$b['backgroundColor']:'transparent'}};"
39+
@if($b['link']) href="{{$b['link']}}" target="_blank" @else href="javascript:;" @endif>
40+
<div class="cover" style="background-image:url({{\ModStart\Core\Assets\AssetsUtil::fix($b['image'])}});"></div>
41+
</a>
42+
@elseif($b['type']==\Module\Banner\Type\BannerType::IMAGE_TITLE_SLOGAN_LINK)
43+
<div class="swiper-slide {{$round?'tw-rounded':''}} a"
44+
style="background-color:{{$b['backgroundColor']?$b['backgroundColor']:'transparent'}};">
45+
<div class="cover" style="background-image:url({{\ModStart\Core\Assets\AssetsUtil::fix($b['image'])}});">
46+
<div class="content @if(!empty($b['colorReverse'])) reverse @endif">
47+
<div class="title">{{$b['title']}}</div>
48+
<div class="slogan">
49+
@foreach(explode("\n",trim($b['slogan'])) as $line)
50+
<div class="line">{{$line}}</div>
51+
@endforeach
52+
</div>
53+
<a class="link" href="{{$b['link']}}" target="_blank">{{$b['linkText']}}</a>
4354
</div>
44-
<a class="link" href="{{$banner['link']}}" target="_blank">{{$banner['linkText']}}</a>
4555
</div>
4656
</div>
47-
@elseif($banner['type']==\Module\Banner\Type\BannerType::VIDEO && !\ModStart\Core\Util\AgentUtil::isMobile())
57+
@elseif($b['type']==\Module\Banner\Type\BannerType::VIDEO && !\ModStart\Core\Util\AgentUtil::isMobile())
4858
<a class="swiper-slide {{$round?'tw-rounded':''}} video"
49-
@if($banner['link']) href="{{$banner['link']}}" target="_blank" @else href="javascript:;" @endif>
50-
<video class="video-player"
51-
src="{{\ModStart\Core\Assets\AssetsUtil::fix($banner['video'])}}"
52-
autoplay="autoplay" loop="loop" muted="muted"></video>
59+
style="background-color:{{$b['backgroundColor']?$b['backgroundColor']:'transparent'}};"
60+
@if($b['link']) href="{{$b['link']}}" target="_blank" @else href="javascript:;" @endif>
61+
<div class="cover">
62+
<video class="video-player"
63+
src="{{\ModStart\Core\Assets\AssetsUtil::fix($b['video'])}}"
64+
autoplay="autoplay" loop="loop" muted="muted"></video>
65+
</div>
5366
</a>
5467
@endif
5568
@endforeach

0 commit comments

Comments
 (0)