From 70273b49a7530df98923536c7c593c42ff160d7f Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期六, 23 三月 2019 13:44:16 +0800
Subject: [PATCH] 解决菜单不起作用问题

---
 WebService/src/main/resources/components/validate_code/validate-code.js |   48 ++++++++++++++++++++++++++++--------------------
 1 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/WebService/src/main/resources/components/validate_code/validate-code.js b/WebService/src/main/resources/components/validate_code/validate-code.js
index 05f3e51..2547009 100644
--- a/WebService/src/main/resources/components/validate_code/validate-code.js
+++ b/WebService/src/main/resources/components/validate_code/validate-code.js
@@ -1,37 +1,45 @@
 (function(vc){
-    var vm = new Vue({
-        el:'#validatecode',
-            data:function(){
-                return {
-                   validateCode:'123',
-                   codeImage:'/callComponent/validate-code/generateValidateCode',
-                   errorInfo:''
+    vc.extends({
+            data:{
+               validateCode:'',
+               codeImage:'',
+            },
+            _initMethod:function(){
+                console.log("validate-code _initMethod 鏂规硶璋冪敤");
+                 vc.component.generateCode();
+
+            },
+            _initEvent:function(){
+
+            },
+            watch: {
+                validateCode:function(){
+                    var validateParam = {
+                        validateCode:vc.component.validateCode
+                    };
+                    vc.component.$emit('login_param_change_event',validateParam);
                 }
             },
-            mounted:function(){
-                       this.generateCode();
-                   },
-
             methods:{
                 generateCode(){
                     var param = {
-                        _uId:'123'
-                    }
-                    vc.http.call('validate-code','generateValidateCode',param,
-                                {
-                                    emulateJSON:true
-                                 },
+                        params:{
+                            _uId:'123'
+                        }
+                    };
+                    console.log("validate-code generateCode",param);
+                    vc.http.get('validate-code','generateValidateCode',
+                                 param,
                                  function(json,res){
                                     //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
                                     if(res.status == 200){
-                                        vm.codeImage = json;
+                                        vc.component.codeImage = json;
                                         return ;
                                     }
                                     vc.component.$emit('errorInfoEvent',json);
                                  },function(errInfo,error){
                                     console.log('璇锋眰澶辫触澶勭悊');
-
-                                    vm.errorInfo = errInfo;
+                                    vc.component.errorInfo = errInfo;
                                  });
 
                 }

--
Gitblit v1.8.0