fix(util): 补全wap_url公共参数并透传page_params
将page_params合并到公共参数中,一并追加到跳转链接里
This commit is contained in:
@@ -1322,13 +1322,18 @@ export default {
|
||||
|
||||
// 外部链接
|
||||
if (link.wap_url && link.wap_url.indexOf('http') != -1) {
|
||||
// 公共参数
|
||||
const params = {
|
||||
title: link?.title ?? '',
|
||||
enable_set_title: link?.enable_set_title ? 1 : 0
|
||||
}
|
||||
// 公共参数 + 透传 page_params(resolveLinkUrl 已把 wap_url 中的 query 合并到 page_params)
|
||||
const pageParams = (link.page_params && typeof link.page_params === 'object') ? link.page_params : {};
|
||||
const params = Object.assign(
|
||||
{},
|
||||
pageParams,
|
||||
{
|
||||
title: link?.title ?? '',
|
||||
enable_set_title: link?.enable_set_title ? 1 : 0
|
||||
}
|
||||
);
|
||||
let url = this.normalizeUrl(decodeEntity(link.wap_url));
|
||||
url = this.appendQueryParams(url, params);
|
||||
url = this.appendQueryParams(url, params);
|
||||
|
||||
// #ifdef H5
|
||||
// console.log(`url ---->`, url, link)
|
||||
|
||||
Reference in New Issue
Block a user