Commit a37d1983 authored by denghr's avatar denghr

新闻动态图片

parent e9c91395
import Vue from 'vue' import Vue from 'vue'
import NuxtLoading from '~/components/loading.vue' import NuxtLoading from '~/components/loading.vue'
import '..\\assets\\main.css'
import '..\\node_modules\\_swiper@4.0.7@swiper\\dist\\css\\swiper.min.css'
let layouts = { let layouts = {
...@@ -15,7 +11,7 @@ let layouts = { ...@@ -15,7 +11,7 @@ let layouts = {
let resolvedLayouts = {} let resolvedLayouts = {}
export default { export default {
head: {"title":"欣新房车—房车·让生活更美好-房车销售丨房车租赁丨房车旅游丨房车托管","meta":[{"charset":"utf-8"},{"name":"viewport","content":"width=device-width, initial-scale=1"},{"name":"keywords","content":"欣新房车,房车旅游,房车,房车租赁,房车销售,房车价格,房车之家,房车经济,房车高峰论坛"},{"hid":"description","name":"description","content":"欣新房车是一家专业从事房车销售,房车租赁,房车旅游,房车托管及房车产业配套与服务的免费异地取车异地还车已在全国各地举办多届房车经济峰会的集团股份公司"}],"link":[{"rel":"icon","type":"image\u002Fx-icon","href":"\u002Ffavicon.ico"},{"rel":"stylesheet","href":"https:\u002F\u002Ffonts.googleapis.com\u002Fcss?family=Roboto:300,400,500,700,400italic"}],"style":[],"script":[]}, head: {"title":"欣新房车—房车·让生活更美好-房车销售丨房车租赁丨房车旅游丨房车托管","meta":[{"charset":"utf-8"},{"name":"viewport","content":"width=device-width, initial-scale=1"},{"hid":"keywords","name":"keywords","content":"欣新房车,房车旅游,房车,房车租赁,房车销售,房车价格,房车之家,房车经济,房车高峰论坛"},{"hid":"description","name":"description","content":"欣新房车是一家专业从事房车销售,房车租赁,房车旅游,房车托管及房车产业配套与服务的免费异地取车异地还车已在全国各地举办多届房车经济峰会的集团股份公司"}],"link":[{"rel":"icon","type":"image\u002Fx-icon","href":"https:\u002F\u002Fmgmt.dfangche.com\u002Fxxfccn\u002Fimage\u002F1\u002Fapp\u002F5d9c62b7412efd926f70e0ed5efb19a.png"},{"rel":"stylesheet","href":"https:\u002F\u002Ffonts.googleapis.com\u002Fcss?family=Roboto:300,400,500,700,400italic"},{"rel":"stylesheet","href":"https:\u002F\u002Fmgmt.dfangche.com\u002Fxxfccn\u002Fcss\u002Fpc\u002Fmain.css"},{"rel":"stylesheet","href":"https:\u002F\u002Fmgmt.dfangche.com\u002Fxxfccn\u002Fcss\u002Fpc\u002Fmenu.css"},{"rel":"stylesheet","href":"https:\u002F\u002Fmgmt.dfangche.com\u002Fxxfccn\u002Fcss\u002Fpc\u002Ffooter.css"},{"rel":"stylesheet","href":"https:\u002F\u002Fmgmt.dfangche.com\u002Fxxfccn\u002Fcss\u002Fpc\u002Findex.css"},{"rel":"stylesheet","href":"https:\u002F\u002Fmgmt.dfangche.com\u002Fxxfccn\u002Fcss\u002Fpc\u002FgoTop.css"},{"rel":"stylesheet","href":"https:\u002F\u002Fmgmt.dfangche.com\u002Fxxfccn\u002Fcss\u002Fpc\u002Fswiper.min.css"},{"rel":"stylesheet","href":"https:\u002F\u002Fwww.xxfangche.com\u002Fxxfccn\u002Fcss\u002Fpc\u002Fel\u002Findex.css"}],"script":[{"src":"https:\u002F\u002Fdev.dfangche.com\u002Fh5\u002FappHtml\u002Fjs\u002Futil.js"}],"style":[]},
render(h, props) { render(h, props) {
const loadingEl = h('nuxt-loading', { ref: 'loading' }) const loadingEl = h('nuxt-loading', { ref: 'loading' })
const layoutEl = h(this.layout || 'nuxt') const layoutEl = h(this.layout || 'nuxt')
......
import Vue from 'vue' import Vue from 'vue'
import NuxtChild from './nuxt-child' import NuxtChild from './nuxt-child'
import NuxtError from './nuxt-error.vue' import NuxtError from '../..\\layouts\\error.vue'
import { compile } from '../utils' import { compile } from '../utils'
export default { export default {
......
...@@ -5,7 +5,7 @@ import { createRouter } from './router.js' ...@@ -5,7 +5,7 @@ import { createRouter } from './router.js'
import NoSSR from './components/no-ssr.js' import NoSSR from './components/no-ssr.js'
import NuxtChild from './components/nuxt-child.js' import NuxtChild from './components/nuxt-child.js'
import NuxtLink from './components/nuxt-link.js' import NuxtLink from './components/nuxt-link.js'
import NuxtError from './components/nuxt-error.vue' import NuxtError from '..\\layouts\\error.vue'
import Nuxt from './components/nuxt.js' import Nuxt from './components/nuxt.js'
import App from './App.js' import App from './App.js'
import { setContext, getLocation, getRouteData } from './utils' import { setContext, getLocation, getRouteData } from './utils'
...@@ -13,6 +13,10 @@ import { setContext, getLocation, getRouteData } from './utils' ...@@ -13,6 +13,10 @@ import { setContext, getLocation, getRouteData } from './utils'
/* Plugins */ /* Plugins */
import nuxt_plugin_museui_2c5e8732 from 'nuxt_plugin_museui_2c5e8732' // Source: ..\\plugins\\muse-ui.js import nuxt_plugin_museui_2c5e8732 from 'nuxt_plugin_museui_2c5e8732' // Source: ..\\plugins\\muse-ui.js
import nuxt_plugin_filters_2b4f519a from 'nuxt_plugin_filters_2b4f519a' // Source: ..\\plugins\\filters.js
import nuxt_plugin_elementUI_3fa02fdd from 'nuxt_plugin_elementUI_3fa02fdd' // Source: ..\\plugins\\elementUI.js
import nuxt_plugin_baidu_7b6ad772 from 'nuxt_plugin_baidu_7b6ad772' // Source: ..\\plugins\\baidu.js
import nuxt_plugin_viewer_1261dfef from 'nuxt_plugin_viewer_1261dfef' // Source: ..\\plugins\\viewer.js
// Component: <no-ssr> // Component: <no-ssr>
...@@ -135,6 +139,10 @@ async function createApp (ssrContext) { ...@@ -135,6 +139,10 @@ async function createApp (ssrContext) {
// Plugin execution // Plugin execution
if (typeof nuxt_plugin_museui_2c5e8732 === 'function') await nuxt_plugin_museui_2c5e8732(app.context, inject) if (typeof nuxt_plugin_museui_2c5e8732 === 'function') await nuxt_plugin_museui_2c5e8732(app.context, inject)
if (typeof nuxt_plugin_filters_2b4f519a === 'function') await nuxt_plugin_filters_2b4f519a(app.context, inject)
if (typeof nuxt_plugin_elementUI_3fa02fdd === 'function') await nuxt_plugin_elementUI_3fa02fdd(app.context, inject)
if (typeof nuxt_plugin_baidu_7b6ad772 === 'function') await nuxt_plugin_baidu_7b6ad772(app.context, inject)
if (typeof nuxt_plugin_viewer_1261dfef === 'function') await nuxt_plugin_viewer_1261dfef(app.context, inject)
// If server-side, wait for async component to be resolved first // If server-side, wait for async component to be resolved first
......
...@@ -3,16 +3,35 @@ import Router from 'vue-router' ...@@ -3,16 +3,35 @@ import Router from 'vue-router'
Vue.use(Router) Vue.use(Router)
const _916d4edc = () => import('..\\pages\\vehicle.vue' /* webpackChunkName: "pages_vehicle" */).then(m => m.default || m) const _7371174b = () => import('..\\pages\\news.vue' /* webpackChunkName: "pages_news" */).then(m => m.default || m)
const _55fc1c46 = () => import('..\\pages\\news.vue' /* webpackChunkName: "pages_news" */).then(m => m.default || m) const _4103d738 = () => import('..\\pages\\vehicle.vue' /* webpackChunkName: "pages_vehicle" */).then(m => m.default || m)
const _96254626 = () => import('..\\pages\\demo.vue' /* webpackChunkName: "pages_demo" */).then(m => m.default || m) const _1f82a760 = () => import('..\\pages\\tour.vue' /* webpackChunkName: "pages_tour" */).then(m => m.default || m)
const _0e939319 = () => import('..\\pages\\activity.vue' /* webpackChunkName: "pages_activity" */).then(m => m.default || m) const _1a80fc25 = () => import('..\\pages\\aboutXx.vue' /* webpackChunkName: "pages_aboutXx" */).then(m => m.default || m)
const _1b677f5a = () => import('..\\pages\\aboutXx.vue' /* webpackChunkName: "pages_aboutXx" */).then(m => m.default || m) const _26135cf2 = () => import('..\\pages\\activity.vue' /* webpackChunkName: "pages_activity" */).then(m => m.default || m)
const _1b4d0cd2 = () => import('..\\pages\\campsite.vue' /* webpackChunkName: "pages_campsite" */).then(m => m.default || m) const _0ca06980 = () => import('..\\pages\\campsite.vue' /* webpackChunkName: "pages_campsite" */).then(m => m.default || m)
const _51cf86e2 = () => import('..\\pages\\tour.vue' /* webpackChunkName: "pages_tour" */).then(m => m.default || m) const _535c825b = () => import('..\\pages\\demo.vue' /* webpackChunkName: "pages_demo" */).then(m => m.default || m)
const _5df21ee8 = () => import('..\\pages\\demoList\\demoList.vue' /* webpackChunkName: "pages_demoList_demoList" */).then(m => m.default || m) const _113883cc = () => import('..\\pages\\indexWeb.vue' /* webpackChunkName: "pages_indexWeb" */).then(m => m.default || m)
const _802b9bc2 = () => import('..\\pages\\demoList\\_id.vue' /* webpackChunkName: "pages_demoList__id" */).then(m => m.default || m) const _96ce9d96 = () => import('..\\pages\\company.vue' /* webpackChunkName: "pages_company" */).then(m => m.default || m)
const _e86eea90 = () => import('..\\pages\\index.vue' /* webpackChunkName: "pages_index" */).then(m => m.default || m) const _80e40e7c = () => import('..\\pages\\findList\\all.vue' /* webpackChunkName: "pages_findList_all" */).then(m => m.default || m)
const _1ca2fa60 = () => import('..\\pages\\findList\\findTour.vue' /* webpackChunkName: "pages_findList_findTour" */).then(m => m.default || m)
const _33728eb8 = () => import('..\\pages\\vehicleList\\vehicleList.vue' /* webpackChunkName: "pages_vehicleList_vehicleList" */).then(m => m.default || m)
const _00eecb5a = () => import('..\\pages\\newsList\\newsList.vue' /* webpackChunkName: "pages_newsList_newsList" */).then(m => m.default || m)
const _53ffda52 = () => import('..\\pages\\activityList\\activityList.vue' /* webpackChunkName: "pages_activityList_activityList" */).then(m => m.default || m)
const _d935d0d2 = () => import('..\\pages\\findList\\findActivity.vue' /* webpackChunkName: "pages_findList_findActivity" */).then(m => m.default || m)
const _53d8fd7a = () => import('..\\pages\\demoList\\demoList.vue' /* webpackChunkName: "pages_demoList_demoList" */).then(m => m.default || m)
const _8fe11c90 = () => import('..\\pages\\campsiteDetails\\campsiteDetails.vue' /* webpackChunkName: "pages_campsiteDetails_campsiteDetails" */).then(m => m.default || m)
const _3bf3bab8 = () => import('..\\pages\\tourDetails\\tourDetails.vue' /* webpackChunkName: "pages_tourDetails_tourDetails" */).then(m => m.default || m)
const _bfc2dd60 = () => import('..\\pages\\findList\\findCampsite.vue' /* webpackChunkName: "pages_findList_findCampsite" */).then(m => m.default || m)
const _67d36758 = () => import('..\\pages\\findList\\findVehicle.vue' /* webpackChunkName: "pages_findList_findVehicle" */).then(m => m.default || m)
const _bd9e2db6 = () => import('..\\pages\\findList\\findCompany.vue' /* webpackChunkName: "pages_findList_findCompany" */).then(m => m.default || m)
const _bc1e5670 = () => import('..\\pages\\findList\\findNew.vue' /* webpackChunkName: "pages_findList_findNew" */).then(m => m.default || m)
const _f54a1ef0 = () => import('..\\pages\\vehicleList\\_id.vue' /* webpackChunkName: "pages_vehicleList__id" */).then(m => m.default || m)
const _98217cfe = () => import('..\\pages\\newsList\\_id.vue' /* webpackChunkName: "pages_newsList__id" */).then(m => m.default || m)
const _deaac4b0 = () => import('..\\pages\\tourDetails\\_id.vue' /* webpackChunkName: "pages_tourDetails__id" */).then(m => m.default || m)
const _04e1cac5 = () => import('..\\pages\\activityList\\_id.vue' /* webpackChunkName: "pages_activityList__id" */).then(m => m.default || m)
const _239656d0 = () => import('..\\pages\\campsiteDetails\\_id.vue' /* webpackChunkName: "pages_campsiteDetails__id" */).then(m => m.default || m)
const _f9796f1e = () => import('..\\pages\\demoList\\_id.vue' /* webpackChunkName: "pages_demoList__id" */).then(m => m.default || m)
const _8983d9ec = () => import('..\\pages\\index.vue' /* webpackChunkName: "pages_index" */).then(m => m.default || m)
...@@ -72,54 +91,149 @@ export function createRouter () { ...@@ -72,54 +91,149 @@ export function createRouter () {
linkExactActiveClass: 'nuxt-link-exact-active', linkExactActiveClass: 'nuxt-link-exact-active',
scrollBehavior, scrollBehavior,
routes: [ routes: [
{
path: "/vehicle",
component: _916d4edc,
name: "vehicle"
},
{ {
path: "/news", path: "/news",
component: _55fc1c46, component: _7371174b,
name: "news" name: "news"
}, },
{ {
path: "/demo", path: "/vehicle",
component: _96254626, component: _4103d738,
name: "demo" name: "vehicle"
}, },
{ {
path: "/activity", path: "/tour",
component: _0e939319, component: _1f82a760,
name: "activity" name: "tour"
}, },
{ {
path: "/aboutXx", path: "/aboutXx",
component: _1b677f5a, component: _1a80fc25,
name: "aboutXx" name: "aboutXx"
}, },
{
path: "/activity",
component: _26135cf2,
name: "activity"
},
{ {
path: "/campsite", path: "/campsite",
component: _1b4d0cd2, component: _0ca06980,
name: "campsite" name: "campsite"
}, },
{ {
path: "/tour", path: "/demo",
component: _51cf86e2, component: _535c825b,
name: "tour" name: "demo"
},
{
path: "/indexWeb",
component: _113883cc,
name: "indexWeb"
},
{
path: "/company",
component: _96ce9d96,
name: "company"
},
{
path: "/findList/all",
component: _80e40e7c,
name: "findList-all"
},
{
path: "/findList/findTour",
component: _1ca2fa60,
name: "findList-findTour"
},
{
path: "/vehicleList/vehicleList",
component: _33728eb8,
name: "vehicleList-vehicleList"
},
{
path: "/newsList/newsList",
component: _00eecb5a,
name: "newsList-newsList"
},
{
path: "/activityList/activityList",
component: _53ffda52,
name: "activityList-activityList"
},
{
path: "/findList/findActivity",
component: _d935d0d2,
name: "findList-findActivity"
}, },
{ {
path: "/demoList/demoList", path: "/demoList/demoList",
component: _5df21ee8, component: _53d8fd7a,
name: "demoList-demoList" name: "demoList-demoList"
}, },
{
path: "/campsiteDetails/campsiteDetails",
component: _8fe11c90,
name: "campsiteDetails-campsiteDetails"
},
{
path: "/tourDetails/tourDetails",
component: _3bf3bab8,
name: "tourDetails-tourDetails"
},
{
path: "/findList/findCampsite",
component: _bfc2dd60,
name: "findList-findCampsite"
},
{
path: "/findList/findVehicle",
component: _67d36758,
name: "findList-findVehicle"
},
{
path: "/findList/findCompany",
component: _bd9e2db6,
name: "findList-findCompany"
},
{
path: "/findList/findNew",
component: _bc1e5670,
name: "findList-findNew"
},
{
path: "/vehicleList/:id?",
component: _f54a1ef0,
name: "vehicleList-id"
},
{
path: "/newsList/:id?",
component: _98217cfe,
name: "newsList-id"
},
{
path: "/tourDetails/:id?",
component: _deaac4b0,
name: "tourDetails-id"
},
{
path: "/activityList/:id?",
component: _04e1cac5,
name: "activityList-id"
},
{
path: "/campsiteDetails/:id?",
component: _239656d0,
name: "campsiteDetails-id"
},
{ {
path: "/demoList/:id?", path: "/demoList/:id?",
component: _802b9bc2, component: _f9796f1e,
name: "demoList-id" name: "demoList-id"
}, },
{ {
path: "/", path: "/",
component: _e86eea90, component: _8983d9ec,
name: "index" name: "index"
} }
], ],
......
...@@ -120,7 +120,7 @@ export async function setContext(app, context) { ...@@ -120,7 +120,7 @@ export async function setContext(app, context) {
payload: context.payload, payload: context.payload,
error: context.error, error: context.error,
base: '/', base: '/',
env: {"host":"https://dev.dfangche.com"} env: {"host":"https://xxtest.upyuns.com"}
} }
// Only set once // Only set once
if (context.req) app.context.req = context.req if (context.req) app.context.req = context.req
......
This diff is collapsed.
...@@ -3771,7 +3771,8 @@ ...@@ -3771,7 +3771,8 @@
}, },
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true "bundled": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -4136,7 +4137,8 @@ ...@@ -4136,7 +4137,8 @@
}, },
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true "bundled": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -4184,6 +4186,7 @@ ...@@ -4184,6 +4186,7 @@
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -4222,11 +4225,13 @@ ...@@ -4222,11 +4225,13 @@
}, },
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true "bundled": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true "bundled": true,
"optional": true
} }
} }
}, },
......
...@@ -9,13 +9,26 @@ ...@@ -9,13 +9,26 @@
<span>{{detail.title}}</span> <span>{{detail.title}}</span>
</div> </div>
<div style="display: flex;padding: 20px;background: #fff"> <div style="display: flex;padding: 20px;background: #fff">
<img :src="detail.banner" style="width: 540px;height:320px;"/> <img :src="detail.banner" style="width: 540px;height:320px;" />
<div class="r-content"> <div class="r-content">
<h1>{{detail.title}}</h1> <h1 ref="newTitle">{{detail.title}}</h1>
<div class="r-cc"> <div class="r-cc">
<p>活动人数<span style="margin-left: 20px;">{{detail.limitNum}}</span></p> <p>
<p>活动时间<span style="margin-left: 20px;">{{detail.startTime | formatDate('yyyy-MM-dd hh:mm')}}~{{detail.endTime | formatDate('yyyy-MM-dd hh:mm')}}</span></p> 活动人数
<p class="ellipsis2">活动地点<span style="margin-left: 20px;">{{detail.province}}{{detail.city}}{{detail.town}}{{detail.address}}</span></p> <span style="margin-left: 20px;">{{detail.limitNum}}</span>
</p>
<p>
活动时间
<span
style="margin-left: 20px;"
>{{detail.startTime | formatDate('yyyy-MM-dd hh:mm')}}~{{detail.endTime | formatDate('yyyy-MM-dd hh:mm')}}</span>
</p>
<p class="ellipsis2">
活动地点
<span
style="margin-left: 20px;"
>{{detail.province}}{{detail.city}}{{detail.town}}{{detail.address}}</span>
</p>
</div> </div>
<!--<div class="buttonDetails">报名参加</div>--> <!--<div class="buttonDetails">报名参加</div>-->
</div> </div>
...@@ -25,15 +38,21 @@ ...@@ -25,15 +38,21 @@
<h3 class="content-t content-t-l" style="text-align: left;">活动详情</h3> <h3 class="content-t content-t-l" style="text-align: left;">活动详情</h3>
<div class="models-details" v-html="detail.content"></div> <div class="models-details" v-html="detail.content"></div>
</div> </div>
<div id = "fixContainer" class="content-r-link" style="width: 300px;background: #fff;margin: 20px 0;padding: 0 20px 20px 20px;"> <div
id="fixContainer"
class="content-r-link"
style="width: 300px;background: #fff;margin: 20px 0;padding: 0 20px 20px 20px;"
>
<div id="activityHotId" :class="barFixed?'isFixed':''"> <div id="activityHotId" :class="barFixed?'isFixed':''">
<h3 class="content-t hot-t-r">热门活动</h3> <h3 class="content-t hot-t-r">热门活动</h3>
<!--<div class="content-r-link" style="width: 300px;background: #fff;margin: 20px 0;padding: 0 20px 20px 20px;">--> <!--<div class="content-r-link" style="width: 300px;background: #fff;margin: 20px 0;padding: 0 20px 20px 20px;">-->
<!--<h3 class="content-t hot-t-r">热门活动</h3>--> <!--<h3 class="content-t hot-t-r">热门活动</h3>-->
<div class="content-detail tc" v-for="item in hotList" :key="item.id"> <div class="content-detail tc" v-for="item in hotList" :key="item.id">
<img :src="item.banner" :alt="item.title" style="width: 190px;height: 120px;"/> <img :src="item.banner" :alt="item.title" style="width: 190px;height: 120px;" />
<div class="tc ellipsis cc-title">{{item.title}}</div> <div class="tc ellipsis cc-title">{{item.title}}</div>
<nuxt-link :to="'/activityList/'+item.id"><div class="detail-new">活动详情</div></nuxt-link> <nuxt-link :to="'/activityList/'+item.id">
<div class="detail-new">活动详情</div>
</nuxt-link>
</div> </div>
</div> </div>
</div> </div>
...@@ -46,143 +65,157 @@ ...@@ -46,143 +65,157 @@
</template> </template>
<script> <script>
import axios from '../../plugins/axios' import axios from "../../plugins/axios";
import menuModal from "../../components/menu" import menuModal from "../../components/menu";
import footerModal from "../../components/footer" import footerModal from "../../components/footer";
import Swiper from 'swiper'; import Swiper from "swiper";
import 'swiper/dist/css/swiper.min.css'; import "swiper/dist/css/swiper.min.css";
import GoTop from "../../components/goTop"; import GoTop from "../../components/goTop";
export default { export default {
transition: 'bounce', transition: "bounce",
components: { components: {
GoTop, GoTop,
menuModal, menuModal,
footerModal footerModal
}, },
data(){ data() {
return{ return {
lengthPic:0, lengthPic: 0,
preIndex: 0,//当前轮播选中图 preIndex: 0, //当前轮播选中图
barFixed: false barFixed: false
} };
}, },
created() { created() {
if (typeof window !== 'undefined') { if (typeof window !== "undefined") {
window.addEventListener('scroll', this.handleScroll); window.addEventListener("scroll", this.handleScroll);
} }
}, },
validate ({ params }) { validate({ params }) {
console.log(params.id); console.log(params.id);
return !isNaN(+params.id) return !isNaN(+params.id);
}, },
async asyncData({ env, params, error}) { async asyncData({ env, params, error }) {
const { data } = await axios.get( '/api/uccn/summitActivity/app/unauth/'+params.id); const { data } = await axios.get(
"/api/uccn/summitActivity/app/unauth/" + params.id
);
let detail = data.data; let detail = data.data;
detail.content =detail.content.replace(/<img/g,"<img style='width:90%'"); detail.content = detail.content.replace(/<img/g, "<img style='width:90%'");
if (!detail) { if (!detail) {
return error({ message: 'detail not found', statusCode: 404 }) return error({ message: "detail not found", statusCode: 404 });
} }
let tempBannerData = await axios.get('/api/uccn/random/list/app/unauth/get?type=4'); let tempBannerData = await axios.get(
"/api/uccn/random/list/app/unauth/get?type=4"
);
let hot = tempBannerData.data.data; let hot = tempBannerData.data.data;
return {detail: detail, hotList: hot} return { detail: detail, hotList: hot, headList : detail.title };
}, },
methods:{ methods: {
changeImgIndex(index,length){ changeImgIndex(index, length) {
this.$refs.mySwiper.swiper.slideTo(index+1, 1000, true); this.$refs.mySwiper.swiper.slideTo(index + 1, 1000, true);
this.lengthPic = length; this.lengthPic = length;
console.log(this.lengthPic); console.log(this.lengthPic);
}, },
handleScroll: function () { handleScroll: function() {
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; let scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
let path = $nuxt.$route.path; let path = $nuxt.$route.path;
if(path.indexOf('/activityList') != -1 ){ if (path.indexOf("/activityList") != -1) {
var menuTop = document.querySelector('#activityHotId').offsetTop; var menuTop = document.querySelector("#activityHotId").offsetTop;
//滑动到指定位置菜单吸顶 //滑动到指定位置菜单吸顶
if (scrollTop > menuTop-120) { if (scrollTop > menuTop - 120) {
this.barFixed = true; this.barFixed = true;
} }
let fixContainer = document.querySelector('#fixContainer').offsetTop; let fixContainer = document.querySelector("#fixContainer").offsetTop;
if(scrollTop<fixContainer-120){ if (scrollTop < fixContainer - 120) {
this.barFixed = false; this.barFixed = false;
// this.tabIndex = 0; // this.tabIndex = 0;
}
} }
} }
}, },
}, mounted() {
mounted(){
let t = this; let t = this;
let galleryThumbs = new Swiper('.gallery-thumbs', { let galleryThumbs = new Swiper(".gallery-thumbs", {
spaceBetween: 10, spaceBetween: 10,
slidesPerView: 5, slidesPerView: 5,
freeMode: true, freeMode: true,
watchSlidesVisibility: true, watchSlidesVisibility: true,
watchSlidesProgress: true, watchSlidesProgress: true
}); });
let galleryTop = new Swiper('.gallery-top', { let galleryTop = new Swiper(".gallery-top", {
spaceBetween: 10, spaceBetween: 10,
loop:true, loop: true,
on: { on: {
slideChangeTransitionEnd: function () { slideChangeTransitionEnd: function() {
t.preIndex = this.activeIndex-1; t.preIndex = this.activeIndex - 1;
if(t.preIndex == 5){ if (t.preIndex == 5) {
t.preIndex = 0 t.preIndex = 0;
}
console.log(this.activeIndex);
} }
console.log(this.activeIndex)
},
}, },
navigation: { navigation: {
nextEl: '.swiper-button-next', nextEl: ".swiper-button-next",
prevEl: '.swiper-button-prev', prevEl: ".swiper-button-prev"
}, },
thumbs: { thumbs: {
swiper: galleryThumbs swiper: galleryThumbs
} }
}); });
}, },
head () { head() {
return { return {
title: "活动详情", title: this.detail.title,
} meta: [
} { hid: "keywords", name: "keywords", content: this.detail.keywords },
} {
hid: "description",
name: "description",
content: this.detail.description
}
]
};
}
};
</script> </script>
<style scoped> <style scoped>
.isFixed{ .isFixed {
position: fixed; position: fixed;
top: 120px; top: 120px;
width: 300px; width: 300px;
background: #fff; background: #fff;
} }
.tc { .tc {
text-align: center; text-align: center;
} }
.swiper-container { .swiper-container {
height: auto; height: auto;
} }
.gallery-top img{ .gallery-top img {
width: 100%; width: 100%;
} }
.content-detail{ .content-detail {
padding: 20px 0; padding: 20px 0;
width: 100%; width: 100%;
} }
.content-detail .cc-title{ .content-detail .cc-title {
margin: 20px; margin: 20px;
} }
.swiper-wrapper-thu{ .swiper-wrapper-thu {
/*max-width: 293px;*/ /*max-width: 293px;*/
margin: 0 !important; margin: 0 !important;
} }
.swiper-wrapper-thu img{ .swiper-wrapper-thu img {
width: 100%; width: 100%;
border: 2px solid #fff; border: 2px solid #fff;
} }
.swiper-wrapper-thu img.active{ .swiper-wrapper-thu img.active {
border: 2px solid #1bbb9f; border: 2px solid #1bbb9f;
padding: 5px; padding: 5px;
} }
.buttonDetails { .buttonDetails {
width: 156px; /* 宽度 */ width: 156px; /* 宽度 */
padding: 10px 0; padding: 10px 0;
background: #1bbb9f; /* 背景颜色 */ background: #1bbb9f; /* 背景颜色 */
...@@ -190,8 +223,8 @@ ...@@ -190,8 +223,8 @@
font-family: Microsoft YaHei; /* 设置字体 */ font-family: Microsoft YaHei; /* 设置字体 */
color: #fff; /* 字体颜色 */ color: #fff; /* 字体颜色 */
text-align: center; text-align: center;
} }
.detail-new{ .detail-new {
width: 156px; width: 156px;
padding: 5px 0; padding: 5px 0;
cursor: pointer; cursor: pointer;
...@@ -200,18 +233,18 @@ ...@@ -200,18 +233,18 @@
border: 1px solid #1bbb9f; border: 1px solid #1bbb9f;
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
} }
.detail-new:hover{ .detail-new:hover {
color: #fff; color: #fff;
background: #1bbb9f; background: #1bbb9f;
} }
.content-r-link{ .content-r-link {
margin-left: 3%; margin-left: 3%;
width: 20%; width: 20%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
</style> </style>
...@@ -217,8 +217,18 @@ export default { ...@@ -217,8 +217,18 @@ export default {
}); });
}, },
head: { head() {
title: "营地详情" return {
title: this.detail.name,
meta: [
{ hid: "keywords", name: "keywords", content: this.detail.keywords },
{
hid: "description",
name: "description",
content: this.detail.description
}
]
};
} }
}; };
</script> </script>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<ul class="campsiteDetail"> <ul class="campsiteDetail">
<li v-for="item in dataDetail" :key="item.id" class="new-item"> <li v-for="item in dataDetail" :key="item.id" class="new-item">
<nuxt-link :to="'/newsList/'+item.id"> <nuxt-link :to="'/newsList/'+item.id">
<img :src="item.coverImage" :alt="item.alt" style="width:270px;height: 172px" /> <img :src="item.coverImage" :alt="item.alt" style="width:270px !important;height: 172px !important" />
<div style="margin-left:20px" class="active-r"> <div style="margin-left:20px" class="active-r">
<h2 class="ellipsis2">{{item.title }}</h2> <h2 class="ellipsis2">{{item.title }}</h2>
<div class="ellipsis2 epitome">导语:{{item.epitome}}</div> <div class="ellipsis2 epitome">导语:{{item.epitome}}</div>
......
...@@ -277,8 +277,18 @@ export default { ...@@ -277,8 +277,18 @@ export default {
} }
}); });
}, },
head: { head() {
title: "旅游详情" return {
title: this.detail.name,
meta: [
{ hid: "keywords", name: "keywords", content: this.detail.keywords },
{
hid: "description",
name: "description",
content: this.detail.description
}
]
};
} }
}; };
</script> </script>
......
This diff is collapsed.
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