...
|
...
|
@@ -11,7 +11,6 @@ export default function() { |
|
|
page: 0,
|
|
|
limit: 10,
|
|
|
totalPage: 0,
|
|
|
uid: '500031170',
|
|
|
},
|
|
|
newsDeatilList: {
|
|
|
list: [],
|
...
|
...
|
@@ -19,7 +18,6 @@ export default function() { |
|
|
page: 0,
|
|
|
limit: 10,
|
|
|
totalPage: 0,
|
|
|
uid: '500031170',
|
|
|
}
|
|
|
},
|
|
|
mutations: {
|
...
|
...
|
@@ -43,7 +41,6 @@ export default function() { |
|
|
async fetchNewsList({ commit, state }, obj) {
|
|
|
console.log(obj);
|
|
|
let page = state.newsList.page + 1;
|
|
|
let uid = state.newsList.uid;
|
|
|
let limit = state.newsList.limit;
|
|
|
let totalPage = state.newsList.totalPage;
|
|
|
let type = obj && obj.type;
|
...
|
...
|
@@ -51,17 +48,12 @@ export default function() { |
|
|
|
|
|
// 页面跳转重置page页码
|
|
|
isPage ? page = 1 : state.newsList.page + 1;
|
|
|
|
|
|
if (page === totalPage) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
const result = await this.$api.post('/api/ufo/home/newsList', {
|
|
|
page, type, limit
|
|
|
});
|
|
|
|
|
|
if (result.code === 200) {
|
|
|
result.data.list.map((res) => {
|
|
|
result.data.list && result.data.list.map((res) => {
|
|
|
res.createTime = moment(new Date(res.createTime * 1000)).format('YYYY.MM.DD HH:mm');
|
|
|
});
|
|
|
commit(Types.FETCH_NEWS_LIST, {list: result.data});
|
...
|
...
|
|