|
@@ -31,6 +31,47 @@
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
+ <script>
|
|
|
+ function statusChangeCallback(response) { // Called with the results from FB.getLoginStatus().
|
|
|
+ if (response.status === 'connected') { // 已登入
|
|
|
+ testAPI();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function checkLoginState() { // Called when a person is finished with the Login Button.
|
|
|
+ FB.getLoginStatus(function (response) { // See the onlogin handler
|
|
|
+ statusChangeCallback(response);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ window.fbAsyncInit = function () {
|
|
|
+ FB.init({
|
|
|
+ appId: '1388696554848391',
|
|
|
+ cookie: true, // Enable cookies to allow the server to access the session.
|
|
|
+ xfbml: true, // Parse social plugins on this webpage.
|
|
|
+ version: 'v11.0' // Use this Graph API version for this call.
|
|
|
+ });
|
|
|
+
|
|
|
+ FB.getLoginStatus(function (response) { // Called after the JS SDK has been initialized.
|
|
|
+ statusChangeCallback(response); // Returns the login status.
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ function testAPI() {
|
|
|
+ FB.api('/me/?fields=id,name,email', function (response) {
|
|
|
+ console.log('FB API回傳資料: ' + JSON.stringify(response));
|
|
|
+
|
|
|
+ if (response.id) {
|
|
|
+ // 設定欄位預設值
|
|
|
+ document.getElementById("email").value = response.email;
|
|
|
+ document.getElementById("name").value = response.name;
|
|
|
+
|
|
|
+ // 隱藏FB登入按鈕
|
|
|
+ document.getElementById("fb_login").style.display = 'none';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+ </script>
|
|
|
<div class="banner container-fluid" style="padding:0; margin:0 ">
|
|
|
<!-- <section id="banner"> -->
|
|
|
<div class="Navigation">
|
|
@@ -62,7 +103,7 @@
|
|
|
<div class="box">
|
|
|
<img src="./img/process/box3.png" alt="">
|
|
|
<div class="box-text">設計公司會</div>
|
|
|
- <div class="box-text"> 主動與屋主</div>
|
|
|
+ <div class="box-text"> 主動與屋主聯繫</div>
|
|
|
</div>
|
|
|
<div class="box">
|
|
|
<img src="./img/process/box4.png" alt="">
|
|
@@ -132,13 +173,13 @@
|
|
|
</div>
|
|
|
<section id="contact-us">
|
|
|
<div class="form-title">
|
|
|
- <h1>已經服務超過14392個生活</h1>
|
|
|
+ <h1>已經服務超過14392個家庭</h1>
|
|
|
<h1>打造夢想中的完美居家生活</h1>
|
|
|
<h1>即刻啟動!</h1>
|
|
|
</div>
|
|
|
<!-- <hr> -->
|
|
|
<div class="contact-text">
|
|
|
- <div class="text-p">請撥打全台付費專線<span style="opacity: 0;">11</span><span id="phone"
|
|
|
+ <div class="text-p">請撥打全台免付費專線<span style="opacity: 0;">11</span><span id="phone"
|
|
|
style="color: #ee751b; font-weight:900;"> 0800-336-086</span></div>
|
|
|
<div class="text-p">或填寫以下資料,專人將盡速與您聯繫</div>
|
|
|
</div>
|
|
@@ -199,7 +240,7 @@
|
|
|
</select>
|
|
|
<input name="size" type="text" id="square" placeholder="請輸入坪數" required>
|
|
|
<select name="bed_num" id="rooms" required style="margin-right:1.5vw">
|
|
|
- <option value="幾房" disabled selected="selected">幾房</option>
|
|
|
+ <option value="幾房" disabled selected="selected">2房</option>
|
|
|
<option class="option" value="1">1</option>
|
|
|
<option class="option" value="2">2</option>
|
|
|
<option class="option" value="3">3</option>
|
|
@@ -210,12 +251,12 @@
|
|
|
<option class="option" value="8">8</option>
|
|
|
</select>
|
|
|
<select name="liv_num" id="livingroom" required style="margin-right:1.5vw">
|
|
|
- <option value="幾廳" disabled selected="selected" style="margin-right:25px">幾廳</option>
|
|
|
+ <option value="幾廳" disabled selected="selected" style="margin-right:25px">2廳</option>
|
|
|
<option class="option" value="1">1</option>
|
|
|
<option class="option" value="2">2</option>
|
|
|
</select>
|
|
|
<select name="bath_num" id="bathroom" required>
|
|
|
- <option value="地區" disabled selected="selected">幾衛</option>
|
|
|
+ <option value="地區" disabled selected="selected">1衛</option>
|
|
|
<option class="option" value="1">1</option>
|
|
|
<option class="option" value="2">2</option>
|
|
|
<option class="option" value="3">3</option>
|
|
@@ -246,9 +287,10 @@
|
|
|
</div>
|
|
|
<hr>
|
|
|
<div id="form-right">
|
|
|
- <div id="facebook" onclick='callFB()'>
|
|
|
- <img src="./img/logo/facebook.webp" alt="">
|
|
|
- 使用FB填入信箱與姓名
|
|
|
+ <div id="fb_login">
|
|
|
+ <fb:login-button scope="public_profile,email" onlogin="checkLoginState();">使用FB填入信箱與姓名
|
|
|
+ </fb:login-button>
|
|
|
+ <div id="status"></div>
|
|
|
</div>
|
|
|
<input type="text" name="email" id="email" placeholder="請輸入信箱" required>
|
|
|
<input type="text" name="name" id="name" placeholder="請輸入姓名" required>
|
|
@@ -329,8 +371,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+<!-- Load the JS SDK asynchronously -->
|
|
|
+ <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script>
|
|
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
|
|
|
integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
|
|
|
crossorigin="anonymous"></script>
|