other-page-ShowcaseShoppingCart-ShowcaseShoppingCart.4c94c11a.js 47 KB

123
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["other-page-ShowcaseShoppingCart-ShowcaseShoppingCart","components-newSpecifications-newSpecifications","other-page-ProductsListOnce-ProductsListOnce","other-page-components-ProductSpecNumberBox"],{"05a0":function(t,e,i){"use strict";i.r(e);var a=i("2407"),n=i("20df");for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("fcaf");var o=i("828b"),s=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"3d4bd26f",null,!1,a["a"],void 0);e["default"]=s.exports},"20df":function(t,e,i){"use strict";i.r(e);var a=i("cfdc"),n=i.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},2407:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticStyle:{width:"100%",height:"auto","max-height":"100vh"}},[i("v-uni-view",{class:3!=t.pageShowType?"shopping-cart":"shopping-cart2"},[t.isRest?[t.is_loaded?i("div",{staticClass:"cart-is_rest tn-flex-center theme-cart-btn-rest"},[t._v("门店已打烊...")]):i("div",{staticClass:"cart-is_rest tn-flex-center theme-cart-btn-rest"},[t._v("正在加载中...")])]:[i("v-uni-view",{staticClass:"cart-info theme-cart-info",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.handleClickInfoEvent.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"cart-icon"},[3!=t.pageShowType?i("v-uni-text",{staticClass:"tn-icon-cart"}):t._e(),3==t.pageShowType?i("v-uni-view",{staticClass:"icon"},[i("v-uni-text",{staticClass:"tn-icon-cart",staticStyle:{position:"absolute"}}),i("v-uni-image",{staticStyle:{width:"56rpx",height:"56rpx"},attrs:{src:t.shop_image,mode:"widthFix"}})],1):t._e(),t.totalNum>0?i("v-uni-view",{staticClass:"cart-good-num tn-flex-center theme-cart-num"},[t._v(t._s(t.totalNum))]):t._e()],1),i("v-uni-view",{staticClass:"cart-price"},[i("v-uni-view",{staticClass:"product-price"},[i("v-uni-view",{staticClass:"price theme-cart-info-price"},[i("v-uni-view",{staticClass:"unit"},[t._v("RM")]),i("v-uni-view",{staticClass:"value"},[t._v(t._s(t.totalPrice))])],1),t.oldTotalPrice&&3!=t.pageShowType?i("v-uni-view",{staticClass:"price old tn-color-gray theme-cart-info-oldprice"},[i("v-uni-view",{staticClass:"unit"},[t._v("RM")]),i("v-uni-view",{staticClass:"value"},[t._v(t._s(t.oldTotalPrice))])],1):t._e()],1),3!=t.pageShowType?i("v-uni-view",[0==t.multiple_cart?i("v-uni-view",{staticClass:"delivery-price theme-cart-info-delivery-price",staticStyle:{"align-items":"center"}},[t._v("预估配送费"),t.deliveryPrice&&t.deliveryPrice.start_fee>=0?i("v-uni-text",{staticClass:"price"},[t._v("RM"+t._s(t.deliveryPrice.start_fee))]):t.deliveryPrice?i("v-uni-text",{staticClass:"price"},[t._v("RM"+t._s(t.deliveryPrice))]):t._e()],1):i("v-uni-view",{staticClass:"delivery-price theme-cart-info-delivery-price",staticStyle:{"align-items":"center"}},[t._v("预估配送费"),t.deliveryPrice&&t.deliveryPrice.start_fee>=0?i("v-uni-text",{staticClass:"price"},[t._v("RM"+t._s(t.deliveryPrice.start_fee))]):t.deliveryPrice?i("v-uni-text",{staticClass:"price"},[t._v("RM"+t._s(t.multiple_cart_delivery_price))]):t._e()],1)],1):i("v-uni-view",[i("v-uni-view",{staticClass:"delivery-price theme-cart-info-delivery-price",staticStyle:{"align-items":"center"}},[t._v("已省 "+t._s(t.CurrencyUnit)+t._s(t.oldTotalPrice-t.totalPrice))])],1)],1)],1),3!=t.pageShowType?i("v-uni-view",{staticClass:"operation-btn tn-flex-center theme-cart-btn-avcti",class:[{"theme-cart-btn":!t.isToSubmit}],style:[t.themeBtnStyle],on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.handleSubmitEvent.apply(void 0,arguments)}}},[t._v(t._s(t.cidMinPrice?t.cidMinPriceText:t.submitBtnTipText))]):t._e(),3==t.pageShowType?i("v-uni-view",{staticClass:"operation-btn"},[2==t.deliveryType||3==t.deliveryType?i("v-uni-view",{staticClass:"left",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.handleSubmitEvent.apply(void 0,arguments)}}},[i("v-uni-text",[t._v("团购")]),i("v-uni-text",[t._v("下单到店")])],1):t._e(),1==t.deliveryType?i("v-uni-view",{staticClass:"left disabled"},[i("v-uni-text",[t._v("团购")]),i("v-uni-text",[t._v("当前不支持")])],1):t._e(),1==t.deliveryType||3==t.deliveryType?i("v-uni-view",{staticClass:"right",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.handleSubmitEvent.apply(void 0,arguments)}}},[i("v-uni-text",[t._v("配送")]),i("v-uni-text",[t._v(t._s(t.cidMinPrice?t.cidMinPriceText:t.submitBtnTipText))])],1):t._e(),2==t.deliveryType?i("v-uni-view",{staticClass:"left disabled"},[i("v-uni-text",[t._v("配送")]),i("v-uni-text",[t._v("当前不支持")])],1):t._e()],1):t._e()]],2),i("bottom-modal",{attrs:{"close-btn":!1,"z-index":99997,"no-padding":!0},model:{value:t.showProductList,callback:function(e){t.showProductList=e},expression:"showProductList"}},[0==t.multiple_cart?i("v-uni-view",{staticClass:"product-list__top-operation tn-flex-center-between",staticStyle:{"background-color":"#f8f7f8"}},[i("v-uni-view",{staticClass:"package-price"},[t._v("包装费RM"+t._s(t.shoppingCartData.boxPrice))]),t.shoppingCartData.discount_by_num_id>0&&t.shoppingCartData.discount_by_num_price>0?i("v-uni-view",[t._v("活动立减"+t._s(t.CurrencyUnit)+t._s(t.shoppingCartData.discount_by_num_price))]):t._e(),i("v-uni-view",{staticClass:"operation-clear",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.clearStoreShoppingCart.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"tn-icon-delete"}),t._v("清空购物车")],1)],1):t._e(),0==t.multiple_cart?i("v-uni-view",{staticClass:"product-list__content"},[i("v-uni-scroll-view",{staticClass:"scroll-view",attrs:{"scroll-y":!0}},t._l(t.shoppingCartData.data,(function(e,a){return i("v-uni-view",{key:a,staticClass:"product-item"},[i("v-uni-view",{staticClass:"item-image"},[i("v-uni-image",{staticClass:"image",staticStyle:{width:"100rpx",height:"100rpx","border-radius":"inherit"},attrs:{src:e.image,mode:"aspectFill"}})],1),i("v-uni-view",{staticClass:"item-info"},[i("v-uni-view",{staticClass:"item-title tn-full-width tn-text-ellipsis-1"},["bargain"==e.bargain_type?i("v-uni-text",{staticClass:"red-box"},[t._v("含特价")]):t._e(),t._v(t._s(e.title))],1),i("v-uni-view",{staticClass:"item-spec"},[t._v(t._s(e.spec))]),i("v-uni-view",{staticClass:"item-operation"},[i("v-uni-view",{staticClass:"item-price tn-color-red"},["bargain"==e.bargain_type&&e.caigou_discount_price!=e.price?i("v-uni-text",[t._v("RM"+t._s(e.caigou_discount_price.toFixed(2))),e.discount_num>0?i("v-uni-text",{staticStyle:{"margin-left":"5rpx","font-size":"18rpx"}},[t._v("(第"+t._s(e.discount_num)+"个开始恢复原价)")]):t._e()],1):i("v-uni-text",[t._v("RM"+t._s(e.price.toFixed(2)))])],1),i("product-spec-number-box",{attrs:{"operation-from":"shoppingCart",type:0,sid:t.sid,"table-id":t.tableId,"spellrice-id":t.spellriceId,"good-id":e.goodId,"option-id":e.optionId,disabled:t.isRest},on:{"reduce-num":function(e){arguments[0]=e=t.$handleEvent(e),t.handleGoodNumChangeEvent(e,"-",a)},"add-num":function(e){arguments[0]=e=t.$handleEvent(e),t.handleGoodNumChangeEvent(e,"+",a)}},model:{value:e.num,callback:function(i){t.$set(e,"num",i)},expression:"item.num"}})],1)],1)],1)})),1)],1):t._e(),1==t.multiple_cart?i("v-uni-view",{staticClass:"product-list__content"},[i("v-uni-scroll-view",{staticClass:"scroll-view",attrs:{"scroll-y":!0}},t._l(t.multipleShoppingCartData,(function(e,a){return i("v-uni-view",{key:a},[i("v-uni-view",{staticClass:"store-title",staticStyle:{display:"flex","justify-content":"space-between"}},[i("v-uni-view",[i("v-uni-text",{staticStyle:{"font-weight":"bolder"}},[t._v(t._s(e.store_title))]),i("v-uni-text",{staticStyle:{"margin-left":"20rpx"}},[t._v("包装费RM"+t._s(e.boxPrice))])],1),i("v-uni-view",[i("v-uni-checkbox-group",[i("v-uni-checkbox",{attrs:{checked:e.checked},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleStoreCheckedChangeEvent(a)}},model:{value:e.checked,callback:function(i){t.$set(e,"checked",i)},expression:"i.checked"}})],1)],1)],1),t._l(e.data,(function(a,n){return i("v-uni-view",{key:n,staticClass:"product-item"},[i("v-uni-view",{staticClass:"item-image"},[i("v-uni-image",{staticClass:"image",staticStyle:{width:"100rpx",height:"100rpx","border-radius":"inherit"},attrs:{src:a.image,mode:"aspectFill"}})],1),i("v-uni-view",{staticClass:"item-info"},[i("v-uni-view",{staticClass:"item-title tn-full-width tn-text-ellipsis-1"},[t._v(t._s(a.title))]),i("v-uni-view",{staticClass:"item-spec"},[t._v(t._s(a.spec))]),i("v-uni-view",{staticClass:"item-operation"},[i("v-uni-view",{staticClass:"item-price tn-color-red"},[t._v("RM"+t._s(a.price.toFixed(2)))]),i("product-spec-number-box",{attrs:{"operation-from":"shoppingCart",type:0,sid:e.sid,"table-id":t.tableId,"spellrice-id":t.spellriceId,"good-id":a.goodId,"option-id":a.optionId,disabled:t.isRest},on:{"reduce-num":function(e){arguments[0]=e=t.$handleEvent(e),t.handleGoodNumChangeEvent(e,"-",n)},"add-num":function(e){arguments[0]=e=t.$handleEvent(e),t.handleGoodNumChangeEvent(e,"+",n)}},model:{value:a.num,callback:function(e){t.$set(a,"num",e)},expression:"item.num"}})],1)],1)],1)}))],2)})),1)],1):t._e(),i("v-uni-view",{staticClass:"product-list__bottom-empty"})],1)],1)},n=[]},2634:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){
  2. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  3. e.default=function(){return t};var t={},i=Object.prototype,n=i.hasOwnProperty,r=Object.defineProperty||function(t,e,i){t[e]=i.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function u(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,i){return t[e]=i}}function p(t,e,i,a){var n=e&&e.prototype instanceof h?e:h,o=Object.create(n.prototype),s=new D(a||[]);return r(o,"_invoke",{value:x(t,i,s)}),o}function l(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(I){return{type:"throw",arg:I}}}t.wrap=p;var f={};function h(){}function g(){}function v(){}var m={};u(m,s,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(N([])));b&&b!==i&&n.call(b,s)&&(m=b);var y=v.prototype=h.prototype=Object.create(m);function C(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var i;r(this,"_invoke",{value:function(r,o){function s(){return new e((function(i,s){(function i(r,o,s,c){var d=l(t[r],t,o);if("throw"!==d.type){var u=d.arg,p=u.value;return p&&"object"==(0,a.default)(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):e.resolve(p).then((function(t){u.value=t,s(u)}),(function(t){return i("throw",t,s,c)}))}c(d.arg)})(r,o,i,s)}))}return i=i?i.then(s,s):s()}})}function x(t,e,i){var a="suspendedStart";return function(n,r){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===n)throw r;return E()}for(i.method=n,i.arg=r;;){var o=i.delegate;if(o){var s=S(o,i);if(s){if(s===f)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var c=l(t,e,i);if("normal"===c.type){if(a=i.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(a="completed",i.method="throw",i.arg=c.arg)}}}function S(t,e){var i=e.method,a=t.iterator[i];if(void 0===a)return e.delegate=null,"throw"===i&&t.iterator["return"]&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==i&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+i+"' method")),f;var n=l(a,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var r=n.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:E}}function E(){return{value:void 0,done:!0}}return g.prototype=v,r(y,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:g,configurable:!0}),g.displayName=u(v,d,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,d,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},C(w.prototype),u(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,i,a,n,r){void 0===r&&(r=Promise);var o=new w(p(e,i,a,n),r);return t.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},C(y),u(y,d,"Generator"),u(y,s,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),i=[];for(var a in e)i.push(a);return i.reverse(),function t(){for(;i.length;){var a=i.pop();if(a in e)return t.value=a,t.done=!1,t}return t.done=!0,t}},t.values=N,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(i,a){return o.type="throw",o.arg=t,e.next=i,a&&(e.method="next",e.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a],o=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),c=n.call(r,"finallyLoc");if(s&&c){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var r=a;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=t,o.arg=e,r?(this.method="next",this.next=r.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),P(i),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var n=a.arg;P(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:N(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),f}},t},i("6a54"),i("01a2"),i("e39c"),i("bf0f"),i("844d"),i("18f7"),i("de6c"),i("3872e"),i("4e9b"),i("114e"),i("c240"),i("926e"),i("7a76"),i("c9b5"),i("aa9c"),i("2797"),i("8a8d"),i("dc69"),i("f7a5");var a=function(t){return t&&t.__esModule?t:{default:t}}(i("fcf3"))},"2baa":function(t,e,i){var a=i("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.bottom-modal[data-v-7cd1a66a]{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:99998\n /* mask */\n /* close-btn */\n /* wrapper */}.bottom-modal__mask[data-v-7cd1a66a]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);opacity:0;-webkit-animation:showMask-data-v-7cd1a66a .25s ease .1s forwards;animation:showMask-data-v-7cd1a66a .25s ease .1s forwards}.bottom-modal__mask.transparent[data-v-7cd1a66a]{background-color:transparent}.bottom-modal__close-btn[data-v-7cd1a66a]{position:absolute;top:%?30?%;right:%?30?%;z-index:99999}.bottom-modal__wrapper[data-v-7cd1a66a]{position:absolute;left:0;bottom:0;width:100%;background-color:#fff;border-radius:%?20?% %?20?% %?0?% %?0?%;padding:%?40?%;padding-top:%?60?%;padding-bottom:%?40?%;padding-bottom:calc(constant(safe-area-inset-bottom) + %?40?%);padding-bottom:calc(env(safe-area-inset-bottom) + %?40?%);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-animation:showWrapper-data-v-7cd1a66a .25s ease .1s forwards;animation:showWrapper-data-v-7cd1a66a .25s ease .1s forwards;z-index:99999;overflow:hidden}.bottom-modal__wrapper.no-padding[data-v-7cd1a66a]{padding:%?0?%;padding-bottom:%?40?%;padding-bottom:calc(constant(safe-area-inset-bottom) + %?40?%);padding-bottom:calc(env(safe-area-inset-bottom) + %?40?%)}@-webkit-keyframes showMask-data-v-7cd1a66a{0%{opacity:0}100%{opacity:1}}@keyframes showMask-data-v-7cd1a66a{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes showWrapper-data-v-7cd1a66a{0%{-webkit-transform:scaleY(0);transform:scaleY(0)}100%{-webkit-transform:scaleY(1);transform:scaleY(1)}}@keyframes showWrapper-data-v-7cd1a66a{0%{-webkit-transform:scaleY(0);transform:scaleY(0)}100%{-webkit-transform:scaleY(1);transform:scaleY(1)}}',""]),t.exports=e},"2fdc":function(t,e,i){"use strict";function a(t,e,i,a,n,r,o){try{var s=t[r](o),c=s.value}catch(d){return void i(d)}s.done?e(c):Promise.resolve(c).then(a,n)}i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){a(o,n,r,s,c,"next",t)}function c(t){a(o,n,r,s,c,"throw",t)}s(void 0)}))}},i("bf0f")},"46ea":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.REFRESH_STORE_EVENT=void 0;e.REFRESH_STORE_EVENT="refresh_store"},"4f43":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.navPage=e.navMiniProgram=e.navBack=void 0,i("4626"),i("5ac7"),i("5ef2"),i("f7a5");e.navBack=function(t,e){var i=t||"/pages/index/index",a=getCurrentPages();if((null===a||void 0===a?void 0:a.length)>0){var n=a[0];1!==a.length||n.route&&n.route==i?uni.navigateBack({delta:e||1}):uni.reLaunch({url:i})}else uni.reLaunch({url:i})};e.navPage=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nav";if(t)if("nav"===e)if(t.includes("miniProgram"))a(t);else if(t.includes("webview")){var i=t.split("webview:"),n=i[1];uni.navigateTo({url:"/system-page/webview/webview?url="+encodeURIComponent(n),fail:function(t){console.error("[navigateTo]跳转页面失败",t)}})}else uni.navigateTo({url:t,fail:function(t){console.error("[navigateTo]跳转页面失败",t)}});else"redirect"===e?uni.redirectTo({url:t,fail:function(t){console.error("[redirectTo]跳转页面失败",t)}}):"reLaunch"===e?uni.reLaunch({url:t,fail:function(t){console.error("[reLaunch]跳转页面失败",t)}}):"phone"===e&&uni.makePhoneCall({phoneNumber:t,fail:function(t){console.error("[phone]拨打电话失败",t)}})};var a=function(t){if(t&&-1!=t.indexOf(":")){for(var e=t.split(":"),i=e[1].split(","),a={},n=0;n<i.length;n++){var r=i[n].split("_");console.log(r);var o=r[0],s=r.slice(1).join("_");a[o]=s}console.log(a)}else{a={appId:obj.appid||obj.appId};obj.path&&(a["path"]=path)}a["fail"]=function(t){-1!=t.errMsg.indexOf("is not in navigateToMiniProgramAppIdList")&&uni.showModal({content:"跳转小程序出错了",showCancel:!1})},console.log(a),t&&t.includes("half_")?uni.openEmbeddedMiniProgram(a):uni.navigateToMiniProgram(a)};e.navMiniProgram=a},"668d":function(t,e,i){var a=i("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.shopping-cart[data-v-3d4bd26f]{position:relative;width:100%;height:%?100?%;border-radius:%?200?%;overflow:hidden;display:flex;z-index:99998\n /* 购物车信息 start */\n /* 购物车信息 end */\n /* 操作按钮 start */\n /* 操作按钮 end */\n /* 店铺休息中 start */\n /* 店铺休息中 end */}.shopping-cart .cart-info[data-v-3d4bd26f]{position:relative;width:72%;height:100%;background-color:#080808;color:#fff;display:flex;align-items:center;z-index:inherit;border-radius:%?200?% %?0?% %?0?% %?200?%\n /* 购物车价格 start */\n /* 购物车价格 end */}.shopping-cart .cart-info .cart-icon[data-v-3d4bd26f]{position:relative;margin-left:%?40?%;font-size:%?50?%}.shopping-cart .cart-info .cart-icon .cart-good-num[data-v-3d4bd26f]{position:absolute;top:%?-6?%;right:%?-10?%;line-height:1;padding:%?4?%;min-width:%?32?%;font-size:%?24?%;border-radius:50%;background-color:#e83a30}.shopping-cart .cart-info .cart-price[data-v-3d4bd26f]{margin-left:%?50?%\n /* 商品价格 start */\n /* 商品价格 end */\n /* 配送价格 start */\n /* 配送价格 end */}.shopping-cart .cart-info .cart-price .product-price[data-v-3d4bd26f]{display:flex;align-items:flex-end}.shopping-cart .cart-info .cart-price .product-price .price[data-v-3d4bd26f]{display:flex;align-items:flex-end;font-size:%?40?%}.shopping-cart .cart-info .cart-price .product-price .price .unit[data-v-3d4bd26f],\n.shopping-cart .cart-info .cart-price .product-price .price .value[data-v-3d4bd26f]{line-height:1;vertical-align:bottom}.shopping-cart .cart-info .cart-price .product-price .price .unit[data-v-3d4bd26f]{font-size:%?28?%}.shopping-cart .cart-info .cart-price .product-price .price.old[data-v-3d4bd26f]{font-size:%?28?%;text-decoration:line-through;margin-left:%?10?%}.shopping-cart .cart-info .cart-price .delivery-price[data-v-3d4bd26f]{font-size:%?24?%;margin-top:%?4?%}.shopping-cart .cart-info .cart-price .delivery-price .price[data-v-3d4bd26f]{margin-left:%?4?%}.shopping-cart .operation-btn[data-v-3d4bd26f]{position:relative;width:28%;height:100%;z-index:inherit;border-radius:%?0?% %?200?% %?200?% %?0?%;background-color:#ffca28}.shopping-cart .cart-is_rest[data-v-3d4bd26f]{position:relative;width:100%;height:100%;background-color:#080808;border-radius:%?200?%;font-size:%?40?%}\n/* 购物车商品列表 start */.product-list[data-v-3d4bd26f]{\n /* 顶部操作按钮信息 start */\n /* 顶部操作按钮信息 end */\n /* 购物车商品展示 start */\n /* 购物车商品展示 end */}.product-list__top-operation[data-v-3d4bd26f]{padding:%?20?% %?30?%}.product-list__content[data-v-3d4bd26f]{width:100%;height:%?660?%;padding:%?30?%}.product-list__content .product-item[data-v-3d4bd26f]{width:100%;display:flex;padding:%?30?% %?0?%;border-bottom:%?1?% solid #f3f2f7\n /* 商品内容 start */\n /* 商品内容 end */}.product-list__content .product-item[data-v-3d4bd26f]:last-child{border-bottom:none}.product-list__content .product-item .item-image[data-v-3d4bd26f]{width:%?100?%;height:%?100?%;border-radius:%?15?%}.product-list__content .product-item .item-info[data-v-3d4bd26f]{flex:1;width:100%;padding-left:%?20?%}.product-list__content .product-item .item-info .item-title[data-v-3d4bd26f]{font-size:%?32?%;font-weight:500}.product-list__content .product-item .item-info .item-spec[data-v-3d4bd26f]{font-size:%?24?%}.product-list__content .product-item .item-info .item-operation[data-v-3d4bd26f]{display:flex;align-items:center;justify-content:space-between;margin-top:%?10?%}.product-list__content .product-item .item-info .item-price[data-v-3d4bd26f]{font-size:%?34?%}.product-list__bottom-empty[data-v-3d4bd26f]{width:100%;height:%?80?%}.shopping-cart2[data-v-3d4bd26f]{position:relative;width:100%;height:%?100?%;border-radius:%?200?%;height:%?120?%;border-radius:%?20?% %?20?% %?0?% %?0?%;overflow:hidden;display:flex;z-index:99998\n /* 购物车信息 start */\n /* 购物车信息 end */\n /* 操作按钮 start */\n /* 操作按钮 end */\n /* 店铺休息中 start */\n /* 店铺休息中 end */}.shopping-cart2 .cart-info[data-v-3d4bd26f]{position:relative;height:100%;background-color:#fff!important;color:#fff;display:flex;flex:1;align-items:center;z-index:inherit;border-radius:%?200?% %?0?% %?0?% %?200?%;border-radius:%?20?% %?0?% %?0?% 0\n /* 购物车价格 start */\n /* 购物车价格 end */}.shopping-cart2 .cart-info .cart-icon[data-v-3d4bd26f]{position:relative;margin-left:%?40?%;font-size:%?50?%}.shopping-cart2 .cart-info .cart-icon .icon[data-v-3d4bd26f]{width:%?90?%;height:%?90?%;display:flex;align-items:center;justify-content:center;background-color:#00ba4d;border-radius:50%}.shopping-cart2 .cart-info .cart-icon .cart-good-num[data-v-3d4bd26f]{position:absolute;top:%?-6?%;right:%?-10?%;line-height:1;padding:%?4?%;min-width:%?32?%;font-size:%?24?%;border-radius:50%}.shopping-cart2 .cart-info .cart-price[data-v-3d4bd26f]{margin-left:%?25?%\n /* 商品价格 start */\n /* 商品价格 end */\n /* 配送价格 start */\n /* 配送价格 end */}.shopping-cart2 .cart-info .cart-price .product-price[data-v-3d4bd26f]{display:flex;align-items:flex-end}.shopping-cart2 .cart-info .cart-price .product-price .price[data-v-3d4bd26f]{display:flex;align-items:flex-end;font-size:%?36?%;color:#ff2626!important}.shopping-cart2 .cart-info .cart-price .product-price .price .unit[data-v-3d4bd26f],\n.shopping-cart2 .cart-info .cart-price .product-price .price .value[data-v-3d4bd26f]{line-height:1;vertical-align:bottom}.shopping-cart2 .cart-info .cart-price .product-price .price .unit[data-v-3d4bd26f]{font-size:%?28?%}.shopping-cart2 .cart-info .cart-price .product-price .price.old[data-v-3d4bd26f]{font-size:%?28?%;text-decoration:line-through;margin-left:%?10?%}.shopping-cart2 .cart-info .cart-price .delivery-price[data-v-3d4bd26f]{font-size:%?24?%;margin-top:%?4?%;color:#989898!important}.shopping-cart2 .cart-info .cart-price .delivery-price .price[data-v-3d4bd26f]{margin-left:%?4?%}.shopping-cart2 .operation-btn[data-v-3d4bd26f]{display:flex;flex:1.3;position:relative;justify-content:space-between;z-index:inherit;background-color:#fff!important;align-items:center;font-size:%?28?%}.shopping-cart2 .operation-btn .left[data-v-3d4bd26f]{display:flex;align-items:center;justify-content:center;width:%?200?%;height:%?85?%;background-color:#ffcb5b;color:#622c00;border-radius:%?10?%;flex-direction:column}.shopping-cart2 .operation-btn .right[data-v-3d4bd26f]{display:flex;align-items:center;justify-content:center;width:%?200?%;height:%?85?%;background-color:#d60200;color:#fff;border-radius:%?10?%;margin-right:%?10?%;flex-direction:column}.shopping-cart2 .operation-btn .disabled[data-v-3d4bd26f]{background-color:#989898!important;color:#fff!important}.shopping-cart2 .cart-is_rest[data-v-3d4bd26f]{position:relative;width:100%;height:100%;background-color:#080808;border-radius:%?200?%;font-size:%?40?%}\n/* 购物车商品列表 end */.red-box[data-v-3d4bd26f]{display:inline-block;background-color:red;color:#fff;font-size:%?28?%;padding:%?4?%}.scroll-view[data-v-3d4bd26f]{height:100%}',""]),t.exports=e},7401:function(t,e,i){var a=i("668d");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("967d").default;n("94576c2e",a,!0,{sourceMap:!1,shadowMode:!1})},"7caa":function(t,e,i){i("64aa"),t.exports={data:function(){},props:{backgroundColor:{type:String,default:""},fontColor:{type:String,default:""},fontSize:{type:Number,default:0},fontUnit:{type:String,default:"rpx"}},computed:{backgroundColorStyle:function(){return this.$t.color.getBackgroundColorStyle(this.backgroundColor)},backgroundColorClass:function(){return this.$t.color.getBackgroundColorInternalClass(this.backgroundColor)},fontColorStyle:function(){return this.$t.color.getFontColorStyle(this.fontColor)},fontColorClass:function(){return this.$t.color.getFontColorInternalClass(this.fontColor)},fontSizeStyle:function(){return this.$t.string.getLengthUnitValue(this.fontSize,this.fontUnit)}},methods:{}}},"95e4":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var a={options:{virtualHost:!0},props:{value:{type:Boolean,default:!1},closeBtn:{type:Boolean,default:!0},zIndex:{type:[String,Number],default:""},noPadding:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},closeMask:{type:Boolean,default:!0},transparentMask:{type:Boolean,default:!1}},data:function(){return{openModal:!1}},computed:{modalStyle:function(){var t={};return this.zIndex&&(t.zIndex=Number(this.zIndex-1)),t},closeBtnStyle:function(){var t={};return this.zIndex&&(t.zIndex=Number(this.zIndex)),t},wrapperStyle:function(){var t={};return this.zIndex&&(t.zIndex=Number(this.zIndex)),t}},watch:{value:{handler:function(t){this.openModal=t},immediate:!0}},methods:{closeModal:function(t){("mask"!==t||this.closeMask)&&(this.$emit("cancel"),this.$emit("input",!1),this.$emit("close"))}}};e.default=a},a465:function(t,e,i){"use strict";i.r(e);var a=i("95e4"),n=i.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},a736:function(t,e,i){"use strict";i.r(e);var a=i("d28f"),n=i("a465");for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("c8a1");var o=i("828b"),s=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"7cd1a66a",null,!1,a["a"],void 0);e["default"]=s.exports},b1a6:function(t,e,i){var a=i("2baa");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("967d").default;n("90b74ece",a,!0,{sourceMap:!1,shadowMode:!1})},c8a1:function(t,e,i){"use strict";var a=i("b1a6"),n=i.n(a);n.a},cbea:function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.searchRecordApi=e.postStoreCouponApi=e.postStoreCollectApi=e.myStoreApi=e.joinStoreVipApi=e.getStoreVipInfoApi=e.getStoreTangshiGoodsListApi=e.getStoreShoppingCartDataApi=e.getStoreInfoApi=e.getStoreGoodsListApi=e.getStoreCommentListApi=e.getOrderDinnerStoreListApi=e.getOrderDinnerStoreIdApi=e.getMyCommentListApi=e.getIsBrandStoreApi=e.getFaviateBrandStoreListApi=e.getCodeInfoByCodeApi=e.getClassChild=e.getCategorys=e.getBrandStoreListApi=e.getBrandMasterApi=e.getBrandGoodsApi=e.getBrandApi=e.delCommentApi=void 0,i("5c47"),i("af8f");var n=a(i("b4f6"));e.getStoreInfoApi=function(t){var e=t.sid,i=t.table_id,a=t.storeCode,r=t.brand;return n.default.get("api/user.store.store/index",{sid:e,table_id:i,storeCode:a,brand:r})};e.getStoreVipInfoApi=function(t){return n.default.get("api/user.store.store/storeVip",t)};e.joinStoreVipApi=function(t){return n.default.post("api/user.store.store/joinStoreVip",t)};e.getStoreGoodsListApi=function(t){var e=t.sid,i=t.search,a=t.orderId,r=t.cid,o=t.child_id,s=t.page,c=t.is_api_shop,d=t.storeCode,u=t.api_brand,p=t.order_type,l=t.encrypted_data,f=t.write_off_type,h=t.is_promotion,g=t.goodsC,v=t.chrid;return n.default.get("api/user.store.goods/goods",{sid:e,child_id:o||"",search:i||"",order_id:a||"",cid:r||"",page:s||1,is_api_shop:c||"",storeCode:d||"",api_brand:u||"",order_type:p||"",encrypted_data:l||"",write_off_type:f||"",is_promotion:h||-1,goodsC:g,chrid:v||""})};e.getStoreShoppingCartDataApi=function(t){var e=t.sid,i=t.tableId,a=t.encrypted_data;return n.default.get("api/user.store.goods/cartIndex",{sid:e,table_id:i||"",encrypted_data:a||""})};e.getStoreCommentListApi=function(t){var e=t.sid,i=t.type,a=t.note,r=t.page,o=t.pSize;return n.default.get("api/user.store.store/comment",{sid:e,type:i||"",note:a||0,page:r,psize:o})};e.getMyCommentListApi=function(t){var e=t.page,i=t.pSize;return n.default.get("api/user.store.store/myComment",{page:e,psize:i})};e.delCommentApi=function(t){return n.default.post("api/user.store.store/delComment",t)};e.getStoreTangshiGoodsListApi=function(t){var e=t.sid,i=t.search,a=t.tableId,r=t.clear;return n.default.get("api/user.store.table/goods",{sid:e,search:i||"",table_id:a,clear:r||!1})};e.postStoreCouponApi=function(t){var e=t.sid;return n.default.post("api/user.channel.coupon/receive",{sid:e})};e.postStoreCollectApi=function(t){var e=t.sid,i=t.type,a=t.storeCode;return n.default.get("api/user.member.favorite/operate",{sid:e,type:i,storeCode:a})};e.getCategorys=function(t){var e=t.template_id;return n.default.get("api/user.store.goods/plugin_categorys",{template_id:e})};e.getClassChild=function(t){var e=t.cid;return n.default.get("api/user.store.goods/plugin_goods",{cid:e})};e.getOrderDinnerStoreListApi=function(t){return n.default.get("api/user.store.store/getOrderDinnerStoreList",t)};e.getOrderDinnerStoreIdApi=function(t){return n.default.get("api/user.store.store/getOrderDinnerStoreId",t)};e.getBrandApi=function(t){return n.default.get("api/user.store.store/getBrand?sid="+t)};e.getCodeInfoByCodeApi=function(t){return n.default.get("api/user.store.store/getCodeInfo?code="+t,{})};e.searchRecordApi=function(t){return n.default.post("api/user.tuangouquan.write_off/searchRecords",t)};e.getIsBrandStoreApi=function(t){return n.default.get("api/user.store.store/getIsBrandStore?sid="+t)};e.getBrandStoreListApi=function(t){return n.default.post("api/user.store.store/getBrandStoreList",t)};e.getFaviateBrandStoreListApi=function(t){return n.default.get("api/user.store.store/getFaviateBrandStoreList",t)};e.getBrandMasterApi=function(t){return n.default.get("api/user.appointment.index/index?sid="+t)};e.getBrandGoodsApi=function(t){return n.default.get("api/user.appointment.index/goods?sid="+t)};e.myStoreApi=function(){return n.default.get("api/user.store.store/myStore")}},cfdc:function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("9b1b"));i("64aa"),i("473f"),i("bf0f"),i("2797"),i("aa77"),i("aa9c"),i("c223"),i("fd3c"),i("8f71"),i("c9b5"),i("ab80"),i("dd2b");var r=a(i("7dcc")),o=a(i("a736")),s=a(i("e165")),c=i("edc8"),d=i("47da"),u=i("4f43"),p=i("cbea"),l=i("dfc8"),f=i("46ea"),h={props:{sendPrice:{type:[String,Number],default:0},selfPickupMinPrice:{type:[String,Number],default:0},deliveryPrice:{type:[String,Number],default:0},sid:{type:[String,Number],default:""},spellriceId:{type:[String,Number],default:""},tableId:{type:[String,Number],default:""},isRest:{type:Boolean,default:!1},goodsData:{type:Array,default:[]},deliveryType:{type:Number,default:1},isZiti:{type:Boolean,default:!1},personNum:{type:[String,Number],default:""},brand:{type:String,default:""},storeCode:{type:String,default:""},encrypted_data:{type:String,default:""},multiple_cart:{type:[Boolean,String,Number],default:!1},multiple_cart_add_fee:{type:Number,default:0},pageShowType:{type:Number,default:0}},components:{BottomModal:o.default,ProductSpecNumberBox:s.default},mixins:[r.default],data:function(){return{shoppingCartData:{boxPrice:0,data:[],discount_by_num_id:0,discount_by_num_price:0,encrypted_data:"",is_single_no_delivery:0},require:!0,require_text:"未选必选品",requireIndex:-1,showProductList:!1,cidMinPrice:!1,cidMinPriceText:"最低消费0",multipleShoppingCartData:[],other_shop_num:0,multiple_cart_delivery_price:0,tuangouquan_price:0,is_loaded:!1,shop_image:c.BASE_URL+"uploads/images/shopping/shangpin.png",categoryGoodsNum:[],goodsNum:[]}},computed:{totalPrice:function(){var t=this;if(0==this.multiple_cart){var e=0;return this.shoppingCartData.data.length>0&&(e=this.shoppingCartData.data.reduce((function(e,i){return i.is_tuangouquan?(t.tuangouquan_price=i.tuangouquan_price,e+i.total_discount_price-i.tuangouquan_price):e+i.total_discount_price}),0)),this.shoppingCartData.discount_by_num_id>0&&e!=this.shoppingCartData.price&&(e=this.shoppingCartData.price),this.shoppingCartData.encrypted_data&&(e=this.shoppingCartData.price),e.toFixed(2)}var i=0;return this.multipleShoppingCartData.length>0&&this.multipleShoppingCartData.forEach((function(t){t.checked&&t.data.forEach((function(t){Array.isArray(t)||(t=[t]),i+=t.reduce((function(t,e){return t+e.total_discount_price}),0)}))})),i.toFixed(2)},oldTotalPrice:function(){if(0==this.multiple_cart){var t=0;return this.shoppingCartData.data.length>0&&(t=this.shoppingCartData.data.reduce((function(t,e){if(88888!=e.goods_id)return t+e.oldPrice*e.num}),0)),t.toFixed(2)}var e=0;return this.multipleShoppingCartData.length>0&&this.multipleShoppingCartData.forEach((function(t){t.checked&&t.data.forEach((function(t){Array.isArray(t)||(t=[t]),e+=t.reduce((function(t,e){return t+e.oldPrice*e.num}),0)}))})),e.toFixed(2)},totalNum:function(){var t=0;return 0==this.multiple_cart?this.shoppingCartData.data.length>0&&(t=this.shoppingCartData.data.reduce((function(t,e){return t+e.num}),0)):this.multipleShoppingCartData.length>0&&this.multipleShoppingCartData.forEach((function(e){e.checked&&e.data.forEach((function(e){Array.isArray(e)||(e=[e]),t+=e.reduce((function(t,e){return t+e.num}),0)}))})),t},submitBtnTipText:function(){var t=this;if(this.isRest)return"休息中...";var e=Number(this.totalPrice),i=Number(this.sendPrice),a=Number(this.selfPickupMinPrice),r=!0;if(console.log("this.shoppingCartData",this.shoppingCartData),this.goodsData.length>0)for(var o=!1,s=!1,c=function(e){for(var i=0;i<t.goodsData.length;i++)if(1!=t.shoppingCartData.data[e].is_single_no_delivery&&(r=!1),t.goodsData[i].is_mandatory){o=!0;var a=t.goodsData[i].goods.find((function(i,a){return i.id==t.shoppingCartData.data[e].goodId}));if(a&&1==t.goodsData[i].is_mandatory&&(s=!0),o&&s){t.require=!0;break}o&&!s&&(t.requireIndex=i,t.require=!1)}else t.have_mandatory=!1},d=0;d<this.shoppingCartData.data.length;d++)c(d);var u=[];return this.shoppingCartData.data.forEach((function(t,e,i){u.push({cid:t.cid,price:t.price})})),u=u.reduce((function(t,e){var i=t.find((function(t){return t.cid===e.cid})),a=(0,n.default)((0,n.default)({},e),{},{frequency:1});return i?(i.price+=e.price,i.frequency++):t.push(a),t}),[]),u.forEach((function(e){t.goodsData.forEach((function(i){e.cid==i.id&&Number(i.category_min_fee)>0&&(t.cidMinPrice=!1,e.price<Number(i.category_min_fee)&&(t.cidMinPrice=!0,t.cidMinPriceText="".concat(i.title,"还需消费").concat((i.category_min_fee-e.price).toFixed(2))))}))})),this.shoppingCartData.data.length>0&&r?"单点不送":i>0?this.isZiti?e+this.tuangouquan_price>=a?"去结算":"差".concat((a-e).toFixed(2),"起送"):e+this.tuangouquan_price>=i?"去结算":"差".concat((i-e).toFixed(2),"起送"):this.isZiti&&e+this.tuangouquan_price<a?"差".concat((a-(e+this.tuangouquan_price)).toFixed(2),"起送"):e+this.tuangouquan_price>=i?"去结算":"请选择商品"},isToSubmit:function(){if(this.isRest)return!1;if(this.cidMinPrice)return!1;var t=Number(this.totalPrice),e=Number(this.sendPrice),i=Number(this.selfPickupMinPrice);return this.isZiti?i>0&&t+this.tuangouquan_price>=i||0===i&&t+this.tuangouquan_price>i:e>=0&&t+this.tuangouquan_price>=e||0===e&&t+this.tuangouquan_price>=e}},watch:{sid:{handler:function(t){t&&this.updateShoppingCartData()},immediate:!0}},methods:{handleStoreCheckedChangeEvent:function(t){this.multipleShoppingCartData[t].checked=!this.multipleShoppingCartData[t].checked,console.log("this.multipleShoppingCartData",this.multipleShoppingCartData)},getShoppingCartData:function(){var t=this;(0,p.getStoreShoppingCartDataApi)({sid:this.sid,tableId:this.tableId,encrypted_data:this.encrypted_data}).then((function(e){t.tuangouquan_price=0,console.log(t.goodsData,"阿里"),t.$emit("updateCartNumber",t.goodsData);var i=e.cart;if(0==t.multiple_cart)t.shoppingCartData.boxPrice=i.box_price,t.shoppingCartData.price=i.price,t.shoppingCartData.discount_by_num_id=i.discount_by_num_id,t.shoppingCartData.encrypted_data=i.encrypted_data||"",t.shoppingCartData.discount_by_num_id=Number(i.discount_by_num_id),t.shoppingCartData.discount_by_num_price=Number(i.discount_by_num_price),i.data&&(t.shoppingCartData.data=i.data.reduce((function(t,e){return t.concat(e.filter((function(t){return"88888"!=t.goods_id})).map((function(t){var e=Number(t.price),a=Number(t.caigou_discount_price),n=Number(t.total_discount_price),r=Number(t.num),o=0;return e==t.caigou_discount_price?o=0:(o=Math.floor((n-a*r)/(e-a)),o=r-o,o&&(o+=1)),console.log("discount_num",o),{cid:t.cid,goodId:t.goods_id,optionId:(0===t.option_id?0:t.option_id).toString(),title:t.title,image:t.thumb,spec:t.option_title,min:0,max:-1,num:t.num,price:Number(t.price),oldPrice:Number((null===t||void 0===t?void 0:t.old_price)||t.price),cart_price:Number(i.cart_price),total_discount_price:Number(t.total_discount_price),is_tuangouquan:t.is_tuangouquan,tuangouquan_price:t.tuangouquan_price,bargain_type:t.bargain_type||"",caigou_discount_price:Number(t.caigou_discount_price)||Number(t.price),discount_num:o,is_single_no_delivery:t.is_single_no_delivery||0}})))}),[]));else{t.multipleShoppingCartData=[],console.log("cart",i),i.forEach((function(e){var i=e.data.reduce((function(t,i){return t.concat(i.filter((function(t){return"88888"!=t.goods_id})).map((function(t){return{cid:t.cid,goodId:t.goods_id,optionId:(0===t.option_id?0:t.option_id).toString(),title:t.title,image:t.thumb,spec:t.option_title,min:0,max:-1,num:t.num,price:Number(t.price),oldPrice:Number((null===t||void 0===t?void 0:t.old_price)||t.price),cart_price:Number(e.cart_price),total_discount_price:Number(t.total_discount_price),store_title:e.store_title,is_single_no_delivery:t.is_single_no_delivery}})))}),[]),a={boxPrice:e.box_price,data:i,discount_by_num_id:e.discount_by_num_id,discount_by_num_price:e.discount_by_num_price,encrypted_data:e.encrypted_data||"",store_title:e.store_title,sid:e.sid,checked:!0};t.multipleShoppingCartData.push(a),t.multiple_cart_delivery_price=e.delivery_price,e.sid==t.sid&&(t.shoppingCartData.boxPrice=e.box_price,t.shoppingCartData.price=e.price,t.shoppingCartData.discount_by_num_id=e.discount_by_num_id,t.shoppingCartData.encrypted_data=e.encrypted_data||"",t.shoppingCartData.discount_by_num_id=Number(e.discount_by_num_id),t.shoppingCartData.discount_by_num_price=Number(e.discount_by_num_price),t.shoppingCartData.data=i)})),console.log("shoppingCartData",t.shoppingCartData),console.log("cart",i),console.log("xxxxxx",t.multipleShoppingCartData);var a=t.multipleShoppingCartData.find((function(e){return e.sid==t.sid}));console.log("currentShopCart",a),a||(t.shoppingCartData.data=[])}console.log("shoppingCartData",t.shoppingCartData),console.log(t.shoppingCartData.data,"this.shoppingCartData.data"),uni.$emit("historyCart",t.shoppingCartData.data),t.categoryGoodsNum=[],t.goodsNum=[],console.log(t.shoppingCartData.data,"this.shoppingCartData.data"),t.shoppingCartData.data.forEach((function(e){if(e.cid){var i=t.categoryGoodsNum.find((function(t){return t.cid===e.cid}));i?i.num+=e.num:t.categoryGoodsNum.push({cid:e.cid,num:e.num})}if(e.goodId){var a=t.goodsNum.find((function(t){return t.goodId===e.goodId}));a?a.num+=e.num:t.goodsNum.push({goodId:e.goodId,num:e.num}),console.log("this.goodsNum",t.goodsNum)}})),console.log("this.categoryGoodsNum",t.categoryGoodsNum),t.$emit("updateCategoryGoodsNum",t.categoryGoodsNum),t.$emit("updateGoodsNum",t.goodsNum),t.$emit("get-cart-id",i.id),t.is_loaded=!0})).catch((function(e){console.error("[shoppingCart]获取店铺购物车数据失败",e),t.shoppingCartData.data=[]}))},updateShoppingCartData:function(){this.getShoppingCartData()},clearStoreShoppingCart:function(){var t=this;(0,d.showModal)({title:"操作提示",content:"确定需要清空购物车吗?",showCancel:!0,callback:function(e){e&&(0,l.clearStoreShoppingCartApi)({sid:t.sid}).then((function(e){(0,d.showToast)({title:"清空购物车成功"}),t._resetShoppingCartData(),t.getShoppingCartData(),t.showProductList=!1,t.$emit("clear")})).catch((function(t){console.error("[shoppingCart]清空购物车数据失败",t),(0,d.showToast)({title:t.msg})}))}})},getCheckedStore:function(){var t=[];return this.multipleShoppingCartData.forEach((function(e){e.checked&&t.push(e.sid)})),t},handleSubmitEvent:function(){var t=this;if(0!=this.totalNum){if(console.log(this.isToSubmit,this.require,this.requireIndex,"this.isToSubmit"),this.isToSubmit)if(!this.require&&this.requireIndex>=0)this.$emit("update-category",this.requireIndex);else{uni.$once(f.REFRESH_STORE_EVENT,(function(){t.$emit("refresh-data")}));var e=3===+this.deliveryType&&this.isZiti?1:0;if(console.log(this.deliveryType,this.isZiti),0==this.multiple_cart)this.tableId&&""!=this.tableId?(0,u.navPage)("/other-page/submit-order/submit-tangshi-order?sid=".concat(this.sid,"&table_id=").concat(this.tableId,"&personNum=")+this.personNum):(0,u.navPage)("/other-page/submit-order/submit-order?sid=".concat(this.sid,"&orderType=").concat(e,"&brand=").concat(this.brand,"&storeCode=").concat(this.storeCode));else{var i=this.getCheckedStore();if(i.length>0)if(1==i.length)(0,u.navPage)("/order-page/submit-order/index?sid=".concat(i.join(","),"&orderType=").concat(e,"&brand=").concat(this.brand,"&storeCode=").concat(this.storeCode));else{var a=i.join(",");(0,u.navPage)("/order-page/one-touch-submit-order/index?sids=".concat(a),"redirect")}else(0,d.showToast)({title:"请选择店铺"})}}}else(0,d.showToast)({title:"请选择商品"})},handleGoodNumChangeEvent:function(t,e,i){var a=this,n=this.shoppingCartData.data[i];this.updateShoppingCartData(),this.$emit("good-num-change",{cid:n.cid,goodId:n.goodId,type:e,sid:sid}),0===t&&this.$nextTick((function(){setTimeout((function(){a.shoppingCartData.data.splice(i,1)}),250)}))},_resetShoppingCartData:function(){this.shoppingCartData.boxPrice=0,this.shoppingCartData.data=[]},handleClickInfoEvent:function(){this.showProductList=!this.showProductList}}};e.default=h},d28f:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.openModal?i("v-uni-view",{staticClass:"bottom-modal",style:[t.modalStyle]},[t.mask?i("v-uni-view",{staticClass:"bottom-modal__mask",class:[{transparent:t.transparentMask}],on:{touchmove:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e)},click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.closeModal("mask")}}}):t._e(),i("v-uni-view",{staticClass:"bottom-modal__wrapper",class:[{"no-padding":t.noPadding,"tn-shadow":t.transparentMask}],style:[t.wrapperStyle]},[t.closeBtn?i("v-uni-view",{staticClass:"bottom-modal__close-btn",style:[t.closeBtnStyle],on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.closeModal("btn")}}},[i("v-uni-text",{staticClass:"tn-icon-close"})],1):t._e(),t._t("default")],2)],1):t._e()},n=[]},fcaf:function(t,e,i){"use strict";var a=i("7401"),n=i.n(a);n.a}}]);