mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 06:09:11 +08:00
29 lines
1.0 KiB
JavaScript
Executable File
29 lines
1.0 KiB
JavaScript
Executable File
(function(vc){
|
|
var vm = new Vue({
|
|
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); |