admin
2024-02-21 d1f88af76d8cb3b3751f53a1814081f2c5e997d1
kp_html/kp/js/code_list.js
@@ -42,10 +42,10 @@
         data_type: 0,
         trade_progress_index: -1,
         latest_real_order_index: -1,
         hidden_canceled: false,
         hidden_canceled: true,
         //隐藏撤单
         hidden_cancel:true,
         hidden_little_money:false,
         hidden_little_money:true,
         hidden_sell:true,
         l2_datas: [],
         l2_colors_class: ["color-single-start", "color-single-exec", "color-cancel",
@@ -82,7 +82,7 @@
            if(is_trade_time()){
               app.get_delegated_buy_code_infos();
            }
         },1000*5);
         },1000*3);
      },
      methods: {
         change_data_type: function(type) {
@@ -143,8 +143,14 @@
               alert("没有获取到代码")
               return;
            }
            var index = layer.load(1, {
              shade: [0.1,'#fff'] //0.1透明度的白色背景
            });
            http_util.get_l2_datas(app.code, function(res) {
               console.log("获取到数据:",res)
               layer.close(index);
               console.log("获取到L2数据:",res)
               res = JSON.parse(res);
               if (res.code == 0) {
                  var real_order_index = -1;
@@ -167,6 +173,7 @@
                  console.log("最近真实下单位置:", real_order_index);
                  app.latest_real_order_index = real_order_index;
                  app.l2_datas = res.data.data;
                  console.log("L2数据:",app.l2_datas);
                  var code_name = res.data.code_name;
                  var code_ = res.data.code;
                  app.l2_code_name = code_ + " " + code_name;
@@ -195,6 +202,9 @@
                     }
                  });
                  app.delegated_buy_code_infos = result.data
               }else{
                  console.log("已挂买单错误:",result.msg);
                  app.delegated_buy_code_infos=[];
               }
            });
         },
@@ -412,9 +422,13 @@
            app.origin_code = code;
            app.code_name = code;
         },
         load_data:function(){
         load_data:function(refresh_l2){
            if(app.origin_code){
               app.get_score_data(app.origin_code,null,null);
               app.get_score_data(app.origin_code,null,function(e){
                  if(refresh_l2){
                     app.refresh_l2_data();
                  }
               });
                app.get_l2_cant_buy_reasons(app.origin_code); 
            }
         },
@@ -423,6 +437,18 @@
               layer.msg("撤单成功");
            });
         },
         view_details:function(code){
            pyjs.add_code_to_ths(code);
            // 设置目标代码
            app.set_target_code(code);
            // 点击选择L2选项
            app.change_data_type(1);
            // 将目标票传递到首页
            pyjs.set_target_code(code);
            app.load_data(true);
         },
         get_l2_cant_buy_reasons:function(code){
            http_util.get_l2_cant_buy_reasons(code,function(res){
               res = JSON.parse(res);