CT增加Addthis社媒代码

hotfix/paypal-note
赵鹏 4 years ago
parent 486c3bad9a
commit 3adf6d249a

@ -915,7 +915,10 @@ class Information extends CI_Controller
//非产品页面 //非产品页面
$data["PRODUCTJS"] = ""; $data["PRODUCTJS"] = "";
$template_path = 'mobile_first/' . $this->config->item('site_code');
$data["addthis_widget"] = "";
if (empty(get_meta($information->ic_id, 'meta_product_code'))) { if (empty(get_meta($information->ic_id, 'meta_product_code'))) {
$data["addthis_widget"] = $this->load->view($template_path . '-add-this', false, true); //社媒代码addthis
} else { } else {
// $data["PRODUCTJS"] = '<script src="https://data.chinatravel.com/js/mobile-first/flatpickr.js"></script>'; // $data["PRODUCTJS"] = '<script src="https://data.chinatravel.com/js/mobile-first/flatpickr.js"></script>';
} }

@ -0,0 +1 @@
<script>document.addEventListener("DOMContentLoaded",()=>{setTimeout(function(){loadScriptByAsync("https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5be3dae48059b706")},5e3)});</script>

@ -282,7 +282,7 @@ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a
</script> </script>
<!-- End Google --> <!-- End Google -->
<!--@IN-ARTICLE-GOOGLE@--> <!--@IN-ARTICLE-GOOGLE@-->
<!--@ADDTHIS-WIDGET@--> <!--@ADDTHIS-WIDGET@--><?php echo $addthis_widget ?>
<!--@PASSPARAM@--><?php echo $passParam ?> <!--@PASSPARAM@--><?php echo $passParam ?>
</body> </body>
</html> </html>

@ -285,7 +285,7 @@
</script> </script>
<!-- End Google --> <!-- End Google -->
<!--@IN-ARTICLE-GOOGLE@--> <!--@IN-ARTICLE-GOOGLE@-->
<!--@ADDTHIS-WIDGET@--> <!--@ADDTHIS-WIDGET@--><?php echo $addthis_widget ?>
<!--@PASSPARAM@--><?php echo $passParam ?> <!--@PASSPARAM@--><?php echo $passParam ?>
</body> </body>
</html> </html>
Loading…
Cancel
Save