user-my_coupon-get_coupon.08895f00.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-my_coupon-get_coupon"],{"0c22":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return 0==t.shenheStatus&&t.detailData.coupon?a("v-uni-view",{staticClass:"get-card"},[a("v-uni-image",{staticClass:"top-img",attrs:{src:t.asyncImgs.my_coupon.coupon_bg,mode:"aspectFill"}}),a("v-uni-view",{staticClass:"getBox"},[a("v-uni-view",{staticClass:"cardBox"},[a("v-uni-view",{staticClass:"top"},[a("v-uni-view",{staticClass:"name"},[a("v-uni-text",[t._v(t._s(t.detailData.coupon.name))]),a("v-uni-text",[t._v(t._s(t._f("dateText")(t.detailData)))])],1),a("v-uni-view",{staticClass:"price"},[2==t.detailData.coupon.discount_type?a("v-uni-view",{staticClass:"money"},[a("v-uni-text",[t._v("¥")]),a("v-uni-text",[t._v(t._s(t.detailData.coupon.sub_price))])],1):t._e(),1==t.detailData.coupon.discount_type?a("v-uni-view",{staticClass:"discount"},[t._v(t._s(t.detailData.coupon.discount)+"折")]):t._e(),a("v-uni-text",{staticClass:"title"},[t._v("满"+t._s(t.detailData.coupon.min_price)+"可用")])],1)],1),a("v-uni-view",{staticClass:"bottom",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showDetail=!t.showDetail}}},[t.showDetail?a("v-uni-view",{staticClass:"detailInfo",domProps:{innerHTML:t._s(t.detailData.content)}}):t._e(),a("v-uni-view",{staticClass:"detail"},[t.showDetail?[a("v-uni-text",[t._v("收起")]),a("v-uni-text",{staticClass:"iconfont icon-arrow-up"})]:[a("v-uni-text",[t._v("详细信息")]),a("v-uni-text",{staticClass:"iconfont icon-arrow-down"})]],2)],1)],1),a("v-uni-view",{class:["getBtn",t.disabled?"disabled":""]},[t.detailData.give_user_id>0?a("v-uni-text",[t._v("已领取")]):[1!=t.detailData.is_use&&1!=t.detailData.is_expire&&0!=t.detailData.can_send&&0==t.detailData.give_user_id?a("v-uni-text",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.getCardBt.apply(void 0,arguments)}}},[t._v("立即领取")]):t._e(),1==t.detailData.is_use||1==t.detailData.is_expire||0==t.detailData.can_send?a("v-uni-text",[t._v("已失效")]):t._e()]],2)],1)],1):1==t.shenheStatus?a("Shenhe"):t._e()},o=[]},"1f03":function(t,e,a){"use strict";a.r(e);var i=a("0c22"),o=a("2532");for(var n in o)["default"].indexOf(n)<0&&function(t){a.d(e,t,(function(){return o[t]}))}(n);a("5e4f");var d=a("828b"),c=Object(d["a"])(o["default"],i["b"],i["c"],!1,null,"29a6ed9c",null,!1,i["a"],void 0);e["default"]=c.exports},2532:function(t,e,a){"use strict";a.r(e);var i=a("7bef"),o=a.n(i);for(var n in i)["default"].indexOf(n)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(n);e["default"]=o.a},4458:function(t,e,a){var i=a("8a51");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("967d").default;o("5c673386",i,!0,{sourceMap:!1,shadowMode:!1})},"5e4f":function(t,e,a){"use strict";var i=a("4458"),o=a.n(i);o.a},"7bef":function(t,e,a){"use strict";a("6a54");var i=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(a("2634")),n=i(a("2fdc"));a("c223");var d=i(a("2ba3")),c={components:{Shenhe:d.default},data:function(){return{modalShow:!1,id:"",detailData:"",showDetail:!1,isDisabled:!1}},onLoad:function(t){this.id=t.id,this.getDetail()},filters:{dateText:function(t){if(t)return 1==t.expire_type?t.expire_day>0?"领取后".concat(t.expire_day,"天有效"):"领取后永久天有效":2==t.expire_type?"".concat(t.begin_time,"~").concat(t.end_time):""}},methods:{getDetail:function(){var t=this;return(0,n.default)((0,o.default)().mark((function e(){var a;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$allrequest.coupon.couponDetail({user_coupon_id:t.id},!0);case 2:if(a=e.sent,0!=a.code){e.next=13;break}if(t.detailData=a.data.list,1!=t.detailData.is_use&&1!=t.detailData.is_expire&&0!=t.detailData.can_send){e.next=9;break}return uni.showToast({title:"已失效",icon:"none"}),setTimeout((function(){t.$utils.toUrl("/pages/home/home","reLaunch")}),2e3),e.abrupt("return");case 9:if(!(t.detailData.give_user_id>0)){e.next=13;break}return uni.showToast({title:"已领取",icon:"none"}),setTimeout((function(){t.$utils.toUrl("/pages/home/home","reLaunch")}),2e3),e.abrupt("return");case 13:case"end":return e.stop()}}),e)})))()},getCardBt:function(){var t=this;return(0,n.default)((0,o.default)().mark((function e(){var a,i,n;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$allrequest.coupon.getShareCoupon({id:t.id});case 2:a=e.sent,0==a.code&&(uni.showToast({title:"领取成功",icon:"none"}),t.isDisabled=!0,i=t.detailData.goods,n=t.detailData.cat,setTimeout((function(){1==t.detailData.appoint_type&&n.length>1?t.$utils.toUrl("/pages/cat/cat","switchtab"):1!=t.detailData.appoint_type||1!=n.length?2!=t.detailData.appoint_type||1!=i.length?2==t.detailData.appoint_type&&i.length>1&&t.$utils.toUrl("/pages/home/home","switchtab"):t.$utils.toUrl("/goods/goods/goods?id="+t.detailData.goods[0].id):t.$utils.toUrl("/other/list/list?cat_id="+t.detailData.cat[0].id)}),2e3));case 4:case"end":return e.stop()}}),e)})))()},toView:function(){this.$utils.toUrl("/user/write_off_card/card-list/detail-card?id="+this.id)}},computed:{disabled:function(){var t=!1;return 1==this.detailData.is_use&&(t=!0),1==this.detailData.is_expire&&(t=!0),0==this.detailData.can_send&&(t=!0),this.detailData.give_user_id>0&&(t=!0),this.isDisabled&&(t=!0),t}}};e.default=c},"8a51":function(t,e,a){var i=a("c86c");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/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-29a6ed9c] .u-form-item--right__content__slot > uni-view,[data-v-29a6ed9c] .u-form-item--right__content__slot > div,[data-v-29a6ed9c] .u-form-item--right__content__slot > span,[data-v-29a6ed9c] .u-form-item--right__content__slot > uni-text{width:100%}.get-card[data-v-29a6ed9c]{display:flex;flex-direction:column;height:100vh;background:#f86741}.get-card[data-v-29a6ed9c] .u-model__footer{justify-content:center;margin-bottom:%?48?%}.get-card[data-v-29a6ed9c] .u-model__footer__button{flex:initial;width:%?244?%;height:%?84?%;line-height:%?84?%;border-radius:%?42?%;border:1px solid #999}.get-card[data-v-29a6ed9c] .u-model__footer__button:nth-child(2){margin-left:%?14?%;color:#fff!important;background:#f0250e;border:0}.top-img[data-v-29a6ed9c]{width:100%;display:block;height:%?684?%}.bottom-scroll[data-v-29a6ed9c]{flex:1;height:0;padding-bottom:env(safe-area-inset-bottom)}.bottom-scroll .item[data-v-29a6ed9c]{position:relative;margin:%?28?% auto;border-radius:%?10?%;width:%?702?%;height:%?206?%}.bottom-scroll .item > uni-image[data-v-29a6ed9c]{position:absolute;left:0;top:0;width:100%;height:100%}.bottom-scroll .item > uni-view[data-v-29a6ed9c]{position:absolute;left:0;top:0;width:100%;height:100%;padding:0 %?36?%}.bottom-scroll .item > uni-view .left-image[data-v-29a6ed9c]{margin-right:%?15?%;width:%?116?%;height:%?116?%;background:#c78744;opacity:1;border-radius:%?12?%}.bottom-scroll .item > uni-view .right-box[data-v-29a6ed9c]{flex:1;width:0}.bottom-scroll .item > uni-view .right-box .right-content[data-v-29a6ed9c]{flex:1;width:0}.bottom-scroll .item > uni-view .right-box .right-content > uni-view[data-v-29a6ed9c]:nth-child(1){line-height:%?40?%;font-size:%?28?%;font-weight:700;color:#46270f}.bottom-scroll .item > uni-view .right-box .right-content > uni-view[data-v-29a6ed9c]:nth-child(2){margin-top:%?18?%;height:%?28?%;font-size:%?20?%;color:#46270f;text-shadow:%?0?% %?3?% %?6?% rgba(0,0,0,.16)}.bottom-scroll .item > uni-view .right-box .right-price-bt[data-v-29a6ed9c]{display:flex;flex-direction:column;align-items:center}.bottom-scroll .item > uni-view .right-box .right-price-bt > uni-view[data-v-29a6ed9c]:nth-child(1){height:%?48?%;font-size:%?34?%;font-weight:700;color:#8b521e}.bottom-scroll .item > uni-view .right-box .right-price-bt > uni-view[data-v-29a6ed9c]:nth-child(2){margin-top:%?8?%;width:%?128?%;line-height:%?48?%;text-align:center;background:#ff4b33;border-radius:%?60?%;font-size:%?22?%;color:#fff}.getBox[data-v-29a6ed9c]{width:%?702?%;padding:%?24?%;background-color:#fef1d9;border-radius:%?20?%;position:fixed;top:%?420?%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.getBox .cardBox[data-v-29a6ed9c]{width:100%}.getBox .cardBox .top[data-v-29a6ed9c]{position:relative;border-radius:%?20?% %?20?% 0 0;border-bottom:1px dashed #ededed;background-color:#fff;padding:%?28?%;display:flex;align-items:center;justify-content:space-between}.getBox .cardBox .top[data-v-29a6ed9c] ::before{content:"";position:absolute;width:%?20?%;height:%?20?%;border-radius:50%;background-color:#fef1d9;bottom:%?-10?%;left:%?-10?%}.getBox .cardBox .top[data-v-29a6ed9c] ::after{content:"";position:absolute;width:%?20?%;height:%?20?%;border-radius:50%;background-color:#fef1d9;bottom:%?-10?%;right:%?-10?%}.getBox .cardBox .top .name[data-v-29a6ed9c]{display:flex;flex-direction:column}.getBox .cardBox .top .name uni-text[data-v-29a6ed9c]:nth-child(1){font-size:%?30?%;color:#262626;font-weight:600}.getBox .cardBox .top .name uni-text[data-v-29a6ed9c]:nth-child(2){font-size:%?22?%;color:#8c8c8c;margin-top:%?10?%}.getBox .cardBox .top .price .money[data-v-29a6ed9c]{display:flex;align-items:baseline;color:#f0250e;font-weight:600}.getBox .cardBox .top .price .money uni-text[data-v-29a6ed9c]:nth-child(1){font-size:%?28?%}.getBox .cardBox .top .price .money uni-text[data-v-29a6ed9c]:nth-child(2){font-size:%?56?%}.getBox .cardBox .top .price .discount[data-v-29a6ed9c]{color:#f0250e;font-size:%?44?%}.getBox .cardBox .top .price .title[data-v-29a6ed9c]{font-size:%?22?%;color:#8c8c8c}.getBox .cardBox .bottom[data-v-29a6ed9c]{border-radius:0 0 %?20?% %?20?%;background-color:#fff;padding:%?24?% %?28?%}.getBox .cardBox .bottom .detailInfo[data-v-29a6ed9c]{font-size:%?24?%;color:#8c8c8c;padding-bottom:%?10?%}.getBox .cardBox .bottom .detail[data-v-29a6ed9c]{display:flex;align-items:center;font-size:%?24?%;color:#8c8c8c}.getBox .getBtn[data-v-29a6ed9c]{width:%?574?%;height:%?100?%;border-radius:99px;margin:%?40?% auto %?16?% auto;background:linear-gradient(180deg,#ffa356,#ff3640)}.getBox .getBtn uni-text[data-v-29a6ed9c]{width:100%;height:100%;border-radius:99px;display:flex;align-items:center;justify-content:center;font-size:%?36?%;font-weight:600;color:#fff}.getBox .disabled[data-v-29a6ed9c]{background:#c2c2c2}',""]),t.exports=e}}]);