From 7d3e24229565e0eee8402ab7595e23a411fdee67 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 20 Feb 2020 14:02:22 +0800 Subject: [PATCH] fix login $http --- src/main/ui/login.html | 21 +++++++++++++-------- src/main/ui/login_v1.html | 21 +++++++++++++-------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/main/ui/login.html b/src/main/ui/login.html index 70be7cfb9..0620a3554 100644 --- a/src/main/ui/login.html +++ b/src/main/ui/login.html @@ -353,14 +353,19 @@ function getGeekSsoLoginUrl() { var url = "http://mch.dev.geekforbest.com/#/sso_login?token="; - $http.get("/client/partner_info/incremental_service/RP跨境商城/login_token").then(function (res) { - url += res.data.token; - window.open(url, '_blank'); - location.href = '/index.html'; - }, function (resp) { - console.log(resp.data.message) - location.href = '/index.html'; - }); + $.ajax({ + url: '/client/partner_info/incremental_service/RP跨境商城/login_token', + method: 'get', + success: function (res) { + url += res.data.token; + window.open(url, '_blank'); + location.href = '/index.html'; + }, + error: function (resp) { + console.log(resp.data.message) + location.href = '/index.html'; + } + }) }; $('#forgetPassword-btn').click(function () { diff --git a/src/main/ui/login_v1.html b/src/main/ui/login_v1.html index 2ae787cac..4cb94828d 100644 --- a/src/main/ui/login_v1.html +++ b/src/main/ui/login_v1.html @@ -334,14 +334,19 @@ function getGeekSsoLoginUrl() { var url = "http://mch.dev.geekforbest.com/#/sso_login?token="; - $http.get("/client/partner_info/incremental_service/RP跨境商城/login_token").then(function (res) { - url += res.data.token; - window.open(url, '_blank'); - location.href = '/index.html'; - }, function (resp) { - console.log(resp.data.message) - location.href = '/index.html'; - }); + $.ajax({ + url: '/client/partner_info/incremental_service/RP跨境商城/login_token', + method: 'get', + success: function (res) { + url += res.data.token; + window.open(url, '_blank'); + location.href = '/index.html'; + }, + error: function (resp) { + console.log(resp.data.message) + location.href = '/index.html'; + } + }) }; $('#forgetPassword-btn').click(function () {