- var that = this;
- that.$http({ //调用接口
- method:'GET',
- url:ctxPath + "/login/doLogin" ,
- params:{
- userName : account.val().trim(),
- password : passwd.val().trim()
- }
- }).then(function(response){ //接口返回数据
- if(response.body == "success"){
- window.location.href = ctxPath + "/user/init";
- }else{
- login.errorMsg=response.body;
- }
- },function(error){
- })
Vue.js 请求后台数据
最新推荐文章于 2024-08-05 19:35:10 发布