admin
2024-05-07 582b3f0e67e5bf2f5806b70600faaa89f44215a6
kp_html/kp/js/page.js
@@ -80,6 +80,12 @@
         app.get_kpl_market_feelings();
      }
   }, 3000, 3000);
   setInterval(function() {
      if (is_trade_time()||true) {
         app.get_cb_list();
      }
   }, 3000, 3000);
@@ -98,6 +104,9 @@
            trade_data: {
               order: 0
            },
            cb_list:[],// 可转债列表
            cb_list_top:[],
            cb_selected_code:'',
            // 代码的开盘啦涨停原因
            kpl_limit_up_reason: '',
            default_score_data: {
@@ -458,15 +467,14 @@
                        app.trade_data = res.data.trade_data
                     }
                     res.data.kpl_code_info.plate.forEach(function(e) {
                        var s = false;
                        var s = null;
                        if (app.first_info.limit_up_reason_statistic) {
                           for (var i = 0; i < app.first_info
                              .limit_up_reason_statistic
                              .length; i++) {
                              if (app.first_info
                                 .limit_up_reason_statistic[
                                    i][0] == e[1]) {
                                 s = true;
                              var limit_up_info = app.first_info.limit_up_reason_statistic[i];
                              if (limit_up_info[0] == e[1]) {
                                 s = limit_up_info;
                                 break;
                              }
                           }
@@ -679,7 +687,7 @@
                     console.log("板块请求结果:", res);
                     if (res.code == 0) {
                        res.data.plate.forEach(function(e) {
                           var s = false;
                           var s = null;
                           if (app.first_info.limit_up_reason_statistic) {
                              for (var i = 0; i < app.first_info
                                 .limit_up_reason_statistic
@@ -687,7 +695,7 @@
                                 if (app.first_info
                                    .limit_up_reason_statistic[
                                       i][0] == e[1]) {
                                    s = true;
                                    s = app.first_info.limit_up_reason_statistic[i];
                                    break;
                                 }
                              }
@@ -829,8 +837,59 @@
                  }
               });
            },
             add_or_remove_forbidden:function(event,code){
               var el = event.currentTarget;
               var checked = $(el).is(':checked');
               console.log(code, checked);
               if(checked){
                  http_util.do_action_for_code(code,'',0,function(res){
                  });
               }else{
                  http_util.do_action_for_code(code,'',1,function(res){
                  });
               }
            },
            get_cb_list:function(){
               http_util.get_cb_list(function(res){
                  res = JSON.parse(res);
                  if(res.code==0){
                     app.cb_list = res.data;
                     var arr= new Array();
                     arr = arr.concat(res.data);
                     app.cb_list_top = arr;
                     app.set_selected_cb_top();
                  }
               })
            },
            set_selected_cb_top:function(){
               var temp_list=app.cb_list;
               for(var i=0;i<temp_list.length;i++){
                  if(temp_list[i][0][0] == app.cb_selected_code){
                     var data = temp_list[i];
                     temp_list.splice(i, 1);
                     temp_list.unshift(data);
                     app.cb_list = temp_list;
                     break;
                  }
               }
            },
            select_cb:function(data){
               app.cb_selected_code = data[0][0];
               this.set_selected_cb_top();
            },
            add_to_ths:function(code){
               pyjs.add_code_to_ths(code);
            }
         }
          }
      });
   }
@@ -839,6 +898,7 @@
      app.get_jingxuan_data(app.jingxuan_data_type);
      app.get_limit_up_list(app.code, false);
      app.get_kpl_market_feelings();
      app.get_cb_list();
   }
   $(".market .child-title").click(function() {