wuxw7
2019-03-25 6767be67503cfc829e84d189fc60013304e66216
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
(function(vc){
      vc.extends({
        data:{
            registerInfo:{
                username:'',
                passwd:'',
                repasswd:'',
                errorInfo:''
            }
        },
        _initMethod:function(){
 
        },
        _initEvent:function(){
             vc.component.$on('errorInfoEvent',function(_errorInfo){
                    vc.component.registerInfo.errorInfo = _errorInfo;
                    console.log('errorInfoEvent 事件被监听',_errorInfo)
                });
 
             vc.component.$on('validate_tel_change_event',function(params){
                         for(var tmpAttr in params){
                             vc.component.registerInfo[tmpAttr] = params[tmpAttr];
                         }
                         console.log('validate_tel_component_param_change_event 事件被监听',params)
                     });
        },
        methods:{
            doRegister(){
                vc.http.post(
                            'register',
                            'doRegister',
                            JSON.stringify(vc.component.registerInfo),
                            {
                                emulateJSON:true
                             },
                             function(json,res){
                                //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
                                if(res.status == 200){
                                    vc.jumpToPage("/flow/login");
                                    return ;
                                }
                                vc.component.registerInfo.errorInfo = json;
                             },
                             function(errInfo,error){
                                console.log('请求失败处理');
 
                                vc.component.registerInfo.errorInfo = errInfo;
                             });
 
            }
        }
    });
 
 
})(window.vc);