1/** 2 * å ¬ç¨å¼¹çªæ¹æ³ 3 * @param msg æç¤ºå 容 4 * @param type ç¶æ 1.è¦å 2.é误 3.æå 4.æä½ 5 */ 6function tipFunc(msg='',type='1',left_btn='',right_btn='',left_url='',right_url='') { 7 if($('body').find('#show_tip').length >= 1)return; 8 msg = msg != '' ? msg : 'ä½ çè´¦æ·ææ å¯ç ï¼ä¸ºäºä½ çè´¦å·å®å ¨è¯·è®¾ç½®è´¦å·ï¼å¯ç '; 9 var type_msg = 'è¦åæç¤º'; 10 var tip_btn = ''; 11 var img_src = '/images/mobile/comm/warming_icon.png'; 12 switch (type) { 13 case '2': 14 case 2: 15 type_msg = 'é误æç¤º'; 16 img_src = '/images/mobile/comm/error_icon.png'; 17 break; 18 case '3': 19 case 3: 20 type_msg = 'æåæç¤º'; 21 img_src = '/images/mobile/comm/success_icon.png'; 22 break; 23 case '4': 24 case 4: 25 type_msg = 'æä½æç¤º'; 26 if(left_btn && right_btn) { 27 tip_btn = '<a href="'+left_url+'">'+left_btn+'</a>\n<a class="mainBgColor" href="'+right_url+'">'+right_btn+'</a>'; 28 } 29 break; 30 case '5': 31 case 5: 32 type_msg = 'æä½ç¡®è®¤'; 33 if(right_btn) { 34 tip_btn = '<a href="javaScript:" onclick="closeTip(this)">åæ¶</a>\n<a class="mainBgColor" onclick="'+right_btn+'()" href="javaScript:" >ç¡®å®</a>'; 35 } 36 break; 37 } 38 var html = '<div id="show_tip" class="dialog">\ 39 <div class="relative">\ 40 <div>\ 41 <div class="box">\ 42 <div><img src="'+img_src+'" alt="'+type_msg+'"/></div>\ 43 <p>'+msg+'</p>\ 44 <div class="tip_btn">\ 45 '+tip_btn+'</div>\ 46 </div>\ 47 <div class="close" onclick="closeTip(this)"><img src="/images/mobile/comm/close.png" alt="å ³éè¦åçª"/></div>\ 48 </div>\ 49 </div>\ 50</div>'; 51 $('body').append(html); 52 $('#show_tip').show(); 53} 54//å¾®ä¿¡æ«æ 55function show_wx_qrcode() { 56 if($('body').find('#wx_qrcode').length >= 1)return; 57 var html = '<div id="wx_qrcode" class="dialog">\ 58 <div class="relative">\ 59 <div class="img_box">\ 60 <img src="/images/top_wechat.jpg" alt=""/>\ 61 <p>请使ç¨å¾®ä¿¡æ«æäºç»´ç å³å¯ç»å½ç¨æ·æ§å¶ä¸å¿</p>\ 62 <div class="close" onclick="closeTip(this)"><img src="/images/mobile/comm/close.png" alt="å ³éäºç»´ç çªå£"/></div>\ 63 </div>\ 64 </div>\ 65 </div>'; 66 $('body').append(html); 67} 68 69function closeTip(obj){ 70 if( $(obj).parents('.dialog').length > 0){ 71 $(obj).parents('.dialog').remove(); 72 } 73} 74 75// è´ä¹°é¡µä¸æææç®å¤´ 76function change_show(obj,e) { 77 if($(obj).find('.select_list').is(':hidden')) { 78 $(obj).find('.select_list').show(); 79 $(obj).find('i').addClass('down'); 80 $(obj).parents('.item').siblings().find('.select').find('.select_list').hide(); 81 $(obj).parents('.item').siblings().find('.select').children('i').removeClass('down'); 82 }else{ 83 $(obj).find('.select_list').hide(); 84 $(obj).find('i').removeClass('down'); 85 } 86 if ( e && e.stopPropagation ){ 87 e.stopPropagation(); 88 }else{ 89 window.event.cancelBubble = true; //IEåæ¶åæ³¡ 90 return false; 91 } 92} 93// ç¹å»ç©ºç½éèè´ä¹°é¡µä¸æ 94$('body,html').click(function(){ 95 $('.select_list').hide(); 96 $('.section li .select i').removeClass('down'); 97}); 98 99$(window).scroll(function(){ 100 // è¿åé¡¶é¨ 101 if ($(window).scrollTop() > 200){ 102 $("#go_top").show(); 103 }else{ 104 $("#go_top").hide(); 105 } 106}); 107$('#go_top').click(function(){ 108 $('body,html').animate({scrollTop:0},1000); 109 return false; 110}); 111 112//产åè´ä¹°æé®è·³è½¬ 113//speriod => åºå«å¥é¤è¿æ¯åç¬å®ç 114//pid => 产åid 115//xcxid => 微信å°ç¨åº 116//bdxcxid => ç¾åº¦å°ç¨åº 117//bookid => è¡ä¸é¢çº¦ 118//model => åç¬å®çç±»å 119function box_go_link(speriod,pid,xcxid,bdxcxid=0,bookid=0,model="") { 120 var str = ''; 121 if(xcxid) str += '&xcxid='+xcxid; 122 if(bdxcxid) str += '&bdxcxid='+bdxcxid; 123 if(bookid) str += '&bookid='+bookid; 124 var location_string = ''; 125 if(speriod) { //å¥é¤ 126 location_string="/special/order.php?speriod="+speriod+'&spid='+pid+str; 127 }else{ //åç¬å®ç 128 location_string="/design/boxorder.php?model="+model+'&pid='+pid+str; 129 } 130 hasLoginAjaxGet (location_string); 131} 132 133/** 134 * ajaxè¯·æ± location 跳转 135 * @param string|obj locationStr è·³è½¬é¾æ¥æè form对象 136 * @param int locationStr ç±»å 137 */ 138function hasLoginAjaxGet (locationStr='',type = '1') { 139 $.ajax({
140 url : '/special/ajaxs/product.ajax.php', 141 type : 'get', 142 data : { 143 'act' : 'hasLogin' 144 }, 145 dataType : 'json', 146 success : function (msg) { 147 if (msg.code == 1) { 148 switch (type) { 149 case '1': 150 location.href = locationStr; 151 break; 152 case '2': 153 locationStr.submit(); 154 break; 155 } 156 157 } else { 158 window.open("/user/login.php","_blank"); 159 return false; 160 } 161 } 162 }); 163}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.