2 lines
4.4 KiB
JavaScript
2 lines
4.4 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabbar/shop"],{100:function(t,n,e){"use strict";var o;e.r(n),e.d(n,"render",(function(){return i})),e.d(n,"staticRenderFns",(function(){return r})),e.d(n,"recyclableRender",(function(){return s})),e.d(n,"components",(function(){return o}));try{o={uniNavBar:function(){return e.e("uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar").then(e.bind(null,349))},lxcCountStyle:function(){return e.e("components/lxc-count-style/lxc-count-style").then(e.bind(null,356))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var t=this,n=t.$createElement,e=(t._self._c,t.list.length),o=t.list.length,i=o>0?t.__map(t.list,(function(n,e){var o=t.__get_orig(n),i=t.$tools.oss(n.image);return{$orig:o,g2:i}})):null;t.$mp.data=Object.assign({},{$root:{g0:e,g1:o,l0:i}})},s=!1,r=[];i._withStripped=!0},101:function(t,n,e){"use strict";e.r(n);var o=e(102),i=e.n(o);for(var s in o)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(s);n["default"]=i.a},102:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o={data:function(){return{min:1,nums:1,list:[],checkAllList:!1}},onShow:function(){this.shopCar(),this.checkAllList=!1},computed:{totalPrice:function(){var t=this.list.filter((function(t){return t.checkList})),n=0;return t.forEach((function(t){n+=Number(t.price)*Number(t.num)})),n.toFixed(2)}},methods:{shopCar:function(){var t=this;this.$tools.axiosFromToken("POST","shop/shopCar").then((function(n){n.data.forEach((function(t){t.checkList=!1})),t.list=n.data}))},checkAll:function(){this.checkAllList=!this.checkAllList,this.checkAllList?this.list.forEach((function(t){t.checkList=!0})):this.list.forEach((function(t){t.checkList=!1})),this.$forceUpdate()},checkItem:function(t,n){t.checkList=!t.checkList,this.checkAllList=this.list.every((function(t){return t.checkList})),this.$forceUpdate()},handleCount:function(t,n,e){var o=this;this.$tools.axiosFromToken("POST","shop/editCar",{id:n.id,num:t}).then((function(n){o.$tools.showtt(n.msg),1==n.code&&(o.list[e].num=t,0==t&&(o.list.splice(e,1),o.$tools.showtt("删除成功")))}))},cardelete:function(){var t=this;if(0==this.list.length)return this.$tools.showtt("购物车暂无商品");var n=[];if(this.list.forEach((function(t){t.checkList&&n.push(t.id)})),0==n.length)return this.$tools.showtt("请选择要删除的商品");this.$tools.axiosFrom("POST","shop/deleteCar",{ids:n.join(",")}).then((function(n){t.$tools.showtt(n.msg),1==n.code&&(t.shopCar(),t.checkAllList=!1)}))},cartOrderCreate:function(){if(0==this.list.length)return this.$tools.showtt("购物车暂无商品");var t=[],n=[];if(this.list.forEach((function(e){e.checkList&&(t.push(e),n.push(e.id))})),0==t.length)return this.$tools.showtt("请选择要结算的商品");getApp().globalData.shoppings=t,this.$tools.goNext("/pageOne/shopConfirm?id=".concat(n.join(",")))}}};n.default=o},103:function(t,n,e){"use strict";e.r(n);var o=e(104),i=e.n(o);for(var s in o)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(s);n["default"]=i.a},104:function(t,n,e){},97:function(t,n,e){"use strict";(function(t,n){var o=e(4);e(26);o(e(25));var i=o(e(98));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e(1)["default"],e(2)["createPage"])},98:function(t,n,e){"use strict";e.r(n);var o=e(99),i=e(101);for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(s);e(103);var r,c=e(32),u=Object(c["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],r);u.options.__file="pages/tabbar/shop.vue",n["default"]=u.exports},99:function(t,n,e){"use strict";e.r(n);var o=e(100);e.d(n,"render",(function(){return o["render"]})),e.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),e.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),e.d(n,"components",(function(){return o["components"]}))}},[[97,"common/runtime","common/vendor"]]]);
|
||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/tabbar/shop.js.map
|