代码如下:
1 layer.msg(data.msg, {icon: 1,time:1500,shade: 0.1}, function(index){ 2 layer.close(index); 3 var str = "{:url('product/add',['product_id'=>'p_id'])}"; 4 var url = str.replace("p_id",data.p_id); 5 window.location.href= url; 6 });
参考链接:
http://micuer.com/index.php?m=index&a=read&id=288