view.php添加
~~~
'tpl_replace_string' => [
'JS' => '/static/js',
'CSS' => '/static/css',
'LIB' => '/static/lib', ]
~~~
前端调用
~~~
<script src="JS/jquery.min.js"></script>
<script src="LIB/layer/layer.js"></script>
~~~
~~~
<script>
$(function () {
$('#logout').click(function () {
layer.open({
title:'哈哈',
content:'内容',
icon:6,
})
});
});
</script>
~~~
