Authored by 陈峰

commit

@@ -14,7 +14,7 @@ function getPredata(key) { @@ -14,7 +14,7 @@ function getPredata(key) {
14 14
15 function fetch($api) { 15 function fetch($api) {
16 return function(url, params, options) { 16 return function(url, params, options) {
17 - if (Vue.$isServer) { 17 + if (process.env.VUE_ENV === 'server') {
18 return $api.get(url, params, options); 18 return $api.get(url, params, options);
19 } 19 }
20 let ispredata = { 20 let ispredata = {
@@ -68,7 +68,7 @@ function init() { @@ -68,7 +68,7 @@ function init() {
68 } 68 }
69 69
70 export default ($api) => { 70 export default ($api) => {
71 - if (!Vue.$isServer) { 71 + if (process.env.VUE_ENV !== 'server') {
72 init(); 72 init();
73 } 73 }
74 return { 74 return {
@@ -28,15 +28,12 @@ export default { @@ -28,15 +28,12 @@ export default {
28 }; 28 };
29 }, 29 },
30 created() { 30 created() {
31 - console.log('created')  
32 this.id = +this.$route.params.id; 31 this.id = +this.$route.params.id;
33 32
34 this.loadPreData(); 33 this.loadPreData();
35 }, 34 },
36 activated() { 35 activated() {
37 - console.log('activated')  
38 if (+this.$route.params.id !== this.id) { 36 if (+this.$route.params.id !== this.id) {
39 - this.loadPreData();  
40 this.init(); 37 this.init();
41 } 38 }
42 }, 39 },
@@ -611,16 +611,12 @@ ul { @@ -611,16 +611,12 @@ ul {
611 white-space: nowrap; 611 white-space: nowrap;
612 } 612 }
613 613
614 -img[lazy] {  
615 - -webkit-transition: opacity 500ms;  
616 - transition: opacity 500ms;  
617 - opacity: 0.2;  
618 -}  
619 -  
620 img[lazy=loading] { 614 img[lazy=loading] {
  615 + opacity: 0.2;
621 } 616 }
622 617
623 img[lazy=error] { 618 img[lazy=error] {
  619 + opacity: 0;
624 } 620 }
625 621
626 img[lazy=loaded] { 622 img[lazy=loaded] {
@@ -89,7 +89,7 @@ function setArticleList(state, data, type, thumb) { @@ -89,7 +89,7 @@ function setArticleList(state, data, type, thumb) {
89 if (thumb) { 89 if (thumb) {
90 state[articlefield(type, thumb)] = data; 90 state[articlefield(type, thumb)] = data;
91 } else { 91 } else {
92 - state[articlefield(type, thumb)] = state[articlefield(type, thumb)].concat(data); 92 + state[articlefield(type)] = state[articlefield(type)].concat(data);
93 } 93 }
94 } 94 }
95 95