Commit f8567556 by lmf

优化js文件

parent f1e63aea
var config = {
paths : {
'smartphoto': 'Magento_Catalog/js/smartphoto.min'
},
shim : {
'smartphoto' : {
deps: ['jquery']
}
}
};
...@@ -38,19 +38,13 @@ ...@@ -38,19 +38,13 @@
</div> </div>
<?php endif; ?> <?php endif; ?>
<script> <script>
console.log("js is work!")
require([ require([
'jquery' 'jquery'
], function ($) { ], function ($) {
console.log("jquery is work!") console.log("jquery is work!")
setTimeout(function(){ setTimeout(function(){
$("#tab-label-reviews").trigger("click"); $("#tab-label-reviews").trigger("click");
},1000); },3000);
}); });
let e = document.createEvent('MouseEvents');
e.initEvent('click', true, true);
setTimeout(function(){
document.getElementById('tab-label-reviews').dispatchEvent(e);
},1000);
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment