吴学文
2019-07-10 4ee6445f67bbb56caa2b2f981afce6e87cc602af
WebService/src/main/resources/components/test/vue_test.js
@@ -1,29 +1,29 @@
(function(){
(function(vc){
    var vm = new Vue({
        el:'#vueTest',
        data:{
            message:"你好学文",
            version:""
        },
        mounted:function(){
            this.getVersion();
        },
        methods:{
            getVersion:function(){
                var param = {
                    msg:this.message
                }
                //发送get请求
                this.$http.post('/callComponent/vue_test/getTestVersion',
                param,
                {
                    emulateJSON:true
                }).then(function(res){
                    this.version = res.bodyText;
                },function(){
                    console.log('请求失败处理');
                });
            }
        }
    });
})();
               el:'#vueTest',
               data:{
                   message:"你好学文",
                   version:""
               },
               mounted:function(){
                   this.getVersion();
               },
               methods:{
                   getVersion:function(){
                       var param = {
                           msg:this.message
                       }
                       //发送get请求
                       vc.http.get('vue_test',
                                       'getTestVersion',
                                       param,
                                       function(json){
                                           vm.version = json;
                                       },function(){
                                           console.log('请求失败处理');
                                       }
                                   );
                   }
               }
           });
})(window.vc);