Browse Source

kw basic search

ming 3 years ago
parent
commit
0096b31f49
1 changed files with 12 additions and 65 deletions
  1. 12 65
      similar_web/keywords.html

+ 12 - 65
similar_web/keywords.html

@@ -287,9 +287,7 @@
       </div>
     </div>
   </div>
-  <footer class="footer text-center p-4 bg-white">
-    <div class="text-muted"> © 2021 Copyright: Googo Website Traffic</div>
-  </footer>
+  
   <script
   src="https://code.jquery.com/jquery-3.6.0.min.js"
   integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
@@ -322,12 +320,11 @@ input.addEventListener("keyup", function(event) {
   }
 });
 $(document).ready(function () {
-$('#dtBasicExample').DataTable();
-$('.dataTables_length').addClass('bs-select');
-});
+//$('#dtBasicExample').DataTable();
+//$('.dataTables_length').addClass('bs-select');
+//});
+
 
-const myChart = echarts.init(document.getElementById('main'));
-let option;
 
 function check_form(){
   dataOBJ = {'keyword':$('#following_keys').val()}
@@ -340,13 +337,7 @@ function check_form(){
             type: 'post',
             data: objstr,
             success: function(suc_data) {
-                response = suc_data
-                sitename.textContent =response.SiteName;
-                descriptions.textContent=response.Description;
-                globalrank.textContent=response.GlobalRank;
-                sitetitle.textContent=response.Title;
-                countryrank.textContent=response.CountryRank;
-                category.textContent=response.Category;
+                alert('hi im here')
 
               },
             //data:JSON.stringify({n1:"12",n2:"22"}),
@@ -355,53 +346,7 @@ function check_form(){
               closeNav()
             }
         });
-    const qry = document.getElementById('search_query').value;
-    axios.get('http://www.googo.org:8080/domain/' + qry)
-    .then((response) => {
-      const sitename = document.getElementById('sitename');
-      const sitetitle = document.getElementById('sitetitle');
-      const descriptions = document.getElementById('descriptions');
-      const globalrank = document.getElementById('globalrank');
-      const countryrank = document.getElementById('countryrank');    
-      const category = document.getElementById('category');    
 
-      console.log(response.data); 
-      //    alert(response.data.SiteName);
-      //    var obj = JSON.parse(response.data);
-      //    alert(obj);
-      itename.textContent =response.data.SiteName;
-      descriptions.textContent=response.data.Description;
-      globalrank.textContent=response.data.GlobalRank.Rank;
-      sitetitle.textContent=response.data.Title;
-      countryrank.textContent=response.data.CountryRank.Rank;
-      category.textContent=response.data.Category;
-  
-      const key_ary=[];
-      const val_ary=[];
-      for (const [key, value] of Object.entries(response.data.EstimatedMonthlyVisits)) {
-        key_ary.push(key);
-        val_ary.push(value);
-      }
-      option = {
-          xAxis: {
-              type: 'category',
-              boundaryGap: false,
-              data: key_ary
-          },
-          yAxis: {
-              type: 'value'
-          },
-          series: [{
-              data: val_ary,
-              type: 'line',
-              areaStyle: {}
-          }]
-      };
-          myChart.setOption(option);
-      //    sitename.innerHTML =response.data
-      var bar = document.getElementById('bar');
-
-var barChart = echarts.init(bar);
 let traffics;
 
 traffics = {
@@ -446,16 +391,18 @@ traffics = {
     ]
 };
 
-  traffics && barChart.setOption(traffics);
+  traffics.setOption(traffics);
       console.log(response.status);
       console.log(response.statusText);
       console.log(response.headers);
       console.log(response.config);
-    });
+  
   }
 </script>
 
 </body>
 
-    
-</html>
+    <footer class="footer text-center p-4 bg-white">
+    <div class="text-muted"> © 2021 Copyright: Googo Website Traffic</div>
+  </footer>
+</html>