/** * @inheritDoc */ public function afterAction($action, $result) { /** * 注册页面js函数 */ if (!$this->request->getIsAjax()) { if ($this->module) { $currentModuleId = $this->module->getUniqueId(); $file = Yii::getAlias('@webroot/static') . '/scripts/pages/' . $currentModuleId . '.js'; if (file_exists($file)) { PageScriptAsset::registerJsFile($this->getView(), $currentModuleId); } } } return parent::afterAction($action, $result); }
<div class="col-md-3 col-sm-3 col-xs-6 text-stat"> <span class="label label-info"> Tax: </span> <h3>$134,90.10</h3> </div> <div class="col-md-3 col-sm-3 col-xs-6 text-stat"> <span class="label label-danger"> Shipment: </span> <h3>$1,134,90.10</h3> </div> <div class="col-md-3 col-sm-3 col-xs-6 text-stat"> <span class="label label-warning"> Orders: </span> <h3>235090</h3> </div> </div> </div> </div> </div> <!-- End: life time stats --> </div> </div> <?php \modules\components\assets\backend\PageScriptAsset::registerJsFile($this, 'index'); ?> <script type="text/javascript"> _callbacks.push(function() { EcommerceIndex.init(); }); </script>