cnf
9 天以前 975cb4cdd150c48f47d5d82138e1f9c9132c1483
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
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            formCustom: {
                phone: 'admin',
                passwd: 'gs666',
            },
            showPassword: false,
            showPhone: false,
        }
    },
    mounted() {
        var that = this;
        if (typeof (Cookies.get('phone')) == "undefined") { }
        else {
            var _fm = that.formCustom;
            _fm.phone = Cookies.get('phone');
            _fm.passwd = Cookies.get('passwd');
            that.formCustom = _fm;
        }
    },
    methods: {
        onSubmit(name) {
            var that = this;
            that._userLogin();
        },
        _userLogin() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'User/UserLogin', {
                accountNo: that.formCustom.phone,
                accountPwd: that.formCustom.passwd,
                accountLog: "主机名: 工控机"
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.rtnCode * 1 > 0) {
                        Cookies.set('loginGuid', json.rtnData.loginGuid);
                        var cjId = "100100";
                        window.location.href = ("/BaoGong/fjDefault.aspx?math=" + Math.random() + "&cjId=" + cjId);
                        //  window.location.href = ("/BaoGong/fjDefault.aspx?math=" + Math.random() + "&cjId=" + that.Request("cjId"));
                    }
                    else {
                        that.$toast.fail(json.rtnMsg);
                        that.isLoading = false;
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
        },
    }
})