Commit 37395c24 by 肖康

新闻页面

parent ae48fc22
......@@ -28,7 +28,7 @@
<script src="<%= BASE_URL %>static/js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
<script src="<%= BASE_URL %>static/js/shence.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<body class="boxsiz">
<noscript>
<strong>网站出现了一点小问题,正在紧急修复中.......</strong>
</noscript>
......
......@@ -4,14 +4,14 @@ window.onload = function() {
// console.log(start);
// 在页面关闭前,调用sa的track方法
window.onbeforeunload = function() {
var end = new Date();
// 如果用户一直不关闭页面,可能出现超大值,可以根据业务需要处理,例如设置一个上限
var duration = (end.getTime() - start.getTime()) / 1000;
// console.log(duration);
// 定义一个记录页面停留时间的事件pageView,并且保存需要的属性(停留时间和当前页面的地址)
sensors.track('pageclose', {
pageStayTime: duration,
pageUrl: window.location.href
});
var end = new Date();
// 如果用户一直不关闭页面,可能出现超大值,可以根据业务需要处理,例如设置一个上限
var duration = (end.getTime() - start.getTime()) / 1000;
// console.log(duration);
// 定义一个记录页面停留时间的事件pageView,并且保存需要的属性(停留时间和当前页面的地址)
sensors.track('pageclose', {
pageStayTime: duration,
pageUrl: window.location.href
});
};
}
\ No newline at end of file
......@@ -7,37 +7,30 @@ import axios from 'axios'
* www.liexin.com 本地环境
* urlApi api环境
* url 3.0环境
* urlMarketing marketing营销系统接口
*/
var urlApi, url;
var urlApi, url,urlMarketing;
switch (window.location.hostname) {
case "www.ichunt.com":
urlApi = 'https://api.ichunt.com/';
break;
case "m.ichunt.com":
url = 'https://m.ichunt.com/v3/';
urlApi = 'https://api.ichunt.com/';
break;
case "sz.ichunt.com":
urlApi = 'https://szapi.ichunt.com/';
urlMarketing='http://szmarketing.ichunt.net/';
break;
case "szm.ichunt.com":
urlApi = 'https://szapi.ichunt.com/';
url = 'https://szm.ichunt.com/v3/';
break;
case "t.ichunt.com":
urlApi = 'https://api.ichunt.com/';
urlMarketing='http://marketing.ichunt.net/';
break;
case "tm.ichunt.com":
url = 'https://tm.ichunt.com/v3/';
urlApi = 'https://api.ichunt.com/';
break;
case "www.liexin.com":
urlApi = 'http://api.liexin.com/';
break;
case "m.liexin.com":
url = 'http://m.liexin.com/v3/';
urlApi = 'http://api.liexin.com/';
urlMarketing='http://szmarketing.ichunt.net/';
//urlMarketing='http://marketing.liexin.com/';
break;
default:
//本地proxy配置参考vue.config.js
......@@ -47,7 +40,7 @@ switch (window.location.hostname) {
export const productionUrl = url;
export const productionUrlApi = urlApi;
export const productionUrlMarketing = urlMarketing;
export const apis = {
/**
* 首页
......@@ -84,7 +77,11 @@ export const apis = {
/**
* 提交报关信息
*/
chainFind: productionUrl + 'Service/chainFind'
chainFind: productionUrl + 'Service/chainFind',
/**
*微信菜单文章锦集api
*/
wechatArticle: productionUrlMarketing + 'wechatMenu/article'
}
export const services = {
......@@ -126,5 +123,9 @@ export const services = {
},
chainFind(params) {
return axios.post(apis.chainFind, params)
},
wechatArticle(params) {
return axios.post(apis.wechatArticle, params)
}
}
.wxlist{height:100%;background:#f8f8f8; }
.wxlist-content{}
.wxlist .wxlist-content .menu-title{color:#333;font-size: 18px;height:47px;line-height: 47px;padding-left:0.2rem;}
.wxlist .wxlist-content .wxlist-banner{padding:0 0.2rem;}
.wxlist .wxlist-content .wxlist-banner .banner-header{padding:10px;}
.banner-box{background: #fff;border-radius: 4px;min-height:275px;}
.banner-header .banner-title{font-size: 19px;color:#333;}
.banner-header .banner-img{width:0.8rem;height:0.8rem;margin-right: 10px;}
.banner-header .banner-img img{width:100%;height:100%;width:0.8rem;height:0.8rem;border-radius: 50%;display: block;}
.banner-body img{width:100%;height: 4.8rem;}
.banner-footer{font-size: 16px;line-height:20px;color:#666;padding:0.4rem 0.28rem;}
.banner-footer a{color:#666;}
.banner-footer span{color:#999;}
.wxlist-data{padding:10px;}
.wxlist-data-box{background: #fff;border-radius: 4px;}
.group-right{width: 2rem;height: 1.6rem;}
.group-left{width: 6.36rem;height: 1.6rem;font-size: 16px;color:#333;line-height: 0.8rem;border-bottom:1px solid #e5e5e5;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.data-group{padding:0.25rem;display: block;}
.wxlist {
}
\ No newline at end of file
import Util from '../util/index'
/**
* 格式化日期
* @param value
* @returns {string}
*/
//PTAG处理
export const urlPatg = (value,ptag) => {
var val=value;
if (val.indexOf('ptag') == -1) {
if (val.indexOf('?') > -1) {
val=val + '&ptag='+ptag;
} else {
val=val + '?ptag='+ptag;
}
}
return val;
}
/**参数处理**/
export const urlParams = (value) => {
if (value.indexOf('?') > -1) {
return value + '&ptag=index-dynamic';
......
import {dateTimeFormate, urlParams} from './formate';
import {dateTimeFormate, urlParams,urlPatg} from './formate';
export default {
dateTimeFormate,
urlParams
urlParams,
urlPatg
};
......@@ -4,6 +4,7 @@ import Router from 'vue-router'
const Home = resolve => require(['@/views/home/Index'], resolve);
const Smt = resolve => require(['@/views/smt/Index'], resolve);
const Supplier = resolve => require(['@/views/supplier/Index'], resolve);
const Wxlist = resolve => require(['@/views/wxlist/Index'], resolve);
Vue.use(Router)
......@@ -30,6 +31,13 @@ const routes = [
}
},
{
path: '/wxlist',
component: Wxlist,
meta: {
title: '猎芯网-公众号文章锦集'
}
},
{
path: '*',
redirect: '/'
}
......
import Vue from 'vue'
import {Toast} from 'vant';
import {services as Services} from '../../../api/index'
var qs = require('qs');
Vue.use(Toast);
const state = {
loading: false,
wechatArticle:{},
loadingup:false,
finished: false
}
const mutations = {
wechatArticle(state, payload) {
state.wechatArticle = payload.data;
}
}
const actions = {
wechatArticle({commit}, payload) {
state.loading = true;
//state.loadingup = true;
state.finished=true;
var params = {
type_id:payload.type_id,
page:payload.page,
limit:payload.limit
}
Services.wechatArticle(qs.stringify(params)).then((res) => {
let data = res.data;
state.loading = false;
state.loadingup = false;
state.finished=false;
if (data.err_code == 0) {
commit({
type: 'wechatArticle',
data: data.data
});
}
}).catch(function (err) {
state.loading = false;
state.loadingup = false;
});
}
}
const getters = {}
export default {
state,
mutations,
actions,
getters
}
......@@ -3,6 +3,8 @@ import Vuex from 'vuex'
import home from './modules/home'
import common from './modules/common'
import smt from './modules/smt/index'
import wxlist from './modules/wxlist/wxlist'
Vue.use(Vuex)
......@@ -10,6 +12,7 @@ export default new Vuex.Store({
modules: {
home,
common,
smt
smt,
wxlist
}
})
<template>
<section>
<div class="header-page clr">
<i class="icon iconfont icon-xiangzuo fl"></i>
<h3 class="title fl">{{title}}</h3>
<Menu v-if="meaushow" :color="color"></Menu>
</div>
</section>
</template>
<script>
import Menu from '@/views/common/Menu.vue';
export default {
name: 'header-page',
props: {
color: {
type: String,
default: ''
},
title: {
type: String,
default: '猎芯网'
},
meaushow:{
type: Boolean,
default: false
}
},
data() {
return {
}
},
mounted() {
},
methods: {
},
components: {
Menu
}
}
</script>
<style lang="scss">
body{padding-top:40px;}
.header-page{
border-bottom:1px solid #b2b1b2;
height:40px;
width:100%;
padding: 0 0.2rem;
position:fixed;
top:0;
background:#fafafa;
i{font-size:18px;margin-top:10px;color:#666}
h3{font-size:16px;color:#333;width:80%;line-height:40px;text-align:center;height:40px;overflow: hidden;
text-overflow: ellipsis;}
}
</style>
......@@ -36,7 +36,7 @@
props: {
color: {
type: String,
default: ''
default: '#666'
},
},
data() {
......
<template>
<section class="wxlist">
<Header ></Header>
<div class="wxlist-content">
<div class="menu-title">{{wechatArticle.menu}}</div>
<div class="wxlist-banner" v-if="wechatArticle.top">
<div class="banner-box">
<div class="banner-header clr">
<div class="banner-img fl"><img src="../../assets/images/wxlist/logo2.png" /></div>
<div class="banner-title fl">猎芯网</div>
</div>
<div class="banner-body">
<a :href="wechatArticle.top.url | urlPatg('wechatlist')"><img :alt="wechatArticle.top.title" :src="wechatArticle.top.img" /></a>
</div>
<div class="banner-footer">
<a :href="wechatArticle.top.url | urlPatg('wechatlist')"><span>活动&nbsp;|&nbsp;</span>{{wechatArticle.top.title}}</a>
</div>
</div>
</div>
<div class="wxlist-data">
<pre>{{loadingup}}</pre>
<div class="wxlist-data-box">
<van-list v-model="loadingup" :finished="finished" finished-text="没有更多了" @load="onLoad">
<div class="data-group clr" v-for="(item,index) in wechatArticle.list" :key="index" >
<a :href="item.url | urlPatg('wechatlist')">
<div class="group-left fl">
{{item.title}}
</div>
<img :src="item.img" class="group-right fr" />
</a>
</div>
</van-list>
</div>
</div>
</div>
</section>
</template>
<script>
import Vue from 'vue';
import {mapState} from 'vuex'
import {List,Loading} from 'vant';
import Header from '@/views/common/Header.vue';
Vue.use(List).use(Loading);
export default {
name: 'wxlist',
data() {
return {
page:0,
limit:4
//控制在页面往下移动到底部时是否调用接口获取数据
}
},
computed: mapState({
wechatArticle: state => state.wxlist.wechatArticle,
loading: state => state.wxlist.loading,
loadingup:state => state.wxlist.loadingup,
finished:state => state.wxlist.finished
}),
watch: {
},
created(){
//sssssss
this.getData(this.$route.query.type_id);
},
methods: {
getData(type_id){
this.$store.dispatch({
type: 'wechatArticle',
type_id:type_id,
page:this.page,
limit:this.limit
})
},
onLoad(){
setTimeout(()=>{
this.page++;
this.getData(this.$route.query.type_id)
},100)
}
},
components: {
Header
}
}
</script>
<style scoped lang="scss">
@import "../../assets/css/wxlist/wxlist.min.css";
</style>
\ No newline at end of file
.menu-fade{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.3)}.menu{position:fixed;right:10px;top:10px;z-index:999}.menu b{font-size:18px;color:#666}.menu .popover-arrow{position:absolute;z-index:1000;top:11px;right:0;overflow:hidden;width:26px;height:26px}.menu .popover-arrow:after{position:absolute;top:19px;left:0;width:26px;height:26px;content:" ";-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:3px;background:#333}.menu .menu-view{margin-top:36px;background:#333;font-size:15px;border-radius:2px;max-height:300px}.menu .menu-view li{position:relative;overflow:hidden;padding:11px 15px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.menu .menu-view li a{color:#fff}.menu .menu-view li a i{margin-right:.1rem}body{padding-top:40px}.header-page{border-bottom:1px solid #b2b1b2;height:40px;width:100%;padding:0 .2rem;position:fixed;top:0;background:#fafafa}.header-page i{font-size:18px;margin-top:10px;color:#666}.header-page h3{font-size:16px;color:#333;width:80%;line-height:40px;text-align:center;height:40px;overflow:hidden;text-overflow:ellipsis}.wxlist{height:100%;background:#f8f8f8}.wxlist .wxlist-content .menu-title{color:#333;font-size:18px;height:47px;line-height:47px;padding-left:.2rem}.wxlist .wxlist-content .wxlist-banner{padding:0 .2rem}.wxlist .wxlist-content .wxlist-banner .banner-header{padding:10px}.banner-box{background:#fff;border-radius:4px;min-height:275px}.banner-header .banner-title{font-size:19px;color:#333}.banner-header .banner-img{width:.8rem;height:.8rem;margin-right:10px}.banner-header .banner-img img{width:100%;height:100%;width:.8rem;height:.8rem;border-radius:50%;display:block}.banner-body img{width:100%;height:4.8rem}.banner-footer{font-size:16px;line-height:20px;color:#666;padding:.4rem .28rem}.banner-footer a{color:#666}.banner-footer span{color:#999}.wxlist-data{padding:10px}.wxlist-data-box{background:#fff;border-radius:4px}.group-right{width:2rem;height:1.6rem}.group-left{width:6.36rem;height:1.6rem;font-size:16px;color:#333;line-height:.8rem;border-bottom:1px solid #e5e5e5;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.data-group{padding:.25rem;display:block}
\ No newline at end of file
<!DOCTYPE HTML><html lang=zh-CN><head><title></title><meta name=author content=www.ichunt.com><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,user-scalable=no,minimal-ui"><meta http-equiv=Content-Type content="text/html;charset=utf-8"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><meta name=format-detection content="telephone=no"><meta http-equiv=Expires content=-1><meta http-equiv=Cache-Control content=no-cache><meta http-equiv=Pragma content=no-cache><meta name=full-screen content=yes><meta name=browsermode content=application><meta name=x5-fullscreen content=true><meta name=x5-page-mode content=app><meta name=description content=猎芯网,快速成长的专业电子元器件商城,贸泽(MOUSER)全系产品、e络盟(element14)树莓派系列产品授权经销商,已获得多轮风险投资。为客户提供电子元器件现货,IC采购,进口报关,电子元器件寄售,供应链金融等一站式电子元器件采购服务。><meta name=keywords content=猎芯网,电子元器件采购,电子元器件商城,电子元器件现货,IC采购网,电子元器件寄售,电子元件,元器件商城,元器件采购,电子商城,><link rel=icon href=//h5static.ichunt.com/favicon.ico><link rel=stylesheet href=/v3/dist/res/m/css/font/iconfont.css><script src=/h5/view/get_time.php></script><script>var fwtimes = window.fwtime - (Math.floor((new Date().getTime()) / 1000)); //获取服务器时间差</script><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js charset=utf-8></script><script src=//h5static.ichunt.com/static/js/flexible.min.js charset=utf-8></script><script src=//h5static.ichunt.com/static/js/shence.min.js charset=utf-8></script><link href=//h5static.ichunt.com/css/chunk-1144b73a.43c91bcb.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-37ba70a3.d7e46390.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-5498eef5.e5216386.css rel=prefetch><link href=//h5static.ichunt.com/js/chunk-1144b73a.dcaaca52.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-37ba70a3.58777a98.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-5498eef5.dfdb390f.js rel=prefetch><link href=//h5static.ichunt.com/css/app.adc8e432.css rel=preload as=style><link href=//h5static.ichunt.com/css/chunk-vendors.fa7e75a9.css rel=preload as=style><link href=//h5static.ichunt.com/js/app.583e82a0.js rel=preload as=script><link href=//h5static.ichunt.com/js/chunk-vendors.a6fd0b8b.js rel=preload as=script><link href=//h5static.ichunt.com/css/chunk-vendors.fa7e75a9.css rel=stylesheet><link href=//h5static.ichunt.com/css/app.adc8e432.css rel=stylesheet></head><body><noscript><strong>网站出现了一点小问题,正在紧急修复中.......</strong></noscript><div id=app></div><script>function SetCookie(name, value, time, domain) {
<!DOCTYPE HTML><html lang=zh-CN><head><title></title><meta name=author content=www.ichunt.com><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,user-scalable=no,minimal-ui"><meta http-equiv=Content-Type content="text/html;charset=utf-8"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><meta name=format-detection content="telephone=no"><meta http-equiv=Expires content=-1><meta http-equiv=Cache-Control content=no-cache><meta http-equiv=Pragma content=no-cache><meta name=full-screen content=yes><meta name=browsermode content=application><meta name=x5-fullscreen content=true><meta name=x5-page-mode content=app><meta name=description content=猎芯网,快速成长的专业电子元器件商城,贸泽(MOUSER)全系产品、e络盟(element14)树莓派系列产品授权经销商,已获得多轮风险投资。为客户提供电子元器件现货,IC采购,进口报关,电子元器件寄售,供应链金融等一站式电子元器件采购服务。><meta name=keywords content=猎芯网,电子元器件采购,电子元器件商城,电子元器件现货,IC采购网,电子元器件寄售,电子元件,元器件商城,元器件采购,电子商城,><link rel=icon href=//h5static.ichunt.com/favicon.ico><link rel=stylesheet href=/v3/dist/res/m/css/font/iconfont.css><script src=/h5/view/get_time.php></script><script>var fwtimes = window.fwtime - (Math.floor((new Date().getTime()) / 1000)); //获取服务器时间差</script><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js charset=utf-8></script><script src=//h5static.ichunt.com/static/js/flexible.min.js charset=utf-8></script><script src=//h5static.ichunt.com/static/js/shence.min.js charset=utf-8></script><link href=//h5static.ichunt.com/css/chunk-383c5e1e.d7e46390.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-406d08fd.43c91bcb.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-7dbd3ca4.7fc76ae3.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-d0644cb4.e5216386.css rel=prefetch><link href=//h5static.ichunt.com/js/chunk-383c5e1e.cf0033d8.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-406d08fd.59ea6d2b.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-7dbd3ca4.170499b8.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-d0644cb4.d3b6c9c8.js rel=prefetch><link href=//h5static.ichunt.com/css/app.adc8e432.css rel=preload as=style><link href=//h5static.ichunt.com/css/chunk-vendors.59ded326.css rel=preload as=style><link href=//h5static.ichunt.com/js/app.4769dfcb.js rel=preload as=script><link href=//h5static.ichunt.com/js/chunk-vendors.1b4108eb.js rel=preload as=script><link href=//h5static.ichunt.com/css/chunk-vendors.59ded326.css rel=stylesheet><link href=//h5static.ichunt.com/css/app.adc8e432.css rel=stylesheet></head><body class=boxsiz><noscript><strong>网站出现了一点小问题,正在紧急修复中.......</strong></noscript><div id=app></div><script>function SetCookie(name, value, time, domain) {
domain = domain ? ";domain=" + domain : "";
var Days = time;
var exp = new Date();
......@@ -224,4 +224,4 @@
user_rank: '0'
});
sensors.quick('autoTrack');
}</script><script src=//h5static.ichunt.com/js/chunk-vendors.a6fd0b8b.js></script><script src=//h5static.ichunt.com/js/app.583e82a0.js></script></body></html>
\ No newline at end of file
}</script><script src=//h5static.ichunt.com/js/chunk-vendors.1b4108eb.js></script><script src=//h5static.ichunt.com/js/app.4769dfcb.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7dbd3ca4"],{2259:function(t,a,i){},"3b79":function(t,a,i){"use strict";var e=i("2259"),n=i.n(e);n.a},"4f52":function(t,a,i){},5710:function(t,a,i){},7272:function(t,a,i){"use strict";var e=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("div",[t.flag?i("div",{staticClass:"menu-fade",on:{click:function(a){t.flag=!1}}}):t._e(),i("div",{staticClass:"menu clr"},[i("b",{staticClass:"iconfont icon-liedanbiao fr",style:{color:t.color},on:{click:function(a){t.flag=!t.flag}}}),t.flag?i("div",[i("i",{staticClass:"popover-arrow"}),t._m(0)]):t._e()])])},n=[function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("ul",{staticClass:"menu-view"},[i("li",[i("a",{attrs:{href:"/v3?ptag=selfshop-topnav"}},[i("i",{staticClass:"icon iconfont icon-shouye"}),t._v("首页")])]),i("li",[i("a",{attrs:{href:"/v3/lxshop?ptag=selfshop-topnav"}},[i("i",{staticClass:"icon iconfont icon-lianying"}),t._v("联营商城")])]),i("li",[i("a",{attrs:{href:"/v3/xianhuo?ptag=selfshop-topnav"}},[i("i",{staticClass:"icon iconfont icon-liexinziying"}),t._v("自营现货")])]),i("li",[i("a",{attrs:{href:"/v3/brand/map?ptag=selfshop-topnav"}},[i("i",{staticClass:"icon iconfont icon-pinpai"}),t._v("品牌之家")])]),i("li",{staticClass:"mui-table-view-cell "},[i("a",{staticClass:"zytabgo",attrs:{href:"/v3/joincart?ptag=selfshop-topnav"}},[i("i",{staticClass:"icon iconfont icon-gouwuche1"}),t._v("购物车")])]),i("li",[i("a",{attrs:{href:"/v3/user?ptag=selfshop-topnav"}},[i("i",{staticClass:"icon iconfont icon-huiyuanzhongxin"}),t._v("会员中心")])])])}],s={name:"menus",props:{color:{type:String,default:"#666"}},data:function(){return{flag:!1}}},c=s,l=(i("3b79"),i("8c9c")),o=Object(l["a"])(c,e,n,!1,null,null,null);a["a"]=o.exports},"9f93":function(t,a,i){"use strict";var e=i("5710"),n=i.n(e);n.a},bd04:function(t,a,i){"use strict";i.r(a);var e=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("section",{staticClass:"wxlist"},[i("Header"),i("div",{staticClass:"wxlist-content"},[i("div",{staticClass:"menu-title"},[t._v(t._s(t.wechatArticle.menu))]),t.wechatArticle.top?i("div",{staticClass:"wxlist-banner"},[i("div",{staticClass:"banner-box"},[t._m(0),i("div",{staticClass:"banner-body"},[i("a",{attrs:{href:t._f("urlPatg")(t.wechatArticle.top.url,"wechatlist")}},[i("img",{attrs:{alt:t.wechatArticle.top.title,src:t.wechatArticle.top.img}})])]),i("div",{staticClass:"banner-footer"},[i("a",{attrs:{href:t._f("urlPatg")(t.wechatArticle.top.url,"wechatlist")}},[i("span",[t._v("活动 | ")]),t._v(t._s(t.wechatArticle.top.title))])])])]):t._e(),i("div",{staticClass:"wxlist-data"},[i("pre",[t._v(t._s(t.loadingup))]),i("div",{staticClass:"wxlist-data-box"},[i("van-list",{attrs:{finished:t.finished,"finished-text":"没有更多了"},on:{load:t.onLoad},model:{value:t.loadingup,callback:function(a){t.loadingup=a},expression:"loadingup"}},t._l(t.wechatArticle.list,function(a,e){return i("div",{key:e,staticClass:"data-group clr"},[i("a",{attrs:{href:t._f("urlPatg")(a.url,"wechatlist")}},[i("div",{staticClass:"group-left fl"},[t._v("\n "+t._s(a.title)+"\n ")]),i("img",{staticClass:"group-right fr",attrs:{src:a.img}})])])}),0)],1)])])],1)},n=[function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"banner-header clr"},[e("div",{staticClass:"banner-img fl"},[e("img",{attrs:{src:i("defc")}})]),e("div",{staticClass:"banner-title fl"},[t._v("猎芯网")])])}],s=i("8973"),c=i("52c1"),l=i("5101"),o=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("section",[i("div",{staticClass:"header-page clr"},[i("i",{staticClass:"icon iconfont icon-xiangzuo fl"}),i("h3",{staticClass:"title fl"},[t._v(t._s(t.title))]),t.meaushow?i("Menu",{attrs:{color:t.color}}):t._e()],1)])},r=[],u=i("7272"),f={name:"header-page",props:{color:{type:String,default:""},title:{type:String,default:"猎芯网"},meaushow:{type:Boolean,default:!1}},data:function(){return{}},mounted:function(){},methods:{},components:{Menu:u["a"]}},d=f,p=(i("9f93"),i("8c9c")),h=Object(p["a"])(d,o,r,!1,null,null,null),v=h.exports;s["a"].use(l["c"]).use(l["d"]);var g={name:"wxlist",data:function(){return{page:0,limit:4}},computed:Object(c["b"])({wechatArticle:function(t){return t.wxlist.wechatArticle},loading:function(t){return t.wxlist.loading},loadingup:function(t){return t.wxlist.loadingup},finished:function(t){return t.wxlist.finished}}),watch:{},created:function(){this.getData(this.$route.query.type_id)},methods:{getData:function(t){this.$store.dispatch({type:"wechatArticle",type_id:t,page:this.page,limit:this.limit})},onLoad:function(){var t=this;setTimeout(function(){t.page++,t.getData(t.$route.query.type_id)},100)}},components:{Header:v}},_=g,m=(i("d34a"),Object(p["a"])(_,e,n,!1,null,"b554d940",null));a["default"]=m.exports},d34a:function(t,a,i){"use strict";var e=i("4f52"),n=i.n(e);n.a},defc:function(t,a,i){t.exports=i.p+"img/logo2.19d260fd.png"}}]);
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -4,14 +4,14 @@ window.onload = function() {
// console.log(start);
// 在页面关闭前,调用sa的track方法
window.onbeforeunload = function() {
var end = new Date();
// 如果用户一直不关闭页面,可能出现超大值,可以根据业务需要处理,例如设置一个上限
var duration = (end.getTime() - start.getTime()) / 1000;
// console.log(duration);
// 定义一个记录页面停留时间的事件pageView,并且保存需要的属性(停留时间和当前页面的地址)
sensors.track('pageclose', {
pageStayTime: duration,
pageUrl: window.location.href
});
var end = new Date();
// 如果用户一直不关闭页面,可能出现超大值,可以根据业务需要处理,例如设置一个上限
var duration = (end.getTime() - start.getTime()) / 1000;
// console.log(duration);
// 定义一个记录页面停留时间的事件pageView,并且保存需要的属性(停留时间和当前页面的地址)
sensors.track('pageclose', {
pageStayTime: duration,
pageUrl: window.location.href
});
};
}
\ 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 sign in to comment