...
|
...
|
@@ -97,17 +97,20 @@ export function createChannel() { |
|
|
|
|
|
commit(FETCH_HOME_REQUEST);
|
|
|
try {
|
|
|
const getContent = this.$api.get('/api/resource/get', {content_code: HOME_CONTENT_CODE});
|
|
|
const getSlider = this.$api.get('/api/resource/get', {content_code: SLIDER_CONTENT_CODE});
|
|
|
|
|
|
const getContent = this.$api.get('/api/resource/get', {
|
|
|
home_invalid_cache: Date.now(),
|
|
|
content_code: HOME_CONTENT_CODE
|
|
|
});
|
|
|
const getSlider = this.$api.get('/api/resource/get', {
|
|
|
home_invalid_cache: Date.now(),
|
|
|
content_code: SLIDER_CONTENT_CODE
|
|
|
});
|
|
|
|
|
|
let [result, slider] = await Promise.all([getContent, getSlider]);
|
|
|
|
|
|
commit(FETCH_HOME_SUCCESS, {result, slider});
|
|
|
return result;
|
|
|
} catch (e) {
|
|
|
console.error(e);
|
|
|
console.log('fail')
|
|
|
commit(FETCH_HOME_FAILURE);
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -118,14 +121,14 @@ export function createChannel() { |
|
|
commit(FETCH_CHANNEL_SUCCESS, {cache: true});
|
|
|
return Promise.resolve();
|
|
|
}
|
|
|
|
|
|
console.log('刷新')
|
|
|
try {
|
|
|
let getSort = this.$api.get('/sort/list', {
|
|
|
home_invalid_cache: Date.now(),
|
|
|
channel: gender
|
|
|
});
|
|
|
|
|
|
let getResource = this.$api.get('/api/resource/get', {
|
|
|
home_invalid_cache: Date.now(),
|
|
|
content_code: gender === 'men' ? CHANNEL_MAN_CONTENT_CODE : CHANNEL_WOMEN_CONTENT_CODE
|
|
|
});
|
|
|
|
...
|
...
|
|