1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-coupons-selectGoods"],{"0f25":function(e,t,o){var i=o("24fb");t=i(!1),t.push([e.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-6ea01fef]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-6ea01fef]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-6ea01fef]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-6ea01fef]{padding-top:0}.vertical[data-v-6ea01fef]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-6ea01fef], .lists .goods-item .mian .title[data-v-6ea01fef], .lists .goods-item .mian .subtitle[data-v-6ea01fef], .lists .goods-item .mian .mian-flex .price[data-v-6ea01fef], .lists .goods-item .mian .mian-flex .inventory[data-v-6ea01fef], .footer .footer-flex .flex-checkbox .sub-text[data-v-6ea01fef]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-6ea01fef]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-6ea01fef]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-6ea01fef]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-6ea01fef]{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-6ea01fef]{padding-bottom:%?110?%}.lists .goods-item[data-v-6ea01fef]{background:#fff;padding:%?30?% %?30?% %?30?% %?100?%;position:relative;border-bottom:solid %?1?% #ddd}.lists .goods-item .checkbox[data-v-6ea01fef]{left:%?30?%}.lists .goods-item .mian[data-v-6ea01fef]{position:relative;padding-left:%?198?%;min-height:%?168?%}.lists .goods-item .mian .cover[data-v-6ea01fef]{position:absolute;left:0;top:0;width:%?168?%;height:%?168?%}.lists .goods-item .mian .title[data-v-6ea01fef]{font-size:%?30?%;line-height:%?40?%;height:%?48?%}.lists .goods-item .mian .subtitle[data-v-6ea01fef]{color:#555;font-size:%?28?%;height:%?80?%;line-height:%?40?%;margin-bottom:%?8?%}.lists .goods-item .mian .mian-flex[data-v-6ea01fef]{display:flex;justify-content:space-between}.lists .goods-item .mian .mian-flex .price[data-v-6ea01fef]{width:50%;font-weight:700;color:#8b64fd;font-size:%?32?%;height:%?40?%;line-height:%?40?%}.lists .goods-item .mian .mian-flex .inventory[data-v-6ea01fef]{width:50%;text-align:right;font-size:%?26?%;color:#555;height:%?40?%;line-height:%?40?%}.footer[data-v-6ea01fef]{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-6ea01fef]{display:flex;justify-content:space-between;align-items:center}.footer .footer-flex .flex-checkbox[data-v-6ea01fef]{position:relative;width:50%;padding-right:%?30?%;padding-left:%?70?%;box-sizing:border-box}.footer .footer-flex .flex-checkbox .text[data-v-6ea01fef]{font-size:%?30?%;font-weight:700;line-height:%?40?%;color:#333}.footer .footer-flex .flex-checkbox .sub-text[data-v-6ea01fef]{font-size:%?26?%;color:#555;line-height:%?40?%}.footer .footer-flex .flex-button[data-v-6ea01fef]{background:#8b64fd;color:#fff;width:50%;text-align:center;line-height:%?80?%;border-radius:%?10?%;font-size:%?32?%;font-weight:700}.checkbox[data-v-6ea01fef]{position:absolute;left:0;top:50%;margin-top:%?-28?%}.checkbox .uni-checkbox-input[data-v-6ea01fef]{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-6ea01fef]{border:none;background:#8b64fd}.checkbox .uni-checkbox-input.uni-checkbox-input-checked[data-v-6ea01fef]::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)}',""]),e.exports=t},1080:function(e,t,o){"use strict";var i=o("2128"),n=o.n(i);n.a},2128:function(e,t,o){var i=o("0f25");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=o("4f06").default;n("6772dc9f",i,!0,{sourceMap:!1,shadowMode:!1})},"24e7":function(e,t,o){"use strict";var i;o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return i}));var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("v-uni-view",[[o("v-uni-view",{staticClass:"lists"},[e._l(e.goods,(function(t,i){return o("v-uni-view",{key:i,staticClass:"goods-item"},[o("v-uni-checkbox",{staticClass:"checkbox",attrs:{checked:t.isSelect},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onSelect(i)}}}),o("v-uni-view",{staticClass:"mian"},[o("v-uni-image",{staticClass:"cover",attrs:{src:t.cover,mode:"aspectFill"}}),o("v-uni-view",{staticClass:"title"},[e._v(e._s(t.title))]),o("v-uni-view",{staticClass:"subtitle"},[e._v(e._s(t.description))]),o("v-uni-view",{staticClass:"mian-flex"},[o("v-uni-view",{staticClass:"price"},[o("v-uni-text",[e._v("¥")]),e._v(e._s(t.price))],1),o("v-uni-view",{staticClass:"inventory"},[e._v("权证剩余"+e._s(t.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:e.allSelect},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onAllSelect.apply(void 0,arguments)}}}),o("v-uni-label",{attrs:{for:"all"}},[o("v-uni-view",{staticClass:"text"},[e._v("全选")]),o("v-uni-view",{staticClass:"sub-text"},[e._v("已选"+e._s(e.selectGoods.length)+"件")])],1)],1),o("v-uni-view",{staticClass:"flex-button",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.setGoods.apply(void 0,arguments)}}},[e._v("确定")])],1),o("v-uni-view",{staticClass:"ios-bottom"})],1)],0===e.goods.length?o("no-list",{attrs:{name:"no-goods",txt:"没有任何可选商品~"}}):e._e()],2)},a=[]},"71ae":function(e,t,o){"use strict";o.r(t);var i=o("f3ad"),n=o.n(i);for(var a in i)"default"!==a&&function(e){o.d(t,e,(function(){return i[e]}))}(a);t["default"]=n.a},a1d0:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.magCouponsRecommend=t.magCouponsStatus=t.magCouponsInfo=t.couponsGoods=t.pushCoupons=t.toolsCoupons=void 0;var i=o("89d9"),n=function(e){return(0,i.request)({url:"coupons/tools/coupons",data:e})};t.toolsCoupons=n;var a=function(e){return(0,i.request)({url:"coupons/tools/coupons",method:"POST",data:e})};t.pushCoupons=a;var s=function(e){return(0,i.request)({url:"coupons/tools/coupons/goods",data:e})};t.couponsGoods=s;var l=function(e){return(0,i.request)({url:"coupons/tools/coupons/"+e})};t.magCouponsInfo=l;var r=function(e){return(0,i.request)({url:"coupons/tools/coupons/"+e+"/status",method:"POST"})};t.magCouponsStatus=r;var f=function(e){return(0,i.request)({url:"coupons/tools/coupons/"+e+"/recommend"})};t.magCouponsRecommend=f},b31e:function(e,t,o){"use strict";o.r(t);var i=o("24e7"),n=o("71ae");for(var a in n)"default"!==a&&function(e){o.d(t,e,(function(){return n[e]}))}(a);o("1080");var s,l=o("f0c5"),r=Object(l["a"])(n["default"],i["b"],i["c"],!1,null,"6ea01fef",null,!1,i["a"],s);t["default"]=r.exports},b85c:function(e,t,o){"use strict";o("a4d3"),o("e01a"),o("d28b"),o("d3b7"),o("3ca3"),o("ddb0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(o("06c5"));function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var o;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(o=(0,i.default)(e))||t&&e&&"number"===typeof e.length){o&&(e=o);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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=e[Symbol.iterator]()},n:function(){var e=o.next();return l=e.done,e},e:function(e){r=!0,s=e},f:function(){try{l||null==o["return"]||o["return"]()}finally{if(r)throw s}}}}},f3ad:function(e,t,o){"use strict";var i=o("4ea4");o("c740"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(o("b85c")),a=o("a1d0"),s={data:function(){return{goods:[],selectGoods:[],allSelect:!1}},created:function(){var e=this;(0,a.couponsGoods)({type:this.$Route.query.type}).then((function(t){var o,i=e.$store.getters.getCoupongoods,a=t,s=(0,n.default)(i);try{var l=function(){var e=o.value,t=a.findIndex((function(t){return t.goods_sku_id===e}));a[t].isSelect=!0};for(s.s();!(o=s.n()).done;)l()}catch(r){s.e(r)}finally{s.f()}e.goods=a,e.selectNumber()})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))},methods:{onAllSelect:function(){var e,t=(0,n.default)(this.goods);try{for(t.s();!(e=t.n()).done;){var o=e.value;o.isSelect=!this.allSelect}}catch(i){t.e(i)}finally{t.f()}this.selectNumber()},onSelect:function(e){var t=this.goods[e];t.isSelect=!t.isSelect,this.$set(this.goods,e,t),this.selectNumber()},selectNumber:function(){var e,t=[],o=(0,n.default)(this.goods);try{for(o.s();!(e=o.n()).done;){var i=e.value;i.isSelect&&t.push(i.goods_sku_id)}}catch(a){o.e(a)}finally{o.f()}this.selectGoods=t,t.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())}}};t.default=s}}]); |