ThinkPHP中关于JS文件如何添加类似__PUBLIC__图片路径

时间:2022-07-29 15:20:21

在对html样式进行优化的时候,经常会用到Js/jquery进行一些跳转切换的样式,而我们常做的就是在Js/jquery代码中嵌url图片链接代码,以实现动态交互的页面效果。

如下图所示:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAywAAADCCAIAAAAkStGlAAAgAElEQVR4nO2dMa/0uHWG9bMMVjayP2DzA5JqQSBwn7TCwkitToWT1kAKdYbqjeAyaQcI1AVwmqm23fUuU0iiDslDjjRXM5q593kwwHc/iUNSlES985I6rBwAAAAAPJ3q7AoAAAAAfEUQYQAAAAAngAgDAAAAOAFEGAAAAMAJIMIAAAAATgARBgAAAHACiDAAAACAE0CEAQAAAJwAIgwAAADgBBBhAAAAACeACAMAAAA4AUQYAAAAwAkgwgAAAABOABEGAAAAcAKIMAAAAIATQIQBAAAAnAAiDAAAAOAEjhdhvXVVtXzswZmPTTZPWznTHFycpLeVx/bBdtOMDyy4UJE9B/z0ekoutqplo6X0tqrKFRwbU4V59F1Vddlcx8FUdWUve+sKAADwHI4WYb2rKld82n4se3u8sNvE2JiHSry9jI0xTW+fLasaU5ZSOmPTltTSmvnew7nYqjbNVd3XWxQYAAC8NEeKsMYID6ya1di80QYOWT95WpWr7PJH5eQDOMpq2mXDzL0a8zmk+mzNx7hRJs6UqyI9MOk/jY1ZNoyZb5immR2eKfEkYabd/ltTNj7NarT5AhLTa5zUkFBhc/7W13VVS0o9p03G2CnlXN/lK4HXNsa5FArQzTlFKokvrNk0xjS937OWLAuOmrog7xBhAADw4jzDCQvsK5Ggt64yzjbOTdpo0UmNWf+e0vsHdcEJS3dZIcsmCVgut0TeCRsTA2cdNhsbI3TDKH2kyMVadNn095RMZjw2RuqbJafeio1jYypRcqJXwi0+dW+nf9fq9b0QRsEQoOqEFerp3DRo2IYKW2ip3vr0kzBsRp9RUlZq/Y2DyQx0IsIAAODFOV+EjdH20ZnQnbLivztEWFITu4g5vdwy20VYmFLuLYu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AA4ARwwgAAAABO4J2cMAAAAIBPA04YAAAAwAnghAEAAACcwJs5Yb2tqzS4JSEAAAAA4N14Pyest3UVr1XIwnwAAADwZryZE+Z0EVaMsT4OBokGAAAAL8bncMJKCyQjwgAAAOAFeT8nzPVdVTEiCQAAAO/NZ3HCEGEAAADwVryfE7Z3OLI0XQwAAADgJD6JE5ZXWhebhrQAAAAAOJu3dMKSYcf8WGTfMUYJAAAAL8ibOWG9rRXHi2CtAAAA8G68nxMGAAAA8Al4MycMAAAA4HOAEwYAAABwAogwAAAAgBNAhAEAAACcACIMAAAA4AQOFmG9rSuCowIAAADc4ngnLLO2IwAAAACsIMIAAAAATgARBgAAAHACD5iY33dVhQ4DAAAAKIETBgAAAHACiDAAAACAE0CEAQAAAJzAQ0SYaa6HZwsAAADwmXhEsNauPzZTAAAAgE8HyxYBAAAAnAAiDAAAAOAEEGEAAAAAJ4AIAwAAADgBRBgAAADACSDCAAAAAE7g/wGXQL/PExk79QAAAABJRU5ErkJggg==" alt="" />

-------------------------------------------------------------------------------------------------------------------------------

问题:Js文件不认识__PUBLIC__这些thinkphp独特的链接,所以要我们自己重新定义url地址,才能使用这些路径。

     另外,定义url不能在Js文件里,必须在Js文件对应的index.html代码中写才有效果!一般将导入的js文件放在定义url地址的下面,这样可以不必担心引入Js文件的时候不能使用 定义的url路径。

解决办法:

第一步:在index.html页面中定义url路径

<script>
var url = "__PUBLIC__/Home";//定义js中的url路径
</script>
<script src="__PUBLIC__/Home/js/cy.js"></script>

第二步:引用定义好的url,这样即可完美在thinkphp中识别Js中的图片url路径

function figureAnimate(obj){
$figureImg.addClass('amimateZoom').animate({opacity:0,right:'-300px'},200,function(){
$figureImg.attr('src',url + '/img/'+obj.img).removeClass('amimateZoom')//单纯人物转换src地址
.animate({opacity:1,right:'-150px'},200); $('.readstar').attr('data-url',obj.url);
$figureText.html(obj.html);
$figureName.text(obj.name);
});
}

错误之处,还望指正!