Moli0
2022-02-15 3d13fff2afc69131bbca9ea98deaa3907bf454f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<template>
  <div>
    <div id="container">
      <div id="output">
        <div class="containerT"
             style="top:180px;">
          <div class="Login-Title">梦想书屋欢迎您加入</div>
          <form class="form"
                id="form1">
            <input id="Account"
                   name="Account"
                   type="text"
                   maxlength="24"
                   placeholder="用户名"
                   required>
            <input id="E_Mail"
                   name="E_Mail"
                   type="email"
                   maxlength="120"
                   placeholder="邮箱"
                   required>
            <input id="Real_Name"
                   name="Real_Name"
                   type="text"
                   maxlength="32"
                   placeholder="姓名"
                   required>
            <input id="Id_Number"
                   name="Id_Number"
                   type="text"
                   maxlength="20"
                   placeholder="身份证号码"
                   required>
            <input id="Phone_Number"
                   name="Phone_Number"
                   type="tel"
                   maxlength="12"
                   placeholder="手机号码"
                   required>
            <input id="Password"
                   name="Password"
                   type="password"
                   maxlength="64"
                   placeholder="密码"
                   required>
            <input id="VerifyPassword"
                   name="VerifyPassword"
                   type="password"
                   maxlength="64"
                   placeholder="确认密码"
                   required>
            <div style="text-align:right;width:100%;"><a href="/Login/SignIn">返回登陆</a></div>
            <div id="submitBtn"
                 class="btn btn-bubble">注册</div>
            <div id="prompt"
                 class="prompt"></div>
          </form>
        </div>
      </div>
    </div>
    <div style="text-align:center;">
    </div>
  </div>
 
</template>
<style>
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 1em 2em;
}
 
.btn-bubble {
  color: white;
  background-color: #77b11c;
  background-repeat: no-repeat;
}
</style>
<script>
import '../../../static/Frame/Login/css/style.css'
import '../../../static/Content/Css/btnCss.css'
 
export default {
  name: 'SignIn',
  mounted () {
    const oScript = document.createElement('script');
    oScript.type = 'text/javascript';
    oScript.src = '/static/Frame/Login/js/vector.js';
    document.body.appendChild(oScript);
    var sl = ShowLoad('正在加载');
    setTimeout(() => {
      layer.close(sl);
      Victor("container", "output");   //登录背景函数
    }, (200));
    $("#entry_name").focus();
    $(document).keydown(function (event) {
      if (event.keyCode == 13) {
        $("#entry_btn").click();
      }
    });
    var Account = $.request("Account");
    if (!!Account) {
      $("#Account").val(Account);
    }
 
    $("#submitBtn").click(function () {
      if (!_form("#form1").check()) {
        return false;
      }
      if ($("#Password").val().length < 6) {
        _alert("密码长度不得小于6位", "warning");
        return false;
      }
      if ($("#Password").val() != $("#VerifyPassword").val()) {
        _alert("再次密码不一致!", "error");
        return false;
      }
      $.SubmitForm({
        url: '/api/SignUp',
        CORS: true,
        iframe: false,
        data: _form("#form1").serializeArray(),
        success: function (res) {
          _alert(res.model, "ok", function () { window.location.href = "/Login/SignIn?Account=" + $("#Account").val(); });
        }
      });
    });
  },
  data () { return {} },
}
</script>