| | |
| | | }, 3000, 3000); |
| | | |
| | | setInterval(function() { |
| | | if (is_trade_time()||true) { |
| | | if (is_trade_time()) { |
| | | app.get_cb_list(); |
| | | } |
| | | }, 3000, 3000); |
| | |
| | | }); |
| | | app.get_last_trade_day_reasons(code); |
| | | }, 10); |
| | | |
| | | this.set_selected_cb_top(true); |
| | | //init_data(); |
| | | }, |
| | | show_want_codes: function(plate) { |
| | |
| | | var arr= new Array(); |
| | | arr = arr.concat(res.data); |
| | | app.cb_list_top = arr; |
| | | app.set_selected_cb_top(); |
| | | app.set_selected_cb_top(true); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | set_selected_cb_top:function(){ |
| | | set_selected_cb_top:function(update_top){ |
| | | 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){ |
| | |
| | | temp_list.splice(i, 1); |
| | | temp_list.unshift(data); |
| | | app.cb_list = temp_list; |
| | | |
| | | break; |
| | | } |
| | | } |
| | | if(update_top){ |
| | | // 先变黄 |
| | | // 置顶 |
| | | var temp_list=app.cb_list_top; |
| | | for(var i=0;i<temp_list.length;i++){ |
| | | if(temp_list[i][1][0] == app.code){ |
| | | var data = temp_list[i]; |
| | | temp_list.splice(i, 1); |
| | | temp_list.unshift(data); |
| | | app.cb_list_top = temp_list; |
| | | app.cb_selected_code = data[0][0]; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | select_cb:function(data){ |
| | | app.cb_selected_code = data[0][0]; |
| | | this.set_selected_cb_top(); |
| | | |
| | | |
| | | this.set_selected_cb_top(false); |
| | | }, |
| | | add_to_ths:function(code){ |
| | | pyjs.add_code_to_ths(code); |