Commit df4ad4cc authored by 章建武's avatar 章建武

dep

parent 36968da4
......@@ -41,6 +41,7 @@ class ArticleController extends Controller
$param = $request->param();
$param['created_at'] = time();
$param['release_time'] = time();
$param['url'] = 'http://'.$_SERVER['SERVER_NAME'];
$validate_result = $validate->scene('add')->check($param);
if (!$validate_result) {
......@@ -90,11 +91,11 @@ class ArticleController extends Controller
return error($validate->getError());
}
//处理头像上传
if (!empty($_FILES['manager_img']['name'])) {
if (!empty($_FILES['img_path']['name'])) {
$attachment_avatar = new Attachment;
$file_avatar = $attachment_avatar->upload('manager_img');
$file_avatar = $attachment_avatar->upload('img_path');
if ($file_avatar) {
$param['manager_img'] = $file_avatar->url;
$param['img_path'] = $file_avatar->url;
}
}
......@@ -113,7 +114,7 @@ class ArticleController extends Controller
}
//删除
public function del($id, ManagerList $model)
public function del($id, IndexArticleInfo $model)
{
if (count($model->noDeletionId) > 0) {
if (is_array($id)) {
......
......@@ -102,7 +102,6 @@
<if condition="$data">
{:html_entity_decode($data.content)}
<else/>
{:html_entity_decode($data.content)}
</if>
</script>
......@@ -141,8 +140,9 @@
</section>
<script>
// 实例化编辑器
var ue = UE.getEditor('container');
UE.delEditor('container');
var ue = UE.getEditor('container');
/** 表单验证 **/
$('#dataForm').validate({
rules: {
......
......@@ -8,7 +8,7 @@
"imageCompressEnable": true, /* 是否压缩图片,默认是true */
"imageCompressBorder": 1600, /* 图片压缩最长边限制 */
"imageInsertAlign": "none", /* 插入的图片浮动方式 */
"imageUrlPrefix": "", /* 图片访问路径前缀 */
"imageUrlPrefix": "http://www.fashion_group_admin.net", /* 图片访问路径前缀 */
"imagePathFormat": "/Uploads/notice/images/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
/* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
/* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
......
<?php /*a:9:{s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\manager\index.html";i:1588066599;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1587980045;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588148490;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?>
<?php /*a:9:{s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\manager\index.html";i:1588066599;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1588211322;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588154379;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?>
<?php if(!$admin['pjax']): ?>
<!DOCTYPE html>
<html lang="zh-CN">
......@@ -56,7 +56,7 @@
<script type="text/javascript" src="/static/admin/plugins/fileinput/js/locales/zh.min.js"></script>
<script type="text/javascript" src="/static/admin/plugins/baiduueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/static/admin/plugins/baiduueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="/static/admin/plugins/baiduueditor/lang/zh-cn/zh-cn.min.js"></script>
<script type="text/javascript" src="/static/admin/plugins/baiduueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="/static/admin/plugins/clipboard/clipboard.min.js"></script>
<script type="text/javascript" src="/static/admin/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
<script type="text/javascript" src="/static/admin/plugins/viewer/viewer.min.js"></script>
......@@ -73,6 +73,9 @@
//UEditor server地址
var UEServer = "<?php echo url('editor/server'); ?>";
//列表页当前选择的ID
// 实例化编辑器
var dataSelectIds = [];
</script>
<script type="text/javascript" src="/static/admin/js/adminlte.min.js"></script>
......
<?php /*a:9:{s:79:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\template\404.html";i:1587980045;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1587980045;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588154379;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?>
<?php /*a:9:{s:79:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\template\404.html";i:1587980045;s:78:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\base.html";i:1588211322;s:82:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_css.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\head_js.html";i:1588154379;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\header.html";i:1587980045;s:81:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\sidebar.html";i:1588038504;s:88:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\content_header.html";i:1588063433;s:80:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\footer.html";i:1588037872;s:89:"D:\PHPTutorial\WWW\fashion_group\admin\application\admin\view\public\control_sidebar.html";i:1587980045;}*/ ?>
<?php if(!$admin['pjax']): ?>
<!DOCTYPE html>
<html lang="zh-CN">
......
......@@ -29,13 +29,13 @@ class HelperController
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
......@@ -44,6 +44,7 @@ class HelperController
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
......
......@@ -28,8 +28,9 @@ class ArticleController extends Controller
}
$news_center = ArticleInfo::query()
->where('id', '=', 1)
->where('type', '=', 1)
->where('language_type', '=', $language_type)
->orderBy('id', 'desc')
->first();
$news_center2 = ArticleInfo::query()
->where('id', '=', 35)
......@@ -39,24 +40,32 @@ class ArticleController extends Controller
$group_news1 = ArticleInfo::query()->where('type', '=', NewsType::GROUP_NEWS)
->orderBy('id', 'asc')
->where('language_type', '=', $language_type)
->limit(3)->get();
$group_news2 = ArticleInfo::query()->whereIn('type', [NewsType::GROUP_NEWS,NewsType::ALERT])
$group_news2 = ArticleInfo::query()
->where('language_type', '=', $language_type)
->whereIn('type', [NewsType::GROUP_NEWS,NewsType::ALERT])
->whereNotIn('id', $group_news1->pluck('id')->toArray())
->orderBy('id', 'asc')
->limit(2)->get();
//dd($group_news2->toArray());
$item_trends = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('language_type', '=', $language_type)
->orderBy('id', 'asc')
->limit(2)->get();
$item_trends2 = ArticleInfo::query()->where('type', '=', NewsType::ITEM_TRENDS)
->where('language_type', '=', $language_type)
->whereNotIn('id', $item_trends->pluck('id')->toArray())
->orderBy('id', 'asc')
->limit(3)->get();
return view('index.news.index', ['news_center' => $news_center,
return view('index.news.index',
['news_center' => $news_center,
'news_center2' => $news_center2,
'group_news' => $group_news1, 'group_news2' => $group_news2, 'item_trends' => $item_trends,'item_trends2'=>$item_trends2]);
'group_news' => $group_news1,
'group_news2' => $group_news2,
'item_trends' => $item_trends,
'item_trends2'=>$item_trends2]);
}
public function info(Request $request)
......@@ -74,7 +83,6 @@ class ArticleController extends Controller
$info = ArticleInfo::query()
->where('id', $id)->first();
return view('index.news.article_info', compact('info'))->with(compact('data'))->with(compact('type'));
}
......
......@@ -46,23 +46,21 @@ class IndexController extends Controller
->limit(2)->get();
$article1 = ArticleInfo::query()
->where('id','=',1)
->limit(1)
->first();
$article2 = ArticleInfo::query()
->where('id','=',2)
->limit(1)
->first();
$alert_t = ArticleInfo::query()
->orderBy('id','asc')
->where('id','=',38)
->limit(1)
->first();
$alert_b = ArticleInfo::query()
->orderBy('release_time','desc')
->whereIn('id',[9,6,5,4])
->where(['status'=>0,'type'=>5])
->limit(5)
->get();
$events = IndexEvents::query()
->get();
......
......@@ -9,6 +9,12 @@
define('LARAVEL_START', microtime(true));
// 加载基础文件
// 支持事先使用静态方法设置Request对象和Config对象
// 执行应用并响应
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
......
......@@ -177,7 +177,7 @@
<small>{{date('m',$article1->release_time)}}月</small>
</div>
<div class="page8-l-c">
<img src="{{asset($article1->img_path)}}">
<img src="{{$alert_t->url}}{{$article1->img_path}}">
<h1>{{$article1->title}}</h1>
<p> </p>
<a href="{{route('article',['id'=>$article1->id,'type'=>$article1->type])}}">查看详情<span class="icon-angle-double-right"></span></a>
......@@ -208,7 +208,7 @@
<small>{{date('m',$article2->release_time)}}月</small>
</div>
<div class="page8-l-c">
<img src="{{asset($article2->img_path)}}">
<img src="{{$alert_t->url}}{{$article2->img_path}}">
<h1>{{$article2->title}}</h1>
<p></p>
......@@ -548,7 +548,7 @@
<div class="close"></div>
<div class="alert-all-t">
<a href="{{ route('article',['id'=>$alert_t->id]) }}">
<img src="{{ asset($alert_t->img_path) }}">
<img src="{{$alert_t->url}}{{ $alert_t->img_path }}">
<div class="alert-all-t-info">
<h1 class="ell1">{{ $alert_t->title }}</h1>
<p></p>
......
......@@ -46,7 +46,7 @@
@endif
<h1>{{$news_center->title}}</h1>
<p class="p-img"><img src="{{asset($news_center->img_path)}}" style="width: 100%;"></p>
<p class="p-img"><img src="{{$news_center->url}}{{$news_center->img_path}}" style="width: 100%;"></p>
<p> </p>
</div>
<div class="news-more" >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment