yii样式文件的引入,静态文件的引入

<?php 
	use yii\helpers\Url;
	use yii\widgets\ActiveForm; 
	use backend\assets\AppAsset;
	$this->registerJsFile('/backend/web/log/js/jquery.js', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerJsFile('/backend/web/log/js/bootstrap.min.js', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerJsFile('/backend/web/log/js/swiper.min.js', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerJsFile('/backend/web/log/js/main.js', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerJsFile('/backend/web/log/js/wow.min.js', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerJsFile('/backend/web/log/js/mdui.min.js', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerJsFile('/backend/web/log/layer/layer.js', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	
	$this->registerCssFile('/backend/web/log/css/bootstrap.css', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerCssFile('/backend/web/log/css/main.css', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerCssFile('/backend/web/log/css/swiper.min.css', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerCssFile('/backend/web/log/css/font-awesome.min.css', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerCssFile('/backend/web/log/css/animate.min.css', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerCssFile('/backend/web/log/css/mdui.min.css', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	$this->registerCssFile('/backend/web/log/layer/mobile/need/layer.css', ['depends' => backend\assets\AppAsset::className(), "position"=> $this::POS_END]);
	
	
	AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<?php $this->registerCsrfMetaTags() ?>
		<title>999</title>
		<?php $this->head() ?>
		<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
		<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
		<!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
	</head>
	<body>
		<?php $this->beginBody() ?>
		<div class="log" style="background: url(/backend/web/log/img/login-bg.jpg);background-position: center;background-repeat: no-repeat;background-size: cover;">
			<div class="con_log">
				<div class="main">
					<div class="main_left">
						<div class="tit">登陆</div>
						<form action="">
							<div class="form-group">
							  <input type="text" class="form-control col-md-12" id="inputSuccess1" aria-describedby="helpBlock2" placeholder="用户名">
							</div>
							<div class="form-group">
							  <input type="password" class="form-control col-md-12" id="inputSuccess2" aria-describedby="helpBlock2" placeholder="密码">
							</div>
							<div class="form-group form_con">
							  <input type="text" class="form-control col-md-12" id="inputSuccess3" aria-describedby="helpBlock2" placeholder="验证码">
							  <div class="code">555</div>
							</div>
							<div class="form-group">
							  <input type="submit" class="btn btn-default btn-info" onclick="return fun()" value="登陆">
							</div>
						</form>
					</div>
					
				</div>
			</div>
		</div>
		
		<?php $this->beginBlock('script') ?>
			function fun(){
				$name=$('#inputSuccess1').val();
				$pass=$('#inputSuccess2').val();
				$code=$('#inputSuccess3').val();
				if($name==''){
					layer.msg('请填写用户名', {icon: 0});
					$('#inputSuccess1').focus();
					return false;
				}
				if($pass==''){
					layer.msg('请填写密码',{icon:0});
					$('#inputSuccess2').focus();
					return false;
				}
				if($code==''){
					layer.msg('请填写验证码',{icon:0});
					$('#inputSuccess3').focus();
					return false;
				}
			}
		<?php $this->endBlock() ?>
		<?php $this->registerJs($this->blocks['script'], \yii\web\View::POS_END); ?>
		<?php $this->endBody() ?>
	</body>
</html>
<?php $this->endPage() ?>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

原克技术

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值