(function(e){function a(a){for(var r,i,c=a[0],s=a[1],g=a[2],p=0,u=[];p>16)+(a>>16)+(n>>16)<<16|65535&n}function i(e,a,n,r,o,i){return t(function(e,a){return e<>>32-a}(t(t(a,e),t(r,i)),o),n)}function c(e,a,n,r,o,t,c){return i(a&n|~a&r,e,a,o,t,c)}function s(e,a,n,r,o,t,c){return i(a&r|n&~r,e,a,o,t,c)}function g(e,a,n,r,o,t,c){return i(a^n^r,e,a,o,t,c)}function d(e,a,n,r,o,t,c){return i(n^(a|~r),e,a,o,t,c)}function p(e,a){e[a>>5]|=128<>>9<<4)]=a;var n,r,o,i,p,u=1732584193,f=-271733879,l=-1732584194,m=271733878;for(n=0;n>5]>>>a%32&255);return n}function f(e){var a,n=[];for(n[(e.length>>2)-1]=void 0,a=0;a>5]|=(255&e.charCodeAt(a/8))<>>4&15)+"0123456789abcdef".charAt(15&a);return r}function m(e){return unescape(encodeURIComponent(e))}function b(e){return function(e){return u(p(f(e),8*e.length))}(m(e))}function y(e,a){return function(e,a){var n,r,o=f(e),t=[],i=[];for(t[15]=i[15]=void 0,o.length>16&&(o=p(o,8*e.length)),n=0;n<16;n+=1)t[n]=909522486^o[n],i[n]=1549556828^o[n];return r=p(t.concat(f(a)),512+8*a.length),u(p(i.concat(r),640))}(m(e),m(a))}function h(e,a,n){return a?n?y(a,e):function(e,a){return l(y(e,a))}(a,e):n?b(e):function(e){return l(b(e))}(e)}r=function(){return h}.call(a,n,a,e),void 0===r||(e.exports=r)}()},"8f30":function(e,a,n){"use strict";var r=n("f5bd").default,o=r(n("9b1b"));n("fd3c"),n("c9b5"),n("bf0f"),n("ab80"),n("5c47"),n("a1c1"),n("5ef2"),n("0506"),n("aa9c");r(n("8757"));var t="http://tiantian2.langye.net/",i=function(e){return e=e.toString(),e[1]?e:"0"+e},c=function(e){uni.showModal({title:"",content:e,showCancel:!1})},s=function(e){e.customLoading?e.bindThis&&e.bindThis.setData({}):uni.showLoading({title:"正在加载"}),e.url=t+e.api,e.header=(0,o.default)({},e.header);var a=uni.getStorageSync("userInfo").access_token;g()&&(e.data=(0,o.default)((0,o.default)({},e.data),{},{token:a})),"POST"!=e.method||d(a)||(e.data.ts=(new Date).getTime()),uni.request((0,o.default)((0,o.default)({},e),{},{success:function(a){200!=a.statusCode?void 0!=e.utilFail&&(401==a.statusCode?(uni.clearStorageSync(),uni.navigateTo({url:"/pages/login/login"})):e.utilFail("TODO: 特殊处理非200错误("+a.statusCode+")")):d(a.data.errorcode)&&0!=a.data.errorcode?void 0!=e.utilSuccess&&e.utilSuccess(a.data):void 0!=e.utilFail?e.utilFail(a.data.errormsg||"接口发生未知错误"):e.utilFail(a.data.errormsg)},fail:e.utilFail,complete:function(a){e.customLoading?e.bindThis&&e.bindThis.setData({loadingCount:e.bindThis.data.loadingCount-1}):(uni.hideNavigationBarLoading(),uni.hideLoading())}}))},g=function(){var e=uni.getStorageSync("userInfo");return!d(e.access_token)},d=function(e){return""==e||void 0==e||null==e||"undefined"==e||"null"==e},p=/^\d{17}([0-9]|X)$/,u={table:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],UTF16ToUTF8:function(e){for(var a=[],n=e.length,r=0;r0&&o<=127)a.push(e.charAt(r));else if(o>=128&&o<=2047){var t=192|o>>6&31,i=128|63&o;a.push(String.fromCharCode(t),String.fromCharCode(i))}else if(o>=2048&&o<=65535){t=224|o>>12&15,i=128|o>>6&63;var c=128|63&o;a.push(String.fromCharCode(t),String.fromCharCode(i),String.fromCharCode(c))}}return a.join("")},UTF8ToUTF16:function(e){var a=[],n=e.length,r=0;for(r=0;r>7&255))a.push(e.charAt(r));else if(6==(o>>5&255)){var t=e.charCodeAt(++r),i=(31&o)<<6,c=63&t,s=i|c;a.push(Sting.fromCharCode(s))}else if(14==(o>>4&255)){t=e.charCodeAt(++r);var g=e.charCodeAt(++r);i=o<<4|t>>2&15,c=(3&t)<<6|63&g;s=(255&i)<<8|c,a.push(String.fromCharCode(s))}}return a.join("")},encode:function(e){if(!e)return"";var a=this.UTF16ToUTF8(e),n=0,r=a.length,o=[];while(n>2]),n==r){o.push(this.table[(3&t)<<4]),o.push("==");break}var i=a.charCodeAt(n++);if(n==r){o.push(this.table[(3&t)<<4|i>>4&15]),o.push(this.table[(15&i)<<2]),o.push("=");break}var c=a.charCodeAt(n++);o.push(this.table[(3&t)<<4|i>>4&15]),o.push(this.table[(15&i)<<2|(192&c)>>6]),o.push(this.table[63&c])}return o.join("")},decode:function(e){if(!e)return"";var a=e.length,n=0,r=[];while(n>4,g=(15&t)<<4|i>>2,d=(3&i)<<6|c;r.push(String.fromCharCode(s)),64!=i&&r.push(String.fromCharCode(g)),64!=c&&r.push(String.fromCharCode(d))}return this.UTF8ToUTF16(r.join(""))}};e.exports={HOST:t,formatTime:function(e){var a=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return[a,n,r].map(i).join("-")},formatTimeAll:function(e){var a=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),o=e.getHours(),t=e.getMinutes(),c=e.getSeconds();return[a,n,r].map(i).join("-")+" "+[o,t,c].map(i).join(":")},formatNumber:i,alert:c,getfile:function(e,a,n){var r=uni.getStorageSync("userInfo").access_token,o=t+"manager/get-attachment/"+e+"?token="+r;a(o)},request:s,uploadFormID:function(e){Math.floor((new Date).getTime()/1e3);s({api:"WeChat/SaveFormID",method:"POST",data:{FormIDs:e},utilSuccess:function(e){console.log("上传formID成功")},utilFail:function(e){console.log("上传formID失败")}})},payOrder:function(e,a,n,r){uni.request({url:t+"WxPay/ToPay?openId="+uni.getStorageSync("userInfo").WeChatOpenID+"&orderId="+e+"&OrderType="+a,method:"GET",header:{"content-type":"application/json"},success:function(o){if(""!=o.data){var t=o.data.replace(/\\/g,"");o.data=JSON.parse(t);var i=o.data.package.indexOf("=")+1,c=o.data.package.substring(i);uni.requestPayment({timeStamp:o.data.timeStamp,nonceStr:o.data.nonceStr,package:o.data.package,signType:o.data.signType,paySign:o.data.paySign,success:function(r){n(r),s({api:"WxPay/PayTemplateMsg",data:{prepay_id:c,orderId:e,isSuccess:1,failMsg:"",xType:a}})},fail:function(n){r(n);var o="requestPayment:fail cancel"==n?"用户取消支付":n;s({api:"WxPay/PayTemplateMsg",data:{prepay_id:c,orderId:e,isSuccess:0,failMsg:o,xType:a}})}})}else r("当前网络状况不好")},fail:function(e){r("当前网络状况不好")}})},scanPay:function(e,a,n,r,o,i){var s=uni.getStorageSync("userInfo").access_token;console.log("1.支付进入");var g={token:s,order_id:e,money:a,auth_code:n,type:r};console.log("2.参数"),console.log(g),uni.showLoading({title:"正在加载"}),uni.request({url:t+"manager/scan-pay/"+e,method:"POST",data:{token:s,order_id:e,money:a,auth_code:n,type:r},header:{"content-type":"application/json"},success:function(e){uni.hideLoading(),d(e.data.errorcode)?(o(e),console.log("3.支付成功"),console.log(e)):(c("支付失败:"+e.data.errormsg),console.log("4.支付失败"),console.log(e))},fail:function(e){i("当前网络状况不好"),console.log("4.支付失败"),console.log(res)}})},isLogin:g,isNull:d,phoneRegex:/^1\d{10}$/,idCardRegex:p,filterSpecialChars:function(e){return e.replace(/[^\u4e00-\u9fa5a-zA-Z0-9\w]/g,"")},randomStr:function(e){for(var a="",n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],r=0;r