Browse Source

[bugfix] test open

jihuaqiang 2 năm trước cách đây
mục cha
commit
8269dfbde4
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      components/MobileLandPage.vue

+ 3 - 1
components/MobileLandPage.vue

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