|
@@ -97,17 +97,20 @@ export function createChannel() { |
|
@@ -97,17 +97,20 @@ export function createChannel() { |
97
|
|
97
|
|
98
|
commit(FETCH_HOME_REQUEST);
|
98
|
commit(FETCH_HOME_REQUEST);
|
99
|
try {
|
99
|
try {
|
100
|
- const getContent = this.$api.get('/api/resource/get', {content_code: HOME_CONTENT_CODE});
|
|
|
101
|
- const getSlider = this.$api.get('/api/resource/get', {content_code: SLIDER_CONTENT_CODE});
|
|
|
102
|
-
|
100
|
+ const getContent = this.$api.get('/api/resource/get', {
|
|
|
101
|
+ home_invalid_cache: Date.now(),
|
|
|
102
|
+ content_code: HOME_CONTENT_CODE
|
|
|
103
|
+ });
|
|
|
104
|
+ const getSlider = this.$api.get('/api/resource/get', {
|
|
|
105
|
+ home_invalid_cache: Date.now(),
|
|
|
106
|
+ content_code: SLIDER_CONTENT_CODE
|
|
|
107
|
+ });
|
103
|
|
108
|
|
104
|
let [result, slider] = await Promise.all([getContent, getSlider]);
|
109
|
let [result, slider] = await Promise.all([getContent, getSlider]);
|
105
|
|
110
|
|
106
|
commit(FETCH_HOME_SUCCESS, {result, slider});
|
111
|
commit(FETCH_HOME_SUCCESS, {result, slider});
|
107
|
return result;
|
112
|
return result;
|
108
|
} catch (e) {
|
113
|
} catch (e) {
|
109
|
- console.error(e);
|
|
|
110
|
- console.log('fail')
|
|
|
111
|
commit(FETCH_HOME_FAILURE);
|
114
|
commit(FETCH_HOME_FAILURE);
|
112
|
}
|
115
|
}
|
113
|
},
|
116
|
},
|
|
@@ -118,14 +121,14 @@ export function createChannel() { |
|
@@ -118,14 +121,14 @@ export function createChannel() { |
118
|
commit(FETCH_CHANNEL_SUCCESS, {cache: true});
|
121
|
commit(FETCH_CHANNEL_SUCCESS, {cache: true});
|
119
|
return Promise.resolve();
|
122
|
return Promise.resolve();
|
120
|
}
|
123
|
}
|
121
|
-
|
|
|
122
|
- console.log('刷新')
|
|
|
123
|
try {
|
124
|
try {
|
124
|
let getSort = this.$api.get('/sort/list', {
|
125
|
let getSort = this.$api.get('/sort/list', {
|
|
|
126
|
+ home_invalid_cache: Date.now(),
|
125
|
channel: gender
|
127
|
channel: gender
|
126
|
});
|
128
|
});
|
127
|
|
129
|
|
128
|
let getResource = this.$api.get('/api/resource/get', {
|
130
|
let getResource = this.$api.get('/api/resource/get', {
|
|
|
131
|
+ home_invalid_cache: Date.now(),
|
129
|
content_code: gender === 'men' ? CHANNEL_MAN_CONTENT_CODE : CHANNEL_WOMEN_CONTENT_CODE
|
132
|
content_code: gender === 'men' ? CHANNEL_MAN_CONTENT_CODE : CHANNEL_WOMEN_CONTENT_CODE
|
130
|
});
|
133
|
});
|
131
|
|
134
|
|