Преглед изворни кода

Merge branch 'feature-landpage-update' into dev_1.1.7_lint

jihuaqiang пре 2 година
родитељ
комит
44f8a2a962
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      components/MobileLandPage.vue

+ 3 - 1
components/MobileLandPage.vue

@@ -194,6 +194,8 @@ export default {
 			location.href = `/course?useful=${this.useFul ? '1' : '0'}&playType=${this.playType}&rewardType=${this.rewardType}&postId=${this.postId}`;
 			location.href = `/course?useful=${this.useFul ? '1' : '0'}&playType=${this.playType}&rewardType=${this.rewardType}&postId=${this.postId}`;
 		},
 		},
 		async twitterAuth() {
 		async twitterAuth() {
+			let win = window.open();
+			win.opener = null;
 			postRequest(`/denet/user/twitterRequestToken`, {
 			postRequest(`/denet/user/twitterRequestToken`, {
 				params: {
 				params: {
 					oauthCallback: `${location.protocol}//${location.host}/authlogin`,
 					oauthCallback: `${location.protocol}//${location.host}/authlogin`,
@@ -201,7 +203,7 @@ export default {
 			}).then(({ code, data }) => {
 			}).then(({ code, data }) => {
 				if (code == 0) {
 				if (code == 0) {
 					let url = getOauthUrl(data.authToken);
 					let url = getOauthUrl(data.authToken);
-					let win = window.open(url);
+					win.location.href = url;
 					this.timer.value = setInterval(() => {
 					this.timer.value = setInterval(() => {
 						if (win && win.closed) {
 						if (win && win.closed) {
 							clearInterval(this.timer.value);
 							clearInterval(this.timer.value);