{
    template:'${tmpl}',
    data:function(){
        return {
            ldms:[],
        }
    },
    mounted:function(){
        this.ldms=[
            {
                "title":null,
                "colnum":1,
                 ctls:[
                   {"type":"input","label":"","prop":"userName","placeHolder":"请输入登录账号","style":"margin-top:5px",rules:[  { "required": true, "message": ' ', "trigger": 'blur' },,]},
                   {"type":"input","label":"","prop":"password","placeHolder":"请输入登录密码","style":"",rules:[ { "required": true, "message": ' ', "trigger": 'blur' },]},
                   {"type":"btn","label":"登录","prop":"btnLogin","placeHolder":"请输入手机号","style":"","face":"primary"},
                ]
              },
        ];
    },
    created:function(){

    },
    methods:{
        validmethod:function (rule,value,callback) { 
            console.log("code validdate");
            var self=this;
            var fm=this.currentFrm.getFormModel();
            return callback();
        },
        loginclick:function (fm,prop){
            var self=this;
            var fm=this.$refs.loginFrm.getFormModel();
            this.$refs.loginFrm.overBtnLoading(prop);
            this.$refs.loginFrm.validate(function(v){
                if(v){
                    console.log(v);
                    self.$root.postReq("/web/auth/userCtl/login",{u:fm}).then(function(d){
                        if(d.status==0){
                            console.log(d.data);
                            var tourl="";
                            if(d.data.jumpUrl.indexOf("?")>=0){
                                tourl=d.data.jumpUrl+"&"+"gtb=1";
                            }else{
                                tourl=d.data.jumpUrl+"?gtb=1";
                            }
                            location.href=tourl;
                        }else{
                            self.$alert(d.msg, '提示', {
                                confirmButtonText: '确定',
                                callback: action => {
                                }
                              });
                        }
                      });
                }
            });
         },
     
    },
    vname:"gsb-tlogin"
}
