Files
2025-12-22 17:13:05 +08:00

1 line
5.0 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["shop/pages/car"],{3997:function(t,e,n){"use strict";n.r(e);var r=n("7a62"),a=n("7a13");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("d0c7");var i=n("f0c5"),s=Object(i["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);e["default"]=s.exports},"5aef":function(t,e,n){"use strict";(function(t){var r=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(n("2eee")),o=r(n("9523")),i=r(n("c973")),s=n("26cb");function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={components:{},data:function(){return{isLoad:!1,options:{},lockTap:!1}},computed:(0,s.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo},shopCarList:function(t){return t.order.shopCarList}}),onLoad:function(t){var e=this;return(0,i.default)(a.default.mark((function n(){return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.$util.showLoading(),e.options=t,n.next=4,e.initIndex();case 4:case"end":return n.stop()}}),n)})))()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},methods:c(c(c({},(0,s.mapActions)(["getConfigInfo","updateCommonOptions","getShopCarList"])),(0,s.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=this;return(0,i.default)(a.default.mark((function e(){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getShopCarList();case 2:t.$util.hideAll(),t.isLoad=!0;case 4:case"end":return e.stop()}}),e)})))()},initRefresh:function(){this.initIndex()},toUpdateCar:function(t,e,n,r){var o=arguments,s=this;return(0,i.default)(a.default.mark((function i(){var u,c;return a.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(o.length>4&&void 0!==o[4]?o[4]:1,u=r>0?"addCar":"delCar",c=r>0?{store_id:t,goods_id:e,spe_id:n,goods_num:r}:{id:e,goods_num:1},!s.lockTap){a.next=5;break}return a.abrupt("return");case 5:return s.lockTap=!0,a.prev=6,a.next=9,s.$api.shop[u](c);case 9:return s.lockTap=!1,a.next=12,s.getShopCarList();case 12:a.next=17;break;case 14:a.prev=14,a.t0=a["catch"](6),s.lockTap=!1;case 17:case"end":return a.stop()}}),i,null,[[6,14]])})))()},toUpdateStatus:function(t,e){var n=this;return(0,i.default)(a.default.mark((function r(){var o,i,s,u,c;return a.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(o={},-1===t?(i=!n.shopCarList.selectAll,n.selectAll=i,o={status:i?1:0}):(s=n.shopCarList.list[t].goods_list[e],u=s.id,c=s.status,o={id:[u],status:1==c?0:1}),!n.lockTap){r.next=4;break}return r.abrupt("return");case 4:return n.lockTap=!0,r.prev=5,r.next=8,n.$api.shop.carUpdate(o);case 8:return n.lockTap=!1,r.next=11,n.getShopCarList();case 11:r.next=16;break;case 13:r.prev=13,r.t0=r["catch"](5),n.lockTap=!1;case 16:case"end":return r.stop()}}),r,null,[[5,13]])})))()},toDelCar:function(){var t=this;return(0,i.default)(a.default.mark((function e(){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.shop.delSomeCar();case 2:return t.$util.showToast({title:"清空成功"}),t.$refs.show_car_item.close(),e.next=6,t.getCarInfo();case 6:case"end":return e.stop()}}),e)})))()},goDetail:function(t){var e=this.shopCarList.list[t].farmer_id,n="/shop/pages/store?id=".concat(e);this.$util.goUrl({url:n})},goOrder:function(){var t=this.shopCarList.car_count;t<1?this.$util.showToast({title:"请选择商品"}):this.$util.goUrl({url:"/shop/pages/order"})}})};e.default=l}).call(this,n("543d")["default"])},"7a13":function(t,e,n){"use strict";n.r(e);var r=n("5aef"),a=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=a.a},"7a62":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var r=function(){var t=this.$createElement,e=(this._self._c,this.isLoad?this.shopCarList.list.length:null),n=this.isLoad?this.shopCarList.list.length:null;this.$mp.data=Object.assign({},{$root:{g0:e,g1:n}})},a=[]},a00a:function(t,e,n){"use strict";(function(t,e){var r=n("4ea4");n("b03e");r(n("66fd"));var a=r(n("3997"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},a349:function(t,e,n){},d0c7:function(t,e,n){"use strict";var r=n("a349"),a=n.n(r);a.a}},[["a00a","common/runtime","common/vendor"]]]);