<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title>采美365网--医疗美容生活美容正品采购平台</title>
    <template th:replace="components/head-link"></template>
    <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/document/login.css(v=${version})}" rel="stylesheet" type="text/css">
</head>
<body>
<!-- 二级页面 -->
<div id="loginPage">
    <header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml">
        <div class="header document">
            <div class="wrap clear">
                <img class="logo" src="/img/document/document_logo.png" alt="采美 生美/医美采购服务平台"/>
                <span>采美资料库</span>
            </div>
        </div>
        <input type="hidden" th:value="${spiServer}" id="spiServer">
        <input type="hidden" th:value="${agent}" id="userAgent">
    </header>
    <div class="login-contailer">
        <div class="loginWrap clear">
            <div class="login-image">
                <img v-if="isPC" src="/img/document/document_img.png" alt="">
                <img v-else src="/img/document/document-h5img.png" alt="">
            </div>
            <div class="loginForm">
                <div class="title">
                    <h1>欢迎登录</h1>
                </div>
                <form>
                    <div class="formLine">
                        <input class="massageBtn" type="text" v-model="loginAccount" placeholder="请输入手机号" :rule="rule.phone" maxlength="11" @blur="blurHandle($event)" needverify>
                        <i class="checked icon mIcon"></i>
                        <span class="errTips icon mIcon" tips="请输入正确的手机号"></span>
                    </div>
                    <div class="formLine code">
                        <input type="text" v-model="activateCode" autocomplete="off" placeholder="请输入短信验证码" :rule="rule.code"  maxlength="6" @blur="blurHandle($event)" needverify>
                        <a class="code-btn" href="javascript:void(0);" @click="getMobileImage" :class="[isMobileDisabled  ? 'disabled' : '']">{{ mobileCodeText }}</a>
                        <i class="checked icon mIcon"></i>
                        <span class="errTips icon mIcon" tips="请输入有效短信验证码" id="codeMsg"></span>
                    </div>
                    <div class="submit clear">
                        <button class="btn" type="button" @click="loginSubmit()">登录</button>
                    </div>
                </form>
            </div>
        </div>
        <div class="login-success" v-if="isLoginSuccess" :class="isLoginSuccess ? 'active' : ''">
            <div class="inner">
                <div class="success-main" v-if="isSuccess">
                    <img class="pc-icon" v-if="isPC" src="/img/document/icon-success.png" alt="">
                    <img class="h5-icon" v-else src="/img/document/icon-h5success.png" alt="">
                    <h1 class="text-success">登录成功</h1>
                    <p><span>{{ maxtime }}</span>秒后自动 <span class="navLinkFn">跳转</span></p>
                </div>
                <div class="success-main" v-if="isError">
                    <img class="pc-icon" v-if="isPC" src="/img/document/icon-error.png" alt="">
                    <img class="h5-icon" v-else src="/img/document/icon-h5error.png" alt="">
                    <h1 class="text-error">登录失败!</h1>
                    <p>您可能没有查看资料的权限</p>
                   <a href="javascript:void(0);"class="btn" @click="goBackLogin">返回登录</a>
                </div>
            </div>
        </div>
    </div>
    <div class="content-model"  :class="isCodeModel ? 'active' : ''">
        <div class="model-main">
            <div class="model-title"><p>获取短信验证码</p><i class="icon mIcon icon-close"  @click="closeCodeModel"></i></div>
            <div class="model-content">
                <div class="model-form">
                    <input class="input" type="text" placeholder="请输入图形验证码" v-model="imageCode" maxlength="4">
                    <div class="image"><img :src="codeImagePath" alt=""></div>
                    <div class="refresh" @click="refreshCodeImage">
                        <i class="icon mIcon"></i>
                        <span>刷新</span>
                    </div>
                </div>
                <div class="model-button">
                    <div class="button"  @click="getMobileCodeFn">获取短信验证码</div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 引入底部 -->
<template th:replace="components/document-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/document/login.js(v=${version})}"></script>
</body>
</html>
