[更新]自定义模板路径常量替换TP内置等模板路径常量(TP内置模板路径常量在某些情况不精准)

This commit is contained in:
邹景立 2017-04-24 11:42:18 +08:00
parent 0d4e005e06
commit f99b446d56
10 changed files with 30 additions and 29 deletions

View File

@ -1,7 +1,7 @@
{extend name="extra@admin/main" /}
{block name="style"}
<link rel="stylesheet" href="__STATIC__/theme/default/css/login.css">
<link rel="stylesheet" href="__PUBLIC__/static/theme/default/css/login.css">
{/block}
{block name="body"}

View File

@ -5,9 +5,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0">
<link href="__STATIC__/plugs/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/static/plugs/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<script src="__STATIC__/plugs/jquery/jquery.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/static/plugs/jquery/jquery.min.js" type="text/javascript"></script>
<style>
.bs-glyphicons-list { padding-left: 0; list-style: none }
.bs-glyphicons li { float: left; width: 20%; padding: 10px; font-size: 10px; line-height: 1.4; text-align: center; background-color: #f9f9f9; border: 1px solid #fff;cursor: pointer }

View File

@ -6,11 +6,11 @@
<link rel="icon" href="../image/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0">
<link href="__STATIC__/plugs/uploader/webuploader.css" rel="stylesheet" type="text/css"/>
<link href="__STATIC__/plugs/uploader/theme/uploader.css" rel="stylesheet" type="text/css"/>
<script src="__STATIC__/plugs/jquery/jquery.min.js" type="text/javascript"></script>
<script src="__STATIC__/plugs/uploader/webuploader.min.js" type="text/javascript"></script>
<script src="__STATIC__/plugs/uploader/theme/upload.js" type="text/javascript"></script>
<link href="__PUBLIC__/static/plugs/uploader/webuploader.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/static/plugs/uploader/theme/uploader.css" rel="stylesheet" type="text/css"/>
<script src="__PUBLIC__/static/plugs/jquery/jquery.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/static/plugs/uploader/webuploader.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/static/plugs/uploader/theme/upload.js" type="text/javascript"></script>
</head>
<body>
<div id="uploader">
@ -159,7 +159,7 @@
}
delete window['expressinstallcallback'];
};
var swf = '__STATIC__/plugs/uploader/expressInstall.swf';
var swf = '__PUBLIC__/static/plugs/uploader/expressInstall.swf';
var html = '<object type="application/' + 'x-shockwave-flash" data="' + swf + '" ';
if (WebUploader.browser.ie) {
html += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
@ -231,7 +231,7 @@
compress: false,
dnd: '#dndArea',
paste: document.body,
swf: '__STATIC__/plugs/uploader/Uploader.swf',
swf: '__PUBLIC__/static/plugs/uploader/Uploader.swf',
chunked: false,
chunkSize: 512 * 1024,
server: '{:url("admin/plugs/upload")}',

View File

@ -6,13 +6,13 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="shortcut icon" href="{:sysconf('browser_icon')}" />
<title>{block name="title"}{$title|default=''}&nbsp;{if !empty($title)}-{/if}&nbsp;{:sysconf('site_name')}{/block}</title>
<link rel="stylesheet" href="__STATIC__/plugs/bootstrap/css/bootstrap.min.css?ver={:date('ymd')}"/>
<link rel="stylesheet" href="__STATIC__/plugs/layui/css/layui.css?ver={:date('ymd')}"/>
<link rel="stylesheet" href="__STATIC__/theme/default/css/console.css?ver={:date('ymd')}">
<link rel="stylesheet" href="__STATIC__/theme/default/css/animate.css?ver={:date('ymd')}">{block name="style"}{/block}
<script>window.ROOT_URL = '__ROOT__';</script>
<script src="__STATIC__/plugs/require/require.js?ver={:date('ymd')}"></script>
<script src="__STATIC__/admin/app.js?ver={:date('ymd')}"></script>
<link rel="stylesheet" href="__PUBLIC__/static/plugs/bootstrap/css/bootstrap.min.css?ver={:date('ymd')}"/>
<link rel="stylesheet" href="__PUBLIC__/static/plugs/layui/css/layui.css?ver={:date('ymd')}"/>
<link rel="stylesheet" href="__PUBLIC__/static/theme/default/css/console.css?ver={:date('ymd')}">
<link rel="stylesheet" href="__PUBLIC__/static/theme/default/css/animate.css?ver={:date('ymd')}">{block name="style"}{/block}
<script>window.ROOT_URL = '__PUBLIC__';</script>
<script src="__PUBLIC__/static/plugs/require/require.js?ver={:date('ymd')}"></script>
<script src="__PUBLIC__/static/admin/app.js?ver={:date('ymd')}"></script>
</head>
{block name="bodyTag"}
<body>

View File

@ -36,7 +36,7 @@
$.get('{:url("payqrc")}', {'action': 'payqrc'}, function (ret) {
if (ret.code === 2) {
$('[data-reset]').removeClass('hide');
ret.url = '__STATIC__/theme/default/img/wechat/qrc_payed.jpg';
ret.url = '__PUBLIC__/static/theme/default/img/wechat/qrc_payed.jpg';
}
$('#showbox').html('<img style="width:300px" class="img-thumbnail" src="' + ret.url + '"/>');
$('#orderno').html('订单号:' + ret.order_no);

View File

@ -5,7 +5,7 @@
.pay-qrc-test {
height: 248px;
width: 248px;
background: url('__STATIC__/plugs/layui/css/modules/layer/default/loading-2.gif') no-repeat center center
background: url('__PUBLIC__/static/plugs/layui/css/modules/layer/default/loading-2.gif') no-repeat center center
}
.refund-qrc-test {
@ -104,7 +104,7 @@
$.form.load('{:url("pay")}?action=payqrc', {}, 'get', function (ret) {
if (ret.code === 1 || ret.code === 2) {
if (ret.code === 2) {
ret.url = '__STATIC__/theme/default/img/wechat/qrc_payed.jpg';
ret.url = '__PUBLIC__/static/theme/default/img/wechat/qrc_payed.jpg';
timer && window.clearInterval(timer), timer = null;
}
if (isShow) {

View File

@ -52,7 +52,7 @@
</td>
<td class='text-left'>
<img style="width:25px;height:25px;border-radius:50%;margin-right:10px" data-tips-image="{$vo.headimgurl}"
onerror="this.src='__STATIC__/theme/default/img/image.png'" alt="" src="{$vo.headimgurl}"/>
onerror="this.src='__PUBLIC__/static/theme/default/img/image.png'" alt="" src="{$vo.headimgurl}"/>
{$vo.nickname|default="<span style='color:#999'>未设置微信昵称</span>"}
</td>
<td class='text-center'>{$vo.sex==1?'男':($vo.sex==2?'女':'未知')}</td>

View File

@ -27,7 +27,7 @@
<!-- 效果预览区域 开始 -->
<!--<div class="col-xs-4" style="width:320px;">-->
<!--<div style="position:relative" class="phone-container animated fadeIn">-->
<!--<img style='width:100%' src="__ROOT__/static/theme/default/img/wechat/mobile_head.png" alt=""/>-->
<!--<img style='width:100%' src="__PUBLIC__/static/theme/default/img/wechat/mobile_head.png" alt=""/>-->
<!--<div class="phone-screen">-->
<!--<iframe id="phone-preview" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>-->
<!--</div>-->

View File

@ -16,7 +16,7 @@
{/foreach}
{else}
<div class="news-item transition active news-image"
style="background-image:url('__ROOT__/static/plugs/uploader/theme/image.png')">
style="background-image:url('__PUBLIC__/static/plugs/uploader/theme/image.png')">
<span class="news-title" style='display:none'>标题</span>
</div>
<hr/>
@ -60,7 +60,7 @@
<div class="row">
<div class="col-xs-3">
<div class="upload-image-box">
<input value="__ROOT__/static/plugs/uploader/theme/image.png" type="hidden"
<input value="__PUBLIC__/static/plugs/uploader/theme/image.png" type="hidden"
name="local_url">
</div>
</div>
@ -186,7 +186,7 @@
this.get = function () {
var data = $item.data('item') || {};
data.title = data.title || '';
data.local_url = data.local_url || '__ROOT__/static/plugs/uploader/theme/image.png';
data.local_url = data.local_url || '__PUBLIC__/static/plugs/uploader/theme/image.png';
data.content = data.content || '';
data.author = data.author || '小编';
data.show_cover_pic = data.show_cover_pic || 0;
@ -263,7 +263,7 @@
border: 1px solid #ccc;
background-repeat: no-repeat;
background-position: center center;
background-image: url('__ROOT__/static/plugs/uploader/theme/image.png');
background-image: url('__PUBLIC__/static/plugs/uploader/theme/image.png');
}
.news-left .news-item.active {
@ -287,6 +287,7 @@
color: #fff;
display: block;
padding: 0 5px;
overflow: hidden;
position: absolute;
margin-left: -1px;
text-overflow: ellipsis;
@ -314,7 +315,7 @@
background-size: 100%;
background-repeat: no-repeat;
background-position: center center;
background-image: url('__ROOT__/static/plugs/uploader/theme/image.png');
background-image: url('__PUBLIC__/static/plugs/uploader/theme/image.png');
}
.panel {

View File

@ -7,7 +7,7 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="__ROOT__/static/plugs/aui/aui.css">
<link rel="stylesheet" href="__PUBLIC__/static/plugs/aui/aui.css">
<style>
* {
font-family: "Microsoft YaHei" !important;
@ -56,7 +56,7 @@
<div class="aui-chat-header"><span class="time">{:date('H:i')}</span></div>
<div class="aui-chat-item aui-chat-left">
<div class="aui-chat-media">
<img src="__ROOT__/static/theme/default/img/head.gif"/>
<img src="__PUBLIC__/static/theme/default/img/head.gif"/>
</div>
<div class="aui-chat-inner">
{if $type eq 'text'}