$(document).ready(function(){ $.get('/hdapp/bas/d.php?ac=getlimit',function(all){ var reobj = eval('(' + all + ')'); if(reobj.type == 'success'){ location.href = "../../403.htm"; } }) $.get('/hdapp/bas/d.php?ac=all',function(all){ var reobj = eval('(' + all + ')'); var ttip = reobj.sysvisit.ttip; var ttvp = reobj.sysvisit.ttvp $("#umenu").html(reobj.umenu); $("#sys_count_ttip").html('uv/'+ttip); $("#sys_count_ttvp").html('pv/'+ttvp); }) $.get('/hdapp/bas/d.php?ac=pdc_cart',function(all){ var reobj = eval('(' + all + ')'); var cart_list = reobj.cart_list; var total_fee = reobj.cart_price_info.total_fee; var goods_num = reobj.cart_price_info.goods_num; $('#cart_quantity').empty().html(goods_num); $('#cart_total_fee').empty().html(total_fee.tofixed(2)); var carliststr = ''; for (var i = 0; i < cart_list.length; i++) { var goods_price = (cart_list[i].tpc_price * cart_list[i].goods_num).tofixed(2); carliststr += '
'+cart_list[i].goods_num+'x '+cart_list[i].tpc_topic+'
¥'+goods_price+'
'; } $('.quick-cart-wrapper').empty().html(carliststr); }) }); function limitaccess(){ $.ajax({ type : "post", url:"../../hdapp/bas/e.php?ac=getlimit",//, datatype:'json', success: function(data){ if(data.type == 'success'){ location.href = "../../403.htm"; } } }); } var _arr = {}; function loadscript(scriptname, callback) { if (!_arr[scriptname]) { _arr[scriptname] = true; var body = document.getelementsbytagname('body')[0]; var script = document.createelement('script'); script.type = 'text/javascript'; script.src = scriptname; // then bind the event to the callback function // there are several events for cross browser compatibility // script.onreadystatechange = callback; script.onload = callback; // fire the loading body.appendchild(script); } else if (callback) { callback(); } }; function _toastr(_message,_position,_notifytype,_onclick) { var _btn = jquery(".toastr-notify"); if(_btn.length > 0 || _message != false) { loadscript(plugin_path + 'toastr/toastr.js', function() { // toastr.clear(); /** button click ********************* **/ _btn.bind("click", function(e) { e.preventdefault(); var _message = jquery(this).attr('data-message'), _notifytype = jquery(this).attr('data-notifytype') || "default", _position = jquery(this).attr('data-position') || "top-right", _progressbar = jquery(this).attr('data-progressbar') == "true" ? true : false, _closebutton = jquery(this).attr('data-closebutton') == "true" ? true : false, _debug = jquery(this).attr('data-debug') == "true" ? true : false, _newestontop = jquery(this).attr('data-newestontop') == "true" ? true : false, _preventduplicates = jquery(this).attr('data-preventduplicates') == "true" ? true : false, _showduration = jquery(this).attr('data-showduration') || "300", _hideduration = jquery(this).attr('data-hideduration') || "1000", _timeout = jquery(this).attr('data-timeout') || "5000", _extendedtimeout = jquery(this).attr('data-extendedtimeout') || "1000", _showeasing = jquery(this).attr('data-showeasing') || "swing", _hideeasing = jquery(this).attr('data-hideeasing') || "linear", _showmethod = jquery(this).attr('data-showmethod') || "fadein", _hidemethod = jquery(this).attr('data-hidemethod') || "fadeout"; toastr.options = { "closebutton": _closebutton, "debug": _debug, "newestontop": _newestontop, "progressbar": _progressbar, "positionclass": "toast-" + _position, "preventduplicates": _preventduplicates, "onclick": null, "showduration": _showduration, "hideduration": _hideduration, "timeout": _timeout, "extendedtimeout": _extendedtimeout, "showeasing": _showeasing, "hideeasing": _hideeasing, "showmethod": _showmethod, "hidemethod": _hidemethod } toastr[_notifytype](_message); }); /** javscript / on load ************************* **/ if(_message != false) { if(_onclick != false) { onclick = function() { window.location = _onclick; } } else { onclick = null } toastr.options = { "closebutton": true, "debug": false, "newestontop": false, "progressbar": true, "positionclass": "toast-" + _position, "preventduplicates": false, "onclick": onclick, "showduration": "300", "hideduration": "1000", "timeout": "5000", "extendedtimeout": "1000", "showeasing": "swing", "hideeasing": "linear", "showmethod": "fadein", "hidemethod": "fadeout" } settimeout(function(){ toastr[_notifytype](_message); }, 100); // delay 0.1s } }); } }