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.
shangmenanmo/unpackage/dist/build/web/static/js/user-pages-bell-list.d2196e...

1 line
18 KiB

8 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-bell-list"],{"0373":function(e,t,i){"use strict";var a=i("b073"),n=i.n(a);n.a},"1ae1":function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("fd3c"),i("4626"),i("5ac7"),i("8f71"),i("bf0f"),i("aa9c"),i("dd2b"),i("bd06");var n=a(i("2634")),s=a(i("2fdc")),r=a(i("9b1b")),c=i("8f59"),o={components:{},data:function(){return{isLoad:!1,options:{},navTitle:"",tabList:[{id:1,title:"项目升级"},{id:2,title:"项目加钟"}],activeIndex:0,serviceList:[],serviceList_check:[],no_check_id:0,have_check:[],have_check_num:0,have_all_check:!1,can_add_order:0,order_goods:[],order_uprecord:[],goodsInd:0,showGoods:!1,loading:!0,popupInfo:{},lockTap:!1}},computed:(0,c.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},subColor:function(e){return e.config.configInfo.subColor},configInfo:function(e){return e.config.configInfo},userInfo:function(e){return e.user.userInfo}}),onLoad:function(e){this.options=e;var t=e.tab,i=void 0===t?0:t;this.activeIndex=i,this.initIndex()},watch:{have_check:function(e){0==this.activeIndex&&this.toFormatHaveCheck()}},filters:{textFormat:function(e){var t=e;return e.length>5&&(t=e.substring(0,5)+"..."),t}},methods:(0,r.default)((0,r.default)((0,r.default)({},(0,c.mapActions)([])),(0,c.mapMutations)(["updateOrderItem"])),{},{initIndex:function(){var e=arguments,t=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=e.length>0&&void 0!==e[0]&&e[0],a||!t.$jweixin.isWechat()){i.next=5;break}return i.next=4,t.$jweixin.initJssdk();case 4:t.$jweixin.wxReady((function(){t.$jweixin.hideOptionMenu()}));case 5:return i.next=7,t.getDetail();case 7:return i.next=9,t.getList();case 9:uni.setNavigationBarTitle({title:t.navTitle}),t.isLoad=!0,t.$util.setNavigationBarColor({bg:t.primaryColor});case 12:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.initIndex(!0)},getDetail:function(){var e=this;return(0,s.default)((0,n.default)().mark((function t(){var i,a,s,r;return(0,n.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=e.options.id,t.next=3,e.$api.order.orderInfo({id:i});case 3:a=t.sent,s=a.order_goods,r=a.can_add_order,e.order_goods=s,e.can_add_order=r,e.navTitle=r?"升级/加钟":"升级项目";case 9:case"end":return t.stop()}}),t)})))()},getList:function(){var e=this;return(0,s.default)((0,n.default)().mark((function t(){var i,a,s,r,c,o,l,d,u;return(0,n.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=e.options,i.id,a=i.coach_id,s=e.order_goods[e.goodsInd],r=s.id,c=s.true_price,o=e.activeIndex,l=0===o?"getUpOrderGoods":"coachServiceList",d=0===o?{order_goods_id:r}:{coach_id:a,order_goods_id:r,is_add:1},t.next=7,e.$api.service[l](d);case 7:return u=t.sent,1==o&&(u=u.data),u.map((function(t){t.is_check=!1,0==o&&(t.init_add_num=1,t.init_add_price=(t.price-c).toFixed(2),t.is_check=e.serviceList_check.includes(t.id))})),e.serviceList=u,t.next=13,e.toFormatHaveCheck(3);case 13:e.loading=!1,e.$util.hideAll();case 15:case"end":return t.stop()}}),t)})))()},handerTabChange:function(e){this.activeIndex=e,this.serviceList=[],this.getList()},toChangeGoods:function(e){var t=this;return(0,s.default)((0,n.default)().mark((function i(){return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return t.goodsInd=e,t.showGoods=!1,i.next=4,t.toFormatHaveCheck(2);case 4:t.handerTabChange(0);case 5:case"end":return i.stop()}}),i)})))()},toFormatHaveCheck:function(){var e=arguments,t=this;return(0,s.default)((0,n.default)().mark((function i(){var a,s,r,c,o;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:a=e.length>0&&void 0!==e[0]?e[0]:1,s=t.order_goods[t.goodsInd].id,3!=a&&(r=t.have_check.filter((function(e){return e.order_goods_id==s})),t.have_all_check=r.length==t.serviceList.length,t.serviceList_check=r.map((function(e){return e.id})),c=0,r.map((function(e){c+=e.ini