在普通html 页面上自动加载
<script>
$(function(){
{if condition="$Request.session.msg neq ''"}
var msg = '{$Request.session.msg}';
<?php session('msg',null)?>
alert(msg);
{/if}
});
</script>
在js文件夹里面封装的js
直接
public function xxx()
{
xxxxxxx;
}
//执行封装函数
xxx(); //消费
tp5获取SESSION值 {$Request.session.msg}
session('msg',$msg);
$this->redirect($url);