|
@@ -22,12 +22,12 @@ var app = new Vue({
|
|
|
id: null,
|
|
|
columnList: [],
|
|
|
requestParams: { //内容接口请求参数
|
|
|
- categoryid: 0,
|
|
|
+ categoryid: 0, //栏目id
|
|
|
pageNum: 1,
|
|
|
pageSize: 9,
|
|
|
- title: '',
|
|
|
order: 'sortindex',
|
|
|
- articleid: 0,
|
|
|
+ articleid: 0, //访问量统计
|
|
|
+ id: 0, //内容详情id
|
|
|
},
|
|
|
currentPath: '',
|
|
|
articalArray: [], //详情数组
|
|
@@ -92,7 +92,7 @@ var app = new Vue({
|
|
|
},
|
|
|
created: function () {
|
|
|
this.requestParams.categoryid = this.getQuery('id') ? this.getQuery('id') : ''
|
|
|
- this.requestParams.title = this.getQuery('title') ? this.getQuery('title') : ''
|
|
|
+ this.requestParams.id = this.getQuery('articleid') ? this.getQuery('articleid') : ''
|
|
|
this.requestParams.articleid = this.getQuery('articleid') ? this.getQuery('articleid') : ''
|
|
|
},
|
|
|
mounted: function () {
|
|
@@ -212,8 +212,8 @@ var app = new Vue({
|
|
|
_this.getArticalData(_this.requestParams)
|
|
|
//获取详情相关数据
|
|
|
setTimeout(() => {
|
|
|
- _this.requestParams.title = ''
|
|
|
- _this.requestParams.articleid = 0
|
|
|
+ _this.requestParams.id = ''
|
|
|
+ _this.requestParams.articleid = ''
|
|
|
_this.getArticalData(_this.requestParams, 1)
|
|
|
}, 100)
|
|
|
_this.currentPath = _this.columnList[i].sname //产品详情时栏目高亮
|
|
@@ -264,10 +264,10 @@ var app = new Vue({
|
|
|
bb = res.data.records
|
|
|
} else {
|
|
|
aa = res.data.records;
|
|
|
- // aa.sort(_this.compare("sortindex"))
|
|
|
+// aa.sort(_this.compare("sortindex"))
|
|
|
_this.articalArray = aa;
|
|
|
}
|
|
|
- if (bb) {
|
|
|
+ if (bb) {
|
|
|
_this.articalArrayRelated = bb.filter(obj => obj.title != _this.articalArray[0].title);
|
|
|
_this.articalArrayRelated = bb
|
|
|
}
|
|
@@ -286,8 +286,8 @@ var app = new Vue({
|
|
|
|
|
|
// 分页
|
|
|
oneInnerBox: function (param) {
|
|
|
-
|
|
|
- window.location = "./read.html?id=" + param.categoryid + "&title=" + param.title + "&articleid=" + param.id + "&isUrlId=1";
|
|
|
+
|
|
|
+ window.location = "./read.html?id=" + param.categoryid + "&articleid=" + param.id + "&isUrlId=1";
|
|
|
},
|
|
|
enterPage: function (res) {
|
|
|
if (this.goPage >= 1 && this.goPage <= this.totalPageNum) {
|