|
@@ -1,50 +1,47 @@
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
+
|
|
|
<head>
|
|
|
@include('common.head')
|
|
|
</head>
|
|
|
+
|
|
|
<body>
|
|
|
-<div class="header">
|
|
|
- @include('common.header')
|
|
|
-</div>
|
|
|
-<div id="app">
|
|
|
- <!-- 頭部導航 -->
|
|
|
<div class="header">
|
|
|
- <!-- 导航栏 -->
|
|
|
- @include('common.nav')
|
|
|
+ @include('common.header')
|
|
|
</div>
|
|
|
+ <div id="app">
|
|
|
|
|
|
- <!--- 解决方案 --->
|
|
|
- <div class="index-about" style="padding-top: 40px;">
|
|
|
- <div class="width-1200">
|
|
|
- <div class="flex-start">
|
|
|
- <div class="about-list news-detail">
|
|
|
- <p class="news-title overflow">{{$info->title}}</p>
|
|
|
- <p class="news-time">发布日期:{{ date("Y-m-d H:i",$info->created_at)}}</p>
|
|
|
+ <!--- 解决方案 --->
|
|
|
+ <div class="index-about" style="padding-top: 40px;">
|
|
|
+ <div class="width-1200">
|
|
|
+ <div class="flex-start">
|
|
|
+ <div class="about-list news-detail">
|
|
|
+ <p class="news-title overflow">{{ $info->title }}</p>
|
|
|
+ <p class="news-time">发布日期:{{ date('Y-m-d H:i', $info->created_at) }}</p>
|
|
|
|
|
|
- <div class="news-content" id="news-content">
|
|
|
- {!! $info->content !!}
|
|
|
+ <div class="news-content" id="news-content">
|
|
|
+ {!! $info->content !!}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="about-detail">
|
|
|
- <div class="about-area">
|
|
|
- <div class="about-title">栏目分类</div>
|
|
|
- @foreach($category as $item)
|
|
|
- <div class="news-item">
|
|
|
- <a href="{{'/news/category/'.$item->mid}}">{{$item->name}}</a>
|
|
|
- </div>
|
|
|
- @endforeach
|
|
|
+ <div class="about-detail">
|
|
|
+ <div class="about-area">
|
|
|
+ <div class="about-title">栏目分类</div>
|
|
|
+ @foreach ($category as $item)
|
|
|
+ <div class="news-item">
|
|
|
+ <a href="{{ '/news/category/' . $item->mid }}">{{ $item->name }}</a>
|
|
|
+ </div>
|
|
|
+ @endforeach
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
- @include('common.footer')
|
|
|
+ @include('common.footer')
|
|
|
|
|
|
-</div>
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
</body>
|
|
@@ -59,7 +56,7 @@
|
|
|
newsInfo: [],
|
|
|
categoryList: [],
|
|
|
},
|
|
|
- mounted: function () {
|
|
|
+ mounted: function() {
|
|
|
var mySwiper = new Swiper('.swiper-container', {
|
|
|
loop: true,
|
|
|
// 如果需要分页器
|
|
@@ -71,19 +68,20 @@
|
|
|
},
|
|
|
//方法
|
|
|
methods: {
|
|
|
- init: function () {
|
|
|
+ init: function() {
|
|
|
let _this = this;
|
|
|
let mid = this.getQueryVariable('mid');
|
|
|
axios.post(_this.target + '/api/index/m_news_info', {
|
|
|
mid: mid
|
|
|
- }).then(function (response) {
|
|
|
+ }).then(function(response) {
|
|
|
if (response.data.result) {
|
|
|
this.newsInfo = response.data.data;
|
|
|
- this.newsInfo.created_at = new Date(this.newsInfo.created_at * 1000).toLocaleString();
|
|
|
+ this.newsInfo.created_at = new Date(this.newsInfo.created_at * 1000)
|
|
|
+ .toLocaleString();
|
|
|
let dom = document.getElementById('news-content');
|
|
|
dom.innerHTML = this.newsInfo.content;
|
|
|
}
|
|
|
- }.bind(_this)).catch(function (error) {
|
|
|
+ }.bind(_this)).catch(function(error) {
|
|
|
console.log(error);
|
|
|
});
|
|
|
|
|
@@ -91,16 +89,16 @@
|
|
|
axios.post(_this.target + '/api/index/m_category_list', {
|
|
|
size: 10,
|
|
|
page: 1
|
|
|
- }).then(function (response) {
|
|
|
+ }).then(function(response) {
|
|
|
if (response.data.result) {
|
|
|
this.categoryList = response.data.data.list;
|
|
|
}
|
|
|
- }.bind(_this)).catch(function (error) {
|
|
|
+ }.bind(_this)).catch(function(error) {
|
|
|
console.log(error);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- getQueryVariable: function (variable) {
|
|
|
+ getQueryVariable: function(variable) {
|
|
|
var query = window.location.search.substring(1);
|
|
|
var vars = query.split("&");
|
|
|
for (var i = 0; i < vars.length; i++) {
|
|
@@ -114,4 +112,5 @@
|
|
|
},
|
|
|
});
|
|
|
</script>
|
|
|
+
|
|
|
</html>
|