//author: 声色视觉
//webSite: www.softboyo.cn
//blog.sina.com/k3man
//2021-05

// const Baseurl = 'http://localhost:8080/boyo/tencent/';
var Baseurl="./cakeapi.dll/boyo/tencent/";function GetBackstage(a,c){$.ajax({type:"get",url:Baseurl+a,contentType:"application/json",dataType:"json",headers:{Authorization:"Basic "+btoa("boyosoft:k3man.yeah.net")},success:function(a,d){"success"==d&&c(a.result)}})}function postBackstage(a,c,b){$.ajax({type:"post",url:Baseurl+a,data:JSON.stringify(c),contentType:"application/json",dataType:"json",success:function(a,c){if("success"==c){var d=JSON.parse(a.result);b(d)}},error:function(a){b(a.statusText)}})}function msgbox(a,c){Notiflix.Notify.Init();switch(c){case 0:Notiflix.Notify.Failure(a);break;case 1:Notiflix.Notify.Success(a);break;case 2:Notiflix.Notify.Info(a)}}function isPhoneNo(a){return/^1[345789]\d{9}$/.test(a)}function isweixin(){return"micromessenger"==navigator.userAgent.toLowerCase().match(/MicroMessenger/i)?!0:!1}function writeCardb(a){navigator.cookieEnabled?$.cookie("cakecar",JSON.stringify(a),{expires:7}):alert("\u8bf7\u5141\u8bb8\u63a5\u53d7Cookie\u624d\u80fd\u6b63\u5e38\u4f7f\u7528\u8d2d\u7269\u529f\u80fd\u3002")}function readcardb(){var a=$.cookie("cakecar");return null!=a?JSON.parse(a):null}jQuery.cookie=function(a,c,b){if("undefined"!=typeof c){b=b||{};null===c&&(c="",b=$.extend({},b),b.expires=-1);var d="";b.expires&&("number"==typeof b.expires||b.expires.toUTCString)&&("number"==typeof b.expires?(d=new Date,d.setTime(d.getTime()+864E5*b.expires)):d=b.expires,d="; expires\x3d"+d.toUTCString());var e=b.path?"; path\x3d"+b.path:"",f=b.domain?"; domain\x3d"+b.domain:"";b=b.secure?"; secure":"";document.cookie=[a,"\x3d",encodeURIComponent(c),d,e,f,b].join("")}else{c=null;if(document.cookie&&""!=document.cookie)for(b=document.cookie.split(";"),d=0;d<b.length;d++)if(e=jQuery.trim(b[d]),e.substring(0,a.length+1)==a+"\x3d"){c=decodeURIComponent(e.substring(a.length+1));break}return c}};function GetDateTime(){var a=new Date;this.year=a.getFullYear();this.month=a.getMonth()+1;this.date=a.getDate();this.hour=10>a.getHours()?"0"+a.getHours():a.getHours();this.minute=10>a.getMinutes()?"0"+a.getMinutes():a.getMinutes();this.second=10>a.getSeconds()?"0"+a.getSeconds():a.getSeconds();this.milliSeconds=a.getMilliseconds();return this.year+""+this.month+""+this.date+""+this.hour+""+this.minute+""+this.second+""+this.milliSeconds}function ExtractURL(a){for(var c=window.location.search.substring(1).split("\x26"),b=0;b<c.length;b++){var d=c[b].split("\x3d");if(d[0]==a)return d[1]}return!1}function goodsQuantity(){var a=readcardb(),c=0;for(key in a)c+=parseInt(a[key].quant);$("#count").text(Number(c))};