java-mall-app/unpackage/dist/build/mp-weixin/pagesub/index/store.js
2025-12-12 17:04:03 +08:00

1 line
39 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesub/index/store","components/payment-box","components/uni-popup/uni-popup"],{"26af":function(t,e,o){"use strict";o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return i})),o.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,o=(t._self._c,t.__("支付金额")),n=t.__("¥"),i=t.defaultUserMoney&&t.paymentDataDefault.user_recharge_card&&t.blanceChannel.recharge_card?t.sprintf(t.__("充值余额 (¥%s)"),t.paymentDataDefault.user_recharge_card):null,a=t.defaultUserMoney&&t.paymentDataDefault.user_sp&&t.blanceChannel.sp?t.sprintf(t.__("现金券 (¥%s)"),t.paymentDataDefault.user_sp):null,s=t.defaultUserMoney&&(t.userMoney||t.userPoints||t.userSp||t.userRechargeCard)?t.__("请输入支付密码"):null,r=t.__map(t.providerList,(function(e,o){var n=t.__get_orig(e),i=t.$.inArray(t.h5WeChatMPpayList,e.id);return{$orig:n,g0:i}})),c=t.__("确定支付");t.$mp.data=Object.assign({},{$root:{m0:o,m1:n,m2:i,m3:a,m4:s,l0:r,m5:c}})},i=[]},"2ac6":function(t,e,o){"use strict";o.r(e);var n=o("7217"),i=o("9c51");for(var a in i)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("8003");var s=o("828b"),r=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"4b80472c",null,!1,n["a"],void 0);e["default"]=r.exports},"36fa":function(t,e,o){"use strict";(function(t,n){var i=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(o("7eb4")),s=i(o("34cf")),r=i(o("7ca3")),c=i(o("ee10")),u=(i(o("e70c")),i(o("2ac6")),i(o("ee53"))),l=o("8f59");function m(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?m(Object(o),!0).forEach((function(e){(0,r.default)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var p={isStoreFlag:1,ProductInfo:{},addCar:!1,count:0,windowHeight:0,categoryname:"",click6:!0,cid:0,cartlist:{},isdata:!0,select_cart_ids:[],tapindex:2,viewtype:1,shopInfo:{analytics:{store_collect:0},store_slogan:"",base:{},info:{store_slide:{}},VendorInfo:" "},pdlist:[],sort:2,ispage:!0,flag:!0,distance:0,istop:!1,TemplateKey:"",smallCategory:[],loadStoreCategoryComplete:!1,currentCategoryId:0,currentCategoryName:"",AdContent:{},post:{store_id:0,orderby:1,sort:2,isnew:!1,curpage:1},formdate:"",pageId:0},f={data:function(){return{options:{},Coupons:[],isCancelSuccess:!0,isCancel:!0,CouponAmount:0,user_is_new:0,pageId:"",loadPageFlag:!1,PageContent:[],BgConfig:{BackgroundObj:{type:1,bgColor:"#ffffff",pathColor:"#f8f8f8",path:""}},PageNav:{window:{navigationBarBackgroundColor:"#ffffff",navigationBarTextStyle:"black",navigationBarTitleText:"",backgroundColor:"#f8f8f8",backgroundTextStyle:"dark"}},AdContent:{},TemplateKey:"",commonTPL:Object.assign({},p),indexArray:[],splist:[],splistStr:[],pid:0,index:0,shareImg:"",shareTitle:"",navTitle:"",refresh:!0,ispage:!0,flag:!0,w:0,comment_row:[],latitude:0,longitude:0,distance:0,discountNum:0,discountNNum:0,initThatProm:Object.assign({},p),initPageData:null,store_id:1001,store_info:null,loadStoreInfoComplete:!1,loadStoreConfigComplete:!1,loadStoreCategoryComplete:!1,isRest:!0,showBackTop:!1,scrollThreshold:600,showLoginPopup:!1}},computed:(0,l.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin","cartNum"]),components:{shoptheme1:function(){o.e("components/themes/shoptheme1").then(function(){return resolve(o("41a9"))}.bind(null,o)).catch(o.oe)},shoptheme2:function(){o.e("components/themes/shoptheme2").then(function(){return resolve(o("c004"))}.bind(null,o)).catch(o.oe)},shoptheme3:function(){o.e("components/themes/shoptheme3").then(function(){return resolve(o("e7b1"))}.bind(null,o)).catch(o.oe)},shoptheme4:function(){o.e("components/themes/shoptheme4").then(function(){return resolve(o("ddd4"))}.bind(null,o)).catch(o.oe)},shoptheme5:function(){o.e("components/themes/shoptheme5").then(function(){return resolve(o("7a72"))}.bind(null,o)).catch(o.oe)},shoptheme6:function(){o.e("components/themes/shoptheme6").then(function(){return resolve(o("14fa"))}.bind(null,o)).catch(o.oe)},diy:function(){Promise.all([o.e("common/vendor"),o.e("components/themes/diy")]).then(function(){return resolve(o("5602"))}.bind(null,o)).catch(o.oe)},uniTag:function(){o.e("components/uni-tag/uni-tag").then(function(){return resolve(o("120e"))}.bind(null,o)).catch(o.oe)},wxParse:function(){Promise.all([o.e("common/vendor"),o.e("components/u-parse/u-parse")]).then(function(){return resolve(o("9733"))}.bind(null,o)).catch(o.oe)},MyTabbar:function(){o.e("pagesub/index/components/tabbar").then(function(){return resolve(o("3ec8"))}.bind(null,o)).catch(o.oe)},loginPopup:function(){Promise.all([o.e("common/vendor"),o.e("components/loginPopup")]).then(function(){return resolve(o("0c45"))}.bind(null,o)).catch(o.oe)}},onBackPress:function(e){var o=e.from;console.log("=======",o),"backbutton"==o&&t.switchTab({url:"/pages/index/index"})},onLoad:function(t){this.$.showModal({title:"提示",content:t}),this.initStorePageData(t)},onShow:function(){this.reloadShop6Data()},onUnload:function(){this.setData({commonTPL:p}),this.notice.removeNotification("RefreshProduct",this)},onPullDownRefresh:function(){var t=(0,c.default)(a.default.mark((function t(){return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.reloadShop6Data();case 1:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),onReachBottom:function(){this.scrollbottom()},onShareAppMessage:function(){return n.showShareMenu({withShareTicket:!0,menus:["shareAppMessage","shareTimeline"]}),{title:this.shareTitle,imageUrl:this.shareImg,path:"/pagesub/index/store?store_id="+this.options.store_id+"&uid="+this.userInfo.user_id}},onShareTimeline:function(){return{title:this.shareTitle,query:{uid:this.userInfo.user_id,store_id:this.options.store_id},imageUrl:this.shareImg}},onPageScroll:function(t){var e=t.scrollTop;this.showBackTop=e>=this.scrollThreshold},methods:d(d({},(0,l.mapMutations)(["logout","getPlantformInfo","forceUserInfo","getStoreInfo"])),{},{closeLoginPopup:function(){this.showLoginPopup=!1},scrollToTop:function(){t.pageScrollTo({scrollTop:0,duration:300})},goShopDetail:function(t){this.$.gopage(t)},handerSkip:function(){t.navigateBack(-1),t.switchTab({url:"/pages/index/index"}),console.log("跳转成功")},addCart:function(e){var o=this;return(0,c.default)(a.default.mark((function n(){var i,s;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=o,s={item_id:e.item_id,proName:e.product_name,cart_quantity:1,activity_id:0,SKU_Id:e.item_id},o.hasLogin){n.next=5;break}return o.showLoginPopup=!0,n.abrupt("return");case 5:if(0!=(null===e||void 0===e?void 0:e.product_quantity)){n.next=8;break}return t.showToast({icon:"error",title:o.$.__("商品库存不足")}),n.abrupt("return",!1);case 8:return n.next=10,o.$store.dispatch("addCart",{params:s,callback:function(e,o,n,a){200==o&&(0!=e.item_quantity?i.$.alert(i.__("添加购物车成功"),(function(){}),400):t.showToast({title:"亲~商品没有库存啦!",icon:"error",duration:500}),i.plantformInfo.prodcut_addcart_flag&&i.$store.dispatch("getCartList",(function(t){})))}});case 10:case"end":return n.stop()}}),n)})))()},ckLabel:function(t){},reloadShop6Data:function(){this.$refs.shop6&&this.$refs.shop6.reloadCategoryProduct(),this.$.stopPullDownRefresh(),this.$.hideLoading()},initStorePageData:function(e){var o=this;if(o.$.showLoading(),o.$set(o.commonTPL,"istop",!1),o.$set(o.commonTPL,"pdlist",[]),e.scene){var n=decodeURIComponent(e.scene),i=n.split("="),r=(0,s.default)(i,2),u=(r[0],r[1]);e.store_id=u}this.setData({options:e,distance:e.d||0,store_id:e.store_id||1001});var l=o.$.getSystemInfoSync().windowWidth;o.setData({w:l}),this.notice.addNotification("RefreshProduct",o.RefreshProduct,o),this.getStoreInfo({callback:function(){var n=(0,c.default)(a.default.mark((function n(i){var s,r,c;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:t.setNavigationBarTitle({title:i.store_name}),s=Object.assign({},i),r=o.$.bMapTransQQMap(s["store_longitude"],s["store_latitude"]),s["store_longitude"]=r.lng,s["store_latitude"]=r.lat,c=o.commonTPL,c.shopInfo=s,o.setData({shareImg:i.WapLogoPath,shareTitle:i.store_name,navTitle:i.store_name,store_info:i,loadStoreInfoComplete:!0});try{o.$set(o.commonTPL,"windowHeight",o.$.getSystemInfoSync().windowHeight-50)}catch(a){}return n.next=11,o.getStoreConfig();case 11:return n.next=13,o.getStoreCategory();case 13:setTimeout((function(){var t=i.store_name,n=o.$.sprintf("%s/h5/pagesub/index/store?store_id=%s",o.Config.SiteUrl,e.store_id),a=i.WapLogoPath;o.$.wxShare(t,"",n,a)}),100),o.$.getLocation({type:"wgs84",success:function(t){o.setData({latitude:t.latitude,longitude:t.longitude}),console.info("手机定位:"),console.info(JSON.stringify(t));var e=function(t,e,o,n){var i=t*Math.PI/180,a=o*Math.PI/180,s=i-a,r=e*Math.PI/180-n*Math.PI/180,c=2*Math.asin(Math.sqrt(Math.pow(Math.sin(s/2),2)+Math.cos(i)*Math.cos(a)*Math.pow(Math.sin(r/2),2)));return c*=6378.137,c=Math.round(1e4*c)/10,c}(o.latitude,o.longitude,r.lat,r.lng);e&&(e=o.$.distanceFormat(e||0)),o.setData({distance:e||0}),o.getNearbylist()},fail:function(){o.$.confirm("手机定位失败"),o.getNearbylist()}});case 15:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),store_id:e.store_id}),t.setStorageSync("store_id",e.store_id)},getDivModel:function(){var t=this,e={store_id:this.store_id};t.$.request({url:this.Config.URL.store.index_diy,data:e,loading:!1,success:function(e,o,n,i){t.setData({loadPageFlag:!0,pageId:e.page_id,PageContent:t.$.parseJSON(e.page_code),BgConfig:t.$.parseJSON(e.page_config),shareImg:e.page_share_image,shareTitle:e.page_share_title})}})},RefreshProduct:function(t){t?this.setData({refresh:!0}):this.setData({refresh:!1})},getStoreCategory:function(){var t=this,e={store_id:t.store_id};return new Promise((function(o,n){t.$.request({url:t.Config.URL.store.product_category,data:e,loading:!1,ajaxCache:{timeout:t.Config.CACHE_EXPIRE},success:function(e,o,n,i){t.commonTPL;t.$set(t.commonTPL,"smallCategory",e.leaf),t.$set(t.commonTPL,"loadStoreCategoryComplete",!0),t.setData({loadStoreCategoryComplete:!0}),e.leaf.length>0&&(t.$set(t.commonTPL,"cid",e.leaf[0].id),t.$set(t.commonTPL,"currentCategoryId",e.leaf[0].id),t.$set(t.commonTPL,"categoryname",e.leaf[0].store_product_cat_name),t.$set(t.commonTPL,"currentCategoryName",e.leaf[0].store_product_cat_name)),1==t.commonTPL.tapindex||(2==t.commonTPL.tapindex?t.listAllProduct():3==t.commonTPL.tapindex?t.listNewProduct():4==t.commonTPL.tapindex?t.getStoreData():t.commonTPL.tapindex),t.$.stopPullDownRefresh(),t.$.hideLoading()},fail:function(t){}})}))},clickRecommend:function(){this.$set(this.commonTPL,"tapindex",1)},clickListAllProduct:function(){this.$set(this.commonTPL,"tapindex",2),this.listAllProduct()},listAllProduct:function(t){this.$set(this.commonTPL,"pdlist",[]),"shop6"===this.commonTPL.TemplateKey?this.$set(this.commonTPL,"post",Object.assign({},this.commonTPL.post,{store_category_ids:this.commonTPL.currentCategoryId,store_id:this.store_id,orderby:1,sort:2,isnew:!1,curpage:1})):(this.$set(this.commonTPL,"post",Object.assign({},this.commonTPL.post,{store_id:this.store_id,orderby:1,sort:2,isnew:!1,curpage:1,is_activity:3})),this.getProductList())},clickListNewProduct:function(){this.$set(this.commonTPL,"tapindex",3),this.listNewProduct()},listNewProduct:function(){this.$set(this.commonTPL,"pdlist",[]),"shop6"===this.commonTPL.TemplateKey?this.$set(this.commonTPL,"post",Object.assign({},this.commonTPL.post,(0,r.default)({store_category_ids:this.commonTPL.currentCategoryId,store_id:this.store_id,sidx:"product_add_time",sord:"DESC",orderby:1,sort:2,isnew:!0,curpage:1},"store_id",this.store_id))):(this.$set(this.commonTPL,"post",Object.assign({},this.commonTPL.post,{store_id:this.store_id,sidx:"product_add_time",sord:"DESC",orderby:2,sort:2,isnew:!0,curpage:1,is_activity:1})),this.getProductList())},clickGetStoreData:function(){this.$set(this.commonTPL,"tapindex",4),this.getStoreData()},getStoreData:function(){},onViewType:function(){this.$set(this.commonTPL,"viewtype",0===this.commonTPL.viewtype?1:0)},clickSortBySaleNum:function(){this.sortBySaleNum()},sortBySaleNum:function(){this.$set(this.commonTPL,"pdlist",[]),this.$set(this.commonTPL,"post",Object.assign({},this.commonTPL.post,{sidx:"product_sale_num",sord:"DESC",curpage:1})),this.getProductList()},clickNewpd:function(){this.newpd()},newpd:function(){this.$set(this.commonTPL,"pdlist",[]),this.$set(this.commonTPL,"post",Object.assign({},this.commonTPL.post,{sidx:"product_add_time",sord:"DESC",curpage:1})),this.getProductList()},clickSortByPrice:function(){this.sortByPrice()},sortByPrice:function(){this.$set(this.commonTPL,"post",Object.assign({},this.commonTPL.post,{sidx:"product_unit_price",sord:1===this.commonTPL.sort?"DESC":"ASC",curpage:1})),this.$set(this.commonTPL,"sort",1==this.commonTPL.sort?2:1),this.$set(this.commonTPL,"pdlist",[]),this.getProductList()},scrollbottom:function(t){var e=this;if(e.commonTPL.flag){e.setData({flag:!1}),clearTimeout(o);var o=setTimeout((function(){e.$set(e.commonTPL,"post",Object.assign({},e.commonTPL.post,{curpage:e.commonTPL.post.curpage+1})),e.getProductList()}),500)}},getProductList:function(){var t=this;t.$set(t.commonTPL,"flag",!1);var e=Object.assign({},t.commonTPL.post,{isnew:t.commonTPL.post.isnew?1:0,user_cart_quantity:"shop6"===t.commonTPL.TemplateKey?1:0});t.$.request({url:this.Config.URL.store.product,loading:!0,data:e,success:function(e,o,n,i){for(var a=0;a<e.items.length;a++)e.items[a]["id"]=e.items[a]["item_id"],e.items[a]["DefaultProductSkuId"]=e.items[a]["item_id"],e.items[a]["productName"]=e.items[a]["product_name"],e.items[a]["SalesName"]=e.items[a]["product_name"],e.items[a]["ProductPic"]=e.items[a]["product_image"],e.items[a]["ItemSalePrice"]=e.items[a]["product_unit_price"],e.items[a]["SaleNum"]=e.items[a]["product_sale_num"],e.items[a]["Stock"]=e.items[a]["product_quantity"],e.items[a]["HasManualSku"]=e.items[a]["item_color"].length>1,e.items[a]["DefaultProductSkuId"]=e.items[a]["item_id"];e.items.length>0?(1==t.commonTPL.post.curpage&&e.items.length<10?(t.$set(t.commonTPL,"flag",!1),t.$set(t.commonTPL,"ispage",!1)):(t.$set(t.commonTPL,"flag",!0),t.$set(t.commonTPL,"ispage",!0)),t.$set(t.commonTPL,"pdlist",t.commonTPL.pdlist.concat(e.items))):(t.$set(t.commonTPL,"flag",!1),t.$set(t.commonTPL,"ispage",!1))}})},scrollView:function(t){t.detail.deltaY<-305&&(this.$set(this.commonTPL,"distance",t.detail.deltaY),this.$set(this.commonTPL,"istop",!0))},scrollTop:function(){this.$set(this.commonTPL,"istop",!1)},returnTop:function(){this.$set(this.commonTPL,"distance",0)},showSupplyProducts:function(){this.$.gopage("/pages/product/list?store_type=2")},getStoreConfig:function(){var t=this,e=this,o={store_id:this.store_id};return new Promise((function(n,i){e.$.request({url:t.Config.URL.store.contents,data:o,loading:!1,success:function(t,o,i,a){if(e.setData({loadStoreConfigComplete:!0}),e.$set(e.commonTPL,"TemplateKey",t.store_template>1e3||"shop7"===t.store_template?"shopdiy":t.store_template),"shopdiy"==e.commonTPL.TemplateKey);else{for(var s=0;s<t.contents["F1ProductContents"].length;s++)t.contents["F1ProductContents"][s]["ProductContentID"]=t.contents["F1ProductContents"][s]["item_id"],t.contents["F1ProductContents"][s]["ProductName"]=t.contents["F1ProductContents"][s]["product_name"],t.contents["F1ProductContents"][s]["Price"]=t.contents["F1ProductContents"][s]["product_unit_price"],t.contents["F1ProductContents"][s]["ImagePath"]=t.contents["F1ProductContents"][s]["product_image"],t.contents["F1ProductContents"][s]["TitleType"]=t.contents["F1TitleType"];for(s=0;s<t.contents["F2ProductContents"].length;s++)t.contents["F2ProductContents"][s]["ProductContentID"]=t.contents["F2ProductContents"][s]["item"],t.contents["F2ProductContents"][s]["ProductName"]=t.contents["F2ProductContents"][s]["name"],t.contents["F2ProductContents"][s]["Price"]=t.contents["F2ProductContents"][s]["product_unit_price"],t.contents["F2ProductContents"][s]["ImagePath"]=t.contents["F2ProductContents"][s]["img"],t.contents["F2ProductContents"][s]["TitleType"]=t.contents["F2TitleType"],t.contents["F2ProductContents"][s]["ProductLinkUrl"]=t.contents["F2ProductContents"][s]["url"];for(s=0;s<t.contents["F3ProductContents"].length;s++)t.contents["F3ProductContents"][s]["ProductContentID"]=t.contents["F3ProductContents"][s]["item_id"],t.contents["F3ProductContents"][s]["ProductName"]=t.contents["F3ProductContents"][s]["product_name"],t.contents["F3ProductContents"][s]["Price"]=t.contents["F3ProductContents"][s]["product_unit_price"],t.contents["F3ProductContents"][s]["ImagePath"]=t.contents["F3ProductContents"][s]["product_image"],t.contents["F3ProductContents"][s]["TitleType"]=t.contents["F3ProductContents"][s]["title"],t.contents["F3ProductContents"][s]["ProductLinkUrl"]=t.contents["F3ProductContents"][s]["link_url"]}e.$set(e.commonTPL,"AdContent",t.contents),e.setData({AdContent:t.contents,TemplateKey:e.commonTPL.TemplateKey,commonTPL:e.commonTPL,discountNum:t.discount_num,discountNNum:t.no_discount_num}),e.commonTPL.smallCategory.length>0&&"shop6"==e.commonTPL.TemplateKey&&e.$set(e.commonTPL,"tapindex",2),"shopdiy"==e.commonTPL.TemplateKey&&e.getDivModel(),n("success")},complete:function(t,e){}})}))},sao:function(){var t=this;t.$.scanCode({success:function(e){var o=e.result.split("=");o.length>2||o.length<2?t.$.alert("无法识别"):"productId"==o[0]?t.$.isNull(o[1])?t.$.alert("无法识别"):t.$.navigateTo("/pages/product/detail?pid="+o[1]):"eventId"==o[0]?t.$.isNull(o[1])?t.$.alert("无法识别"):t.$.navigateTo("../activitycheckin/activitycheckin?eventId="+o[1]):t.$.alert("无法识别")},fail:function(e){t.$.alert("无法识别")}})},doReceive:function(){this.cancel(),this.userReceiveCoupon()},cancel:function(){this.setData({isCancel:!1})},cancelsuccess:function(){this.setData({isCancelSuccess:!0})},userReceiveCoupon:function(){var t={CouponIds:"",user_is_new:this.user_is_new},e=this;e.$.xsr(e.$.makeUrl(userapi.UserReceiveCoupon,t),(function(t){0==t.Code?e.setData({isCancelSuccess:!1,Coupons:t.Info}):e.$.alert(t.Msg)}))},onLikeStore:function(t){var e=this;u.default.onLikeStore(t,(function(t){e.commonTPL.shopInfo.analytics.store_collect=1,e.commonTPL.shopInfo.analytics.store_favorite_num++}))},onUnlikeStore:function(t){var e=this;u.default.onUnlikeStore(t,(function(t){e.commonTPL.shopInfo.analytics.store_collect=0,e.commonTPL.shopInfo.analytics.store_favorite_num--}))},previewProductImg:function(t){var e=[];for(var o in this.commonTPL.shopInfo.info.store_slide)this.ProductInfo.productPicList[o].check&&e.push(this.ProductInfo.productPicList[o].img);var n=t.target.dataset.src;this.$.previewImage({current:n,urls:e})},callPhone:function(e){t.makePhoneCall({phoneNumber:e+""})},gotomap:function(t){this.$.openLocation({latitude:parseFloat(t.currentTarget.dataset.lat),longitude:parseFloat(t.currentTarget.dataset.lng),name:t.currentTarget.dataset.name,address:t.currentTarget.dataset.address,scale:28})},getNearbylist:function(){this.post,this.latitude,this.longitude,this.options.store_id,this.$.getStorageSync("city")}})};e.default=f}).call(this,o("df3c")["default"],o("3223")["default"])},"4b22":function(t,e,o){"use strict";o.r(e);var n=o("36fa"),i=o.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"4bbd":function(t,e,o){"use strict";o.r(e);var n=o("6e73"),i=o("4b22");for(var a in i)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("f42b");var s=o("828b"),r=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"df13c9a2",null,!1,n["a"],void 0);e["default"]=r.exports},"62d6":function(t,e,o){"use strict";(function(t,n){var i=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(o("7eb4")),s=i(o("ee10")),r=i(o("7ca3")),c=o("8f59");function u(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function l(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?u(Object(o),!0).forEach((function(e){(0,r.default)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var m={name:"payment-box",props:{order_id:{type:String,default:""},kind:{type:String,default:"order"},defaultUserMoney:{type:Boolean,default:!0},paymentDataDefault:{type:Object,default:function(){return{order_id:"",orderSelMoneyAmount:0,user_money:0,user_points:0,user_recharge_card:0,user_sp:0}}}},data:function(){return{loading:!1,h5payList:["paypal","redsys","payu","ccav"],h5WeChatpayList:["wxpay"],h5WeChatMPpayList:["wxpay"],providerList:[{name:"支付宝",id:"alipay",loading:!1},{name:"微信",id:"wxpay",loading:!1},{name:"Paypal",id:"paypal",loading:!1},{name:"Redsys",id:"redsys",loading:!1},{name:"Payu",id:"payu",loading:!1},{name:"Ccav",id:"ccav",loading:!1},{name:"Cash on delivery",id:"offline",loading:!1}],blanceChannel:{money:!1,points:!1,recharge_card:!1,sp:!1},showBoxView:!1,userMoney:!1,userPoints:!1,userRechargeCard:!1,userSp:!1,password:"",paymentIndex:1,isWeixin:!1}},computed:(0,c.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin"]),created:function(){var t=this,e=this;setTimeout((function(){t.getPlantformInfo((function(o){if("undefined"!=typeof o.payment_channel_code_row){var n=t.providerList.length;while(n--){var i=t.providerList[n].id;e.$.inArray(o.payment_channel_code_row,i)||t.providerList.splice(n,1)}var a=["money","points","recharge_card","sp"];for(var n in a)e.$.inArray(o.payment_channel_code_row,a[n])?t.blanceChannel[a[n]]=!0:t.blanceChannel[a[n]]=!1}}))}),200)},methods:l(l({},(0,c.mapMutations)(["login","logout","getPlantformInfo","forceUserInfo","getUserInfo"])),{},{confirmPayment:function(e){var o=this;!(this.userMoney||this.userPoints||this.userSp||this.userRechargeCard)||this.password?t.login({success:function(t){if(t.code){var e={code:t.code};o.$.request({url:o.cf.URL.get_miniapp_open_id,data:e,success:function(t,e,n,i){o.weixinPay(t.openid)},fail:function(t,e){}})}else o.$.showModal({content:o.__("授权失败"),showCancel:!1})}}):o.$.showModal({content:o.__("请输入余额支付密码!"),showCancel:!1})},switchMoney:function(t){this.userMoney=t.detail.value},switchPoints:function(t){this.userPoints=t.detail.value},switchRechargeCard:function(t){this.userRechargeCard=t.detail.value},switchSp:function(t){this.userSp=t.detail.value},passwordChange:function(t){this.password=t.target.value},paymentChange:function(t){var e=parseInt(t.detail.value);this.paymentIndex=e},weixinPay:function(t){var e=this;return(0,s.default)(a.default.mark((function o(){var n,i,s,r;return a.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return n=e,e.loading=!0,o.next=4,e.getOrderInfo("wxpay",t);case 4:if(i=o.sent,s=i.data,200===i.status){o.next=12;break}return 101==i.code?n.$.showModal({title:n.__("提示"),content:n.__("未设置支付密码,去设置?"),success:function(t){if(t.confirm){n.$.gopage("/member/member/paypwd")}else t.cancel}}):n.$.showModal({content:i.msg||n.__("获得订单信息失败"),showCancel:!1}),e.loading=!1,o.abrupt("return");case 12:s.paid?(e.loading=!1,setTimeout((function(){e.$emit("onPaid",s)}),1e3)):(r=s.data,n.$.requestPayment({timeStamp:r.timeStamp+"",nonceStr:r.nonceStr,package:r.package,signType:r.signType,paySign:r.paySign,success:function(t){setTimeout((function(){e.$emit("onPaid",s)}),1e3)},fail:function(t){n.$.showModal({content:n.__("支付失败"),showCancel:!1}),e.$emit("onFail")},complete:function(){e.loading=!1}}));case 13:case"end":return o.stop()}}),o)})))()},baiduPay:function(){var t=this;return(0,s.default)(a.default.mark((function e(){var o,n,i,s;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t,t.loading=!0,e.next=4,t.getOrderInfo("baidu");case 4:if(n=e.sent,i=n.data,200===n.status){e.next=12;break}return 101==n.code?o.$.showModal({title:o.__("提示"),content:o.__("未设置支付密码,去设置?"),success:function(t){if(t.confirm){o.$.gopage("/member/member/paypwd")}else t.cancel}}):o.$.showModal({content:n.msg||o.__("获得订单信息失败"),showCancel:!1}),t.loading=!1,e.abrupt("return");case 12:i.paid?(t.loading=!1,setTimeout((function(){t.$emit("onPaid",i)}),1e3)):(s=i.data,o.$.requestPayment({timeStamp:s.timeStamp,nonceStr:s.nonceStr,package:s.package,signType:"MD5",paySign:s.paySign,success:function(e){setTimeout((function(){t.$emit("onPaid",i)}),1e3)},fail:function(e){o.$.showModal({content:o.__("支付失败"),showCancel:!1}),t.$emit("onFail")},complete:function(){t.loading=!1}}));case 13:case"end":return e.stop()}}),e)})))()},requestPayment:function(t,e){var o=this;return(0,s.default)(a.default.mark((function n(){var i,s,r,c;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=o,o.loading=!0,o.providerList[e].loading=!0,n.next=5,o.getOrderInfo(t.id);case 5:if(s=n.sent,r=s.data,200===s.status){n.next=13;break}return 101==s.code?i.$.showModal({title:i.__("提示"),content:i.__("未设置支付密码,去设置?"),success:function(t){if(t.confirm){i.$.gopage("/member/member/paypwd")}else t.cancel}}):i.$.showModal({content:s.msg||i.__("获得订单信息失败"),showCancel:!1}),o.loading=!1,n.abrupt("return");case 13:r.paid?(o.loading=!1,setTimeout((function(){o.$emit("onPaid",r)}),1e3)):(c=Object.assign({},r.data),delete c["order_id"],c["partnerid"]=c["partnerid"]+"",c["timestamp"]=c["timestamp"]+"",i.$.requestPayment({provider:t.id,orderInfo:"alipay"==t.id?r.data:c,success:function(t){setTimeout((function(){o.$emit("onPaid",r)}),1e3)},fail:function(t){i.$.showModal({content:i.__("支付失败"),showCancel:!1}),o.$emit("onFail")},complete:function(){o.loading=!1,o.providerList[e].loading=!1}}));case 14:case"end":return n.stop()}}),n)})))()},h5OldPay:function(t,e){var o=this;return(0,s.default)(a.default.mark((function i(){var s,r,c,u,l,m,d,p;return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:s=o,o.loading=!0,o.providerList[e].loading=!0,r=n.getStorageSync("uid"),c=n.getStorageSync("ukey"),"",u=t.id,"wxpay"==t.id&&(u="wx_native"),l=0,0,0,0,m=o.password,d=o.order_id,o.userMoney&&(l=o.paymentDataDefault.orderSelMoneyAmount),p={perm_id:r,perm_key:c,pay_sn:d,password:m,pm_recharge_card:0,pm_money:l,pm_points:0,pm_credit:0,payment_channel_code:u,mp_flag:0,old_mp_flag:1,appid:"",typ:"e"},s.$.createUrl(s.cf.URL.pay.pay,p);case 17:case"end":return i.stop()}}),i)})))()},h5Pay:function(t,e){var o=this;return(0,s.default)(a.default.mark((function n(){var i,s,r,c;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=o,o.loading=!0,o.providerList[e].loading=!0,n.next=5,o.getOrderInfo(t.id);case 5:if(s=n.sent,r=s.data,200===s.status){n.next=13;break}return 101==s.code?i.$.showModal({title:i.__("提示"),content:i.__("未设置支付密码,去设置?"),success:function(t){if(t.confirm){i.$.gopage("/member/member/paypwd")}else t.cancel}}):i.$.showModal({content:s.msg||i.__("获得订单信息失败"),showCancel:!1}),o.loading=!1,n.abrupt("return");case 13:r.paid?(o.loading=!1,setTimeout((function(){o.$emit("onPaid",r)}),1e3)):(i.$.showModal({title:i.__("提示"),content:i.__("是否支付完成?"),success:function(t){t.confirm?setTimeout((function(){o.$emit("onPaid",r)}),1e3):t.cancel&&o.$emit("onFail")}}),"alipay"==t.id?window.location.href=r.mweb_url:(c=i.cf.SiteUrl+"/h5/member/order/detail?init_pay_flag=1&on="+i.order_id,"order"==i.kind||"favorable"==i.kind&&(c=i.cf.SiteUrl+"/h5/chain/chain/favorabledetail?init_pay_flag=1&order_id="+i.order_id),window.location.href=r.mweb_url+"&redirect_url="+encodeURIComponent(c))),o.loading=!1;case 15:case"end":return n.stop()}}),n)})))()},mpPay:function(){var t=this;return(0,s.default)(a.default.mark((function e(){var o,n,i;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t,t.loading=!0,e.next=4,t.getOrderInfo("wxpay");case 4:if(n=e.sent,i=n.data,200===n.status){e.next=12;break}return 101==n.code?o.$.showModal({title:o.__("提示"),content:o.__("未设置支付密码,去设置?"),success:function(t){if(t.confirm){o.$.gopage("/member/member/paypwd")}else t.cancel}}):o.$.showModal({content:n.msg||o.__("获得订单信息失败"),showCancel:!1}),t.loading=!1,e.abrupt("return");case 12:i.paid?(t.loading=!1,setTimeout((function(){t.$emit("onPaid",i)}),1e3)):wPay({appId:i.data.appId,timeStamp:i.data.timeStamp,nonceStr:i.data.nonceStr,signature:i.data.signType,package:i.data.package,paySign:i.data.paySign},(function(e){setTimeout((function(){t.$emit("onPaid",i)}),1e3)}),(function(e){o.$.showModal({content:o.__("支付失败"),showCancel:!1}),t.$emit("onFail")}));case 13:case"end":return e.stop()}}),e)})))()},getOrderInfo:function(t,e){var o=this;"wxpay"==t&&(t="wx_native");var n=0,i=0,a=0,s=0,r=this.password,c=this.order_id;this.userMoney&&(n=this.paymentDataDefault.orderSelMoneyAmount),this.userPoints&&(a=this.paymentDataDefault.user_points),this.userSp&&(s=this.paymentDataDefault.user_sp),this.userRechargeCard&&(i=this.paymentDataDefault.user_recharge_card);var u={pay_sn:c,password:r,pm_recharge_card:i,pm_money:n,pm_points:a,pm_sp:s,pm_credit:0,payment_channel_code:t,appid:"",typ:"json",prepay_flag:1};u["openid"]=e;var l=o.cf.URL.pay.pay;return new Promise((function(t){o.$.request({url:l,data:u,success:function(e,o,n,i){t({data:e,status:o,msg:n,code:i})},fail:function(e,o){t({data:e,status:o})}})}))},cancel:function(){this.setData({showBoxView:!1})},show:function(){var t=this,e=this;setTimeout((function(){if(t.setData({showBoxView:!0}),e.paymentDataDefault.orderSelMoneyAmount<=0){var o={};setTimeout((function(){e.$emit("onPaid",o)}),1e3)}}),10)}})};e.default=m}).call(this,o("3223")["default"],o("df3c")["default"])},"6e73":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={uniNavBar:function(){return o.e("components/uni-nav-bar/uni-nav-bar").then(o.bind(null,"77f4"))},uniTag:function(){return o.e("components/uni-tag/uni-tag").then(o.bind(null,"120e"))},uniIcons:function(){return Promise.all([o.e("common/vendor"),o.e("components/uni-icons/uni-icons")]).then(o.bind(null,"4704"))}},i=function(){var t=this,e=t.$createElement,o=(t._self._c,t.loadStoreInfoComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.store_info.store_star_num>0?t.__("综合体验"):null),n=t.loadStoreInfoComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&""!=t.store_info.store_slogan?t.sprintf(t.__("公告:%s"),t.store_info.store_slogan):null,i=t.loadStoreInfoComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.store_info.analytics.store_collect?t.__("已收藏"):null,a=t.loadStoreInfoComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.store_info.analytics.store_collect<1?t.__("收藏"):null,s=t.loadStoreInfoComplete&&"shopdiy"!=t.commonTPL.TemplateKey?t.sprintf(t.__(" %d 次"),t.store_info.analytics.store_favorite_num):null,r=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&""!=t.commonTPL.TemplateKey&&"shop6"!=t.commonTPL.TemplateKey?t.__("推荐"):null,c=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&""!=t.commonTPL.TemplateKey?t.__("全部商品"):null,u=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&""!=t.commonTPL.TemplateKey?t.__("上新"):null,l=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&""!=t.commonTPL.TemplateKey?t.__("店铺简介"):null,m=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&""!=t.commonTPL.TemplateKey?t.__("供应商"):null,d=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.loadStoreCategoryComplete&&(2!=t.commonTPL.tapindex||"shop6"!=t.commonTPL.TemplateKey)&&2==t.commonTPL.tapindex?t.__("销量"):null,p=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.loadStoreCategoryComplete&&(2!=t.commonTPL.tapindex||"shop6"!=t.commonTPL.TemplateKey)&&2==t.commonTPL.tapindex?t.__("新品"):null,f=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.loadStoreCategoryComplete&&(2!=t.commonTPL.tapindex||"shop6"!=t.commonTPL.TemplateKey)&&2==t.commonTPL.tapindex?t.__("价格"):null,h=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.loadStoreCategoryComplete&&(2!=t.commonTPL.tapindex||"shop6"!=t.commonTPL.TemplateKey)&&2==t.commonTPL.tapindex?t.__map(t.commonTPL.pdlist,(function(e,o){var n=t.__get_orig(e),i=e.ItemSalePrice?t.__("¥"):null,a=e.ItemSalePrice?t.number_format(e.ItemSalePrice,2):null,s=e.product_unit_points?t.number_format(e.product_unit_points):null,r=e.product_unit_points?t.__("积分"):null,c=e.product_unit_sp?t.__("众宝"):null;return{$orig:n,m13:i,m14:a,m15:s,m16:r,m17:c}})):null,g=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.loadStoreCategoryComplete&&(2!=t.commonTPL.tapindex||"shop6"!=t.commonTPL.TemplateKey)&&2==t.commonTPL.tapindex&&t.commonTPL.ispage?t.__("正在加载"):null,_=!t.loadStoreConfigComplete||"shopdiy"==t.commonTPL.TemplateKey||!t.loadStoreCategoryComplete||2==t.commonTPL.tapindex&&"shop6"==t.commonTPL.TemplateKey||2!=t.commonTPL.tapindex||t.commonTPL.ispage?null:t.__("没有更多数据啦!"),P=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.loadStoreCategoryComplete&&(3!=t.commonTPL.tapindex||"shop6"!=t.commonTPL.TemplateKey)&&3==t.commonTPL.tapindex?t.__map(t.commonTPL.pdlist,(function(e,o){var n=t.__get_orig(e),i=e.ItemSalePrice?t.__("¥"):null,a=e.ItemSalePrice?t.number_format(e.ItemSalePrice,2):null,s=e.product_unit_points?t.number_format(e.product_unit_points):null,r=e.product_unit_points?t.__("积分"):null,c=e.product_unit_sp?t.__("众宝"):null;return{$orig:n,m20:i,m21:a,m22:s,m23:r,m24:c}})):null,y=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&t.loadStoreCategoryComplete&&(3!=t.commonTPL.tapindex||"shop6"!=t.commonTPL.TemplateKey)&&3==t.commonTPL.tapindex&&t.commonTPL.ispage?t.__("正在加载"):null,T=!t.loadStoreConfigComplete||"shopdiy"==t.commonTPL.TemplateKey||!t.loadStoreCategoryComplete||3==t.commonTPL.tapindex&&"shop6"==t.commonTPL.TemplateKey||3!=t.commonTPL.tapindex||t.commonTPL.ispage?null:t.__("没有更多数据啦!"),C=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&4==t.commonTPL.tapindex&&t.distance?t.sprintf(t.__("距您 %s"),t.distance):null,L=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&4==t.commonTPL.tapindex?t.__("联系商家"):null,v=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&5==t.commonTPL.tapindex?t.comment_row.length:null,w=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&5==t.commonTPL.tapindex&&v>0?t.__("我也说两句~"):null,b=t.loadStoreConfigComplete&&"shopdiy"!=t.commonTPL.TemplateKey&&5==t.commonTPL.tapindex&&v>0?t.__("去评论~"):null,S=!t.loadStoreConfigComplete||"shopdiy"==t.commonTPL.TemplateKey||5!=t.commonTPL.tapindex||v>0?null:t.__("暂时没有评论哦~"),$=!t.loadStoreConfigComplete||"shopdiy"==t.commonTPL.TemplateKey||5!=t.commonTPL.tapindex||v>0?null:t.__("去评论~"),x=t.loadStoreConfigComplete&&t.loadStoreConfigComplete&&"shopdiy"==t.commonTPL.TemplateKey?t.__("销量"):null,I=t.loadStoreConfigComplete&&t.loadStoreConfigComplete&&"shopdiy"==t.commonTPL.TemplateKey?t.__("新品"):null,k=t.loadStoreConfigComplete&&t.loadStoreConfigComplete&&"shopdiy"==t.commonTPL.TemplateKey?t.__("价格"):null,D=t.loadStoreConfigComplete&&t.loadStoreConfigComplete&&"shopdiy"==t.commonTPL.TemplateKey?t.__map(t.commonTPL.pdlist,(function(e,o){var n=t.__get_orig(e),i=e.ItemSalePrice?t.__("¥"):null,a=e.ItemSalePrice?t.number_format(e.ItemSalePrice,2):null,s=e.product_unit_points?t.number_format(e.product_unit_points):null,r=e.product_unit_points?t.__("积分"):null,c=e.product_unit_sp?t.__("众宝"):null;return{$orig:n,m36:i,m37:a,m38:s,m39:r,m40:c}})):null,O=t.loadStoreConfigComplete&&t.loadStoreConfigComplete&&"shopdiy"==t.commonTPL.TemplateKey&&t.commonTPL.ispage?t.__("正在加载"):null,M=t.loadStoreConfigComplete&&t.loadStoreConfigComplete&&"shopdiy"==t.commonTPL.TemplateKey&&!t.commonTPL.ispage?t.__("没有更多数据啦!"):null;t.$mp.data=Object.assign({},{$root:{m0:o,m1:n,m2:i,m3:a,m4:s,m5:r,m6:c,m7:u,m8:l,m9:m,m10:d,m11:p,m12:f,l0:h,m18:g,m19:_,l1:P,m25:y,m26:T,m27:C,m28:L,g0:v,m29:w,m30:b,m31:S,m32:$,m33:x,m34:I,m35:k,l2:D,m41:O,m42:M}})},a=[]},7217:function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={uniTransition:function(){return o.e("components/uni-transition/uni-transition").then(o.bind(null,"46d2"))}},i=function(){var t=this.$createElement;this._self._c},a=[]},7339:function(t,e,o){},8003:function(t,e,o){"use strict";var n=o("c7d0"),i=o.n(n);i.a},"9ac3":function(t,e,o){"use strict";var n=o("7339"),i=o.n(n);i.a},"9c51":function(t,e,o){"use strict";o.r(e);var n=o("f87a"),i=o.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},b762:function(t,e,o){"use strict";(function(t,e){var n=o("47a9");o("ec76");n(o("3240"));var i=n(o("4bbd"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},c152:function(t,e,o){},c7d0:function(t,e,o){},d26e:function(t,e,o){"use strict";o.r(e);var n=o("62d6"),i=o.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},e70c:function(t,e,o){"use strict";o.r(e);var n=o("26af"),i=o("d26e");for(var a in i)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("9ac3");var s=o("828b"),r=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=r.exports},f42b:function(t,e,o){"use strict";var n=o("c152"),i=o.n(n);i.a},f87a:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"UniPopup",components:{uniTransition:function(){o.e("components/uni-transition/uni-transition").then(function(){return resolve(o("46d2"))}.bind(null,o)).catch(o.oe)}},props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},maskClick:{type:Boolean,default:!0}},data:function(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{position:"fixed",left:0,right:0}}},watch:{type:{handler:function(t){switch(this.type){case"top":this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0};break;case"bottom":this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0};break;case"center":this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"};break}},immediate:!0}},created:function(){this.animation?this.duration=300:this.duration=0},methods:{clear:function(t){t.stopPropagation()},open:function(){var t=this;this.showPopup=!0,this.$nextTick((function(){clearTimeout(t.timer),t.timer=setTimeout((function(){t.showTrans=!0}),50)})),this.$emit("change",{show:!0})},close:function(t){var e=this;this.showTrans=!1,this.$nextTick((function(){clearTimeout(e.timer),e.timer=setTimeout((function(){e.$emit("change",{show:!1}),e.showPopup=!1}),300)}))},onTap:function(){this.maskClick&&this.close()}}};e.default=n}},[["b762","common/runtime","common/vendor"]]]);