From 2290855b2fd798e00b240ddbf777eaac949bcb12 Mon Sep 17 00:00:00 2001 From: Ting-Jun Wang Date: Sun, 17 Jan 2021 23:48:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=8F=AF=E5=9B=9E?= =?UTF-8?q?=E5=82=B3=E5=88=86=E4=BA=AB=E7=B6=B2=E5=9D=80=E7=9A=84=E6=8C=89?= =?UTF-8?q?=E9=88=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 5 ++++- js/index.vue | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index bd21f93..db49c92 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,7 @@ - + @@ -61,6 +61,9 @@
+
+
+
diff --git a/js/index.vue b/js/index.vue index d0d036a..2794653 100644 --- a/js/index.vue +++ b/js/index.vue @@ -68,7 +68,7 @@ var vm = new Vue({ if(response.status == "connected"){ this.token = response.authResponse.accessToken - FB.api('/me', function(response){vm.user = response.name}) + FB.api('/me', function(response){vm.user = response}) fetch('https://api.snsd0805.com/courseTable?token='+this.token) .then(function(response){ @@ -180,6 +180,13 @@ var vm = new Vue({ a.download = '課表.jpg'; a.click(); }); + }, + 'share': function(){ + url = "https://snsd0805.com/NCNU_Course/share.html?id=" + if(this.user!="") + alert("請複製以下網址給你的朋友,跟他分享你的課表\n\n"+url+this.user.id) + else + this.login() } }, components: {