Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一个关于修改 {ms:global.host} 标签的例子,感谢 张凯 提供 #7

Open
sky5454 opened this issue Oct 13, 2019 · 0 comments

Comments

@sky5454
Copy link
Owner

sky5454 commented Oct 13, 2019

具体介绍见:https://github.com/sky5454/MCMS_MyDocs#%E6%A8%A1%E6%9D%BF

以下是修改方法:

一个关于修改 {ms:global.host} 标签的例子,感谢 张凯 提供的方案:

  1. 找到表:mdiy_tag_sql
  2. 找到表中tag_id=5的那一条记录
  3. 修改字段tag_sql的内容为如下:
select 
APP_NAME as name,
app_logo as logo,
app_keyword as keyword,
app_description as descrip,
app_copyright as copyright,
<#--动态解析 -->
<#if isDo?? && isDo>
"${url}" as url,
"${url}" as host,
<#--使用地址栏的域名 -->
<#elseif url??>
CONCAT("${url}","/${html}/",app_id,"/<#if m??>${m}</#if>") as url,
REPLACE(REPLACE(TRIM(substring_index(app_url,"\n",1)), CHAR(10),''), CHAR(13),'') as host,
</#if>
CONCAT("templets/",app_id,"/",<#if m??>CONCAT(app_style,"/${m}")<#else>app_style</#if>) as style <#-- 判断是否为手机端 -->
from app where app_id = ${appId} limit 1

修改数据后需要重启后台

再发布静态文件才能生效

本例子方案由 张凯 提供

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant