You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/h5/static/js/pages-cart-cart~pages-cart-...

1 line
21 KiB

3 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-cart-cart~pages-cart-tabBarCart"],{"0d97":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var n={uLoadmore:a("c153").default,uNumberBox:a("071b").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"container"},[n("UiPageHeader",{class:"head__"+t.type,attrs:{back:"inner"==t.type}},[n("template",{slot:"custom"},[n("v-uni-view",{staticClass:"head--title"},[n("v-uni-text",[t._v("购物车")]),t.list.length?n("v-uni-text",[t._v("("+t._s(t.list.length)+")")]):t._e()],1),t.list.length?["normal"==t.mode?n("v-uni-view",{staticClass:"head--edit",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleToggleMode.apply(void 0,arguments)}}},[t._v("编辑")]):n("v-uni-view",{staticClass:"head--finish",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleToggleMode.apply(void 0,arguments)}}},[t._v("完成")])]:t._e()],2)],2),t.isLoading?n("u-loadmore",{attrs:{status:"loading"}}):t._e(),t.list.length||t.isLoading?t._l(t.list,(function(e,a){return n("UiWhiteBox",{key:a,staticClass:"cart-item"},[n("v-uni-label",{staticClass:"cart-item--radio",on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a),t.handleCheckItem(e.id,e.status)}}},[n("v-uni-radio",{staticClass:"radio",attrs:{color:"#FF875B",checked:!!t.checkedIds.length&&t.checkedIds.includes(e.id),disabled:"normal"!==e.status}})],1),n("v-uni-image",{staticClass:"cart-item--image",attrs:{src:e.product.mainPicture,mode:"scaleToFill"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.$Router.push("/goodsDetail?id="+e.productId)}}}),n("v-uni-view",{staticClass:"cart-item--content",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.$Router.push("/goodsDetail?id="+e.productId)}}},[n("v-uni-view",{staticClass:"cart-item--title",class:"normal"!==e.status&&"cart-item--title__disabled"},[t._v(t._s(e.product.name))]),"notSku"===e.status?n("v-uni-view",{staticClass:"cart-item--props"},[t._v("请重新选择商品规格")]):t._e(),"isDisable"===e.status?n("v-uni-view",{staticClass:"cart-item--props"},[t._v("宝贝已失效,暂时无法购买")]):t._e(),"normal"===e.status?[n("v-uni-view",{staticClass:"cart-item--props"},[t._v(t._s(e.productSku.name))]),n("v-uni-view",{staticClass:"cart-item--footer"},[n("UiMoney",{staticClass:"cart-item--price",attrs:{money:e.productSku.sellPrice,prefix:!0}}),n("v-uni-view",{staticClass:"cart-item--stepper"},[n("u-number-box",{attrs:{min:1,"button-size":"40rpx",bgColor:"#F5F6FA",value:e.number,max:e.maxBuyNum},on:{change:function(a){arguments[0]=a=t.$handleEvent(a),t.onChangeStepper(a,e)}}},[n("v-uni-text",{staticClass:"cart-item--stepper-icon",attrs:{slot:"minus"},slot:"minus"},[t._v("-")]),n("v-uni-text",{staticClass:"cart-item--stepper-icon",attrs:{slot:"plus"},slot:"plus"},[t._v("+")])],1)],1)],1)]:t._e(),"notSku"===e.status?n("v-uni-view",[n("UiButton",{staticClass:"cart-item--reset-btn",attrs:{size:"small",type:"line"}},[t._v("重新选择")])],1):t._e()],2)],1)})):n("BsEmpty",{staticClass:"empty",attrs:{tips:"去挑点喜欢的好货吧~"}},[n("v-uni-image",{staticClass:"empty--icon",attrs:{slot:"icon",src:a("d7da")},slot:"icon"}),n("v-uni-view",{staticClass:"empty--btn",attrs:{slot:"btn"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$Router.pushTab("/")}},slot:"btn"},[t._v("去逛逛")])],1),t.isLoading?t._e():[n("v-uni-view",{staticClass:"title"},[t._v("为您推荐")]),n("BsChoiceGoods")],t.list.length?n("v-uni-view",{class:"footer footer__"+t.type},[n("v-uni-label",{staticClass:"all-radio",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleCheckAll.apply(void 0,arguments)}}},[n("v-uni-radio",{staticClass:"radio",attrs:{color:"#FF875B",checked:t.checkedIds.length>0&&t.checkedIds.length===t.list.filter((function(t){return"normal"==t.status})).length}}),n("v-uni-text",[t._v("全选")])],1),"normal"==t.mode?n("v-uni-view",{staticClass:"total-info"},[n("v-uni-text",[t._v("合计:")]),n