...
|
...
|
@@ -27,6 +27,7 @@ |
|
|
const $ = require('yoho-jquery');
|
|
|
const tip = require('common/tip');
|
|
|
const bus = require('common/vue-bus');
|
|
|
const contentCode = require('content-code');
|
|
|
|
|
|
const focus = require('component/resources/focus.vue');
|
|
|
const focusLeftRight = require('component/resources/focus-left-right.vue');
|
...
|
...
|
@@ -38,7 +39,7 @@ |
|
|
const dataCache = {};
|
|
|
|
|
|
module.exports = {
|
|
|
props: ['channel', 'contentCode'],
|
|
|
props: ['contentCode'],
|
|
|
data() {
|
|
|
return {
|
|
|
resources: []
|
...
|
...
|
@@ -53,9 +54,6 @@ |
|
|
goods
|
|
|
},
|
|
|
watch: {
|
|
|
channel() {
|
|
|
this.getResourcesData();
|
|
|
},
|
|
|
contentCode() {
|
|
|
this.getResourcesData();
|
|
|
}
|
...
|
...
|
@@ -67,7 +65,7 @@ |
|
|
if (this.contentCode) {
|
|
|
data.contentCode = this.contentCode;
|
|
|
} else {
|
|
|
data.channel = this.channel;
|
|
|
data.contentCode = contentCode.channel.men;
|
|
|
}
|
|
|
|
|
|
let param = $.param(data);
|
...
|
...
|
@@ -77,7 +75,7 @@ |
|
|
return;
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
return $.ajax({
|
|
|
url: '/resources',
|
|
|
data: data
|
|
|
}).then(result => {
|
...
|
...
|
@@ -94,7 +92,7 @@ |
|
|
created() {
|
|
|
this.getResourcesData();
|
|
|
bus.$on('changeChannel', channel => {
|
|
|
this.channel = channel;
|
|
|
this.contentCode = contentCode.channel[channel];
|
|
|
});
|
|
|
}
|
|
|
};
|
...
|
...
|
|