Browse Source

统一微信登录

seimin 3 years ago
parent
commit
67ca319913
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/views/Login.vue

+ 2 - 4
src/views/Login.vue

@@ -46,7 +46,7 @@ export default {
46 46
     // 登陆
47 47
     login() {
48 48
       var that = this;
49
-      that.$http.post("service/auth/wechatlogin", {}).then(function(res) {
49
+      that.$http.post("service/auth/wechatAuth", {}).then(function(res) {
50 50
         if (res.data.url) {
51 51
           window.location.href = res.data.url;
52 52
         } else {
@@ -69,8 +69,6 @@ export default {
69 69
     getCode() {
70 70
       var that = this;
71 71
       var url = window.location.href.split("?");
72
-      // alert("window.location.href----:");
73
-      // alert(JSON.stringify(window.location.href));
74 72
       if (!url[1]) {
75 73
         that.login();
76 74
       } else {
@@ -80,7 +78,7 @@ export default {
80 78
         };
81 79
         // alert("2--传code参数:");
82 80
         // alert(JSON.stringify(code));
83
-        that.$http.post("service/auth/wechatlogin2", code).then(function(res) {
81
+        that.$http.post("service/auth/wechatLoginEncrypt", code).then(function(res) {
84 82
           if (res.data.state == 200) {
85 83
             // alert(3);
86 84
             // alert(JSON.stringify(res.data));