|
@@ -4,6 +4,7 @@ import dialogCom from '/assets/js/component/dialogCom.js'
|
|
|
import loadingCom from '/assets/js/component/loadingCom.js'
|
|
|
import headerCom from '/assets/js/component/headerCom.js'
|
|
|
|
|
|
+var AboutKeyWrds='';
|
|
|
|
|
|
var app = new Vue({
|
|
|
el: '#app',
|
|
@@ -118,12 +119,15 @@ var app = new Vue({
|
|
|
if (res.data[i].sname == window.location.pathname) {
|
|
|
|
|
|
//进入当前栏目页
|
|
|
+ getSeoCommon()
|
|
|
+
|
|
|
_this.columnTypes = res.data[i].children
|
|
|
_this.colL= _this.columnTypes.childten;
|
|
|
if (res.data[i].children.length > 0) {
|
|
|
_this.requestParams.categoryid = (_this.getQuery('isUrlId') == 1) ? _this.getQuery('id') : _this.columnTypes[0].id;
|
|
|
} else {
|
|
|
- _this.requestParams.categoryid = _this.getQuery('id')
|
|
|
+ var objData = _this.columnList.filter(obj => obj.sname == window.location.pathname);
|
|
|
+ _this.requestParams.categoryid=objData[0].id
|
|
|
}
|
|
|
_this.getArticalData(_this.requestParams)
|
|
|
_this.columnImage = res.data[i].imagePath;
|
|
@@ -134,13 +138,17 @@ var app = new Vue({
|
|
|
if (res.data[i].sname == '/product/index.html' && window.location.pathname == '/product/read.html') {
|
|
|
|
|
|
getDetailCommon()
|
|
|
+ getSeoCommon()
|
|
|
}
|
|
|
if (res.data[i].sname == '/solution/index.html' && window.location.pathname == '/solution/read.html') {
|
|
|
getDetailCommon()
|
|
|
+ getSeoCommon()
|
|
|
}
|
|
|
if (res.data[i].sname == '/news/index.html' && window.location.pathname == '/news/read.html') {
|
|
|
getDetailCommon()
|
|
|
+ getSeoCommon()
|
|
|
}
|
|
|
+
|
|
|
function getDetailCommon(){
|
|
|
//获取内容详情
|
|
|
_this.getArticalData(_this.requestParams)
|
|
@@ -154,6 +162,11 @@ var app = new Vue({
|
|
|
_this.columnImage = res.data[i].imagePath; //栏目图片获取
|
|
|
}
|
|
|
}
|
|
|
+ function getSeoCommon(){
|
|
|
+ $('title').text(res.data[i].categoryName);
|
|
|
+ $('meta[name="description"]').attr('content', res.data[i].metadescription);
|
|
|
+ $('meta[name="keywords"]').attr('content',res.data[i].metakeywords);
|
|
|
+ }
|
|
|
|
|
|
//首页旧
|
|
|
|