这个问题主要是页面缓存造成的,关闭页面缓存接口,在页面的layout中找到对应的xml配置文件,在block里加上cacheable=”false”即可解决。如:
<block class="Vendor\Module\Block\Something" cacheable="false"
name="something" template="Vendor_Module::something.phtml">
这个问题主要是页面缓存造成的,关闭页面缓存接口,在页面的layout中找到对应的xml配置文件,在block里加上cacheable=”false”即可解决。如:
<block class="Vendor\Module\Block\Something" cacheable="false"
name="something" template="Vendor_Module::something.phtml">