1. 确保不修改discuz代码; https://gitcafe.com/web3d/uxf/blob/master/upload/source/class/mvc/mvc_template.php p msg:{$msg} / p p Welcome,Phper. / p a href ="{url:'/senery-ticket/list'}" 门票 / a a href ="{url:'/senery-ticket/order/id/' . $t
1. 确保不修改discuz代码;
https://gitcafe.com/web3d/uxf/blob/master/upload/source/class/mvc/mvc_template.php
<span><span>p</span><span>></span>msg:{$msg}<span></span><span>p</span><span>></span> <span><span>p</span><span>></span>Welcome,Phper.<span></span><span>p</span><span>></span> <span><span>a </span><span>href</span><span>="{url:'/senery-ticket/list'}"</span><span>></span>门票<span></span><span>a</span><span>></span> <span><span>a </span><span>href</span><span>="{url:'/senery-ticket/order/id/' . $ticket_id}"</span><span>></span>订购门票<span></span><span>a</span><span>></span></span></span></span></span>
3. 不覆盖discuz的结果,就是这些扩展的东西只能在uxf体系里使用
统一路由构造与解析 说明
比如模版中统一的url写法
{url:'/api-main/list/type/linux/order/1/name/'.$val.name}
参数说明:
在普通url模式下,上述写法将会生成
idx.php?module=api<span>&mod</span>=main<span>&action</span>=list<span>&type</span>=linux<span>&order</span>=1<span>&name</span>=Ubuntu
这样的完整的url。
在pathinfo的模式下,将会生成
/api-main/list/type/linux/order/1/name/Ubuntu
在Diy的模式下,将根据自己定义的方式生成,如
/api/linux/Ubuntu