request->getReferrer());//上一页的URL $hostInfo = parse_url(Yii::$app->request->hostInfo); //当前URL if (!empty($refArr['host']) && $refArr['host'] == $hostInfo['host']) { return 'javascript:history.back(-1)'; } if ($modules != '') { return '/' . $modules; } return '/'; // } }