1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-coupons-selectGoods"],{"4efa":function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-0410d72a]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-0410d72a]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-0410d72a]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-0410d72a]{padding-top:0}.vertical[data-v-0410d72a]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-0410d72a], .lists .goods-item .mian .title[data-v-0410d72a], .lists .goods-item .mian .subtitle[data-v-0410d72a], .lists .goods-item .mian .mian-flex .price[data-v-0410d72a], .lists .goods-item .mian .mian-flex .inventory[data-v-0410d72a], .footer .footer-flex .flex-checkbox .sub-text[data-v-0410d72a]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-0410d72a]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-0410d72a]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-0410d72a]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-0410d72a]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.lists[data-v-0410d72a]{padding-bottom:%?110?%}.lists .goods-item[data-v-0410d72a]{background:#fff;padding:%?30?% %?30?% %?30?% %?100?%;position:relative;border-bottom:solid %?1?% #ddd}.lists .goods-item .checkbox[data-v-0410d72a]{left:%?30?%}.lists .goods-item .mian[data-v-0410d72a]{position:relative;padding-left:%?198?%;min-height:%?168?%}.lists .goods-item .mian .cover[data-v-0410d72a]{position:absolute;left:0;top:0;width:%?168?%;height:%?168?%}.lists .goods-item .mian .title[data-v-0410d72a]{font-size:%?30?%;line-height:%?40?%;height:%?48?%}.lists .goods-item .mian .subtitle[data-v-0410d72a]{color:#555;font-size:%?28?%;height:%?80?%;line-height:%?40?%;margin-bottom:%?8?%}.lists .goods-item .mian .mian-flex[data-v-0410d72a]{display:flex;justify-content:space-between}.lists .goods-item .mian .mian-flex .price[data-v-0410d72a]{width:50%;font-weight:700;color:#8b64fd;font-size:%?32?%;height:%?40?%;line-height:%?40?%}.lists .goods-item .mian .mian-flex .inventory[data-v-0410d72a]{width:50%;text-align:right;font-size:%?26?%;color:#555;height:%?40?%;line-height:%?40?%}.footer[data-v-0410d72a]{position:fixed;bottom:0;left:0;right:0;background:#fff;padding:%?20?% %?30?%;z-index:99;box-shadow:0 0 %?4?% %?4?% rgba(0,0,0,.02)}.footer .footer-flex[data-v-0410d72a]{display:flex;justify-content:space-between;align-items:center}.footer .footer-flex .flex-checkbox[data-v-0410d72a]{position:relative;width:50%;padding-right:%?30?%;padding-left:%?70?%;box-sizing:border-box}.footer .footer-flex .flex-checkbox .text[data-v-0410d72a]{font-size:%?30?%;font-weight:700;line-height:%?40?%;color:#333}.footer .footer-flex .flex-checkbox .sub-text[data-v-0410d72a]{font-size:%?26?%;color:#555;line-height:%?40?%}.footer .footer-flex .flex-button[data-v-0410d72a]{background:#8b64fd;color:#fff;width:50%;text-align:center;line-height:%?80?%;border-radius:%?10?%;font-size:%?32?%;font-weight:700}.checkbox[data-v-0410d72a]{position:absolute;left:0;top:50%;margin-top:%?-28?%}.checkbox .uni-checkbox-input[data-v-0410d72a]{border:1px solid #ddd;border-radius:50%;width:%?46?%;height:%?46?%;box-sizing:border-box}.checkbox .uni-checkbox-input.uni-checkbox-input-checked[data-v-0410d72a]{border:none;background:#8b64fd}.checkbox .uni-checkbox-input.uni-checkbox-input-checked[data-v-0410d72a]::before{border-radius:50%;width:%?40?%;height:%?40?%;line-height:%?40?%;text-align:center;font-size:%?24?%;color:#fff;background:transparent;transform:translate(-50%,-50%) scale(1);-webkit-transform:translate(-50%,-50%) scale(1)}',""]),t.exports=e},"583e":function(t,e,o){"use strict";var i=o("b6ce"),n=o.n(i);n.a},"71ae":function(t,e,o){"use strict";o.r(e);var i=o("f3ad"),n=o.n(i);for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);e["default"]=n.a},a1d0:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.magCouponsRecommend=e.magCouponsStatus=e.magCouponsInfo=e.couponsGoods=e.pushCoupons=e.toolsCoupons=void 0;var i=o("89d9"),n=function(t){return(0,i.request)({url:"coupons/tools/coupons",data:t})};e.toolsCoupons=n;var a=function(t){return(0,i.request)({url:"coupons/tools/coupons",method:"POST",data:t})};e.pushCoupons=a;var s=function(t){return(0,i.request)({url:"coupons/tools/coupons/goods",data:t})};e.couponsGoods=s;var l=function(t){return(0,i.request)({url:"coupons/tools/coupons/"+t})};e.magCouponsInfo=l;var r=function(t){return(0,i.request)({url:"coupons/tools/coupons/"+t+"/status",method:"POST"})};e.magCouponsStatus=r;var d=function(t){return(0,i.request)({url:"coupons/tools/coupons/"+t+"/recommend"})};e.magCouponsRecommend=d},b31e:function(t,e,o){"use strict";o.r(e);var i=o("c3f8"),n=o("71ae");for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);o("583e");var s,l=o("f0c5"),r=Object(l["a"])(n["default"],i["b"],i["c"],!1,null,"0410d72a",null,!1,i["a"],s);e["default"]=r.exports},b6ce:function(t,e,o){var i=o("4efa");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=o("4f06").default;n("05bcb920",i,!0,{sourceMap:!1,shadowMode:!1})},b85c:function(t,e,o){"use strict";o("a4d3"),o("e01a"),o("d28b"),o("d3b7"),o("3ca3"),o("ddb0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=n(o("06c5"));function n(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var o;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(o=(0,i.default)(t))||e&&t&&"number"===typeof t.length){o&&(t=o);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,l=!0,r=!1;return{s:function(){o=t[Symbol.iterator]()},n:function(){var t=o.next();return l=t.done,t},e:function(t){r=!0,s=t},f:function(){try{l||null==o["return"]||o["return"]()}finally{if(r)throw s}}}}},c3f8:function(t,e,o){"use strict";var i;o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("v-uni-view",[o("v-uni-view",{staticClass:"lists"},[t._l(t.goods,(function(e,i){return o("v-uni-view",{key:i,staticClass:"goods-item"},[o("v-uni-checkbox",{staticClass:"checkbox",attrs:{checked:e.isSelect},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onSelect(i)}}}),o("v-uni-view",{staticClass:"mian"},[o("v-uni-image",{staticClass:"cover",attrs:{src:e.cover,mode:"aspectFill"}}),o("v-uni-view",{staticClass:"title"},[t._v(t._s(e.title))]),o("v-uni-view",{staticClass:"subtitle"},[t._v(t._s(e.description))]),o("v-uni-view",{staticClass:"mian-flex"},[o("v-uni-view",{staticClass:"price"},[o("v-uni-text",[t._v("¥")]),t._v(t._s(e.price))],1),o("v-uni-view",{staticClass:"inventory"},[t._v("权证剩余"+t._s(e.stock))])],1)],1)],1)})),o("v-uni-view",{staticClass:"ios-bottom"})],2),o("v-uni-view",{staticClass:"footer"},[o("v-uni-view",{staticClass:"footer-flex"},[o("v-uni-view",{staticClass:"flex-checkbox"},[o("v-uni-checkbox",{staticClass:"checkbox",attrs:{checked:t.allSelect},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onAllSelect.apply(void 0,arguments)}}}),o("v-uni-label",{attrs:{for:"all"}},[o("v-uni-view",{staticClass:"text"},[t._v("全选")]),o("v-uni-view",{staticClass:"sub-text"},[t._v("已选"+t._s(t.selectGoods.length)+"件")])],1)],1),o("v-uni-view",{staticClass:"flex-button",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.setGoods.apply(void 0,arguments)}}},[t._v("确定")])],1),o("v-uni-view",{staticClass:"ios-bottom"})],1)],1)},a=[]},f3ad:function(t,e,o){"use strict";var i=o("4ea4");o("c740"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(o("b85c")),a=o("a1d0"),s={data:function(){return{goods:[],selectGoods:[],allSelect:!1}},created:function(){var t=this;(0,a.couponsGoods)({type:this.$Route.query.type}).then((function(e){var o,i=t.$store.getters.getCoupongoods,a=e,s=(0,n.default)(i);try{var l=function(){var t=o.value,e=a.findIndex((function(e){return e.goods_sku_id===t}));a[e].isSelect=!0};for(s.s();!(o=s.n()).done;)l()}catch(r){s.e(r)}finally{s.f()}t.goods=a,t.selectNumber()})).catch((function(t){uni.showToast({title:t.message,icon:"none"})}))},methods:{onAllSelect:function(){var t,e=(0,n.default)(this.goods);try{for(e.s();!(t=e.n()).done;){var o=t.value;o.isSelect=!this.allSelect}}catch(i){e.e(i)}finally{e.f()}this.selectNumber()},onSelect:function(t){var e=this.goods[t];e.isSelect=!e.isSelect,this.$set(this.goods,t,e),this.selectNumber()},selectNumber:function(){var t,e=[],o=(0,n.default)(this.goods);try{for(o.s();!(t=o.n()).done;){var i=t.value;i.isSelect&&e.push(i.goods_sku_id)}}catch(a){o.e(a)}finally{o.f()}this.selectGoods=e,e.length==this.goods.length&&0!=this.goods.length?this.allSelect=!0:this.allSelect=!1},setGoods:function(){this.selectGoods.length<=0?uni.showToast({title:"请选择优惠券关联商品",icon:"none"}):(this.$store.commit("setCoupongoods",this.selectGoods),this.$Router.back())}}};e.default=s}}]); |