huaisianhuang 3 năm trước cách đây
mục cha
commit
d60c45a334

+ 2 - 10
step_question/apis/static/index-line.html

@@ -119,7 +119,7 @@
           <br>
           <p id="term-error"></p>
           <input type="button" name="previous" class="previous action-button" value="上一步" />
-          <input type="submit" name="submit" class="submit action-button" value="提交" />
+          <input type="submit" name="submit" class="submit action-button" value="提交"/>
       </fieldset>
     </form>
         
@@ -130,16 +130,8 @@
 
     </div>
 
-    <!-- <footer>
-
-      <div class="footer">
-        <div class="text-center">
-          <img class="img-fluid" src="images/banner-bottom.jpg" alt="幸福空間 - 裝修市場問卷調查">
-        </div>
-      </div>
-    </footer> -->
   </div>
-  
+
   <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
   <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'></script>
   <script src="./script.js"></script>

+ 9 - 2
step_question/apis/static/script.js

@@ -92,7 +92,7 @@ $("input[name=submit]").click(function(){
 		stop = 0;
 		$('#term-error').text('');
 	}
-
+	showThankyou();
 	if(stop == 0) {
 		/* $.ajax({
 			url: '/step_questions/submit',
@@ -111,7 +111,14 @@ $("input[name=submit]").click(function(){
 
 // 依據管道導頁
 function showThankyou() {
-	document.location = '/a1/index_complete_line.html';
+	axios.get('http://q.ptt.cx/coffee').then(res => {
+		if(res.data.coffee == 1) {
+			document.location = '/a1/index_complete_line.html';
+		} else {
+			document.location = '/a1/index_complete_line_after.html';
+		}
+	});
+	// document.location = '/a1/index_complete_line.html';
 }
 // 跳離頁面
 $('.btn-exit').click(function() {