$(function(){$('#get_goods_datas')['click'](function(){chrome['tabs']['query']({'active':!![],'currentWindow':!![]},function(_0x3f3bb2){chrome['tabs']['sendMessage'](_0x3f3bb2[0x57e42^0x57e42]['id'],{'action':'get_goods_datas','days':$('#days')['val'](),'pages':$('#pages')['val']()},function(_0xbdf128){console['log'](_0xbdf128);});});});$('#view_local_storage')['click'](function(){Local_Storage_Name='goods_datas';$('.local_storage_list')['css']('display','block');_0x511e53['init']();});var _0x511e53={'init':function(){this['loadLocalStorage']();this['listenSave']();},'loadLocalStorage':function(){_this=this;this['sendMessageBack']('list',{'Local_Storage_Name':''+Local_Storage_Name+''},function(_0x299ab4){if(_0x299ab4['status']==(0x47f4a^0x47ede)){_this['showList']();return![];}_this['showList'](_0x299ab4['data']);_this['listenDel']();});},'showList':function(_0xd19d72){if(!_0xd19d72||_0xd19d72['length']==(0xe5157^0xe5157)){$('#ls_list')['html']('<p>没有找到数据</p>');return;}var _0x167414=['<ul>'];for(var _0x2d63ad in _0xd19d72){var _0x46678c=_0xd19d72[_0x2d63ad]['Local_Storage_Name'];var _0x151d5e={'Local_Storage_Name':_0x46678c,'index':_0x2d63ad};var _0x445042=JSON['parse'](_0xd19d72[_0x2d63ad]['cacheData']);var _0x48fa3d=_0x445042['mallName'];var _0x2b41fb=_0x445042['start_day'];var _0x3c9fe2=_0x445042['end_day'];_0x167414['push']('<li><span\x20class=\x27ls_del\x27\x20data-item=\x27'+JSON['stringify'](_0x151d5e)+'\x27>X</span>'+_0x48fa3d+'\x20'+_0x2b41fb+'\x20'+_0x3c9fe2+'</li>');}_0x167414['push']('</ul>');$('#ls_list')['html'](_0x167414['join'](''));_this['listenDel']();},'listenSave':function(){_this=this;$('#ls_save')['click'](function(){var _0x68e8f3=$['trim']($('#ls_message')['val']());if(!_0x68e8f3){return![];}_this['sendMessageBack']('save',{'Local_Storage_Name':Local_Storage_Name,'cacheData':_0x68e8f3},function(_0x3db5de){if(_0x3db5de['status']==(0xbe83e^0xbe8f6)){_this['showList'](_0x3db5de['data']);$('#ls_message')['val']('');}});});},'listenDel':function(){_this=this;$('.ls_del')['unbind']('click')['click'](function(){var _0x1cf382=$(this);var _0x2c6c8e=$(this)['attr']('data-item');if(!_0x2c6c8e){alert('未找到删除值，请重试');return![];}if(confirm('确定要删除该条记录吗？')){_this['sendMessageBack']('del',JSON['parse'](_0x2c6c8e),function(_0x3427d0){if(_0x3427d0['status']==(0x576c5^0x5760d)){_0x1cf382['parent']()['fadeOut'](function(){$(this)['remove']();});}else{alert(_0x3427d0['msg']);}});}});},'sendMessageBack':function(_0x1ec5ec,_0x144000,_0xb70851){chrome['extension']['sendMessage']({'action':_0x1ec5ec,'data':_0x144000},_0xb70851);}};$('#edit_sku_group_price')['click'](function(){chrome['tabs']['query']({'active':!![],'currentWindow':!![]},function(_0x2eadc8){chrome['tabs']['sendMessage'](_0x2eadc8[0x35fbb^0x35fbb]['id'],{'action':'edit_sku_group_price','sku_group_price':$('#sku_group_price')['val'](),'sku_group_price2':$('#sku_group_price2')['val'](),'limit':$('#limit')['val'](),'limit2':$('#limit2')['val']()},function(_0x49e01e){});});});$('#create_counpon')['click'](function(){var _0x1f1e49=$('input[type=radio][name=counpon]:checked')['attr']('id');if(_0x1f1e49=='counpon_goods'){var _0x39011a=[$('#goods_id')['val'](),$('#goods_discount')['val'](),$('#init_quantity')['val']()];}chrome['tabs']['query']({'active':!![],'currentWindow':!![]},function(_0x9dd697){chrome['tabs']['sendMessage'](_0x9dd697[0xdc598^0xdc598]['id'],{'action':_0x1f1e49,'data':_0x39011a},function(_0x4aaaf4){});});});$('#make_zhekou')['click'](function(){$('input[type=radio][id=xianliangzhekou]')['attr']('checked','checked');var _0x95c9b5=$('input[type=radio][name=counpon]:checked')['attr']('id');if(_0x95c9b5=='counpon_goods'){var _0x30a6f3=[$('#goods_id')['val'](),$('#goods_discount')['val'](),$('#init_quantity')['val']()];}chrome['tabs']['query']({'active':!![],'currentWindow':!![]},function(_0x57d02f){chrome['tabs']['sendMessage'](_0x57d02f[0x902c7^0x902c7]['id'],{'action':_0x95c9b5,'data':_0x30a6f3},function(_0xc48426){});});});$('#piliang_counpon')['click'](function(){var _0x22fe15=$('input[type=radio][name=counpon]:checked')['attr']('id');chrome['tabs']['query']({'active':!![],'currentWindow':!![]},function(_0x5eb838){chrome['tabs']['sendMessage'](_0x5eb838[0x73ff9^0x73ff9]['id'],{'action':_0x22fe15},function(_0x14c3b3){});});});});