1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-my_cart"],{"0d511":function(t,i,e){"use strict";e("7a82"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("c975");var a={name:"bar-title",props:{bgColor:{type:String,default:""},isBack:{type:Boolean,default:!0},backText:{type:String,default:""},fixed:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1},title:{type:String,default:""}},data:function(){return{isWechatBrowser:!1}},methods:{BackPage:function(){uni.navigateBack()},leftTap:function(){this.$emit("leftTap")},contentTap:function(){this.$emit("contentTap")},rightTap:function(){this.$emit("rightTap")}},created:function(){uni.setNavigationBarTitle({title:this.title}),this.isWechatBrowser=navigator.userAgent.toLocaleLowerCase().indexOf("micromessenger")>0},watch:{title:function(t){uni.setNavigationBarTitle({title:t})}}};i.default=a},"34c5":function(t,i,e){"use strict";e("7a82");var a=e("ee27").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("13d5"),e("d3b7"),e("4de4"),e("d81d");var o=a(e("713c")),n=(a(e("e7c0")),a(e("b27f"))),s={components:{barTitle:o.default},data:function(){return{cartList:[],checkAll:!1,goods_checked:!1}},onLoad:function(){this.loadCartList()},onReady:function(){n.default.setBarColor(!0),uni.pageScrollTo({scrollTop:0,duration:0})},computed:{totalInfo:function(){return this.cartList.length?this.cartList.filter((function(t){return 1==t.status})).reduce((function(t,i){var e=t.count+i.num,a=t.price+i.price.value;return{count:e,price:a}}),{count:0,price:0}):0}},methods:{loadCartList:function(){var t=this;this.reqByuser({url:"?l=cart.list",data:{},success:function(i){1==i.data.status?t.cartList=i.data.data.list:t.error=i.data.msg}})},handleCartNum:function(t){var i=this,e=t.currentTarget.dataset.item,a=e.info_id,o=e.sku_id,n=e.num,s=t.currentTarget.dataset.plus;this.reqByuser({url:"?l=cart.up",data:{type_id:a,sku_id:o,num:0==s?t.target.value:n+s},success:function(t){1==t.data.status?(uni.showToast({icon:"success",title:"操作成功"}),i.cartList=t.data.data):uni.showToast({icon:"error",title:"添加失败"})}})},CheckboxChange:function(t,i){var e=this,a=t.currentTarget.dataset.item,o=a.id,n=a.sku_id,s=a.status;this.reqByuser({url:"?l=cart.edit",data:{type_id:o,sku_id:n,status:1==s?2:1},success:function(t){1==t.data.status?e.cartList=t.data.data:e.error=t.data.msg}})},tapChecked:function(){this.checkAll?this.checkAll=!1:this.checkAll=!0,this.CheckboxChange("",this.checkAll?this.cartList.map((function(t){return t.id+""})):[""])},barEditTap:function(){this.goods_checked?this.goods_checked=!1:this.goods_checked=!0},tapBtn:function(){uni.navigateTo({url:"/pages/goods/settlement"})}}};i.default=s},"3c00":function(t,i,e){var a=e("24fb");i=a(!1),i.push([t.i,".zaiui-cart-list-view .zaiui-checkbox-title-view[data-v-5759caca]{position:relative;line-height:1.6}.zaiui-cart-list-view .zaiui-checkbox-title-view .zaiui-checked[data-v-5759caca]{position:absolute;top:%?29.09?%;z-index:999;-webkit-transform:scale(.7);transform:scale(.7)}.zaiui-cart-list-view .zaiui-checkbox-title-view .shop-title[data-v-5759caca]{position:relative;padding-left:%?63.63?%}.zaiui-cart-list-view .goods-list-item-view[data-v-5759caca]{position:relative;padding:%?36.36?% %?27.27?%}.zaiui-cart-list-view .goods-list-item-view .zaiui-checked[data-v-5759caca]{position:absolute;top:%?90.9?%;z-index:999;-webkit-transform:scale(.7);transform:scale(.7)}.zaiui-cart-list-view .goods-list-item-view .cu-avatar[data-v-5759caca]{position:absolute;height:%?163.63?%;width:%?163.63?%;left:%?90.9?%}.zaiui-cart-list-view .goods-list-item-view .goods-info-view[data-v-5759caca]{position:relative;padding-left:%?254.54?%;height:%?163.63?%;line-height:1.4}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .zaiui-tag-view[data-v-5759caca]{position:relative;height:%?38.18?%}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view[data-v-5759caca]{position:relative;line-height:1.7;top:%?9.09?%}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view .text-price-view[data-v-5759caca]{position:absolute}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view .text-price-view .cu-tag[data-v-5759caca]{position:relative;top:%?-3.63?%;left:%?7.27?%}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view .step-btn-view[data-v-5759caca]{position:relative;padding-left:%?272.72?%;height:%?45.45?%}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view .step-btn-view .zaiui-btn[data-v-5759caca]{border:%?2?% solid hsla(0,0%,44.3%,.2);position:absolute;background:initial;text-align:center;line-height:%?32.72?%;border-radius:0;font-size:%?45.45?%;height:%?45.45?%;width:%?45.45?%;right:%?123.63?%;padding:0}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view .step-btn-view .zaiui-btn[data-v-5759caca]:after{width:0;height:0;border:0;border-radius:0}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view .step-btn-view .zaiui-input[data-v-5759caca]{width:%?81.81?%;right:%?43.63?%;height:%?45.45?%;position:absolute;text-align:center;border:%?2?% solid hsla(0,0%,44.3%,.2);border-left:0;color:#333}.zaiui-cart-list-view .goods-list-item-view .goods-info-view .goods-price-view .step-btn-view .zaiui-input + .zaiui-btn[data-v-5759caca]{border-left:0;right:0}.zaiui-footer-fixed[data-v-5759caca]{box-shadow:0 %?-2?% %?9.09?% 0 #ececec;z-index:999}.zaiui-footer-fixed .cu-bar[data-v-5759caca]{width:100%}.zaiui-footer-fixed .cu-bar .checked-view[data-v-5759caca]{position:relative;z-index:999}.zaiui-footer-fixed .cu-bar .checked-view .zaiui-checked[data-v-5759caca]{position:relative;margin-right:%?9.09?%;top:%?-5.45?%;-webkit-transform:scale(.7);transform:scale(.7)}.zaiui-footer-fixed .cu-bar .price-view[data-v-5759caca]{position:absolute;padding:0 %?254.54?% 0 %?127.27?%;width:100%}",""]),t.exports=i},"5a30":function(t,i,e){var a=e("7ed5");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=e("4f06").default;o("e9abf2d4",a,!0,{sourceMap:!1,shadowMode:!1})},6675:function(t,i,e){"use strict";var a=e("5a30"),o=e.n(a);o.a},"67aa":function(t,i,e){"use strict";e.r(i);var a=e("b2aa"),o=e("e94d");for(var n in o)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return o[t]}))}(n);e("f1eb");var s=e("f0c5"),c=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,"5759caca",null,!1,a["a"],void 0);i["default"]=c.exports},"713c":function(t,i,e){"use strict";e.r(i);var a=e("e88e"),o=e("df75a");for(var n in o)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return o[t]}))}(n);e("6675");var s=e("f0c5"),c=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,"1b7fdbfe",null,!1,a["a"],void 0);i["default"]=c.exports},"7ed5":function(t,i,e){var a=e("24fb");i=a(!1),i.push([t.i,".zaiui-bar-title-box .cu-bar[data-v-1b7fdbfe]{padding-top:0;min-height:calc(0px + %?101?%)}.zaiui-bar-title-box .cu-bar .content[data-v-1b7fdbfe]{top:0}.zaiui-bar-title-box .cu-bar .content .cu-tag[data-v-1b7fdbfe]{position:relative;top:%?-2.72?%;padding:0 %?5.45?%}.zaiui-bar-title-box .cu-bar .content .cu-tag uni-text[data-v-1b7fdbfe]{position:relative;top:%?2?%}.zaiui-bar-title-box .cu-bar.fixed.no-shadow[data-v-1b7fdbfe]{box-shadow:inherit}.zaiui-bar-title-box .cu-bar.bg-white[data-v-1b7fdbfe]{color:#333}.zaiui-bar-title-box .zaiui-seat-height[data-v-1b7fdbfe]{width:100%;height:calc(0px + %?101?%)}",""]),t.exports=i},b27f:function(t,i,e){"use strict";e("7a82"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("a9e3"),e("d401"),e("d3b7"),e("25f0"),e("e25e"),e("c975"),e("ac1f"),e("5319");var a={strLeng:function(t){if(t){for(var i=t.length,e=0,a=0;a<i;a++)t.charCodeAt(a)>128?e+=2:e+=1;return e}return 0},getPageNum:function(t,i){var e=Number(t)/Number(i);if(e%1!==0){var a=e.toString(),o=parseInt(a.substring(0,a.indexOf("."))),n=a.replace(/\d+\.(\d*)/,"$1");n>0&&(e=o+1)}return e},setBarColor:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t?uni.setNavigationBarColor({frontColor:"#000000",backgroundColor:"#FAFAFA"}):uni.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:"#FAFAFA"})},zaiui_log:function(t){}},o=a;i.default=o},b2aa:function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){}));var a=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("v-uni-view",[e("bar-title",{attrs:{bgColor:"bg-white"},on:{rightTap:function(i){arguments[0]=i=t.$handleEvent(i),t.barEditTap.apply(void 0,arguments)}}},[e("template",{attrs:{slot:"content"},slot:"content"},[t._v("购物车")])],2),e("v-uni-view",{staticClass:"bg-white zaiui-cart-list-view"},[t._l(t.cartList,(function(i,a){return[e("v-uni-view",{key:i.id+"_0",staticClass:"light goods-list-item-view"},[e("v-uni-checkbox",{staticClass:"round red sm zaiui-checked",class:1==i.status?"checked":"",attrs:{checked:1==i.status,"data-item":i},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.CheckboxChange.apply(void 0,arguments)}}}),e("v-uni-view",{staticClass:"cu-avatar radius lg",style:[{backgroundImage:"url("+i.pic+")"}]}),e("v-uni-view",{staticClass:"goods-info-view"},[e("v-uni-view",{staticClass:"text-cut text-black"},[t._v(t._s(i.name))]),e("v-uni-view",{staticClass:"text-sm text-gray"},[t._v(t._s(i.sku_name))]),e("v-uni-view",{staticClass:"zaiui-tag-view"},[i.tag?e("v-uni-text",{staticClass:"cu-tag line-red sm radius"},[t._v(t._s(i.tag))]):t._e()],1),e("v-uni-view",{staticClass:"goods-price-view"},[e("v-uni-view",{staticClass:"text-price-view"},[e("v-uni-text",{staticClass:"text-price text-red text-lg"},[t._v(t._s(i.price.value))]),i.price_tag?e("v-uni-text",{staticClass:"cu-tag bg-red sm radius"},[t._v(t._s(i.price_tag))]):t._e()],1),e("v-uni-view",{staticClass:"step-btn-view"},[e("v-uni-button",{staticClass:"zaiui-btn text-gray",attrs:{"data-item":i,"data-plus":-1},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.handleCartNum.apply(void 0,arguments)}}},[t._v("-")]),e("v-uni-input",{staticClass:"zaiui-input",attrs:{type:"number",value:i.num,"data-item":i,"data-plus":0},on:{blur:function(i){arguments[0]=i=t.$handleEvent(i),t.handleCartNum.apply(void 0,arguments)}}}),e("v-uni-button",{staticClass:"zaiui-btn",staticStyle:{"line-height":"44upx"},attrs:{"data-item":i,"data-plus":1},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.handleCartNum.apply(void 0,arguments)}}},[t._v("+")])],1)],1)],1)],1)]}))],2),e("v-uni-view",{staticClass:"cu-tabbar-height"}),e("v-uni-view",{staticClass:"bg-white zaiui-footer-fixed zaiui-foot-padding-bottom"},[e("v-uni-view",{staticClass:"cu-bar padding-lr"},[e("v-uni-view",{staticClass:"checked-view",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.tapChecked.apply(void 0,arguments)}}}),e("v-uni-view",{staticClass:"price-view",staticStyle:{"padding-left":"0"}},[e("v-uni-view",{staticClass:"text-black text-bold"},[t._v("合计:¥"+t._s(t.totalInfo.price))]),e("v-uni-view",{staticClass:"text-sm"},[t._v("总额:¥"+t._s(t.totalInfo.price)+" 优惠:¥0.00")])],1),e("v-uni-view",{staticClass:"btn-view"},[e("v-uni-button",{staticClass:"cu-btn radius bg-red",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.tapBtn.apply(void 0,arguments)}}},[t._v("去结算("+t._s(t.totalInfo.count)+")")])],1)],1)],1)],1)},o=[]},bfd2:function(t,i,e){var a=e("3c00");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=e("4f06").default;o("78b8fb34",a,!0,{sourceMap:!1,shadowMode:!1})},df75a:function(t,i,e){"use strict";e.r(i);var a=e("0d511"),o=e.n(a);for(var n in a)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(n);i["default"]=o.a},e7c0:function(t,i,e){"use strict";e("7a82"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a={goodsListData:function(){return[{id:1,checked:!0,name:"仔仔店铺1",goods:[{id:3,num:1,max:10,checked:!0,price:"2999.00",price_tag:"秒杀价",tag:"比加入时降¥50元",rule:"移动4G 联通4G 电信4G",name:"商品名称 99新 苹果 iPhoneX 256G 银色",img:"/static/images/home/goods/1.png"},{id:4,num:1,max:14,checked:!0,price:"1999.00",price_tag:"",tag:"",rule:"移动5G 联通5G 电信5G",name:"商品名称 99新 小米 XiaoMI10 256G 银色",img:"/static/images/home/goods/2.png"},{id:5,num:1,max:14,checked:!0,price:"3999.00",price_tag:"",tag:"比加入时降¥50元",rule:"移动4G 联通3G 电信5G",name:"商品名称 99新 三星 XiaoMI10 256G 银色",img:"/static/images/home/goods/3.png"}]},{id:2,checked:!0,name:"仔仔店铺22",goods:[{id:6,num:1,max:10,checked:!0,price:"4999.00",price_tag:"秒杀价",tag:"比加入时降¥50元",rule:"移动4G 联通4G 电信4G",name:"商品名称 99新 苹果 iPhoneX 256G 银色",img:"/static/images/home/goods/4.png"},{id:7,num:1,max:14,checked:!0,price:"5999.00",price_tag:"",tag:"",rule:"移动5G 联通5G 电信5G",name:"商品名称 99新 小米 XiaoMI10 256G 银色",img:"/static/images/home/goods/5.png"},{id:8,num:1,max:14,checked:!0,price:"6999.00",price_tag:"",tag:"比加入时降¥50元",rule:"移动4G 联通3G 电信5G",name:"商品名称 99新 三星 XiaoMI10 256G 银色",img:"/static/images/home/goods/6.png"}]}]}};i.default=a},e88e:function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){}));var a=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("v-uni-view",{staticClass:"zaiui-bar-title-box",style:t.isWechatBrowser?"display: none;":""},[e("v-uni-view",{staticClass:"cu-bar",class:[t.fixed?"fixed":"",t.shadow?"":"no-shadow",t.bgColor]},[t.isBack?e("v-uni-view",{staticClass:"action",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.BackPage.apply(void 0,arguments)}}},[e("v-uni-text",{staticClass:"cuIcon-back"}),e("v-uni-text",[t._v(t._s(t.backText))])],1):t._e(),t.isBack?t._e():e("v-uni-view",{staticClass:"action",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.leftTap.apply(void 0,arguments)}}},[t._t("left")],2),e("v-uni-view",{staticClass:"content",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.contentTap.apply(void 0,arguments)}}},[t._t("content")],2),e("v-uni-view",{staticClass:"action",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.rightTap.apply(void 0,arguments)}}},[t._t("right")],2)],1),t.fixed?e("v-uni-view",{staticClass:"zaiui-seat-height"}):t._e()],1)},o=[]},e94d:function(t,i,e){"use strict";e.r(i);var a=e("34c5"),o=e.n(a);for(var n in a)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(n);i["default"]=o.a},f1eb:function(t,i,e){"use strict";var a=e("bfd2"),o=e.n(a);o.a}}]);
|