order-page-shopping-cart-index~store-page-goodsDetail-index.66a05477.js 23 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["order-page-shopping-cart-index~store-page-goodsDetail-index"],{"0243":function(t,o,e){"use strict";e("6a54"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,e("64aa"),e("d4b5"),e("bf0f"),e("2797"),e("aa9c"),e("5ef2"),e("dd2b"),e("e838");var i=e("cf41"),n=e("ba1f"),s={name:"newSpecifications",props:{show:{type:Boolean,default:!1},goodId:{type:[String,Number],default:""},sid:{type:[String,Number],default:""},goodPrice:{type:[String,Number],default:""},parent_not_need_choose_productList:{type:Array,default:[]},parent_need_choose_productList:{type:Array,default:[]},good_old_price:{type:[String,Number],default:""},good_code:{type:[String,Number],default:""},desc:{type:String,default:""}},data:function(){return{num:1,shopCart:!1,goodsDetail:null,not_need_choose_productList:[],need_choose_productList:[],selected_list:[],selected_ids:[]}},watch:{show:{handler:function(t){console.log("val",t),t&&(this.not_need_choose_productList=JSON.parse(JSON.stringify(this.parent_not_need_choose_productList)),this.need_choose_productList=JSON.parse(JSON.stringify(this.parent_need_choose_productList)),console.log("this.need_choose_productList",this.need_choose_productList),console.log("this.goodPrice",this.goodPrice),this.selected_ids=[])},immediate:!0}},computed:{selectedGoods:function(){var t=this,o=[];return this.not_need_choose_productList.forEach((function(e){e.comboProducts.forEach((function(e){o.push(e),-1==t.selected_ids.indexOf(e.id)&&t.selected_ids.push(e.id)}))})),this.need_choose_productList.forEach((function(e,i){e.comboProducts.forEach((function(e,n){if("avctMod2"==e.class)for(var s=e.choose_num,a=0;a<s;a++)console.log("j",a),e.parent_index=i,e.current_index=n,o.push(e),-1==t.selected_ids.indexOf(e.id)?t.selected_ids.push(e.id):function(){var o=0;t.selected_ids.forEach((function(t){t==e.id&&o++})),o<s&&t.selected_ids.push(e.id)}();else{var d=t.selected_ids.indexOf(e.id);d>-1&&t.selected_ids.splice(d,1)}}))})),console.log("arr",o),o}},methods:{totalPrice:function(){var t=this.goodPrice;t=parseFloat(t);var o=this.good_old_price;console.log("价格",t,o),o=parseFloat(o),this.selectedGoods.forEach((function(o){if(o){var e=parseFloat(o.diffPrice||o.diff_price);e&&(t+=e)}})),t=Number(t),o=Number(o),t=t.toFixed(2),o=o.toFixed(2);var e=(t/o).toFixed(2);return{total:t,old_price:o,discount:e}},initMaterial:function(){var t=this;(0,i.initMaterialApi)({sid:this.sid,goods_id:this.goodId}).then((function(o){console.log(o),o.data&&t.getMaterial()})).catch((function(t){console.log(t)}))},getMaterial:function(){var t=this;(0,i.getMaterialApi)({goods_id:this.goodId}).then((function(o){console.log(o),o.forEach((function(o){1==o.type?t.not_need_choose_productList.push(o):(1==o.max_quantity?o.choose_text="单选":o.choose_text="选"+o.max_quantity+"份",o.comboProducts.forEach((function(t){t.class=""})),t.need_choose_productList.push(o))})),console.log("not_need_choose_productList",t.not_need_choose_productList),console.log("need_choose_productList",t.need_choose_productList)})).catch((function(t){console.log(t)}))},getDetailInfo:function(){var t=this;(0,i.getApiGoodsDetailApi)({productCode:this.goodId,sid:this.sid}).then((function(o){console.log(o),t.goodsDetail=o;var e=t.goodsDetail.comboItems;e.forEach((function(o){0==o.isChoices||1==o.isChoices&&1==o.maxQuantity&&1==o.comboProducts.length?t.not_need_choose_productList.push(o):(1==o.maxQuantity?o.choose_text="单选":o.choose_text="选"+o.maxQuantity+"份",o.comboProducts.forEach((function(t){t.class=""})),t.need_choose_productList.push(o))})),console.log("not_need_choose_productList",t.not_need_choose_productList),console.log("need_choose_productList",t.need_choose_productList)})).catch((function(t){console.log(t)}))},chooseItem:function(t,o,e){if("avctMod2"==this.need_choose_productList[o].comboProducts[e].class){if(1==t)return;var i=this.need_choose_productList[o].has_choose_num;if(i>=t)return void uni.showToast({title:"最多选择"+t+"份",icon:"none"});i+=1,this.need_choose_productList[o].has_choose_num=i,this.need_choose_productList[o].comboProducts[e].choose_num+=1}else if(1==t)this.need_choose_productList[o].comboProducts.forEach((function(t,o){t.class=""})),this.need_choose_productList[o].has_choose_num=1,this.need_choose_productList[o].comboProducts[e].choose_num=1,this.need_choose_productList[o].comboProducts[e].class="avctMod2";else{var n=this.need_choose_productList[o].has_choose_num;this.need_choose_productList[o].comboProducts.forEach((function(t,o){"avctMod2"==t.class&&0})),n>=t?uni.showToast({title:"最多选择"+t+"份",icon:"none"}):(this.need_choose_productList[o].has_choose_num=n+1,this.need_choose_productList[o].comboProducts[e].choose_num+=1,this.need_choose_productList[o].comboProducts[e].class="avctMod2")}this.need_choose_productList=JSON.parse(JSON.stringify(this.need_choose_productList))},remove:function(t){var o=t.parent_index,e=t.current_index;this.need_choose_productList[o].max_quantity,this.need_choose_productList[o].has_choose_num;this.need_choose_productList[o].has_choose_num-=1,this.need_choose_productList[o].comboProducts[e].choose_num-=1,0==this.need_choose_productList[o].comboProducts[e].choose_num&&(this.need_choose_productList[o].comboProducts[e].class="")},specOptionId:function(){console.log("this.selected_ids",this.selected_ids);var t="";return this.selected_ids.length>0&&(t.length>0&&(t+="_"),this.selected_ids.forEach((function(o){t+="".concat(o,"m1n")}))),t.length>0&&(t="0_"+t),t},addToCar:function(t){var o=this,e=0;if(this.need_choose_productList.forEach((function(t){var i=0;if(t.comboProducts.forEach((function(t){var e=t.id;o.selected_ids.forEach((function(t){t==e&&i++}))})),console.log(i),console.log(t.min_quantity),i<t.min_quantity)return uni.showToast({title:t.title+"请选择"+t.min_quantity+"份"+t.title,icon:"none"}),void(e=1)})),!e){var i=this.specOptionId();console.log("specOptionId",i),(0,n.addGoodToCartApi)({sid:this.sid,goodsId:this.goodId,spellriceId:0,optionId:i,sign:t,tableId:0,num:this.num}).then((function(t){console.log(t),uni.showToast({title:"加入购物车成功",icon:"none"}),o.$emit("addCart")})).catch((function(t){console.log(t)}))}},close:function(){this.$emit("close")}}};o.default=s},"031f":function(t,o,e){var i=e("f8eb");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=e("967d").default;n("56c0f2ee",i,!0,{sourceMap:!1,shadowMode:!1})},1858:function(t,o,e){"use strict";e.r(o);var i=e("abf0"),n=e("d574");for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(o,t,(function(){return n[t]}))}(s);e("f81a");var a=e("828b"),d=Object(a["a"])(n["default"],i["b"],i["c"],!1,null,"4ff61c22",null,!1,i["a"],void 0);o["default"]=d.exports},"19a7":function(t,o,e){"use strict";var i=e("031f"),n=e.n(i);n.a},"20f3":function(t,o,e){"use strict";var i=e("8bdb"),n=e("5145");i({target:"Array",proto:!0,forced:n!==[].lastIndexOf},{lastIndexOf:n})},4466:function(t,o,e){"use strict";e.d(o,"b",(function(){return i})),e.d(o,"c",(function(){return n})),e.d(o,"a",(function(){}));var i=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("v-uni-button",{staticClass:"tn-btn-class tn-btn",class:[t.buttonClass,t.backgroundColorClass,t.fontColorClass],style:[t.buttonStyle],attrs:{"hover-class":"tn-hover",loading:t.loading,disabled:t.disabled,"form-type":t.formType,"open-type":t.openType},on:{getuserinfo:function(o){arguments[0]=o=t.$handleEvent(o),t.handleGetUserInfo.apply(void 0,arguments)},getphonenumber:function(o){arguments[0]=o=t.$handleEvent(o),t.handleGetPhoneNumber.apply(void 0,arguments)},contact:function(o){arguments[0]=o=t.$handleEvent(o),t.handleContact.apply(void 0,arguments)},error:function(o){arguments[0]=o=t.$handleEvent(o),t.handleError.apply(void 0,arguments)},click:function(o){arguments[0]=o=t.$handleEvent(o),t.handleClick.apply(void 0,arguments)}}},[t._t("default")],2)},n=[]},"70bc":function(t,o,e){"use strict";e.r(o);var i=e("4466"),n=e("83fb");for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(o,t,(function(){return n[t]}))}(s);e("19a7");var a=e("828b"),d=Object(a["a"])(n["default"],i["b"],i["c"],!1,null,"1b9df1f2",null,!1,i["a"],void 0);o["default"]=d.exports},"83fb":function(t,o,e){"use strict";e.r(o);var i=e("e871"),n=e.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(o,t,(function(){return i[t]}))}(s);o["default"]=n.a},abf0:function(t,o,e){"use strict";e.d(o,"b",(function(){return n})),e.d(o,"c",(function(){return s})),e.d(o,"a",(function(){return i}));var i={tnPopup:e("1fbf").default,tnButton:e("70bc").default},n=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("v-uni-view",{nativeOn:{click:function(o){o.stopPropagation(),arguments[0]=o=t.$handleEvent(o)}}},[e("tn-popup",{attrs:{mode:"bottom",borderRadius:20,zIndex:999999,closeBtn:!0},on:{close:function(o){arguments[0]=o=t.$handleEvent(o),t.close.apply(void 0,arguments)}},model:{value:t.show,callback:function(o){t.show=o},expression:"show"}},[e("v-uni-view",{staticClass:"pop-item"},[e("v-uni-view",{staticClass:"top-item"},[e("v-uni-text",{staticClass:"tn-text-bold tn-text-xxl"},[t._v(t._s(t.goodsDetail.name))])],1),e("v-uni-scroll-view",{staticStyle:{height:"60vh","margin-top":"30rpx"},attrs:{"scroll-y":"true"}},[e("v-uni-view",[e("v-uni-view",{staticClass:"tn-text-sm"},[t._v(t._s(t.desc?t.desc:""))]),t._l(t.not_need_choose_productList,(function(o,i){return t.not_need_choose_productList&&t.not_need_choose_productList.length>0?e("v-uni-view",{staticClass:"combo1 tn-border-bottom tn-margin-top"},[e("v-uni-text",{staticClass:"tn-color-gray tn-text-sm"},[t._v("已包含")]),e("v-uni-view",{staticClass:"mods"},[t._l(o.comboProducts,(function(o,i){return e("v-uni-view",{key:t.idx,staticClass:"for-itm"},[e("v-uni-image",{staticClass:"img tn-margin-bottom-sm",attrs:{src:o["image"],mode:"aspectFill"}}),e("v-uni-text",[t._v(t._s(i["name"]))])],1)})),e("v-uni-view",{staticClass:"for-itm"})],2)],1):t._e()})),t._l(t.need_choose_productList,(function(o,i){return e("v-uni-view",{staticClass:"combo1 tn-margin-top"},[e("v-uni-text",{staticClass:"tn-color-gray tn-text-sm"},[t._v("选择套餐内"+t._s(o.title)+"("+t._s(o.choose_text)+")")]),e("v-uni-view",{staticClass:"mods"},[t._l(o.comboProducts,(function(n,s){return e("v-uni-view",{staticClass:"for-itm for-itm2 tn-bg-white",class:n.class,on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.chooseItem(o.max_quantity,i,s)}}},[e("v-uni-image",{staticClass:"img tn-margin-bottom-sm",attrs:{src:n.image,mode:"aspectFill"}}),e("v-uni-text",[t._v(t._s(n.name))]),n.diff_price>0?e("v-uni-view",{staticClass:"tn-text-bold tn-text-xl"},[t._v("+"+t._s(t.CurrencyUnit)+t._s(n.diff_price))]):t._e(),0==t.idx?e("v-uni-view",{staticClass:"tn-bg-orange btn_dz tn-margin-top"},[t._v("定制")]):t._e()],1)})),e("v-uni-view",{staticClass:"for-itm"})],2)],1)}))],2)],1)],1),t.shopCart?e("v-uni-view",{staticClass:"tn-text-center tn-padding-sm tn-border-top"},[e("tn-button",{attrs:{size:"lg",width:"90%",backgroundColor:"#faad13",shape:"round"}},[t._v(t._s(t.CurrencyUnit)),e("span",{staticClass:"tn-text-bold tn-text-xxl"},[t._v(t._s(99))]),t._v("加入购物车")])],1):e("v-uni-view",{staticClass:"shopCart"},[e("v-uni-view",{staticClass:"cart-item"},[e("v-uni-view",{staticClass:"for-mod"},t._l(t.selectedGoods,(function(o,i){return e("v-uni-view",{key:i,staticClass:"for-img"},[e("v-uni-image",{staticClass:"img",attrs:{src:o.image}}),e("v-uni-text",{staticClass:"tn-icon-close-fill close",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.remove(o)}}})],1)})),1),e("v-uni-view",{staticClass:"botoom-mod"},[e("v-uni-view",{staticClass:"price"},[e("v-uni-view",{},[e("v-uni-text",{staticClass:"tn-text-bold tn-text-xl tn-color-white"},[t._v(t._s(t.CurrencyUnit)+t._s(t.totalPrice().total))]),e("v-uni-text",{staticStyle:{"text-decoration":"line-through",color:"gray"}},[t._v(t._s(t.CurrencyUnit)+t._s(t.totalPrice().old_price))])],1),e("v-uni-view",{staticClass:"tn-text-sm"},[e("v-uni-text",{staticClass:"tn-color-orange",staticStyle:{"margin-left":"10rpx"}},[t._v(t._s(t.totalPrice().discount)+"折")]),t._v("•"),e("v-uni-text",{staticClass:"tn-color-gray"},[t._v("限1份")])],1)],1),e("tn-button",{staticClass:"tn-text-bold",attrs:{shape:"round",backgroundColor:"#f8dc4e",width:"220rpx"},on:{click:function(o){arguments[0]=o=t.$handleEvent(o),t.addToCar("+")}}},[t._v("加入购物车")])],1)],1)],1)],1)],1)},s=[]},b2f4:function(t,o,e){var i=e("c86c");o=i(!1),o.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.pop-item[data-v-4ff61c22]{padding:%?30?% %?30?% 0 %?30?%}.pop-item .top-item[data-v-4ff61c22]{display:flex;justify-content:space-between}.pop-item .top-item .icon[data-v-4ff61c22]{width:%?40?%;height:%?40?%;font-size:%?24?%;line-height:1;border-radius:50%;background-color:#ffca28;font-weight:700}.pop-item .combo1 .mods[data-v-4ff61c22]{display:flex;justify-content:space-between;flex-wrap:wrap;padding:%?20?%}.pop-item .combo1 .mods .for-itm[data-v-4ff61c22]{width:32%;display:flex;flex-direction:column;align-items:center;margin-bottom:%?30?%}.pop-item .combo1 .mods .for-itm .img[data-v-4ff61c22]{width:%?150?%;height:%?150?%!important}.pop-item .combo1 .mods .for-itm .btn_dz[data-v-4ff61c22]{width:65%;text-align:center;padding:%?5?% %?10?%;color:#000!important;border-radius:%?10?%}.pop-item .combo1 .mods .for-itm2[data-v-4ff61c22]{background-color:#f0f0f0;padding:%?15?% %?10?%;border-radius:%?20?%;border:1px solid #fff}.pop-item .combo1 .mods .for-itm2 .text[data-v-4ff61c22]{display:inline-block;width:95%;text-align:left}.pop-item .combo1 .mods .for-itm2 .radio-mod[data-v-4ff61c22]{width:100%;display:flex;align-items:center;justify-content:space-between}.pop-item .combo1 .mods .avctMod[data-v-4ff61c22]{border:1px solid #f5d532}.pop-item .combo1 .mods .avctMod2[data-v-4ff61c22]{background-color:#eaeaea!important}.shopCart[data-v-4ff61c22]{padding:0 %?30?%;margin-bottom:%?40?%}.shopCart .cart-item[data-v-4ff61c22]{background-color:#2a2b2d;border-radius:%?50?%}.shopCart .cart-item .for-mod[data-v-4ff61c22]{display:flex;align-items:center;padding:%?20?% %?15?%}.shopCart .cart-item .for-mod .for-img[data-v-4ff61c22]{position:relative;margin-right:%?30?%}.shopCart .cart-item .for-mod .for-img .img[data-v-4ff61c22]{width:%?100?%;height:%?100?%;border-radius:50%;background-color:#fff}.shopCart .cart-item .for-mod .for-img .close[data-v-4ff61c22]{position:absolute;top:0;right:%?-2?%;color:grey}.shopCart .cart-item .botoom-mod[data-v-4ff61c22]{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #484848;padding:%?10?%}.shopCart .cart-item .botoom-mod .price[data-v-4ff61c22]{margin-left:%?20?%}',""]),t.exports=o},ba1f:function(t,o,e){"use strict";e("6a54");var i=e("f5bd").default;Object.defineProperty(o,"__esModule",{value:!0}),o.updateGoodCartApi=o.getStoreShoppingCartSpecGoodNumApi=o.clearStoreShoppingCartApi=o.addTangshiGoodToCartApi=o.addGoodToCartApi=o._zfbdataPurchaseGoods=void 0;var n=i(e("7653"));o.getStoreShoppingCartSpecGoodNumApi=function(t){var o=t.sid,e=t.goodsId,i=t.tableId;return n.default.get("api/user.store.goods/cartOption",{sid:o,goods_id:e,table_id:i||""})};o.addGoodToCartApi=function(t){var o=t.sid,e=t.goodsId,i=t.spellriceId,s=t.optionId,a=t.sign,d=t.type,r=t.tableId,c=t.num,u=t.activity_id,l=t.miniProgramPath;return console.log(s),n.default.post("api/user.store.goods/cart",{sid:o,goods_id:e,spellrice_id:i||"",option_id:s||"",sign:a,type:d||"",table_id:r||"",activity_id:u||0,num:c,miniProgramPath:l||""})};o.addTangshiGoodToCartApi=function(t){var o=t.sid,e=t.goodsId,i=t.optionId,s=t.sign,a=t.type,d=t.tableId,r=t.num;return n.default.post("api/user.store.table/cart",{sid:o,goods_id:e,option_id:i||"",sign:s,type:a||"",table_id:d||"",num:r})};o.updateGoodCartApi=function(t){var o=t.goodsId,e=t.sid,i=t.num,s=t.options_id;return n.default.post("api/user.store.goods/updateCart",{sid:e,goods_id:o,num:i,options_id:s})};o.clearStoreShoppingCartApi=function(t){var o=t.sid;return n.default.get("api/user.store.goods/truncate",{sid:o})};o._zfbdataPurchaseGoods=function(t){var o=t.sign,e=t.goodsId;console.log("增长分析埋点中加减购物车的商品ID: ",e);var i="+"===o?0:1;my.reportCustomEvent("1045127",{bizType:"cloudappevent",spu_id:e,action_type:i,action_num:1,is_goods_page:0})}},c621:function(t,o,e){var i=e("b2f4");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=e("967d").default;n("baffa3d6",i,!0,{sourceMap:!1,shadowMode:!1})},cf41:function(t,o,e){"use strict";e("6a54");var i=e("f5bd").default;Object.defineProperty(o,"__esModule",{value:!0}),o.postGoodsCollectApi=o.initMaterialApi=o.initAttrsApi=o.getSpecialOfferGoodsApi=o.getProductInfoAndSkuInfoApi=o.getMaterialApi=o.getListByRandomApi=o.getGoodsDetailsApi=o.getGoodSpecInfoApi=o.getApiGoodsDetailApi=o._zfbdataBrowseGoods=void 0;var n=i(e("7653"));o.getGoodSpecInfoApi=function(t){var o=t.sid,e=t.goodsId,i=t.type,s=t.activity_id;return n.default.get("api/user.store.goods/material",{sid:o,type:i,activity_id:s,goods_id:e})};o._zfbdataBrowseGoods=function(t){var o=t.goodsId;console.log("增长分析埋点中商品访问的商品ID: ",o),my.reportCustomEvent("1045131",{bizType:"cloudappevent",spu_id:o})};o.getGoodsDetailsApi=function(t){return n.default.get("api/user.store.goods/detail",t)};o.getApiGoodsDetailApi=function(t){return n.default.get("api/user.store.goods/getApiGoodsDetail",t)};o.initMaterialApi=function(t){return n.default.get("api/user.store.goods/initMaterial",t)};o.getMaterialApi=function(t){return n.default.get("api/user.store.goods/getMaterial",t)};o.initAttrsApi=function(t){return n.default.get("api/user.store.goods/initAttrs",t)};o.getProductInfoAndSkuInfoApi=function(t){return n.default.get("api/user.store.goods/getProductInfoAndSkuInfo",t)};o.getSpecialOfferGoodsApi=function(t){return n.default.get("api/user.store.goods/getSpecialOfferGoods",t)};o.getListByRandomApi=function(t){return n.default.get("api/user.store.goods/getListByRandom",t)};o.postGoodsCollectApi=function(t){return n.default.get("api/user.member.goods_favorite/operate",t)}},d574:function(t,o,e){"use strict";e.r(o);var i=e("0243"),n=e.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(o,t,(function(){return i[t]}))}(s);o["default"]=n.a},e871:function(t,o,e){"use strict";e("6a54");var i=e("f5bd").default;Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,e("64aa"),e("5ef2"),e("f7a5"),e("20f3"),e("4626"),e("5ac7");var n=i(e("74ff")),s={mixins:[n.default],name:"tn-button",behaviors:["wx://form-field-button"],props:{index:{type:[Number,String],default:0},shape:{type:String,default:"default"},shadow:{type:Boolean,default:!1},width:{type:String,default:"auto"},height:{type:String,default:""},size:{type:String,default:""},fontBold:{type:Boolean,default:!1},padding:{type:String,default:"0 30rpx"},margin:{type:String,default:""},plain:{type:Boolean,default:!1},border:{type:Boolean,default:!0},borderBold:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},formType:{type:String,default:""},openType:{type:String,default:""},blockRepeatClick:{type:Boolean,default:!1}},computed:{buttonClass:function(){var t="";switch(this.shape){case"icon":case"round":t+=" tn-round";break}if(this.shadow)if(""!==this.backgroundColorClass&&-1!=this.backgroundColorClass.indexOf("tn-bg")){var o=this.backgroundColor.slice(this.backgroundColor.lastIndexOf("-")+1);t+=" tn-shadow-".concat(o)}else t+=" tn-shadow-blur";if(this.fontBold&&(t+=" tn-text-bold"),this.plain&&(t+=" tn-btn--plain",this.border&&(t+=" tn-border-solid",this.borderBold&&(t+=" tn-bold-border"),""!==this.backgroundColor&&this.backgroundColor.includes("tn-bg")))){var e=this.backgroundColor.slice(this.backgroundColor.lastIndexOf("-")+1);t+=" tn-border-".concat(e)}return t},buttonStyle:function(){var t={};switch(this.size){case"sm":t.padding="0 20rpx",t.fontSize="22rpx",t.height=this.height||"48rpx";break;case"lg":t.padding="0 40rpx",t.fontSize="32rpx",t.height=this.height||"80rpx";break;default:t.padding="0 30rpx",t.fontSize="28rpx",t.height=this.height||"64rpx"}return this.padding&&(t.padding=this.padding),this.margin&&(t.margin=this.margin),this.fontSize&&(t.fontSize=this.fontSize+this.fontUnit),t.width="icon"===this.shape?t.height:this.width,t.padding="icon"===this.shape?"0":t.padding,this.fontColorStyle&&(t.color=this.fontColorStyle),this.backgroundColorClass||(this.plain?t.borderColor=this.backgroundColorStyle||"#080808":t.background=this.backgroundColorStyle||"#FFFFFF"),this.shadow&&!this.backgroundColorClass&&(-1!=this.backgroundColorStyle.indexOf("#")?t.boxShadow="6rpx 6rpx 8rpx ".concat(this.backgroundColorStyle||"#000000","10"):-1==this.backgroundColorStyle.indexOf("rgb")&&-1==this.backgroundColorStyle.indexOf("rgba")&&this.backgroundColorStyle||(t.boxShadow="6rpx 6rpx 8rpx ".concat(this.backgroundColorStyle||"rgba(0, 0, 0, 0.1)"))),t}},data:function(){return{clickTime:0,clickIntervalTime:200}},methods:{handleClick:function(){var t=this;if(!this.disabled){if(this.blockRepeatClick){var o=(new Date).getTime();if(o-this.clickTime<=this.clickIntervalTime)return;this.clickTime=o,setTimeout((function(){t.clickTime=0}),this.clickIntervalTime)}this.$emit("click",{index:Number(this.index)}),this.$emit("tap",{index:Number(this.index)})}},handleGetUserInfo:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.detail,e=void 0===o?{}:o;this.$emit("getuserinfo",e)},handleContact:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.detail,e=void 0===o?{}:o;this.$emit("contact",e)},handleGetPhoneNumber:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.detail,e=void 0===o?{}:o;this.$emit("getphonenumber",e)},handleError:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.detail,e=void 0===o?{}:o;this.$emit("error",e)}}};o.default=s},f81a:function(t,o,e){"use strict";var i=e("c621"),n=e.n(i);n.a},f8eb:function(t,o,e){var i=e("c86c");o=i(!1),o.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.tn-btn[data-v-1b9df1f2]{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;line-height:1;text-align:center;text-decoration:none;overflow:visible;-webkit-transform:translate(%?0?%,%?0?%);transform:translate(%?0?%,%?0?%);border-radius:%?12?%;margin:0}.tn-btn--plain[data-v-1b9df1f2]{background-color:initial!important;background-image:none}.tn-btn--plain.tn-round[data-v-1b9df1f2]{border-radius:%?1000?%!important}',""]),t.exports=o}}]);