文件
mashangyoujiu/Public/DIY/iframe/static/js/index.42d68f79.js

1 行
23 KiB
JavaScript
可执行文件

(function(e){function t(t){for(var n,r,s=t[0],l=t[1],c=t[2],u=0,d=[];u<s.length;u++)r=s[u],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&d.push(i[r][0]),i[r]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);f&&f(t);while(d.length)d.shift()();return a.push.apply(a,c||[]),o()}function o(){for(var e,t=0;t<a.length;t++){for(var o=a[t],n=!0,s=1;s<o.length;s++){var l=o[s];0!==i[l]&&(n=!1)}n&&(a.splice(t--,1),e=r(r.s=o[0]))}return e}var n={},i={index:0},a=[];function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.e=function(e){var t=[],o=i[e];if(0!==o)if(o)t.push(o[2]);else{var n=new Promise((function(t,n){o=i[e]=[t,n]}));t.push(o[2]=n);var a,s=document.createElement("script");s.charset="utf-8",s.timeout=120,r.nc&&s.setAttribute("nonce",r.nc),s.src=function(e){return r.p+"static/js/"+({"pages-store-store":"pages-store-store"}[e]||e)+"."+{"pages-store-store":"b66e8a24"}[e]+".js"}(e);var l=new Error;a=function(t){s.onerror=s.onload=null,clearTimeout(c);var o=i[e];if(0!==o){if(o){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",l.name="ChunkLoadError",l.type=n,l.request=a,o[1](l)}i[e]=void 0}};var c=setTimeout((function(){a({type:"timeout",target:s})}),12e4);s.onerror=s.onload=a,document.head.appendChild(s)}return Promise.all(t)},r.m=e,r.c=n,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/Public/DIY/iframe/",r.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var f=l;a.push([0,"chunk-vendors"]),o()})({0:function(e,t,o){e.exports=o("3484")},"2be0":function(e,t,o){var n=o("24fb");t=n(!1),t.push([e.i,"/**app.wxss**/uni-page-body{font-size:%?30?%;color:#333;padding-bottom:%?20?%}.load-image{background-color:#eee}.kong{margin:%?50?%;text-align:center;color:#999;font-size:%?26?%}.vip-discount{display:inline-block;font-size:%?20?%;border-radius:%?6?%;padding:%?2?% %?8?%;color:#fff;margin-top:%?15?%;background:#ff5c6d}.isvip2{display:inline-block;font-size:12px!important;border-radius:50%;padding:%?4?% %?8?%;background-color:#ff3d3d;color:#fff!important;max-height:20px;margin-top:%?15?%;margin-left:%?20?%}.empty{margin-top:%?50?%;font-size:%?28?%;color:#999;text-align:center}.vip-price-style, .plus-vip-price-style{font-size:%?18?%;background:#000;color:#fafad2;padding:%?0?% %?10?%;border-radius:%?4?%;margin-left:%?10?%;display:inline-block;height:%?24?%;line-height:%?24?%}.vip_text{font-size:%?18?%;background:#000;color:#fafad2;padding:%?0?% %?10?%;border-radius:%?4?%;margin-left:%?10?%;display:inline-block;height:%?24?%;line-height:%?24?%}.shop_price{font-size:%?22?%;margin-left:%?20?%;color:#b8860b}\r\n\r\n/* 促销价*/.list-inner-price{width:30vw;color:#fd633a;text-align:left;font-size:%?26?%;vertical-align:bottom\r\n /* line-height: 26rpx; */}.price_pass{display:inline-block;position:relative;line-height:%?28?%;color:#999;margin-left:%?10?%;font-size:%?24?%;text-decoration:line-through}\r\n\r\n/* 加载遮罩 */.loadingbox{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#fff;z-index:10}\r\n\r\n/* loading样式 */.loading{margin:%?20?%;display:flex;justify-content:center;align-items:center}.loading>uni-image{width:%?40?%;height:%?40?%}.loading>uni-text{font-size:%?24?%;color:#999;margin-left:%?20?%}.preferential{color:#fd633a!important;background-color:#fff;display:inline-block;font-size:%?24?%!important;line-height:%?24?%!important;padding:%?4?%;border-radius:2px;flex-shrink:0;border:1px solid #fd633a;margin-left:%?16?%}.pl{font-size:%?28?%;color:#aaa}.alert-make{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:100}.alert-view-close{width:100%;height:100%;position:absolute;top:0;left:0}.shareBox{position:fixed;bottom:0;left:0;width:100%;z-index:3;background:#fff;text-align:center}.shareTop{display:flex;align-items:center;justify-content:space-between;background:#f6f6f6;padding:%?30?% 0;color:#333;font-size:%?26?%}.share-left, .share-right{width:50%}.share-left uni-image, .share-right uni-image{width:%?100?%;height:%?100?%}.share-right{padding:none;line-height:normal;border:none;font-size:%?26?%;background:transparent;color:#333}.share-right::after{border:none}.shareBottom{padding:%?20?% 0}.imagePathBox{width:76%;position:fixed;top:3%;left:12%;z-index:101;text-align:center;height:calc(100vh - 10vh - %?60?%);display:flex;align-items:center;overflow-y:auto}.code-img{width:100%}.save-img{z-index:3;text-align:center;display:block;width:30%;height:%?60?%;padding:0;line-height:%?60?%;background:#f1f1f1;color:#666;font-size:%?26?%;border-radius:%?44?%;letter-spacing:%?2?%;position:fixed;bottom:5vh;left:35%}::-webkit-scrollbar{width:0;height:0;color:transparent;display:none}.goods-sell-empty{position:absolute;top:%?40?%;left:calc(50% - %?70?%);z-index:1;background-color:rgba(0,0,0,.5);color:#fff;font-size:%?28?%;width:%?140?%;height:%?140?%;border-radius:50%;display:flex;align-items:center;justify-content:center}.mycanvas{width:375px;height:667px;position:fixed;top:9999px}",""]),e.exports=t},3484:function(e,t,o){"use strict";var n=o("ee27").default;o("a9e3"),o("d3b7"),o("159b"),o("b64b");var i=n(o("f3f3"));o("e623"),o("e379"),o("5dc8"),o("37e1"),o("3791"),o("1c31");var a=n(o("e143")),r=n(o("86c3"));a.default.config.productionTip=!1;var s=Number(a.default.version.split(".")[0]);console.log("version",s),a.default.mixin({methods:{setData:function(e,t){var o,n,i=this,a=[];Object.keys(e).forEach((function(t){a=t.split("."),o=e[t],n=i.$data,a.forEach((function(e,t){t+1==a.length?i.$set(n,e,o):n[e]||i.$set(n,e,{}),n=n[e]}))})),t&&t()}}}),r.default.mpType="app";var l=new a.default((0,i.default)({},r.default));l.$mount()},3791:function(e,t,o){"use strict";(function(e){var t=o("ee27").default;o("13d5"),o("d3b7"),o("ddb0"),o("ac1f"),o("5319");var n=t(o("e143")),i={keys:function(){return[]}};e["____90F8114____"]=!0,delete e["____90F8114____"],e.__uniConfig={tabBar:{color:"#666",selectedColor:"#ff5c6d",backgroundColor:"#ffffff",list:[]},permission:{"scope.userLocation":{desc:"为了按距离获取附近的门店"}},globalStyle:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#ffffff",navigationBarTitleText:"",navigationBarTextStyle:"black",backgroundColor:"#f6f6f6"},condition:{current:0,list:[]}},e.__uniConfig.compilerVersion="4.08",e.__uniConfig.darkmode=!1,e.__uniConfig.themeConfig={},e.__uniConfig.uniPlatform="h5",e.__uniConfig.appId="__UNI__90F8114",e.__uniConfig.appName="reatail-uniapp-diy",e.__uniConfig.appVersion="1.0.0",e.__uniConfig.appVersionCode="100",e.__uniConfig.router={mode:"hash",base:"/Public/DIY/iframe/"},e.__uniConfig.publicPath="/Public/DIY/iframe/",e.__uniConfig["async"]={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4},e.__uniConfig.debug=!1,e.__uniConfig.networkTimeout={request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},e.__uniConfig.sdkConfigs={},e.__uniConfig.qqMapKey=void 0,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=i.keys().reduce((function(e,t){var o=t.replace(/\.\/(uni-app.)?(.*).json/,"$2"),n=i(t);return Object.assign(e[o]||(e[o]={}),n.common||n),e}),{}),e.__uniConfig.nvue={"flex-direction":"column"},e.__uniConfig.__webpack_chunk_load__=o.e,n.default.component("pages-store-store",(function(e){var t={component:o.e("pages-store-store").then(function(){return e(o("eabd"))}.bind(null,o)).catch(o.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/store/store",component:{render:function(e){return e("Page",{props:Object.assign({isQuit:!0,isEntry:!0},__uniConfig.globalStyle,{navigationStyle:"custom"})},[e("pages-store-store",{slot:"page"})])}},meta:{id:1,name:"pages-store-store",isNVue:!1,maxWidth:0,pagePath:"pages/store/store",isQuit:!0,isEntry:!0,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,o("c8ba"))},"6e09":function(e,t,o){"use strict";o("7a82");var n=o("ee27").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=n(o("fc11"));o("4e82"),o("b64b"),o("d3b7"),o("159b"),o("e25e"),o("14d9"),o("d401"),o("25f0"),o("fb6a"),o("acd8"),o("c975");var r={globalData:(i={XcxData:{userInfo:"",isRegister:!1,systemInfo:wx.getSystemInfoSync(),openid:"",merchant_id:"",siteBaseUrl:"",domian:"",appid:"",store_id:"",begin_store_id:"",isLoadInitial:!1,shoppingCount:0,domain:""},userLogin:function(e){var t=this;wx.login({success:function(o){var n=o.code;t.sendRequest({url:"/Register/getOpenId",data:{code:n,appId:t.XcxData.appid},showLoading:!1,success:function(o){1==o.status?(wx.setStorageSync("userInfo",o.data),wx.setStorageSync("openid",o.data.openid),wx.setStorageSync("signKey",o.data.key),t.XcxData.isRegister=!0,t.XcxData.userInfo=o.data,"function"==typeof e&&e()):2==o.status?(wx.setStorageSync("openid",o.openid),t.XcxData.isLoadInitial=!0,"function"==typeof e&&e()):wx.showToast({title:o.msg,icon:"none",duration:1500,mask:!1}),t.XcxData.isLoadInitial=!0},fail:function(){wx.showToast({title:"请求发生错误,请稍后重试",icon:"none",duration:1500,mask:!0}),t.XcxData.isLoadInitial=!0}})},fail:function(e){wx.showToast({title:"小程序用户登录失败",icon:"none",duration:1500,mask:!1}),t.XcxData.isLoadInitial=!0}})},sendRequest:function(e,t){var o=this;console.log("param, customSiteUrl",e,t),wx.getExtConfig&&wx.getExtConfig({success:function(n){console.log("res",n);var i=e.data||{},a=!1!==e.showLoading;if(a){var r=e.loadTitle?e.loadTitle:"加载中...";wx.showLoading({title:r,mask:!0})}i.vid=o.XcxData.userInfo&&o.XcxData.userInfo.vid?o.XcxData.userInfo.vid:"";var s,l=!1!==e.needSign,c=wx.getStorageSync("userInfo");i.merchant_id=o.XcxData.merchant_id,c.uid&&l&&(i.uid=c.uid),""!==i.store_id&&void 0!==i.store_id&&null!==i.store_id||!o.XcxData.store_id||(i.store_id=o.XcxData.store_id);var f=wx.getStorageSync("openid");f&&(i.openid=f),console.log("customSiteUrl",t),t?s=t+e.url:(console.log("that.XcxData.siteBaseUrl",o.XcxData.siteBaseUrl),s=o.XcxData.siteBaseUrl+e.url),o.XcxData.systemInfo&&o.XcxData.systemInfo.model&&(i.equip=o.XcxData.systemInfo.model);var u=wx.getStorageSync("signKey");if(u&&l){for(var d=Object.keys(i).sort(),g={},p=0;p<d.length;p++)g[d[p]]=i[d[p]];i=g}if(i=o.modifyPostParam(i),u&&l){var h=i+"&key="+u,m=(h=decodeURIComponent(h),md5.md5(h));i+="&sign="+m}console.log(s),console.log(i),wx.request({url:s,data:i,method:"post",header:{"content-type":"application/x-www-form-urlencoded"},success:function(t){console.log("app.res: ",t.data),o.isTimeOut=!1,a&&wx.hideLoading(),-1==t.data.status&&!1!==e.needLogin?wx.showModal({title:"登陆提示",content:"您还未登录,暂不能体验该功能,请先登录!",showCancel:!0,cancelText:"暂不登录",cancelColor:"#999",confirmText:"去登录",confirmColor:"#ff5c6d",success:function(e){e.confirm&&wx.switchTab({url:"/pages/my/my"})}}):-2==t.data.status||-3==t.data.status?o.userLogin((function(){o.sendRequest(e)})):"function"==typeof e.success&&e.success(t.data)},fail:function(t){a&&wx.hideLoading(),console.log(t),"request:fail timeout"!=t.errMsg||o.isTimeOut||(wx.showToast({title:"网络超时,请检查您的网络",icon:"none",duration:1500,mask:!0}),o.isTimeOut=!0),"function"==typeof e.fail&&e.fail(t.data)},complete:function(t){"function"==typeof e.complete&&e.complete(t.data)}})}})},getShopCarGoodsCount:function(){var e=this;e.sendRequest({url:"/Shopping/getShopCarGoodsCount",showLoading:!1,needLogin:!1,success:function(t){var o=0;1==t.status&&(o=t.count),e.setShoppingCount(o)},fail:function(){wx.removeTabBarBadge({index:2})}})},setShoppingCount:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.XcxData.shoppingCount=e,e>999&&(e="999+"),0==e?wx.removeTabBarBadge({index:2}):wx.setTabBarBadge({index:2,text:String(e)})},modifyPostParam:function(e){var t,o,n,i,a,r,s,l="";for(t in e)if(o=e[t],o instanceof Array)for(s=0;s<o.length;++s)a=o[s],n=t+"["+s+"]",r={},r[n]=a,l+=this.modifyPostParam(r)+"&";else if(o instanceof Object)for(i in o)a=o[i],n=t+"["+i+"]",r={},r[n]=a,l+=this.modifyPostParam(r)+"&";else void 0!==o&&null!==o&&""!==o&&(l+=encodeURIComponent(t)+"="+encodeURIComponent(o)+"&");return l.length?l.substr(0,l.length-1):l},showToast:function(e){wx.showToast({title:e.title,icon:e.icon,duration:e.duration||1500,success:function(t){"function"==typeof e.success&&e.success(t)},fail:function(t){"function"==typeof e.fail&&e.fail(t)},complete:function(t){"function"==typeof e.complete&&e.complete(t)}})},hideToast:function(){wx.hideToast()},showModal:function(e){wx.showModal({title:e.title||"提示",content:e.content,showCancel:e.showCancel||!1,cancelText:e.cancelText||"取消",cancelColor:e.cancelColor||"#000000",confirmText:e.confirmText||"确定",confirmColor:e.confirmColor||"#3CC51F",success:function(t){t.confirm?"function"==typeof e.confirm&&e.confirm(t):"function"==typeof e.cancel&&e.cancel(t)},fail:function(t){"function"==typeof e.fail&&e.fail(t)},complete:function(t){"function"==typeof e.complete&&e.complete(t)}})},isTimeOut:!1,checkTime:function(e,t){var o=(new Date).getFullYear(),n=(new Date).getMonth(),i=(new Date).getDate(),a=e.split("-"),r=o+"/"+(n+1)+"/"+i+" "+a[0]+":00";r=Date.parse(new Date(r));var s=o+"/"+(n+1)+"/"+i+" "+a[1]+":00";s=Date.parse(new Date(s));var l=(new Date).getHours(),c=(new Date).getMinutes(),f=o+"/"+(n+1)+"/"+i+" "+l+":"+c+":00";return console.log(f),f=Date.parse(new Date(f)),!(f<r||f>s)}},(0,a.default)(i,"showToast",(function(e){if(e&&e.title){var t=e.icon?e.icon:"success";if(e.duration)var o=e.duration;else o=300*e.title.length;wx.showToast({title:e.title,icon:t,image:e.image?e.image:"",duration:o,mask:!!e.mask&&e.mask}),e.success&&"function"==typeof e.success&&setTimeout((function(){e.success()}),o)}})),(0,a.default)(i,"getQrCode",(function(e,t){var o=this;wx.showLoading({title:"生成中...",icon:"loading"}),o.sendRequest({url:"/Share/shareQrCode_v1",type:"post",showLoading:!1,data:{image_url:t.goods_img,path:e},success:function(e){if(1==e.status){var n=wx.arrayBufferToBase64(wx.base64ToArrayBuffer(e.qr_code)),i=wx.arrayBufferToBase64(wx.base64ToArrayBuffer(e.goods_img));n="data:image/jpg;base64,"+n,i="data:image/jpg;base64,"+i,base64src(i,(function(e){var i=e;o.createNewImg(n,i,t)}))}else wx.showModal({title:"错误",confirmColor:"#ff5c6d",confirmText:"确定",content:e.msg,showCancel:!1,success:function(e){}})}})})),(0,a.default)(i,"createNewImg",(function(e,t,o){var n,i,a=this,r=wx.createCanvasContext("mycanvas",this);if(r.setFillStyle("white"),r.fillRect(0,0,375,667),r.drawImage(t,0,0,375,375),r.moveTo(0,0),r.lineTo(375,0),r.lineWidth=10,r.strokeStyle="red",r.stroke(),r.drawImage("/static/images/details-bracground-no.png",0,0,375,375),(2==o.type||3==o.type||4==o.type)&&1==o.status){var s="/static/images/round-white.png";r.drawImage(s,218,348,20,20),r.drawImage(s,255,348,20,20),r.drawImage(s,290,348,20,20),r.drawImage(s,325,348,20,20)}var l=0,c=o.goods.online_price?o.goods.online_price:0;switch(o.type){case 1:n="零售价",i=o.goods.retail_price,o.goods.act_price&&1==o.goods.promotion_status?(n="促销价",i=o.goods.act_price):1==o.goods.plus_mem_status&&o.goods.plus_price>0?(n="PLUS会员价",l=46,i=o.goods.plus_price):o.goods.shop_mem_price>0&&1==o.goods.shop_mem_status&&(n="会员价",i=o.goods.shop_mem_price);break;case 2:n="拼团价",i=o.goods.act_price;break;case 3:n="秒杀价",i=o.goods.spike_price;break;case 4:n="预售价",i=o.goods.advance_price;break}if(r.setFontSize(14),r.setFillStyle("white"),r.fillText(n,35,335),r.setFontSize(12),r.fillText("¥",22,365),r.setFontSize(24),r.fillText(i,35,365),r.stroke(),1!=o.type&&(r.setFontSize(14),r.setFillStyle("white"),r.fillText(o.text,160,363),r.stroke(),o.time[0]<10?(r.setFontSize(10),r.setFillStyle("black"),r.fillText(o.time[0],224,363),r.setFontSize(12),r.setFillStyle("white"),r.fillText("天",240,363),r.stroke()):o.time[0].length<100?(r.setFontSize(10),r.setFillStyle("black"),r.fillText(o.time[0],221,363),r.setFontSize(12),r.setFillStyle("white"),r.fillText("天",240,363),r.stroke()):(r.setFontSize(10),r.setFillStyle("black"),r.fillText(o.time[0],219,363),r.setFontSize(12),r.setFillStyle("white"),r.fillText("天",240,363),r.stroke()),r.setFontSize(10),r.setFillStyle("black"),r.fillText(o.time[1],259,363),r.stroke(),r.setFontSize(12),r.setFillStyle("white"),r.fillText("时",277,363),r.stroke(),r.setFontSize(10),r.setFillStyle("black"),r.fillText(o.time[2],294,363),r.setFontSize(12),r.setFillStyle("white"),r.fillText("分",312,363),r.stroke(),r.setFontSize(10),r.setFillStyle("black"),r.fillText(o.time[3],329,363),r.setFontSize(12),r.setFillStyle("white"),r.fillText("秒",348,363),r.stroke()),r.setFontSize(18),r.setFillStyle("black"),r.fillText(o.goods.goods_name,15,400),r.stroke(),r.setFontSize(16),r.setFillStyle("red"),r.fillText(n,18,450),r.setFontSize(16),r.fillText("¥",68+l,450),r.setFontSize(24),r.fillText(i,85+l,450),1*i<1*c){r.setFontSize(14),r.setFillStyle("#999"),r.fillText("原价",165+l,450),r.fillText("¥",192+l,450),r.fillText(c,206+l,450),r.setLineWidth(.5),r.setStrokeStyle("#aaaaaa");var f=6*(String(c).length+10);r.moveTo(160+l,445),r.lineTo(160+l+f,445),r.stroke()}base64src(e,(function(e){var t=e;r.drawImage(t,110,470,150,150),r.stroke(),r.setFontSize(16),r.setFillStyle("black"),r.fillText("长按二维码识别",133,640),r.stroke(),r.draw(),setTimeout((function(){wx.canvasToTempFilePath({canvasId:"mycanvas",success:function(e){var t=e.tempFilePath;wx.getImageInfo({src:t,success:function(e){e.path&&"function"==typeof o.success&&(a.clearDir(),o.success(e))}}),wx.hideLoading()},fail:function(e){wx.hideLoading()}},this)}),200)}))})),(0,a.default)(i,"saveImg",(function(e){wx.saveImageToPhotosAlbum({filePath:e.url,success:function(t){wx.showModal({content:"图片已保存到相册,赶紧晒一下吧~",showCancel:!1,confirmText:"好的",confirmColor:"#333",success:function(t){t.confirm&&"function"==typeof e.success&&e.success()},fail:function(e){}})}})})),(0,a.default)(i,"clearDir",(function(){var e=wx.getFileSystemManager();console.log("clearDir",e);var t="".concat(wx.env.USER_DATA_PATH);e.readdir({dirPath:t,success:function(o){var n=o.errMsg,i=o.files;"readdir:ok"==n&&i.forEach((function(o){e.unlink({filePath:t+"/"+o})}))}})})),(0,a.default)(i,"creatToday",(function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=28,i=[],a=Date.parse(new Date);switch(console.log(o),t){case 1:a>e.endTime?(i=["明天"],a+=864e5):(i=["今天","明天"],a+=1728e5);break;case 2:o=Date.parse(new Date)+1e3*o,a=Date.parse(new Date(o));break;case 3:n=parseInt((e.endDate-e.startDate)/864e5),a=Date.parse(new Date(e.startDate));break;default:break}var r=1==t?2:0;for(r;r<=n;r++){var s=this.getDate("m-d",a);a+=864e5,i.push(s)}return i})),(0,a.default)(i,"getDate",(function(e,t){if(e&&e.length>11)return"";e=e||"y-m-d h:i:s",e=e.toLowerCase();for(var o="",n=t?new Date(t):new Date,i=0;i<e.length;i++)switch(e.charAt(i)){case"y":o+=n.getFullYear();break;case"m":var a=n.getMonth()+1;a>=1&&a<=9&&(a="0"+a),o+=a;break;case"d":var r=n.getDate();r>=1&&r<=9&&(r="0"+r),o+=r;break;case"h":var s=n.getHours();s>=0&&s<=9&&(s="0"+s),o+=s;break;case"i":var l=n.getMinutes();l>=0&&l<=9&&(l="0"+l),o+=l;break;case"s":var c=n.getSeconds();c>=0&&c<=9&&(c="0"+c),o+=c;break;default:o+=e.charAt(i)}return o})),(0,a.default)(i,"getDayHis",(function(e){var t=[];return t[0]=Math.floor(e/1e3/60/60/24),t[1]=Math.floor(e/1e3/60/60%24),t[2]=Math.floor(e/1e3/60%60),t[3]=Math.floor(e/1e3%60),t[1]=t[1]>9?t[1]:"0"+t[1],t[2]=t[2]>9?t[2]:"0"+t[2],t[3]=t[3]>9?t[3]:"0"+t[3],t})),(0,a.default)(i,"roundPrice",(function(e){var t=e.toString(),o=t.split(".");return o[1]&&(o[1].length>3&&"4999"==o[1].slice(2,6)||o[1].length>=3&&"5"==o[1].slice(2,3))&&(e=parseFloat(o[0])+(parseFloat(o[1].slice(0,2))+1)/100),e=Math.round(100*e)/100,e})),i),onLaunch:function(e){console.log(e),e.query&&e.query.store_id&&(this.globalData.XcxData.store_id=e.query.store_id,this.globalData.XcxData.begin_store_id=e.query.store_id);var t=this;wx.getExtConfig&&wx.getExtConfig({success:function(e){console.log(e),-1!=e.extConfig.siteBaseUrl.indexOf("://")?(t.globalData.XcxData.siteBaseUrl=e.extConfig.siteBaseUrl,t.globalData.XcxData.domain=e.extConfig.domain,console.log("domain -- getExtConfig",e.extConfig.domain),console.log("domain -- globalData.XcxData",t.globalData.XcxData.domain)):(t.globalData.XcxData.domain="https://"+e.extConfig.domain,t.globalData.XcxData.siteBaseUrl="https://"+e.extConfig.siteBaseUrl),t.globalData.XcxData.merchant_id=e.extConfig.merchant_id,t.globalData.XcxData.appid=e.extConfig.appid,t.globalData.userLogin()}})},onShow:function(e){},methods:{}};t.default=r},"7bfa":function(e,t,o){"use strict";var n=o("c64b"),i=o.n(n);i.a},"86c3":function(e,t,o){"use strict";o.r(t);var n=o("9a7c"),i=o("9c19");for(var a in i)["default"].indexOf(a)<0&&function(e){o.d(t,e,(function(){return i[e]}))}(a);o("7bfa");var r=o("f0c5"),s=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=s.exports},"9a7c":function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return i})),o.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=this._self._c||e;return t("App",{attrs:{keepAliveInclude:this.keepAliveInclude}})},i=[]},"9c19":function(e,t,o){"use strict";o.r(t);var n=o("6e09"),i=o.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){o.d(t,e,(function(){return n[e]}))}(a);t["default"]=i.a},c64b:function(e,t,o){var n=o("2be0");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=o("4f06").default;i("abbe806c",n,!0,{sourceMap:!1,shadowMode:!1})}});