Browse Source

update api url

andy 3 months ago
parent
commit
2559bb1eae
1 changed files with 4 additions and 1 deletions
  1. 4 1
      js/demo/text-to-chart.js

+ 4 - 1
js/demo/text-to-chart.js

@@ -410,12 +410,15 @@ checkbox2.addEventListener('change', () => {
 });
 send_data_compare.addEventListener("click", function () {
 
+    // let compare_url=`https://cmm.ai:8080/get_data_from_date?start_date=${dataFirstValue}&end_date=${dataLastValue}&stock_name=${inputField_compare.value}`
+    let compare_url = `https://cmm.ai:8080/get_data_from_date?target=${inputField_compare.value}`
 
 
     console.log('比較', inputField_compare.value);
     const stockName = inputField_compare.value;
     axios
-        .get(`https://cmm.ai:8080/get_data_from_date?start_date=${dataFirstValue}&end_date=${dataLastValue}&stock_name=${inputField_compare.value}`)
+        // .get(compare_url)
+        .post(`https://cmm.ai:8080/get_comparision_data?target=${inputField_compare.value}`, dataArray)
         .then((response) => {
             console.log(response);
             var compare_data = response.data.data;