Commit 12d1bdd2 by 肖康

wl

parent a80173f7
...@@ -26,7 +26,8 @@ switch (window.location.hostname) { ...@@ -26,7 +26,8 @@ switch (window.location.hostname) {
break; break;
case "m.liexin.com": case "m.liexin.com":
url = 'http://m.liexin.com/v3/'; url = 'http://m.liexin.com/v3/';
urlApi = 'http://api.liexin.com/'; //urlApi = 'http://api.liexin.com/';
urlApi="http://szmarketing.ichunt.net/";
break; break;
default: default:
//本地proxy配置参考vue.config.js //本地proxy配置参考vue.config.js
...@@ -76,9 +77,9 @@ export const apis = { ...@@ -76,9 +77,9 @@ export const apis = {
/** /**
*微信菜单文章锦集api *微信菜单文章锦集api
*/ */
wechatArticle: productionUrlApi + 'Wechat/WechatArticleJinJi/article' wechatArticle: productionUrlApi + 'wechatMenu/article'
} }
// 'Wechat/WechatArticleJinJi/article'
export const services = { export const services = {
index(params) { index(params) {
return axios.post(apis.index, params) return axios.post(apis.index, params)
......
...@@ -20,7 +20,7 @@ const mutations = { ...@@ -20,7 +20,7 @@ const mutations = {
state.wechatArticleList = state.wechatArticleList.concat(payload.data.list); state.wechatArticleList = state.wechatArticleList.concat(payload.data.list);
//计算总页码 //计算总页码
state.limits = Math.ceil(payload.data.total / 10); state.limits = Math.ceil(payload.data.total / 6);
//判断数据是否加载完成 //判断数据是否加载完成
if (payload.page >= state.limits) { if (payload.page >= state.limits) {
...@@ -31,6 +31,7 @@ const mutations = { ...@@ -31,6 +31,7 @@ const mutations = {
const actions = { const actions = {
wechatArticle({commit}, payload) { wechatArticle({commit}, payload) {
state.loadStatus = true;
var params = { var params = {
type_id: payload.type_id, type_id: payload.type_id,
page: payload.page, page: payload.page,
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<div class="banner-title fl">猎芯网</div> <div class="banner-title fl">猎芯网</div>
</div> </div>
<div class="banner-body"> <div class="banner-body">
<a :href="wechatArticle.top.url | urlPatg('wechatlist')"><img :alt="wechatArticle.top.title" :src="wechatArticle.top.img"/></a> <a :href="wechatArticle.top.url | urlPatg('wechatlist')"><img :alt="wechatArticle.top.title"
:src="wechatArticle.top.img"/></a>
</div> </div>
<div class="banner-footer"> <div class="banner-footer">
<a :href="wechatArticle.top.url | urlPatg('wechatlist')"><span>活动&nbsp;|&nbsp;</span>{{wechatArticle.top.title}}</a> <a :href="wechatArticle.top.url | urlPatg('wechatlist')"><span>活动&nbsp;|&nbsp;</span>{{wechatArticle.top.title}}</a>
...@@ -19,7 +20,8 @@ ...@@ -19,7 +20,8 @@
</div> </div>
<div class="wxlist-data"> <div class="wxlist-data">
<div class="wxlist-data-box"> <div class="wxlist-data-box">
<van-list v-model="loading" :loading="loadStatus" :finished="finished" finished-text="没有更多了" @load="onLoad"> <van-list v-model="loading" :loading="loadStatus" :finished="finished" :offset="10"
finished-text="没有更多了" @load="onLoad">
<div class="data-group clr" v-for="(item,index) in wechatArticleList" :key="index"> <div class="data-group clr" v-for="(item,index) in wechatArticleList" :key="index">
<a :href="item.url | urlPatg('wechatlist')"> <a :href="item.url | urlPatg('wechatlist')">
<div class="group-left fl"> <div class="group-left fl">
...@@ -49,7 +51,7 @@ ...@@ -49,7 +51,7 @@
data() { data() {
return { return {
page: 0, page: 0,
limit: 10, limit: 6,
loading: false loading: false
} }
}, },
...@@ -62,6 +64,11 @@ ...@@ -62,6 +64,11 @@
finished: state => state.wxlist.finished finished: state => state.wxlist.finished
}) })
}, },
watch: {
loadStatus(val) {
this.loading=val;
}
},
created() { created() {
}, },
...@@ -75,17 +82,11 @@ ...@@ -75,17 +82,11 @@
}) })
}, },
onLoad() { onLoad() {
setTimeout(() => {
if (!this.loadStatus) {
this.loading = false;
if (this.page < this.limits) { if (this.page < this.limits) {
this.page++; this.page++;
this.getData(this.$route.query.type_id); this.getData(this.$route.query.type_id);
} }
} }
}, 800)
}
}, },
components: { components: {
Header Header
...@@ -94,6 +95,6 @@ ...@@ -94,6 +95,6 @@
</script> </script>
<style scoped > <style scoped>
@import "../../assets/css/wxlist/wxlist.min.css"; @import "../../assets/css/wxlist/wxlist.min.css";
</style> </style>
\ No newline at end of file
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