Commit d0638361 authored by shangbj's avatar shangbj

增加百度统计

parent 8457b94d
Pipeline #4 canceled with stages
<template>
<div class="footer">
版权所有&nbsp;&nbsp;北京天绿恒力科技有限公司&nbsp;&nbsp;<a href="http://www.miitbeian.gov.cn/" target="_blank">京ICP备18028316号-1</a>&nbsp;&nbsp;京公网安备11010802013435号
<div class="cnzz">
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1275165771'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/z_stat.php%3Fid%3D1275165771%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
</div>
</div>
<div class="footer">版权所有&nbsp;&nbsp;北京天绿恒力科技有限公司&nbsp;&nbsp;<a href="http://www.miitbeian.gov.cn/" target="_blank">京ICP备18028316号-1</a>&nbsp;&nbsp;京公网安备11010802013435号</div>
</template>
<style lang="scss" scoped>
.footer {
height: 18px;
position: relative;
background: url(~assets/images/11019917.jpg) repeat-x left top;
padding: 15px 0px 0px 30px;
font-size: 12px;
......@@ -21,9 +15,4 @@
color: #00f;
}
}
.cnzz {
position: absolute;
right: 10px;
top: 5px;
}
</style>
......@@ -11,6 +11,9 @@ module.exports = {
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
script: [
{ src: 'https://hm.baidu.com/hm.js?d92e58b28fcfbb367b40556a4a1f85ac' },/*引入百度统计js */
]
},
// cache: true,
......@@ -23,20 +26,20 @@ module.exports = {
'~assets/css/common.scss'
],
generate: {
routes: [
...[...Array(61).keys()].map((item)=>{
return `/news/${item}`
routes: [
...[...Array(61).keys()].map((item) => {
return `/news/${item}`
}),
...[...Array(7).keys()].map((item)=>{
...[...Array(7).keys()].map((item) => {
return `/product/equipment/${item}`
}),
...[...Array(21).keys()].map((item)=>{
...[...Array(21).keys()].map((item) => {
return `/qualifications/${item}`
}),
...[...Array(39).keys()].map((item)=>{
...[...Array(39).keys()].map((item) => {
return `/engineering/drinkingWater/${item}`
}),
...[...Array(12).keys()].map((item)=>{
...[...Array(12).keys()].map((item) => {
return `/engineering/drinkingWater/${item}`
}),
'/product/ozonizer/0',
......@@ -48,8 +51,9 @@ module.exports = {
'@nuxtjs/axios',
'@nuxtjs/proxy'
],
plugins:[
plugins: [
'@/plugins/element-ui',
'@/plugins/baiduGa.js',
{ src: '@/plugins/nuxt-quill-plugin.js', ssr: false },
{ src: '@/plugins/vue-seamless-scroll.js', ssr: false },
],
......@@ -70,7 +74,7 @@ module.exports = {
build: {
vendor: [
],
babel:{
babel: {
plugins: [['component', [
{
'libraryName': 'element-ui',
......@@ -84,7 +88,7 @@ module.exports = {
/*
** Run ESLint on save
*/
extend (config, { isDev, isClient }) {
extend(config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
......
export default ({ app: { router }, store }) => {
/* 每次路由变更时进行pv统计 */
router.afterEach((to, from) => {
/* 告诉增加一个PV */
try {
window._hmt = window._hmt || []
window._hmt.push(['_trackPageview', to.fullPath])
} catch (e) {
}
})
}
\ No newline at end of file
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