소스 검색

add alert

huaisianhuang 4 년 전
부모
커밋
e45d40774c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      step_question/apis/static/controller.html

+ 2 - 2
step_question/apis/static/controller.html

@@ -25,12 +25,12 @@
    function onshow() {
     axios.get('http://q.ptt.cx/coffee/set/1').then(res => {
         console.log(res.data);
+        window.alert('已開啟咖啡券顯示!咖啡券將顯示於頁尾');
     });
    }
-
-   onshow();
    function offshow() {
     axios.get('http://q.ptt.cx/coffee/set/0').then(res => {
+        window.alert('關閉咖啡券顯示!');
         console.log(res.data);
     });
    }