(function(e){function t(t){for(var n,r,s=t[0],l=t[1],c=t[2],u=0,d=[];uuni-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;p0&&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;ss)}},(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=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})}});