Commit 12d1bdd2 by 肖康

wl

parent a80173f7
......@@ -26,7 +26,8 @@ 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/';
urlApi="http://szmarketing.ichunt.net/";
break;
default:
//本地proxy配置参考vue.config.js
......@@ -76,9 +77,9 @@ export const apis = {
/**
*微信菜单文章锦集api
*/
wechatArticle: productionUrlApi + 'Wechat/WechatArticleJinJi/article'
wechatArticle: productionUrlApi + 'wechatMenu/article'
}
// 'Wechat/WechatArticleJinJi/article'
export const services = {
index(params) {
return axios.post(apis.index, params)
......
......@@ -20,7 +20,7 @@ const mutations = {
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) {
......@@ -31,6 +31,7 @@ const mutations = {
const actions = {
wechatArticle({commit}, payload) {
state.loadStatus = true;
var params = {
type_id: payload.type_id,
page: payload.page,
......
......@@ -10,7 +10,8 @@
<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>
<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>
......@@ -19,7 +20,8 @@
</div>
<div class="wxlist-data">
<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">
<a :href="item.url | urlPatg('wechatlist')">
<div class="group-left fl">
......@@ -49,7 +51,7 @@
data() {
return {
page: 0,
limit: 10,
limit: 6,
loading: false
}
},
......@@ -62,6 +64,11 @@
finished: state => state.wxlist.finished
})
},
watch: {
loadStatus(val) {
this.loading=val;
}
},
created() {
},
......@@ -75,17 +82,11 @@
})
},
onLoad() {
setTimeout(() => {
if (!this.loadStatus) {
this.loading = false;
if (this.page < this.limits) {
this.page++;
this.getData(this.$route.query.type_id);
}
}
}, 800)
}
},
components: {
Header
......@@ -94,6 +95,6 @@
</script>
<style scoped >
<style scoped>
@import "../../assets/css/wxlist/wxlist.min.css";
</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