Commit 6a1be09d by 肖康

x

parent 3a6ee52a
......@@ -26,7 +26,7 @@ switch (window.location.hostname) {
break;
case "m.liexin.com":
url = 'http://m.liexin.com/v3/';
urlApi = 'http://api.liexin.com';
urlApi = 'http://api.liexin.com/';
break;
default:
//本地proxy配置参考vue.config.js
......@@ -76,7 +76,11 @@ export const apis = {
/**
*微信菜单文章锦集api
*/
wechatArticle: productionUrlApi + 'Wechat/WechatArticleJinJi/article'
wechatArticle: productionUrlApi + 'Wechat/WechatArticleJinJi/article',
/**
*微信菜单文章锦集api
*/
newsArticle: productionUrlApi + 'Article/Article/index'
}
export const services = {
index(params) {
......@@ -120,6 +124,9 @@ export const services = {
},
wechatArticle(params) {
return axios.post(apis.wechatArticle, params)
},
newsArticle(params) {
return axios.post(apis.newsArticle, params)
}
}
......@@ -5,7 +5,8 @@ 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);
const News = resolve => require(['@/views/news/Index'], resolve);
const NewsDetail = resolve => require(['@/views/news/Detail'], resolve);
Vue.use(Router)
const routes = [
......@@ -32,12 +33,29 @@ const routes = [
},
{
path: '/wxlist',
name:'Wxlist',
component: Wxlist,
meta: {
title: '猎芯网'
}
},
{
path: '/news',
name:'News',
component: News,
meta: {
title: '猎芯网-新闻列表'
}
},
{
path: '/news/detail',
name:'NewsDetail',
component: NewsDetail,
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 = {
finished: false,
loadStatus: false,
cat_list: [],
content_list:[],
rollbanner:[],
p:1,
limit: 10,//每页条数
totalLimit:0//总条数
}
const mutations = {
newsArticle(state, payload) {
state.rollbanner=payload.data.rollbanner;
state.cat_list = payload.data.cat_list;
//处理数据的数组
if(state.p==1){
state.content_list=payload.data.content_list;
}else{
state.content_list = state.content_list.concat(payload.data.content_list);
}
// //计算总页码
state.totalLimit = Math.ceil(Number(payload.data.tatol_num) / state.limit);
//判断数据是否加载完成
if (state.p>= state.totalLimit) {
state.finished = true;
}
}
}
const actions = {
newsArticle({commit}, payload) {
state.loadStatus = true;
var params = {
cat_id: payload.cat_id,
p: payload.p,
limit:payload.limit
}
console.log(payload)
state.p=payload.p;
state.limit=payload.limit;
Services.newsArticle(qs.stringify(params)).then((res) => {
let data = res.data;
state.loadStatus = false;
if (data.err_code == 0) {
commit({
type: 'newsArticle',
data: data.data
});
}
}).catch(function (err) {
state.loadStatus = false;
});
}
}
const getters = {}
export default {
state,
mutations,
actions,
getters
}
......@@ -4,8 +4,7 @@ import home from './modules/home'
import common from './modules/common'
import smt from './modules/smt/index'
import wxlist from './modules/wxlist/wxlist'
import news from './modules/news/index'
Vue.use(Vuex)
export default new Vuex.Store({
......@@ -13,6 +12,7 @@ export default new Vuex.Store({
home,
common,
smt,
wxlist
wxlist,
news
}
})
.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{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:88%;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:60px}.group-left-box{height:50px;width:6.347rem;font-size:16px;color:#333;line-height:25px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.group-left{width:6.347rem;border-bottom:1px solid #e5e5e5;padding-top:.1rem;padding-bottom:.5rem}.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-383c5e1e.d7e46390.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-406d08fd.43c91bcb.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-72ba3ef6.f098c81b.css rel=prefetch><link href=//h5static.ichunt.com/css/chunk-d0644cb4.e5216386.css rel=prefetch><link href=//h5static.ichunt.com/js/chunk-383c5e1e.ace19bcc.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-406d08fd.119f5200.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-72ba3ef6.3e6510e0.js rel=prefetch><link href=//h5static.ichunt.com/js/chunk-d0644cb4.c605683c.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.ea230c52.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) {
<!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.0, maximum-scale=1.0, 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="//szh5static.ichunt.com/favicon.ico">
<link rel="stylesheet" href="/v3/dist/res/m/css/font/iconfont.css">
<script type="text/javascript" src="/h5/view/get_time.php"></script>
<script type="text/javascript">
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" type="text/javascript" charset="utf-8"></script>
<script src="//szh5static.ichunt.com/static/js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
<script src="//szh5static.ichunt.com/static/js/shence.min.js" type="text/javascript" charset="utf-8"></script>
<link href="//szh5static.ichunt.com/0.js" rel="prefetch"><link href="//szh5static.ichunt.com/1.js" rel="prefetch"><link href="//szh5static.ichunt.com/2.js" rel="prefetch"><link href="//szh5static.ichunt.com/3.js" rel="prefetch"><link href="//szh5static.ichunt.com/4.js" rel="prefetch"><link href="//szh5static.ichunt.com/5.js" rel="prefetch"><link href="//szh5static.ichunt.com/6.9de2dd3c4689447c2fcd.hot-update.js" rel="prefetch"><link href="//szh5static.ichunt.com/6.js" rel="prefetch"><link href="//szh5static.ichunt.com/7.js" rel="prefetch"><link href="//szh5static.ichunt.com/app.js" rel="preload" as="script"></head>
<body class="boxsiz">
<noscript>
<strong>网站出现了一点小问题,正在紧急修复中.......</strong>
</noscript>
<div id="app"></div>
<script type="text/javascript">
function SetCookie(name, value, time, domain) {
domain = domain ? ";domain=" + domain : "";
var Days = time;
var exp = new Date();
......@@ -114,7 +150,12 @@
document.getElementsByTagName('head')[0].appendChild(mta);
})();
}
}</script><script>//神策统计
}
</script>
<script type="text/javascript">
//神策统计
var host_v = window.location.host;
var __PUBLIC__;
......@@ -224,4 +265,7 @@
user_rank: '0'
});
sensors.quick('autoTrack');
}</script><script src=//h5static.ichunt.com/js/chunk-vendors.1b4108eb.js></script><script src=//h5static.ichunt.com/js/app.ea230c52.js></script></body></html>
\ No newline at end of file
}
</script>
<script type="text/javascript" src="//szh5static.ichunt.com/app.js"></script></body>
</html>
This diff could not be displayed because it is too large.
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