You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
7.3 KiB
1 lines
7.3 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-coupon-use"],{"73e6":function(t,e,i){"use strict";i.r(e);var n=i("d45b"),a=i("c86d");for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);i("946a");var r=i("f0c5"),o=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"cfcf5912",null,!1,n["a"],void 0);e["default"]=o.exports},"946a":function(t,e,i){"use strict";var n=i("fedb"),a=i.n(n);a.a},9579:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.user-coupon-use .list-item[data-v-cfcf5912]{overflow:hidden}.user-coupon-use .list-item .item-title[data-v-cfcf5912]{top:0;left:0;height:%?50?%;background:#ffe2e2;border-radius:%?15?% 0 %?15?% 0}.user-coupon-use .list-item .use-btn[data-v-cfcf5912]{width:%?140?%;height:%?56?%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}',""]),t.exports=e},a6ac:function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("d81d"),i("99af");var a=n(i("5530")),s=n(i("c7eb")),r=n(i("1da1")),o=i("26cb"),u={components:{},data:function(){return{options:{},param:{page:1,coach_id:""},list:{data:[]},loading:!0}},computed:(0,o.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},userInfo:function(t){return t.user.userInfo}}),onLoad:function(){var t=this;return(0,r.default)((0,s.default)().mark((function e(){return(0,s.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.coach_id=t.$util.getPage(-1).options.id,e.next=3,t.initIndex();case 3:t.$util.setNavigationBarColor({bg:t.primaryColor});case 4:case"end":return e.stop()}}),e)})))()},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:(0,a.default)((0,a.default)({},(0,o.mapMutations)([""])),{},{initIndex:function(){var t=arguments,e=this;return(0,r.default)((0,s.default)().mark((function i(){var n;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=t.length>0&&void 0!==t[0]&&t[0],n||!e.$jweixin.isWechat()){i.next=5;break}return i.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:return i.next=7,e.getList();case 7:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},getList:function(){var t=this;return(0,r.default)((0,s.default)().mark((function e(){var i,n,a,r;return(0,s.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.list,n=t.param,a=t.coach_id,n.coach_id=a,e.next=4,t.$api.order.couponList(n);case 4:r=e.sent,r.data.map((function(t){t.is_show=!1})),1==t.param.page||(r.data=i.data.concat(r.data)),t.list=r,t.loading=!1,t.$util.hideAll();case 9:case"end":return e.stop()}}),e)})))()},toShowItem:function(t){var e=this.list.data[t].is_show;this.list.data[t].is_show=!e},toUse:function(t){var e=this,i=this.list.data[t].id;this.$util.getPage(-1).orderInfo.coupon_id=i,this.$util.back(),setTimeout((function(){e.$util.goUrl({url:1,openType:"navigateBack"})}),1e3)}})};e.default=u},c86d:function(t,e,i){"use strict";i.r(e);var n=i("a6ac"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},d45b:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"user-coupon-use"},[t._l(t.list.data,(function(e,n){return i("v-uni-view",{key:n,staticClass:"list-item rel mt-md ml-lg mr-lg fill-base radius-16",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toUse(n)}}},[i("v-uni-view",{staticClass:"item-title flex-center pl-md pr-md abs f-paragraph c-warning"},[t._v(t._s(e.title))]),i("v-uni-view",{staticClass:"mt-lg pd-lg"},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"f-caption c-caption"},[i("v-uni-view",{staticClass:"flex-y-baseline"},[i("v-uni-view",{staticClass:"flex-y-baseline c-warning"},[t._v("¥"),i("v-uni-view",{staticClass:"f-md-title"},[t._v(t._s(e.discount))])],1),i("v-uni-view",{staticClass:"ml-sm"},[t._v(t._s(0==e.type?"满"+e.full+"元可用":"无门槛"))])],1),i("v-uni-view",[t._v("数量:x"+t._s(e.num))])],1),i("v-uni-view",{staticClass:"use-btn flex-center f-caption radius",style:{color:t.primaryColor,border:"1rpx solid "+t.primaryColor}},[t._v("立即使用")])],1),i("v-uni-view",{staticClass:"f-caption c-caption mt-sm"},[t._v("有效期:"+t._s(e.start_time))])],1),i("v-uni-view",{staticClass:"flex-between fill-space f-caption c-caption pt-md pb-md pl-lg pr-lg b-1px-t",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowItem(n)}}},[i("v-uni-view",[t._v("查看详情")]),i("i",{staticClass:"iconfont icon-right",class:[{"rotate-90":!e.is_show},{"rotate-270":e.is_show}]})],1),e.is_show?i("v-uni-view",{staticClass:"pl-lg pr-lg pb-lg fill-space f-desc c-caption"},[i("v-uni-view",{staticClass:"flex-warp"},[i("v-uni-view",[t._v("使用规则:")]),i("v-uni-view",{staticClass:"flex-1"},[i("v-uni-text",{staticStyle:{"word-break":"break-all"},attrs:{decode:"emsp"}},[t._v(t._s(e.rule))])],1)],1),i("v-uni-view",{staticClass:"flex-warp mt-md"},[i("v-uni-view",[t._v("优惠详情:")]),i("v-uni-view",{staticClass:"flex-1"},[i("v-uni-text",{staticStyle:{"word-break":"break-all"},attrs:{decode:"emsp"}},[t._v(t._s(e.text))])],1)],1),i("v-uni-view",{staticClass:"flex-warp mt-md"},[i("v-uni-view",[t._v("限用服务:")]),i("v-uni-view",{staticClass:"flex-1"},t._l(e.service,(function(e,a){return i("v-uni-view",{key:n,class:[{"mt-sm":0!=a}]},[t._v(t._s(e.title))])})),1)],1)],1):t._e()],1)})),t.loading?i("load-more",{attrs:{noMore:t.list.current_page>=t.list.last_page&&t.list.data.length>0,loading:t.loading}}):t._e(),!t.loading&&t.list.data.length<=0&&1==t.list.current_page?i("abnor",{attrs:{type:"COUPON"}}):t._e(),i("v-uni-view",{staticClass:"space-max-footer"})],2)},a=[]},fedb:function(t,e,i){var n=i("9579");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("283ed35d",n,!0,{sourceMap:!1,shadowMode:!1})}}]); |