Authored by lea guo

发现好货标题自定义

... ... @@ -29,11 +29,11 @@ export default {
sceneId: YAS.scene.list
};
},
created() {
this.setTitle();
},
mounted() {
this.setTitle();
// 自定义title
const { title = '' } = this.$route.query || {};
this.title = title || '发现好货';
},
async serverPrefetch() {
return this.fetchFindNiceGoodsArticles({
... ... @@ -51,12 +51,6 @@ export default {
},
methods: {
...mapActions(['fetchFindNiceGoodsArticles']),
setTitle() {
// 自定义title
const { title = '' } = this.yoho.context;
this.title = title || '发现好货';
},
init() {
this.page = 1;
this.$refs.article.init();
... ...
... ... @@ -61,12 +61,9 @@ const asyncLoadScripts = renderScripts => {
};
const getContext = req => {
// title 为'发现好货'标题自定义字段
const { share_title = '', title = '' } = req.query;
return {
url: req.url,
title: share_title || title || '',
title: req.query.share_title || '',
user: req.user,
env: {
isApp: req.yoho.isApp,
... ...