|
|
@@ -121,6 +121,7 @@ export default {
|
|
|
this.info = res;
|
|
|
this.imgList = [];
|
|
|
let _this = this;
|
|
|
+ res.content = res.content.replace(/code/g, '_Code');
|
|
|
let options = {
|
|
|
visitors: {
|
|
|
img(node) {
|
|
|
@@ -135,7 +136,6 @@ export default {
|
|
|
_this.imgList.push(node.attr.src);
|
|
|
},
|
|
|
tr(node) {
|
|
|
- console.log(node);
|
|
|
node.styleStr = 'height:auto;';
|
|
|
},
|
|
|
td(node) {
|
|
|
@@ -144,8 +144,9 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
// this.getImgList(res.content);
|
|
|
- this.detail = octoparse.htmlParse(res.content, options);
|
|
|
-
|
|
|
+ let detail = octoparse.htmlParse(res.content, options);
|
|
|
+ this.detail = this.changeText(detail);
|
|
|
+ // = detail.replace(/_Code/g, 'code');
|
|
|
// console.log(res.content);
|
|
|
});
|
|
|
},
|
|
|
@@ -160,6 +161,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeText(info) {
|
|
|
+ let allText = JSON.stringify(info);
|
|
|
+ allText = allText.replace(/_Code/g, 'code');
|
|
|
+ return JSON.parse(allText);
|
|
|
+ },
|
|
|
getActivity() {
|
|
|
this.$http
|
|
|
.post(
|