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
<template>
  <div>
    <div id="container">
      <div id="output">
        <div class="containerT">
          <div class="Login-Title">找回密码</div>
          <form class="form"
                id="form1">
            <input type="text"
                   placeholder="用户名"
                   id="Account"
                   name="Account"
                   value=""
                   required>
            <div style="text-align:right;width:100%;padding:5px 0px;">
              <a href="/Login/SignUp">注册账号</a>&nbsp;&nbsp;&nbsp;
            </div>
            <button type="button"
                    class="btn btn-bubble"
                    onclick="SubmitForm()">下一步</button>
            <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: 'RecoverPassword2',
  data () { return {} },
  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);
    }
  },
  methods: {
    SubmitForm: function () {
 
      if (!_form("#form1").check()) {
        return false;
      }
 
      $.SubmitForm({
        url: '/api/SignIn',
        CORS: true,
        iframe: false,
        data: _form("#form1").serializeArray(),
        success: function (data) {
          if (data.code == 0) {
            _setCookie("__usertoken", data.model);
            _alert("登录成功", "ok", function () {
              window.location.href = "/";
            });
          } else {
            _alert(data.model, "error");
          }
        }
      });
 
      return false;
    }
  }
}
 
</script>