










<!DOCTYPE html>
<html lang="en" style="font-size:16px;">
<head>
<meta charset="utf-8">
<title>登录_网·市场</title>
<meta name="keywords" content="网市场云建站系统" />
<meta name="description" content="管雷鸣" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="管雷鸣">
<!-- wm/common/head -->
<!-- layer 、 layui -->
<link rel="stylesheet" href="//res.zvo.cn/module/layui/css/layui.css?v=2.25">
<script src="//res.zvo.cn/module/layui/layui.js?v=2.25"></script>
<script src="//res.zvo.cn/module/msg/msg.js?v=2.25"></script>
<script src="//res.zvo.cn/module/request/request.js?v=2.25"></script>
<!-- 商城及接口相关，要废弃 -->
<!-- <script src="//res.zvo.cn/shop/shop.js"></script>-->
<script>
//加载 layer 模块
layui.use('layer', function(){
	layer = layui.layer;
});
</script>

<script src="//res.zvo.cn/module/js/jquery-2.1.4.js"></script>

<!-- order by 列表的排序 -->
<script src="//res.zvo.cn/module/js/iw.js?v=2.25"></script>

<script src="//res.zvo.cn/module/wm/wm.js?v=2.25"></script>

<!-- vue -->
<script src="//res.zvo.cn/module/vue/vue-3.1.4.js"></script>
<style>

/*列表页头部form搜索框*/
.toubu_xnx3_search_form{
	padding-top:10px;
	padding-bottom: 10px;
}
/*列表页头部搜索，form里面的搜索按钮*/
.iw_list_search_submit{
	margin-left:22px;
}
/* 列表页，数据列表的table */
.iw_table{
	margin:0px;
}
/* 详情页，table列表详情展示，这里是描述，名字的td */
.iw_table_td_view_name{
	width:150px;
}

/* edit.jsp 编辑页面，输入框下面的灰色小字的说明 */
.layui-form-item .explain{
	font-size: 11px;
	color: gray;
	padding-top: 2px;
	text-align: left;
}
</style>
<script type="text/javascript">
/**
 * 获取网址的get参数。
 * @param name get参数名
 * @returns value
 */
function getUrlParams(name){
	console.log('getUrlParams 已废弃，请使用 wm.getUrlParams(name)');
	return wm.getUrlParams(name);
}

function formatTime(number,format) {
	console.log('formatTime 已废弃，请使用 wm.formatTime(number,format)');
	return wm.formatTime(number,format);
}

function post(api, data, func) {
	console.log('post 已废弃，请使用 wm.post(api, data, func); 或者重写本post方法');
	return wm.post(api, data, func);
}

//如果未登录，那么拦截，弹出提示，并跳转到登录页面
function checkLogin(data){
	if(data.result == '2'){
		//未登录
		msg.info('请先登录', function(){
			window.location.href="/wm/login/login.jsp";
		});
	}
}
</script>
</head>
<body>

<style>
.myForm{
	margin: 0 auto;
	width: 495px;
	height: 360px;
	border-width: 1px 1px 1px 1px;
	padding: 0px;
	border-radius: 20px;
	overflow: hidden;
	-webkit-box-shadow: 0 0 10px #e2e2e2;
	-moz-box-shadow: 0 0 10px #e2e2e2;
	box-shadow: 0 0 10px #e2e2e2;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -248px;
	margin-top: -181px;
}

@media screen and (max-width:600px){
	.myForm{
		margin: 0 auto;
		width: 100%;
		height: 100%;
		border-width: 0px;
		padding: 0px;
		border-radius: 0px;
		overflow: auto;
		-webkit-box-shadow: 0 0 0px #e2e2e2;
		-moz-box-shadow: 0 0 0px #e2e2e2;
		box-shadow: 0 0 0px #e2e2e2;
		position: static;
		left: 0px;
		top: 0px;
		margin-left: 0px;
		margin-top: 0px;
	}
}

.touming{
	background: rgba(0,190,150,0.1) none repeat scroll !important;
}
.baisetouming{
	background: rgba(250,250,250,0.1) none repeat scroll !important;
}
</style>

<!-- 背景 -->

<form class="layui-form layui-elem-quote layui-quote-nm myForm">
	<div class="layui-form-item touming" style="height: 70px;background-color: #eeeeee;line-height: 70px;text-align: center;font-size: 25px;color: #3F4056;">
		网·市场 平台登陆
	</div>
	<div style="padding: 30px 50px 40px 0px;">
		<div class="layui-form-item">
			<label class="layui-form-label">用户名</label>
			<div class="layui-input-block">
				<input type="text" name="username" required  lay-verify="required" value="" placeholder="请输入 用户名/邮箱" autocomplete="off" class="layui-input baisetouming">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"> 密 码&nbsp;&nbsp; </label>
			<div class="layui-input-block">
				<input type="password" name="password" required lay-verify="required" value="" placeholder="请输入密码" autocomplete="off" class="layui-input baisetouming">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"> 验证码 </label>
			<div class="layui-input-inline">
				<input type="text" name="code" required lay-verify="required" placeholder="请输入右侧验证码" autocomplete="off" class="layui-input baisetouming">
			</div>
			<div class="layui-form-mid layui-word-aux" style="padding-top: 3px;padding-bottom: 0px;"><img id="code" src="captcha.do" onclick="reloadCode();" style="height: 29px;width: 110px; cursor: pointer;" /></div>
		</div>
		<div class="layui-form-item" style="display:none">
			<label class="layui-form-label">记住密码</label>
			<div class="layui-input-block">
				<input type="checkbox" name="switch" lay-skin="switch">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="formDemo" style="opacity:0.6; margin-right: 50px;">立即登陆</button>
				<button type="reset" class="layui-btn layui-btn-primary baisetouming" style="width: 90px;">重置</button>
			</div>
		</div>
	</div>
</form>
 
<!--[if IE]>
	<div style="position: absolute;bottom: 0px;padding: 10px;text-align: center;width: 100%;background-color: yellow;">建议使用<a href="https://www.baidu.com/s?wd=Chrome" target="_black" style="text-decoration:underline">Chrome(谷歌)</a>、<a href="https://www.baidu.com/s?wd=Firefox" target="_black" style="text-decoration:underline">Firefox(火狐)</a>浏览器，IE浏览器会无法操作！！！</div>
<![endif]-->

<script>
//Demo
layui.use('form', function(){
	var form = layui.form;

	//监听提交
	form.on('submit(formDemo)', function(data){
		msg.loading("登陆中");
		var d=$("form").serialize();
		$.post("wangmarketLoginSubmit.do", d, function (result) {
			msg.close();
			var obj = JSON.parse(result);
			try{
				console.log(obj);
			}catch(e){}
			if(obj.result == '1'){
				localStorage.setItem('token',obj.token);
				msg.success("登陆成功", function(){
					window.location.href=obj.info;
				});
			}else if(obj.result == '0'){
				//登陆失败
				msg.failure(obj.info);
				reloadCode();
			}else if(obj.result == '11'){
				//网站已过期。弹出提示
				reloadCode();
				layer.open({
					title: '到期提示'
					,content: obj.info
				});	 
			}else{
				reloadCode();
				msg.failure(result);
			}
		}, "text");
		return false;
	});
});

//重新加载验证码
function reloadCode(){
var code=document.getElementById('code');
code.setAttribute('src','captcha.do?'+Math.random());
//这里必须加入随机数不然地址相同我发重新加载
}

/* 
//检测浏览器，若不是Chrome浏览器，弹出提示
if(navigator.userAgent.indexOf('Chrome') == -1){
	layer.open({
		type: 1
		,title:'提示'
		,offset: 'rb' //具体配置参考：offset参数项
		,content: '<div style="padding: 18px; line-height:30px;">建议使用<a href="https://www.baidu.com/s?wd=Chrome" target="_black" style="text-decoration:underline">Chrome(谷歌)</a>浏览器<br/>其他浏览器登录可能无法正常操作！</div>'
		,btn: ['下载Chrome','忽略']
		,btnAlign: 'c' //按钮居中
		,shade: 0 //不显示遮罩
		,yes: function(){
			layer.closeAll();
			window.open("https://www.baidu.com/s?wd=Chrome");
		}
		,btn2: function(){
			layer.closeAll();
		}
	});
} */

</script>


</body>
</html>