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 line
4.5 KiB

5 months ago
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/pages/shield"],{"1e7e":function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("7043");a(n("3240"));var i=a(n("4b9d"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"4b9d":function(t,e,n){"use strict";n.r(e);var a=n("df4b"),i=n("ce5e");for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n("849c");var o=n("828b"),c=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=c.exports},"6fee":function(t,e,n){},"72cd":function(t,e,n){"use strict";(function(t){var a=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("7eb4")),r=a(n("ee10")),o=a(n("7ca3")),c=n("8f59");function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={data:function(){return{isLoad:!1,tabList:[{id:2,title:"不喜欢Ta"},{id:1,title:"不想看Ta的作品"}],activeIndex:0,loading:!0,param:{page:1},list:{data:[]},lockTap:!1}},computed:(0,c.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo}}),onLoad:function(){this.$util.setNavigationBarColor({bg:this.primaryColor}),this.initIndex()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.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:s(s(s({},(0,c.mapActions)(["getConfigInfo"])),(0,c.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,r.default)(i.default.mark((function n(){return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.length>0&&void 0!==t[0]&&t[0],n.next=3,Promise.all([e.getConfigInfo(),e.getList()]);case 3:e.isLoad=!0;case 4:case"end":return n.stop()}}),n)})))()},handerTabChange:function(t){this.activeIndex=t,this.param.status=t,this.getList()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},getList:function(){var t=this;return(0,r.default)(i.default.mark((function e(){var n,a,r,o,c,u;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$util.showLoading(),n=t.list,a=t.param,r=t.tabList,o=t.activeIndex,c=r[o].id,a.type=c,e.next=6,t.$api.mine.shieldCoachList(a);case 6:u=e.sent,1==t.param.page||(u.data=n.data.concat(u.data)),t.list=u,t.loading=!1,t.$util.hideAll();case 10:case"end":return e.stop()}}),e)})))()},toRemove:function(t){var e=this;return(0,r.default)(i.default.mark((function n(){var a,r;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a=e.list.data[t].id,r=e.tabList[e.activeIndex].id,!e.lockTap){n.next=4;break}return n.abrupt("return");case 4:return e.lockTap=!0,e.$util.showLoading(),n.prev=6,n.next=9,e.$api.mine.shieldCoachDel({id:a});case 9:e.lockTap=!1,e.$util.hideAll(),e.$util.showToast({title:"移除成功"}),e.list.data.splice(t,1),e.updateUserItem({key:"haveShieldOper",val:r}),n.next=19;break;case 16:n.prev=16,n.t0=n["catch"](6),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 19:case"end":return n.stop()}}),n,null,[[6,16]])})))()}})};e.default=l}).call(this,n("df3c")["default"])},"849c":function(t,e,n){"use strict";var a=n("6fee"),i=n.n(a);i.a},ce5e:function(t,e,n){"use strict";n.r(e);var a=n("72cd"),i=n.n(a);for(var r in a)["default"].i