{"version":3,"names":[],"mappings":"","sources":["js/index.js"],"sourcesContent":["require=function o(i,a,r){function s(n,t){if(!a[n]){if(!i[n]){var e=\"function\"==typeof require&&require;if(!t&&e)return e(n,!0);if(l)return l(n,!0);t=new Error(\"Cannot find module '\"+n+\"'\");throw t.code=\"MODULE_NOT_FOUND\",t}e=a[n]={exports:{}};i[n][0].call(e.exports,function(t){var e=i[n][1][t];return s(e||t)},e,e.exports,o,i,a,r)}return a[n].exports}for(var l=\"function\"==typeof require&&require,t=0;t .jinzhu-dl-detail\").css({display:\"block\"})}),$(\".jinzhu-dl-1\").mouseleave(function(){$(\".jinzhu-dl-1 > .jinzhu-dl-detail\").css({display:\"none\"})}),$(\".jinzhu-dl-2\").mouseenter(function(){$(\".jinzhu-dl-2 > .jinzhu-dl-detail\").css({display:\"block\"})}),$(\".jinzhu-dl-2\").mouseleave(function(){$(\".jinzhu-dl-2 > .jinzhu-dl-detail\").css({display:\"none\"})}),$(\".jinzhu-dl-3\").mouseenter(function(){$(\".jinzhu-dl-3 > .jinzhu-dl-detail\").css({display:\"block\"})}),$(\".jinzhu-dl-3\").mouseleave(function(){$(\".jinzhu-dl-3 > .jinzhu-dl-detail\").css({display:\"none\"})}),$(\".jinzhu-dl-4\").mouseenter(function(){$(\".jinzhu-dl-4 > .jinzhu-dl-detail\").css({display:\"block\"})}),$(\".jinzhu-dl-4\").mouseleave(function(){$(\".jinzhu-dl-4 > .jinzhu-dl-detail\").css({display:\"none\"})})},C.prototype.initEllipsis=function(){$(\".dotdotdot\").dotdotdot({truncate:\"letter\",wrap:\"letter\",height:\"watch\",watch:!0}).data(\"dotdotdot\")},C.prototype.traceIndexHref=function(){function e(t,e){e=e||$(t).text().trim(),t=$(t).children(\"a\").attr(\"href\"),e&&t&&b.DefinedSa(\"e\",function(){},1e4,{name:\"首页-\"+e})}$(\".component-hq_nav\").find(\"a\").on(\"click\",function(t){e(this),t.stopPropagation()}),$(\".zong_list_li\").on(\"click\",function(t){e(this),t.stopPropagation()}),$(\".components-footer\").find(\".item2,.item3\").find(\"a\").on(\"click\",function(t){e(this),t.stopPropagation()}),this.traceHref()},new C},{\"../../components/adv/ad\":30,\"../../components/back_top/index\":34,\"../../components/base/polyfill\":35,\"../../components/base/utils\":36,\"../../components/frame/frame\":41,\"../../components/fullscreen_img_ad\":42,\"../../components/gd/gd\":43,\"../../components/header/v2/index\":49,\"../../components/index/apd_bank_discount/apd_bank_discount\":50,\"../../components/index/business/business\":51,\"../../components/index/news_field_original/news_field_original\":55,\"../../components/index/news_live/news_live\":56,\"../../components/index/smm_experts/smm_experts\":57,\"../../components/index/spot/spot\":58,\"../../components/index/spot_index/spot_index\":59,\"../../components/index/voltage_calculation/voltage_calculation\":60,\"../../components/kb/kb\":68,\"../../components/list_data/list_data\":70,\"../../components/youse_app_download/index\":113,\"@smm/sa/dist/sa/sa\":24}],70:[function(t,e,n){function o(t){this.container=t,this.hover(),this.tag()}o.prototype.hover=function(){var t=this;this.container.find(\"li\").hover(function(){t.container.find(\"li\").removeClass(\"active\"),$(this).addClass(\"active\")})},o.prototype.tag=function(){var o=this,i=[\"#03a3ff\",\"#ff0000\",\"#ff0394\"];this.container.find(\"li\").each(function(t,e){var e=$(e).find(\"div\"),n=e.attr(\"tags\").split(\",\");\"\"!=n[0]&&(n=''+n[0]+\"\",e.find(\".title\").append(n))})},o.prototype.getColors=function(t){return t[Math.floor(Math.random()*t.length)]},n.ListData=o},{}],68:[function(t,e,n){var o=t(\"./chart/chart\"),i=t(\"./chart/compare_chart\"),a=t(\"../../public/time\"),r=t(\"./header/style\"),s=t(\"./constract\");function l(){var e=this;this.dom={board_container:\".kb_container .board_container\",board_list:\".kb_container .board_list\",board:\".kb_container .board_item\",chart:\".kb_container .chart\",kb_container:\".kb_container \",tab_list:\".kb_board_tab_list\",time:\".kb_data_time\",time_wrap:\".kb_data_time_wrap\",board_chart:\"#kb-board-chart\",board_chart_compare:\"#kb-board-chart-compare\"},this.setTime=function(t){(t=void 0===t?!0:t)?($(e.dom.time_wrap).show(),$(e.dom.time).html(a.formatTime(new Date,\"yyyy-MM-dd hh:mm:ss\"))):$(e.dom.time_wrap).hide()},this.bind(),this.init()}l.prototype.bind=function(){var n=this,o=$(this.dom.board_container).outerWidth();$(this.dom.tab_list).on(\"change\",function(t){var e=String($(this).val());\"board_price_compare\"!==e?($(n.dom.board_list).css(\"left\",-0*o+\"px\"),\"board_arbi\"==e?n._board.init(new s.Arbi,n.setTime):\"board_basis\"==e?n._board.init(new s.Basis,n.setTime):n._board.init(new s.Future,n.setTime)):($(n.dom.board_list).css(\"left\",-1*o+\"px\"),n._board_compare.init(),n.setTime(!1))})},l.prototype.init=function(){this._board=new h($(this.dom.board_chart)),this._board_compare=new p($(this.dom.board_chart_compare)),this._board.init(new s.Future,this.setTime)},n.KB=l;d.prototype.init=function(t,e){this._select=new r[\"default\"](this._container,function(t){e(t)}),this._select.addData(t),this._select.select()};var c=d;function d(t){this._container=t}u.prototype.init=function(t,e){var n=this;this._constract=t,this._constract.getList(function(t){n._select.init(t,function(t){n._changeConstract(t),e&&e()})})};var h=u;function u(t){var e=this;this._container=t,this._changeConstract=function(t){e._chart.setLoading(!0),e._constract.getTimeLine(t,e._chart,function(){e._chart.setLoading(!1)}),e._chart.onClick(function(){return window.open(e._constract.gotoTarget(t))})},this._select=new c(t),this._chart=new o.ConstractChart(t)}_.prototype.init=function(t){this._chart.init(),t&&t()};var p=_;function _(t){this._container=t,this._chart=new i.CompareChart(t)}},{\"../../public/time\":188,\"./chart/chart\":61,\"./chart/compare_chart\":63,\"./constract\":64,\"./header/style\":66}],188:[function(t,e,n){n.formatTime=function(t,e){if(!t)return\"\";var n,o={\"M+\":(t=new Date(t)).getMonth()+1,\"d+\":t.getDate(),\"h+\":t.getHours(),\"m+\":t.getMinutes(),\"s+\":t.getSeconds(),\"q+\":Math.floor((t.getMonth()+3)/3),\"w+\":\"星期\"+[\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"][t.getDay()],S:t.getMilliseconds()};for(n in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+\"\").substr(4-RegExp.$1.length))),o)new RegExp(\"(\"+n+\")\").test(e)&&(e=\"w+\"===n?e.replace(RegExp.$1,o[n]):e.replace(RegExp.$1,1==RegExp.$1.length?o[n]:(\"00\"+o[n]).substr((\"\"+o[n]).length)));return e}},{}],66:[function(t,e,n){var o,i=this&&this.__extends||(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}),function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=(r.prototype._addDom=function(t,e){this._selector.append('\")},r.prototype.bind=function(){var t=this;this._selector.change(function(){return t.select()})},r.prototype.link=function(t){this._link_selection=t},r.prototype.select=function(){var t=this._selector.find(\"option:selected\").val();this._selectCallback(t),this._link_selection&&(this._data[t]&&this._data[t].next&&this._link_selection.addData(this._data[t].next),this._link_selection.select())},r.prototype.getVal=function(){return this._selector.find(\"option:selected\").val()},r);function r(t,e){var n=this;this._selector=t,this._selectCallback=e,this._data={},this._link_selection=null,this.addData=function(t){n._selector.html(\"\"),0!=t.length&&t.map(function(t){n._data[t.key]=t});for(var e=0;e=e.year&&t.month>=e.month&&t.day>=e.day)}}i(p,h=t),p.prototype._parse=function(t,e){var n=[];0===t.code&&t.data.forEach(function(t){n.push({key:t.Typename,value:t.InstrumentID,next:null})}),e(n)},p.prototype._parseCurrent=function(t,e){0===t.code&&e(t.data)},p.prototype.getList=function(e){var n=this;c.Get(quoteCenter+\"/mainmental/currentinfo\",function(t){return n._parse(t,e)})},p.prototype.getOptions=function(t){t=t.data;return this._chartOpt=new l.LineOptions(\"line\",c.Merge(c.Copy(l.defaultLineConfig),{hasVolume:!1,leftMargin:10})),this._chartOpt.setYestodayClose(t.pre_settlement_price),this._chartOpt.XAxis.resetScales(t.scales),this._chartOpt.XAxis.resetTimes(this._parseTime(t.trading_time)),this._chartOpt.init(this._parseData(t.data,t.trade_unit)),this._chartOpt.genOption()},p.prototype.getCurrent=function(t,e){var n=this;null!=t&&c.Get(\"/ajax/constract/table?id=\"+t+\"&type=future\",function(t){n._parseCurrent(t,e)})},p.prototype.gotoTarget=function(t){return\"https://hq.smm.cn/data/futures\"};var h,u=p;function p(){return null!==h&&h.apply(this,arguments)||this}n.Future=u;i(m,_=t),m.prototype._parse=function(t,e){var i=[];0===t.code&&t.data.forEach(function(t){var e,n=t.metal,o=t.name;0e.yestclose?e.upColor:e.downColor}},axisLine:{show:!1},z:4,splitLine:{show:!1,lineStyle:{color:\"#efefef\",type:\"dashed\"}},axisTick:{show:!1}},{scale:!0,gridIndex:1,splitNumber:3,position:\"right\",z:4,axisLabel:{show:!1,color:function(t){return t==e.yestclose?\"#aaa\":t>e.yestclose?e.upColor:e.downColor},inside:!1,fontSize:12,formatter:function(t){t=e.ratioCalculate(t,e.yestclose);return e.yestclose?Number(t).toFixed(2)+\"%\":\"--\"}},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1,lineStyle:{color:\"#efefef\",type:\"dashed\"}},axisPointer:{show:!0,label:{formatter:function(t){return e.yestclose?e.ratioCalculate(t.value,e.yestclose)+\"%\":\"--\"}}}}],t)};var f=g;function g(t,e,n,o,i){void 0===i&&(i=\"#999\"),this.yestclose=t,this.hasVolume=e,this.upColor=n,this.downColor=o,this.volumeBarColor=i}v=c.Dispatch,a(w,v),w.prototype.setPrices=function(t){this._prices=t},w.prototype.setAverage=function(t){this._average=t},w.prototype.setVolume=function(t){this._volume=t},w.prototype.genPriceLine=function(t){return{name:\"当前价\",type:\"line\",data:t,z:6,smooth:!0,symbol:\"none\",lineStyle:{normal:{opacity:.8,color:\"#999\",width:1}},areaStyle:{normal:{color:{type:\"linear\",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:\"rgba(204,204,204, 1)\"},{offset:1,color:\"rgba(204,204,204, 0.02)\"}],globalCoord:!1},opacity:this.useAreaLine,origin:\"start\",shadowColor:\"rgba(0, 0, 0, 0.1)\",shadowBlur:10}}}},w.prototype.genSecondYAxis=function(t){return{type:\"line\",data:t,smooth:!0,symbol:\"none\",gridIndex:1,xAxisIndex:1,yAxisIndex:1,lineStyle:{normal:{width:0}}}},w.prototype.genAveragePrice=function(t){return{name:\"均价\",type:\"line\",data:t,smooth:!0,symbol:\"none\",z:6,lineStyle:{normal:{opacity:.8,color:\"#FF9933\",width:1}}}},w.prototype.genVolume=function(t,e){var n=this;return{name:\"Volumn\",type:\"bar\",gridIndex:2,xAxisIndex:2,yAxisIndex:2,z:6,data:t,barWidth:\"60%\",itemStyle:{normal:{color:function(t){t=e[t.dataIndex]>e[t.dataIndex-1]?n.upColor:n.downColor;return t}}}}},w.prototype.genOption=function(){var t=[this.genPriceLine(this._prices),this.genSecondYAxis(this._prices)];return this.hasAverage&&t.push(this.genAveragePrice(this._average)),this.hasVolume&&t.push(this.genVolume(this._volume,this._prices)),t};var v,y=w;function w(t,e,n,o,i){void 0===i&&(i=!0);var a=v.call(this)||this;return a.upColor=t,a.downColor=e,a.hasAverage=n,a.hasVolume=o,a.useAreaLine=i,a._prices=[],a._average=[],a._volume=[],a}x.prototype.setYesToday=function(t){this.yestclose=t},x.prototype.setBackColor=function(t){this.backColor=t},x.prototype.setPrices=function(t){this._prices=t},x.prototype.setAverage=function(t){this._average=t},x.prototype.setVolume=function(t){this._volume=t},x.prototype.ratioCalculate=function(t,e){return((t-e)/Math.abs(e)*100).toFixed(2)},x.prototype.genOption=function(){var a=this;return{tooltip:{trigger:\"axis\",link:{xAxisIndex:\"all\"},axisPointer:{type:\"cross\"},padding:[5,15,5,5],formatter:function(t,e,n){var o,i,t=t[0].dataIndex;return a._prices[t]?(i='
当前价 a.yestclose?'style=\"color:#ff4242\"':'style=\"color:#26bf66\"')+\" >\"+a._prices[t]+\"
\",a.hasAverage&&(i+=\"
均价    \"+a._average[t]+\"
\"),i+=\"
涨幅    \"+(a.yestclose?a.ratioCalculate(a._prices[t]||0,a.yestclose)+\"%\":\"--\")+\"
\",a.hasVolume&&(i+=\"
成交量 \"+a._volume[t]||\" -
\"),i+\"
\"):\"\"}},axisPointer:{show:!0},color:[a.m5Color,a.m10Color],grid:a.hasVolume?[{id:\"gd1\",left:\"14\",right:\"14\",containLabel:!0,height:\"65.5%\",bottom:\"0\"},{id:\"gd2\",left:\"14\",right:\"14\",containLabel:!0,height:\"65.5%\",bottom:\"0\"},{id:\"gd3\",left:\"14\",right:\"14\",containLabel:!0,bottom:\"0\",height:\"13%\"}]:[{id:\"gd1\",left:\"14\",right:\"14\",containLabel:!0,height:\"80%\",bottom:\"0\"},{id:\"gd2\",left:\"14\",right:\"14\",containLabel:!0,height:\"80%\",bottom:\"0\"}],backgroundColor:a.backColor}};var b=x;function x(t,e,n,o,i,a,r){void 0===o&&(o=!0),void 0===i&&(i=!0),void 0===a&&(a=\"#fff\"),void 0===r&&(r=0),this.yestclose=t,this.m5Color=e,this.m10Color=n,this.hasVolume=o,this.hasAverage=i,this.backColor=a,this.leftMargin=r,this._prices=[],this._average=[],this._volume=[]}},{\"../entity\":65,\"../helper\":67,\"../theme\":69}],69:[function(t,e,n){(n=n.ChartTheme||(n.ChartTheme={})).White=\"white\",n.Black=\"black\"},{}],67:[function(t,e,n){var o,h;function a(t,e){var n,o=t.split(\":\")[0],t=Number(t.split(\":\")[1]),i=parseInt(String((t+e)/60)),a=parseInt(String((Number(o)+i)/24));return t=0\",t.forEach(function(t){e+=t.marker+\" \"+t.seriesName+\": \"+t.value+\"
\"}),e)}},symbol:\"none\"},this.normalForm={annual_used:0,use_agent:0},this.unitForm={annual_used:0,annual_profit:0,annual_output:0},this.dom={voltage_chart:$(\"#voltage-chart\"),wdnmd_table:$(\"#wdnmd_table\"),smm_date_picker:$(\"#smm_date_picker\"),smm_date_input:$(\"#smm_date_input\"),smm_date_input_and_picker:$(\"#smm_date_input,#smm_date_picker\"),calc_result:$(\"#calc_voltage_result\"),table_data:$(a.container_selector+\" .table_data\"),tp_calc:$(a.container_selector+\" .tp_calc\"),tp_calc_href:$(a.container_selector+\" .tp_calc_href\"),tp_calc_reset:$(a.container_selector+\" .tp_calc_btn_reset\"),bank_level:$(a.container_selector+\" .bank_level\"),face_amount:$(a.container_selector+\" .face_amount\"),due_date:$(a.container_selector+\" .due_date\"),bill_rate:$(a.modal_selector+\" .bill_rate\"),interest:$(a.modal_selector+\" .interest\"),real_money:$(a.modal_selector+\" .real_money\"),site_url_user:$(a.container_selector+\" .site_url_user\"),site_url_apd_more:$(a.container_selector+\" .site_url_apd_more\")},this.value_dom={begin_date:$(a.container_selector+\" .begin_date\"),user_id:$(a.container_selector+\" .user_id\"),cellphone:$(a.container_selector+\" .cellphone\"),user_name:$(a.container_selector+\" .user_name\"),contact_company:$(a.container_selector+\" .contact_company\")},this.createSeriesOne=function(t,e){return{name:t,data:e,type:\"line\",smooth:!0,itemStyle:{color:\"#4E5A97\"},symbol:\"none\",areaStyle:{color:new echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:\"rgba(78, 90, 151, 0.3)\"},{offset:1,color:\"rgba(78, 90, 151, 0)\"}])},shadowColor:\"rgba(0, 0, 0, 0.1)\",shadowBlur:10}},this.createSeriesTwo=function(t,e){return{name:t,data:e,type:\"line\",smooth:!0,itemStyle:{color:\"#46B4CA\"},symbol:\"none\",areaStyle:{color:new echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:\"rgba(70, 180, 202, 0.3)\"},{offset:1,color:\"rgba(70, 180, 202, 0)\"}])},shadowColor:\"rgba(0, 0, 0, 0.1)\",shadowBlur:10}},this.getCalcResult=function(t){var e=u,n=(n=\"SMM_auth_token\",n=new RegExp(\"(^| )\"+n+\"=([^;]*)(;|$)\"),(n=document.cookie.match(n))?unescape(n[2]):null);$.ajax(aggdatacenter+\"/user/v1/zw_data/calculate_cost\",{data:p({SMM_auth_token:n,province_num:e.selectedValue},t),method:\"POST\",success:function(t){\"0\"==t.code?(u.dom.calc_result.find(\".modal-dialog\").addClass(\"modal-dialog-centered\"),u.dom.calc_result.modal(\"show\"),1===e.selectedValue?($(\".calc-guide-wrap\").show(),$(\"#qrcode-ah\").hide(),$(\"#qrcode-hb\").show()):(2===e.selectedValue?($(\".calc-guide-wrap\").show(),$(\"#qrcode-ah\").show(),$(\"#qrcode-hb\")):$(\".calc-guide-wrap\")).hide(),\"extra\"==e.mode?($(\".calc-result-market\").text(\"优化前(元)\"),$(\".calc-result-unit\").text(\"优化后(元)\"),t.data.encrypt_info&&(e.encryptInfo=t.data.encrypt_info)):($(\".calc-result-market\").text(\"市场交易(元)\"),$(\".calc-result-unit\").text(\"中网联合(元)\")),$(\".calc-result-market-data\").text(t.data&&t.data.market_value?t.data.market_value:\"\"),$(\".calc-result-unit-data\").text(t.data&&t.data.zw_value?t.data.zw_value:\"\")):alert(\"利率试算失败!\"+t.msg)}})},this.normalDatas={},this.extraDatas={},this.setNormalChart=function(e){var t,n,o,i,a,r,s,l,c,d=u.normalDatas.find(function(t){return t.province_num===e}),h=u;d&&Array.isArray(d.avg_price_li)&&0\").addClass(\"block_scroll\").addClass(\"clear\").css({display:\"block\"}).html(o),i=o.clone(),a=$(\"
\").addClass(\"block_scroll_wrap\").css({display:\"block\",position:\"absolute\",top:\"0\"}).append(o).append(i),r=($(t).html(\"\").append(a),Math.floor(a.outerHeight(!0)/$(this.dom.spot_index_item).outerHeight(!0))),s=$(this.dom.spot_index_item).outerHeight(!0),r=r%2==0?r:r-1,l=(r=e?r-1:r,0),c=setInterval(function(){r<=l?e?(a.css({top:\"0px\"}),l=0):clearInterval(c):(l++,a.animate({top:-s*l-1+\"px\"},\"slow\"))},n)},n[\"default\"]=o},{}],58:[function(t,e,n){function s(t){return\"true\"==String(t).toLocaleLowerCase()}function l(t){return\"--\"==t?null:Number(t)}var c=t(\"../../base/utils\"),o=t(\"../../login/login\"),i=t(\"../message_service/message_service\"),d={\"铜\":\"#C75B6B\",\"铝\":\"#548FCB\",\"铅\":\"#FBC96D\",\"锌\":\"#FD7568\",\"镍\":\"#98BEAA\",\"锡\":\"#6B9D92\",\"其他\":\"#315B89\"};function a(){var r=this;this.initConfirm=function(t){var e,n,o,i,a=r;c.isIE9Lower()?$(\".ie8-wrapper\").show():(t=$(t).parents(\"tr\"),s(t.data(\"is_premium\"))?(n=$(t).prev(),i=(0<=new Date(n.data(\"date\")).valueOf()-new Date(t.data(\"date\")).valueOf()?n:t).data(\"date\"),e=0!=n.length,a.creatPriceConfirmation(!0,!0,{constract:n.find(\".c1\").find(\"a\").text().trim()||\"\",constract_id:Number(n.data(\"constract_id\"))||0,unit:n.find(\".c5\").text().trim()||\"\",sdate:i,edate:i},e?{low:l(n.data(\"low\")),average:l(n.data(\"average\")),high:l(n.data(\"high\"))}:{},{low:l(t.data(\"low\")),high:l(t.data(\"high\")),average:l(t.data(\"average\"))})):(e=$(t).next(),n=s(t.data(\"has_future\")),o=s(t.data(\"has_premium\")),i=(0<=new Date(t.data(\"date\")).valueOf()-new Date(e.data(\"date\")).valueOf()?t:e).data(\"date\"),a.creatPriceConfirmation(!1,n,{constract:t.find(\".c1\").find(\"a\").text().trim()||\"\",constract_id:Number(t.data(\"constract_id\"))||0,unit:t.find(\".c5\").text().trim()||\"\",sdate:i,edate:i},{low:l(t.data(\"low\")),average:l(t.data(\"average\")),high:l(t.data(\"high\"))},o?{low:l(e.data(\"low\")),high:l(e.data(\"high\")),average:l(e.data(\"average\"))}:{})))},this.initPriceDeclaration(),this.initCategoryLadder(),this.initPriceConfirmation(),c.isIE9Lower()||(this.initLoginToUnlock(),this.loginModal=new o.Login,this.loginModal.show(),this.messageServiceModal=new i[\"default\"],this.initMessageServiceModal())}a.prototype.creatPriceConfirmation=function(t,e,n,o,i){var a=$(\".config_component_spot\").data(\"spot_center\");new PriceConfirmation(n,o,i,{is_dev:-1!=a.indexOf(\"test\"),init_tab:t?[\"future\",\"spot\"]:e?[\"spot\",\"future\"]:[\"spot\"]}).create()},a.prototype.initPriceDeclaration=function(){$(\".icon_price_declaration\").on(\"mouseenter\",function(t){$(\".price_declaration\").hide(),$(t.target).parent().find(\".price_declaration\").toggle()}),$(\".icon_price_declaration\").on(\"mouseout\",function(t){$(\".price_declaration\").hide()})},a.prototype.initCategoryLadder=function(){for(var t=$(\".spot-new\"),e=$(\".spot-new tbody tr\"),n=$(\"#spot-categorys\"),o=0;o\").html(r).css({display:\"block\",overflow:\"hidden\",top:i,color:s,height:a,borderRight:\"2px solid \"+s,paddingRight:\"2px\"}).appendTo(n))}},a.prototype.initPriceConfirmation=function(){var t=this;$(\".spot_new\").find(\"tbody\").find(\".is_confirm\").find(\".c2\").on(\"click\",function(){0!=$(\".spot_new_table_nologin\").length?t.loginModal.show():t.initConfirm(this)}),$(\".spot_new\").find(\"tbody\").find(\".is_confirm\").find(\".c3\").on(\"click\",function(){0!=$(\".spot_new_table_nologin\").length?t.loginModal.show():t.initConfirm(this)})},a.prototype.initLoginToUnlock=function(){var e=this,n=$(\"#login_modal\").offset().top;0!=$(\".spot_new_table_nologin\").length&&$(\".spot_new_table_nologin\").on(\"click\",function(t){t.preventDefault(),$(\"html, body\").animate({scrollTop:n-200},500),e.loginModal.show()})},a.prototype.initMessageServiceModal=function(){var e=this;$(\".spot_new\").find(\"tbody\").find(\".is_confirm\").find(\".c3\").find(\".icon-message-service\").on(\"click\",function(t){t.stopPropagation();t=$(this).data(\"id\");0!=$(\".spot_new_table_nologin\").length?e.loginModal.show():e.messageServiceModal.show(t)})},n[\"default\"]=a},{\"../../base/utils\":36,\"../../login/login\":73,\"../message_service/message_service\":53}],57:[function(t,e,n){function o(t){this._container=t,this._items=this._container.find(\".single\"),this._groups=[],this._length=0,this._id=0,this._makeGroup(),this.bind()}o.prototype._makeGroup=function(){for(var t=0;;t+=5){if(t>this._items.length-5){this._groups.push([0=this._length&&(this._id=0),this._show(this._id)},o.prototype.bind=function(){var t=this;this._container.find(\".go_preview\").click(function(){t.preview()}),this._container.find(\".go_next\").click(function(){t.next()})},n[\"default\"]=o},{}],56:[function(t,e,n){var o=t(\"../../../public/util\");function i(){this.dom={news_list:\".news_list\",live_pic:\".live_pic\",live_scroll:\".live_scroll\",live_scroll_item:\".live_scroll_item\",scroll_spotlist:\".scroll_spotlist\"},this.init(),new o.Scroll($(this.dom.scroll_spotlist)),new o.ZoomImage($(this.dom.live_pic));for(var t=$(\".news-live-container .content\"),e=0;et.height()&&(i=i.outerWidth(!0),n=n.outerWidth(!0),o.css({maxWidth:n-i,whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",overflow:\"hidden\"}))}},n[\"default\"]=o},{}],50:[function(t,e,n){function o(t,e,n,o){for(var i={},a=1,r=0,s=0;s=t.length?void 0:t)&&t[n++],done:!t}}}},r=t(\"../../smm_components/src/utils/auth\"),s=t(\"@smm/header/dist/headerhelper/headerhelper\"),i=t(\"./search\"),l=t(\"./menu\"),c=jQuery,t=o=o||{};function d(t){var e,n,t=t||[c(\".smmPageHeaderWarp .login_url\"),c(\" .smmPageHeaderWarp .register_url\")];try{for(var o=a(t),i=o.next();!i.done;i=o.next())(t=>{var e,n=window.location.href;t.attr(\"data_url\")&&(e=t.attr(\"data_url\")+\"?referer=\"+encodeURIComponent(n),n=t.attr(\"data_url\").lastIndexOf(\"/\"),\"login\"===t.attr(\"data_url\").substring(n+1)?t.click(function(){window.location.href=e}):t.click(function(){window.open(e)}))})(i.value)}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o[\"return\"])&&n.call(o)}finally{if(e)throw e.error}}}function h(t){(t||c(\".user_logout\")).unbind(\"click\").bind(\"click\",function(){r.smmAuth.Cookie.del(r.smmAuth.Cookie.DefaultKey),window.location.reload()})}t.authStatus=d,t.LoginOut=h,p.prototype.init=function(){var e=this,t=this,n=(console.log(\"123322\"),function(){console.log(\"addNews addNews\");var t='

站内消息通知

    查看全部消息>>
    ',t=(e.target.append(t),c(\".smmPageHeaderWarp .messagebox\").outerHeight());c(\".smmPageHeaderWarp .messagebox-new\").css({top:t}),o()}),o=function(){c.ajax({url:s.HeaderMessage.returnURL().urls.msg_center_url+\"/messagesnew\",headers:{\"X-API-KEY\":r.smmAuth.Cookie.get(r.smmAuth.Cookie.DefaultKey)},method:\"get\",data:{msg_type:s.HeaderMessage.RequestMessges},dataType:\"jsonp\",success:function(t){var n;0==t.code&&(c(\".smmPageHeaderWarp .newbox\").empty(),t=s.HeaderMessage.parseMsgInfo(t.data.message_list),n=\"\",t&&t.forEach(function(t,e){n+='\\n
  • \\n \\n

    \"+t.text+\"

    \\n \\n \"+t.type+\"\\n \\n \"+t.time+\"\\n
    \\n
  • \"}),c(\".smmPageHeaderWarp .newbox\").append(n))}})},i=function(){var n=t;c.ajax({url:s.HeaderMessage.returnURL().urls.msg_center_url+\"/unread\",headers:{\"X-API-KEY\":r.smmAuth.Cookie.get(r.smmAuth.Cookie.DefaultKey)},method:\"get\",dataType:\"jsonp\",success:function(t){if(0==t.code){var t=s.HeaderMessage.parseUnReadNum(t.data),e=t.unreadCount,t=t.unreadCountString;if(n.msgCallback)return void n.msgCallback(e);\"暂无\"===t&&(t=\"0\"),0\\n \\n '+t+'\\n \\n \\n ')})):($(\".history_list\").hide(),$(\".search_title\").hide())},o.prototype.initHotItemClick=function(){var e=this;$(\".recommend_list\").on(\"click\",this.dom.hot_item_a,function(){var t=$(this).text();e.setLocal(e.search_history_list,t),window.open(\"https://\"+i()+\"www.smm.cn/search?keyword=\"+t),e.initHistoryList()})},o.prototype._init=function(){this.initHistoryList(),this.initHotItemClick()},o.prototype.getLocal=function(t){t=localStorage.getItem(t);return t?JSON.parse(t):[]},o.prototype.setLocal=function(t,e){var n=this.getLocal(t);n&&!n.includes(e)&&e&&(12<=n.length&&n.shift(),n.push(e),localStorage.setItem(t,JSON.stringify(n)))},o.prototype.setLocalArr=function(t,e){e&&(12=i.dom.headerMaxWidth?(e=i.dom.headerMaxWidth-(n+i.dom.headerDetailWidth),n=n+i.dom.headerDetailWidth-i.dom.headerMaxWidth,$(t.currentTarget).children(\".header-category-item-list\").css(\"left\",e),$(t.currentTarget).children(\".header-category-item-list\").children(\".triangle\").css(\"left\",n)):$(t.currentTarget).children(\".header-category-item-list\").children(\".triangle\").css(\"left\",.5*o),i.dom.header_category_warp_li.not(t.currentTarget).children(\".header-category-item-list\").hide(),$(t.currentTarget).children(\".header-category-item-list\").show()}),i.dom.header_category_warp_li.on(\"mouseleave\",function(t){i.dom.hideTimeout=setTimeout(function(){$(t.currentTarget).children(\".header-category-item-list\").hide()},500)})},n[\"default\"]=o},{}],43:[function(t,e,n){var o=t(\"@smm/sa/dist/sa/sa\");function i(){this._init()}i.prototype._init=function(){function t(){var t=-1!=location.host.indexOf(\"test\")?\"test\":\"\",e=$(this).attr(\"data-pend-id\");o.DefinedSa(\"e\",function(){},1e4,{name:\"首页-现货买卖挂单-\"+e}),window.open(\"https://\"+t+\"www.anhuida.com/gd/detail/\"+e)}$(function(){$('[data-toggle=\"tooltip\"]').tooltip(),$(\".li_marquee\").liMarquee({direction:\"up\",runshort:!1,scrollamount:30}).on(\"click\",\".gd_detail_link\",t)}),$(\".gd_front_container .gd_link\").on(\"click\",function(){var t=-1!=location.host.indexOf(\"test\")?\"test\":\"\";o.DefinedSa(\"e\",function(){},1e4,{name:\"首页-现货买卖挂单\"}),window.open(\"https://\"+t+\"www.anhuida.com/gd\")}),$(\".gd_front_container .gd_detail_link\").on(\"click\",t)},n[\"default\"]=i},{\"@smm/sa/dist/sa/sa\":24}],42:[function(t,e,n){function o(){this.localKey=\"index_fullscreen_img_ad\",this.adNameKey=\"ad_img_name\",this.countdown=5,this._init(),this._closeInit(),this._jumpArea()}o.prototype._jumpArea=function(){var t=this,e=$(\".ad_container\").data(\"link\");$(document).ready(function(){$(\".fullscreen_img_ad .ad_img\").on(\"click\",function(){e?(e.includes(\"http\")||e.includes(\"https\")?window.open(e):e.includes(\"#\")||e.includes(\".\")?$(\"html, body\").animate({scrollTop:$(e).offset().top-177-100},1e3):console.error(\"请检查市场电价走势广告锚点是否正确!\"),t._closeAD()):console.error(\"链接无效!\")})})},o.prototype._init=function(){var t=localStorage.getItem(this.localKey),e=localStorage.getItem(this.adNameKey),n=$(\".ad_container\").data(\"name\"),o=Date.now();(!e||e===n)&&t&&parseInt(t)>o?this._closeAD():this._showAD()},o.prototype._startCountdown=function(){var t=this,e=setInterval(function(){$(\".time_number\").text(\"自动关闭 \"+t.countdown+\"s\"),t.countdown<=0?(clearInterval(e),t._closeAD()):t.countdown--},1e3)},o.prototype._showAD=function(){$(\".fullscreen_img_ad\").fadeIn(),this._startCountdown()},o.prototype._closeAD=function(){var t=$(\".ad_container\").data(\"name\"),e=$(\".ad_container\").data(\"frequency\"),e=this._getNextMonday(e);localStorage.setItem(this.localKey,e.toString()),localStorage.setItem(this.adNameKey,t),$(\".fullscreen_img_ad\").fadeOut()},o.prototype._closeInit=function(){var t=this;$(\".fullscreen_img_ad .auto_close\").on(\"click\",function(){t._closeAD()})},o.prototype._getNextMonday=function(t){var e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate());switch(t){case\"日\":var o=new Date(n.getTime());return o.setDate(o.getDate()+1),o.getTime();case\"月\":o=new Date(n.getTime());return o.setMonth(o.getMonth()+1),o.setDate(1),o.getTime();default:var o=7-e.getDay()+1,i=new Date(n.getTime());return i.setDate(i.getDate()+o),i.getTime()}},n[\"default\"]=o},{}]},{},[143]);"],"file":"index.js"}