(function(e){function t(t){for(var i,r,u=t[0],s=t[1],c=t[2],f=0,d=[];f255?(n+=2,n>i*t&&(n++,o.push(e.slice(a,r)),a=r,i++)):(n++,n>i*t&&(o.push(e.slice(a,r)),a=r,i++));return o.push(e.slice(a,e.length)),[n,o,i]},PosterCanvas:function(e,t,n,i,a){var o=this;uni.showLoading({title:i18n.t("海报生成中"),mask:!0});var r=uni.createCanvasContext("myCanvas");r.clearRect(0,0,0,0),r.fillStyle="#fff",r.fillRect(0,0,750,1250),uni.getImageInfo({src:e[0],success:function(u){var c=u.width,l=u.height;r.drawImage(e[1],0,0,c,c),r.save();var f=110;r.arc(590,900,f,0,2*Math.PI),r.drawImage(e[2],480,790,220,220),r.restore();var d=o.textByteLength(t,20),p=(0,s.default)(d,3),h=(p[0],p[1]),g=p[2];if(g>2){g=2;var v=h.slice(0,2);v[v.length-1]+="……",h=v}r.setTextAlign("left"),r.setFontSize(36),r.setFillStyle("#000");for(var m=0;m2){g=2;var v=h.slice(0,2);v[v.length-1]+="…",h=v}l.setTextAlign("left"),l.setFillStyle("#000"),h.length<2?l.setFontSize(22):l.setFontSize(20);for(var m=0;m1&&void 0!==arguments[1]?arguments[1]:new Date,n=this;e&&e.includes("-")||n.Tips({title:"识别身份证有效期格式错误"});var i=e.split("-"),a=(0,s.default)(i,2),o=a[0],r=a[1],u=function(e){var t=parseInt(e.slice(0,4),10),n=parseInt(e.slice(4,6),10)-1,i=parseInt(e.slice(6,8),10);return new Date(t,n,i)},c=u(o),l=u(r);return t>l||t750?(n=750,i=750/o):(n=t.width,i=t.height),a&&a({w:n,h:i});var r=uni.createCanvasContext("canvas");r.width=n,r.height=i,r.clearRect(0,0,n,i),r.drawImage(t.path,0,0,n,i),r.save(),setTimeout((function(e){r.draw(!0,(function(){uni.canvasToTempFilePath({canvasId:"canvas",fileType:"JPEG",destWidth:n,destHeight:i,quality:.7,success:function(e){h(e.tempFilePath)}})}))}),200)}}})},fail:function(t){var n=t.errMsg;e.log(n,"111111111"),"chooseImage:fail cancel"==n&&(n="取消选择照片"),"chooseImage:fail:systempermission denied"==n&&(n="请检查相册和相机权限"),"chooseImage:fail privacy permission is not authorized"==n&&(n="获取照片隐私权限失败"),"chooseImage:fail privacy permission is not authorized in gap"==n&&(n="获取照片隐私权限失败"),o.Tips({title:n})}})},uploadImgs:function(t,n,i,a){var o=this;uni.uploadFile({url:HTTP_REQUEST_URL+"/api/"+t,filePath:n,fileType:"image",name:"pics",formData:{filename:"pics"},header:(0,u.default)({},TOKENNAME,"Bearer "+store.state.app.token),success:function(e){if(uni.hideLoading(),403==e.statusCode)o.Tips({title:e.data});else{var t=e.data?JSON.parse(e.data):{};200==t.status?i&&i(t):(a&&a(t),o.Tips({title:t.msg}))}},fail:function(t){uni.hideLoading(),e.log(res),o.Tips({title:i18n.t("上传图片失败")})}})},compareVersion:function(e,t){e=e.split("."),t=t.split(".");var n=Math.max(e.length,t.length);while(e.lengtho)return 1;if(a=i?n:i,((this.Mul(e,a)-this.Mul(t,a))/a).toFixed(o)},Mul:function(e,t){e=parseFloat(e),t=parseFloat(t);var n=0,i=e.toString(),a=t.toString();try{n+=i.split(".")[1].length}catch(o){}try{n+=a.split(".")[1].length}catch(o){}return Number(i.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,n)}},$L:{getLocation:function(){var e=this;return(0,r.default)((0,o.default)().mark((function t(){return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.doGetLocation();case 1:case"end":return t.stop()}}),t)})))()},doGetLocation:function(){uni.getLocation({success:function(e){uni.removeStorageSync("CACHE_LONGITUDE"),uni.removeStorageSync("CACHE_LATITUDE"),uni.setStorageSync("CACHE_LONGITUDE",e.longitude),uni.setStorageSync("CACHE_LATITUDE",e.latitude)},fail:function(e){e.errMsg.indexOf("auth deny")>=0?uni.showToast({title:i18n.t("访问位置被拒绝")}):uni.showToast({title:e.errMsg})}})},getSetting:function(){return new Promise((function(e,t){uni.getSetting({success:function(t){void 0!==t.authSetting["scope.userLocation"]?t.authSetting["scope.userLocation"]?e(1):e(2):e(0)}})}))},openSetting:function(){var e=this;uni.openSetting({success:function(t){t.authSetting&&t.authSetting["scope.userLocation"]&&e.doGetLocation()},fail:function(e){}})},checkPermission:function(){return(0,r.default)((0,o.default)().mark((function e(){var t;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!permision.isIOS){e.next=6;break}return e.next=3,permision.requestIOS("location");case 3:e.t0=e.sent,e.next=9;break;case 6:return e.next=8,permision.requestAndroid("android.permission.ACCESS_FINE_LOCATION");case 8:e.t0=e.sent;case 9:return t=e.t0,null===t||1===t?t=1:2===t?uni.showModal({content:i18n.t("系统定位已关闭"),confirmText:i18n.t("确定"),showCancel:!1,success:function(e){}}):t.code?uni.showModal({content:t.message}):uni.showModal({content:i18n.t("需要定位权限"),confirmText:i18n.t("确定"),success:function(e){e.confirm&&permision.gotoAppSetting()}}),e.abrupt("return",t);case 12:case"end":return e.stop()}}),e)})))()}},JumpPath:function(t){var n=t.split("@APPID=");n.length>1?this.Tips({title:"h5与app端不支持跳转外部小程序"}):(e.log(t,"----------"),-1!=t.indexOf("http")?uni.navigateTo({url:"/pages/annex/web_view/index?url=".concat(encodeURIComponent(t))}):-1==["/pages/goods_cate/goods_cate","/pages/order_addcart/order_addcart","/pages/user/index","/pages/index/index"].indexOf(t)?uni.navigateTo({url:t}):uni.switchTab({url:t}))},openLocation:function(t){e.log(t),uni.openLocation((0,a.default)((0,a.default)({},t),{},{success:function(){e.log("success")},fail:function(t){e.log(t)}}))},pxToRpx:function(e){var t=uni.getSystemInfoSync().screenWidth,n=e/(t/750);return n},getLastMonths:function(e){var t,n=[];if(e){var i=e.split("-").map(Number),a=(0,s.default)(i,2),o=a[0],r=a[1];t=new Date(o,r-1)}else t=new Date;t.setDate(1);for(var u=0;u<4;u++){var c=t.getFullYear(),l=String(t.getMonth()).padStart(2,"0");n.push({name:"".concat(c,"-").concat(l)}),t.setMonth(t.getMonth()-1)}return n}};t.default=l}).call(this,n("ba7c")["default"])},"738f":function(e,t,n){var i=n("2f74");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("967d").default;a("073fc182",i,!0,{sourceMap:!1,shadowMode:!1})},"7d57":function(e,t){e.exports={LOGIN_STATUS:"LOGIN_STATUS_TOKEN",ISPAY:"",UID:"UID",USER_INFO:"USER_INFO",EXPIRES_TIME:"EXPIRES_TIME",WX_AUTH:"WX_AUTH",STATE_KEY:"wx_authorize_state",LOGINTYPE:"loginType",BACK_URL:"login_back_url",STATE_R_KEY:"roution_authorize_state",LOGO_URL:"LOGO_URL",SUBSCRIBE_MESSAGE:"SUBSCRIBE_MESSAGE",TIPS_KEY:"TIPS_KEY",SPREAD:"spread",CACHE_LONGITUDE:"LONGITUDE",CACHE_LATITUDE:"LATITUDE",USER_ADDRESS:"USER_ADDRESS",isFiveClick:"isFiveClick"}},"934d":function(e,t,n){"use strict";var i=n("738f"),a=n.n(i);a.a},"9bb0":function(e,t,n){"use strict";var i=n("f5bd").default,a=i(n("9b1b"));n("3dde"),n("a8b2"),n("1480"),n("6e4a"),n("a514"),n("d6b2");var o=i(n("f773")),r=i(n("19c5")),u=i(n("6810")),s=i(n("9b8e"));n("b75f"),s.default.prototype.$util=u.default,s.default.config.productionTip=!1,o.default.mpType="app";var c=new s.default((0,a.default)({store:r.default},o.default));c.$mount()},a514:function(e,t,n){"use strict";(function(e){var t=n("f5bd").default;n("473f"),n("bf0f"),n("de6c"),n("5c47"),n("a1c1");var i=t(n("9b8e")),a={keys:function(){return[]}};e["____0A12251____"]=!0,delete e["____0A12251____"],e.__uniConfig={globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},uniIdRouter:{}},e.__uniConfig.compilerVersion="4.76",e.__uniConfig.darkmode=!1,e.__uniConfig.themeConfig={},e.__uniConfig.uniPlatform="h5",e.__uniConfig.appId="__UNI__0A12251",e.__uniConfig.appName="H5-pay",e.__uniConfig.appVersion="1.0.0",e.__uniConfig.appVersionCode="100",e.__uniConfig.router={mode:"history",base:"/cash_pay/"},e.__uniConfig.publicPath="/cash_pay/",e.__uniConfig["async"]={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:2e5},e.__uniConfig.debug=!1,e.__uniConfig.networkTimeout={request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},e.__uniConfig.sdkConfigs={maps:{qqmap:{key:"NO7BZ-APDKP-UCBD7-VT7CX-R5UZK-JBF2W"}}},e.__uniConfig.qqMapKey="NO7BZ-APDKP-UCBD7-VT7CX-R5UZK-JBF2W",e.__uniConfig.googleMapKey=void 0,e.__uniConfig.aMapKey=void 0,e.__uniConfig.aMapSecurityJsCode=void 0,e.__uniConfig.aMapServiceHost=void 0,e.__uniConfig.locale="",e.__uniConfig.fallbackLocale=void 0,e.__uniConfig.locales=a.keys().reduce((function(e,t){var n=t.replace(/\.\/(uni-app.)?(.*).json/,"$2"),i=a(t);return Object.assign(e[n]||(e[n]={}),i.common||i),e}),{}),e.__uniConfig.nvue={"flex-direction":"column"},e.__uniConfig.__webpack_chunk_load__=n.e,i.default.component("pages-index-index",(function(e){var t={component:n.e("pages-index-index").then(function(){return e(n("d456d"))}.bind(null,n)).catch(n.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(t.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(t.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),t})),i.default.component("pages-Paysuccessful-jxPaysuccessful",(function(e){var t={component:n.e("pages-Paysuccessful-jxPaysuccessful").then(function(){return e(n("f9bf"))}.bind(null,n)).catch(n.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(t.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(t.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),t})),e.__uniRoutes=[{path:"/",alias:"/pages/index/index",component:{render:function(e){return e("Page",{props:Object.assign({isQuit:!0,isEntry:!0},__uniConfig.globalStyle,{navigationBarTitleText:"向商家付款",enablePullDownRefresh:!1,navigationStyle:"custom"})},[e("pages-index-index",{slot:"page"})])}},meta:{id:1,name:"pages-index-index",isNVue:!1,maxWidth:0,pagePath:"pages/index/index",isQuit:!0,isEntry:!0,windowTop:0}},{path:"/pages/Paysuccessful/jxPaysuccessful",component:{render:function(e){return e("Page",{props:Object.assign({},__uniConfig.globalStyle,{navigationBarTitleText:"支付结果",enablePullDownRefresh:!1,navigationStyle:"custom"})},[e("pages-Paysuccessful-jxPaysuccessful",{slot:"page"})])}},meta:{name:"pages-Paysuccessful-jxPaysuccessful",isNVue:!1,maxWidth:0,pagePath:"pages/Paysuccessful/jxPaysuccessful",windowTop:0}},{path:"/choose-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-choose-location",{slot:"page"})])}},meta:{name:"choose-location",pagePath:"/choose-location"}},{path:"/open-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-open-location",{slot:"page"})])}},meta:{name:"open-location",pagePath:"/open-location"}}],e.UniApp&&new e.UniApp}).call(this,n("0ee4"))},acf6:function(e,t,n){"use strict";(function(e){n("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={onLaunch:function(){e.log("App Launch")},onShow:function(){e.log("App Show")},onHide:function(){e.log("App Hide")}};t.default=i}).call(this,n("ba7c")["default"])},b304:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("7d57"),o=i(n("b5f1")),r={token:o.default.get(a.LOGIN_STATUS)||!1,ISPAY:o.default.get(a.ISPAY)||""},u={LOGIN:function(e,t){e.token=t.token},UPDATE_LOGIN:function(e,t){e.token=t,o.default.set(a.LOGIN_STATUS,t)},SETALL_PAT:function(e,t){e.ISPAY=t,o.default.set(a.ISPAY,t)}},s={state:r,mutations:u,actions:{}};t.default=s},b5f1:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("5c47"),n("a1c1"),n("fd3c"),n("aa9c"),n("5ef2"),n("e966"),n("64aa"),n("dd2b"),n("d4b5"),n("bf0f");var a=i(n("fcf3")),o=i(n("80b1")),r=i(n("efe5")),u=n("3512"),s=function(){function e(t){(0,o.default)(this,e),this.cacheSetHandler=uni.setStorageSync,this.cacheGetHandler=uni.getStorageSync,this.cacheClearHandler=uni.removeStorageSync,this.cacheExpire="UNI-APP-CRMEB:TAG",this.clearOverdue()}return(0,r.default)(e,[{key:"time",value:function(){return Math.round(new Date/1e3)}},{key:"strTotime",value:function(e){var t=e.substring(0,19);return t=t.replace(/-/g,"/"),Math.round(new Date(t).getTime()/1e3)}},{key:"setExpireCaheTag",value:function(e,t){var n=this;if(t=void 0!==t?t:u.EXPIRE,"number"===typeof t){var i=this.cacheGetHandler(this.cacheExpire),o=[],r=[];"object"===(0,a.default)(i)&&i.length&&(o=i.map((function(i){return r.push(i.key),i.key===e&&(i.expire=0===t?0:n.time()+t),i}))),r.length&&-1!==r.indexOf(e)||o.push({key:e,expire:0===t?0:this.time()+t}),this.cacheSetHandler(this.cacheExpire,o)}}},{key:"getExpireCahe",value:function(e,t){try{var n=this.cacheGetHandler(this.cacheExpire),i=0,o=!1;if("object"===(0,a.default)(n)&&n.length){if(n.map((function(t,n){t.key===e&&(i=t.expire,o=n)})),i){var r=parseInt(i);return!(i&&in||0===e.expire?o.push(e):i.push(e.key))})),o.length!==t.length&&this.cacheSetHandler(this.cacheExpire,o),i.forEach((function(t){e.cacheClearHandler(t)}))}}]),e}(),c=new s;t.default=c},b75f:function(e,t,n){var i=n("bdbb").default;n("bf0f"),uni.addInterceptor({returnValue:function(e){return!e||"object"!==i(e)&&"function"!==typeof e||"function"!==typeof e.then?e:new Promise((function(t,n){e.then((function(e){return e?e[0]?n(e[0]):t(e[1]):t(e)}))}))}})},ca3e:function(e,t,n){"use strict";n("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={token:function(e){return e.app.token},isLogin:function(e){return!!e.app.token},backgroundColor:function(e){return e.app.backgroundColor},userInfo:function(e){return e.app.userInfo||{}},uid:function(e){return e.app.uid},homeActive:function(e){return e.app.homeActive},home:function(e){return e.app.home},cartNum:function(e){return e.indexData.cartNum},activityTab:function(e){return e.app.activityTab},address:function(e){return e.app.addressInfo}}},cb07:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("b304")),o={app:a.default};t.default=o},f773:function(e,t,n){"use strict";n.r(t);var i=n("32a1"),a=n("48b1");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("934d");var r=n("828b"),u=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);t["default"]=u.exports}});