|
@@ -11,11 +11,10 @@ |
|
@@ -11,11 +11,10 @@ |
11
|
<script>
|
11
|
<script>
|
12
|
const $ = require('yoho-jquery');
|
12
|
const $ = require('yoho-jquery');
|
13
|
const tip = require('common/tip');
|
13
|
const tip = require('common/tip');
|
|
|
14
|
+ const bus = require('common/vue-bus');
|
14
|
const focus = require('component/resources/focus.vue');
|
15
|
const focus = require('component/resources/focus.vue');
|
15
|
const titleImage = require('component/resources/title-image.vue');
|
16
|
const titleImage = require('component/resources/title-image.vue');
|
16
|
const goods = require('component/resources/goods.vue');
|
17
|
const goods = require('component/resources/goods.vue');
|
17
|
- const Loading = require('common/loading');
|
|
|
18
|
- const loading = new Loading();
|
|
|
19
|
|
18
|
|
20
|
module.exports = {
|
19
|
module.exports = {
|
21
|
props: ['channel', 'contentCode'],
|
20
|
props: ['channel', 'contentCode'],
|
|
@@ -47,13 +46,11 @@ |
|
@@ -47,13 +46,11 @@ |
47
|
data.channel = this.channel;
|
46
|
data.channel = this.channel;
|
48
|
}
|
47
|
}
|
49
|
|
48
|
|
50
|
- loading.show();
|
|
|
51
|
$.ajax({
|
49
|
$.ajax({
|
52
|
url: '/resources',
|
50
|
url: '/resources',
|
53
|
data: data
|
51
|
data: data
|
54
|
}).then(result => {
|
52
|
}).then(result => {
|
55
|
this.resources = result;
|
53
|
this.resources = result;
|
56
|
- loading.hide();
|
|
|
57
|
}).fail(() => {
|
54
|
}).fail(() => {
|
58
|
tip('网络错误');
|
55
|
tip('网络错误');
|
59
|
});
|
56
|
});
|
|
@@ -61,6 +58,10 @@ |
|
@@ -61,6 +58,10 @@ |
61
|
},
|
58
|
},
|
62
|
created() {
|
59
|
created() {
|
63
|
this.getResourcesData();
|
60
|
this.getResourcesData();
|
|
|
61
|
+ bus.$on('changeChannel', channel => {
|
|
|
62
|
+ this.channel = channel;
|
|
|
63
|
+ this.getResourcesData();
|
|
|
64
|
+ });
|
64
|
}
|
65
|
}
|
65
|
};
|
66
|
};
|
66
|
</script>
|
67
|
</script>
|