博客搜索页面分享优化

master
gongfuxiang 2022-08-13 22:19:43 +08:00
parent 5c1da90137
commit 25693a89b0
1 changed files with 13 additions and 4 deletions

View File

@ -114,10 +114,19 @@
});
//
var info = this.data_base;
if((this.nav_active_value || 0) != 0 && this.category.length > 0) {
for(var i in this.category) {
if(this.nav_active_value == this.category[i]['id']) {
info = this.category[i];
break;
}
}
}
this.setData({
share_info: {
title: this.data_base.seo_title || this.data_base.application_name,
desc: this.data_base.seo_desc,
title: info.seo_title || this.data_base.application_name,
desc: info.seo_desc,
path: '/pages/plugins/blog/search/search',
query: 'id=' +this.nav_active_value + '&keywords=' + this.search_keywords_value
}