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
8.5 KiB
1 lines
8.5 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-coupon-list"],{"12da":function(t,e,i){var a=i("e58e");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("967d").default;n("49453d2a",a,!0,{sourceMap:!1,shadowMode:!1})},"28b0":function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("fd3c"),i("c223"),i("dd2b");var n=a(i("2634")),s=a(i("2fdc")),r=a(i("9b1b")),o=i("8f59"),l={components:{},data:function(){return{options:{},activeIndex:0,tabList:[{title:"待使用",id:1},{title:"已使用",id:2},{title:"已过期",id:3}],statusType:{1:"去使用",2:"已使用",3:"删除"},param:{page:1},list:{data:[]},loading:!0,lockTap:!1}},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(t){this.options=t;var e=t.tab,i=void 0===e?0:e;this.activeIndex=i,this.initIndex()},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,r.default)((0,r.default)({},(0,o.mapMutations)([""])),{},{initIndex:function(){var t=arguments,e=this;return(0,s.default)((0,n.default)().mark((function i(){var a;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=t.length>0&&void 0!==t[0]&&t[0],a||!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:e.$util.setNavigationBarColor({bg:e.primaryColor});case 8:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},getList:function(){var t=this;return(0,s.default)((0,n.default)().mark((function e(){var i,a,s,r,o;return(0,n.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.list,a=t.param,s=t.tabList,r=t.activeIndex,a.status=s[r].id,e.next=4,t.$api.mine.userCouponList(a);case 4:o=e.sent,o.data.map((function(t){t.is_show=!1})),1==t.param.page||(o.data=i.data.concat(o.data)),t.list=o,t.loading=!1,t.$util.hideAll();case 9:case"end":return e.stop()}}),e)})))()},handerTabChange:function(t){this.activeIndex=t,this.$util.showLoading(),this.param.page=1,this.list.data=[],this.getList()},toShowItem:function(t){var e=this.list.data[t].is_show;this.list.data[t].is_show=!e},goDetail:function(t){var e=this;return(0,s.default)((0,n.default)().mark((function i(){var a,s;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:a=e.activeIndex,i.t0=a,i.next=0===i.t0?4:1===i.t0?6:2===i.t0?7:25;break;case 4:return e.$util.goUrl({url:"/pages/service",openType:"reLaunch"}),i.abrupt("break",25);case 6:return i.abrupt("break",25);case 7:if(s=e.list.data[t].id,!e.lockTap){i.next=10;break}return i.abrupt("return");case 10:return e.lockTap=!0,e.$util.showLoading(),i.prev=12,i.next=15,e.$api.mine.couponDel({coupon_id:s});case 15:e.$util.hideAll(),e.$util.showToast({title:"删除成功"}),e.list.data.splice(t,1),e.lockTap=!1,i.next=24;break;case 21:i.prev=21,i.t1=i["catch"](12),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 24:return i.abrupt("break",25);case 25:case"end":return i.stop()}}),i,null,[[12,21]])})))()}})};e.default=l},"2a70":function(t,e,i){"use strict";var a=i("12da"),n=i.n(a);n.a},"5ccb":function(t,e,i){"use strict";i.r(e);var a=i("28b0"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);e["default"]=n.a},"7b11":function(t,e,i){"use strict";i.r(e);var a=i("8f2d"),n=i("5ccb");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);i("2a70");var r=i("828b"),o=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"c7173bca",null,!1,a["a"],void 0);e["default"]=o.exports},"8f2d":function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"user-coupon-list"},[i("fixed",[i("tab",{attrs:{list:t.tabList,activeIndex:1*t.activeIndex,activeColor:t.primaryColor,width:"33.3%",height:"100rpx"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.handerTabChange.apply(void 0,arguments)}}}),i("v-uni-view",{staticClass:"b-1px-b"})],1),t._l(t.list.data,(function(e,a){return i("v-uni-view",{key:a,staticClass:"list-item rel mt-md ml-lg mr-lg fill-base radius-16",class:[{grayscale:t.activeIndex>0}],on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goDetail(a)}}},[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,background:t.activeIndex>0?"#eee":"",border:t.activeIndex>0?"1rpx solid #eee":"1rpx solid "+t.primaryColor}},[t._v(t._s(t.statusType[e.status]))])],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(a)}}},[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,n){return i("v-uni-view",{key:a,class:[{"mt-sm":0!=n}]},[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:"DATA"}}):t._e(),i("v-uni-view",{staticClass:"space-footer"})],2)},n=[]},e58e:function(t,e,i){var a=i("c86c");e=a(!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/* 文章场景相关 */.user-coupon-list .list-item[data-v-c7173bca]{overflow:hidden}.user-coupon-list .list-item .item-title[data-v-c7173bca]{top:0;left:0;height:%?50?%;background:#ffe2e2;border-radius:%?15?% 0 %?15?% 0}.user-coupon-list .list-item .use-btn[data-v-c7173bca]{width:%?140?%;height:%?56?%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}',""]),t.exports=e}}]); |