1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b9065ed2"],{"00f9":function(t,e,s){"use strict";var a=s("68cc"),o=s.n(a);o.a},"68cc":function(t,e,s){},"7e87":function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"my-collection-box"},[s("ul",{staticClass:"custom-list-box"},t._l(t.collectionList,function(e){return s("li",{key:e.id,staticClass:"collection-item white-box",on:{click:function(s){return t.goDetail(e)}}},[s("div",{staticClass:"item-content"},[t._v(t._s(e.title))]),s("div",{staticClass:"item-foot"},[s("p",{staticClass:"label"},[s("span",[t._v("发布时间:")]),s("span",[t._v(t._s(e.publishDate))])]),s("div",{staticClass:"custom-status-box val"},[s("p",{class:["status-btn",t.setStatusStyle(e.collectorsType)]},[t._v("\n\t\t\t\t\t\t"+t._s(e.typeStr)+"\n\t\t\t\t\t")])])])])}),0)])},o=[],c=(s("ac6a"),s("5cab")),r=s("8982"),n="/industryParkApi",i="/wx/parkUserCollectors";function l(t){return Object(r["a"])({url:n+i+"/list",method:"post",data:t})}var u={data:function(){return{collectionList:[]}},mounted:function(){this.getData(),window.history&&window.history.pushState&&(history.pushState(null,null,document.URL),window.addEventListener("popstate",this.goBack,!1))},destroyed:function(){window.removeEventListener("popstate",this.goBack,!1)},methods:{goBack:function(){this.$router.push({path:"/mine"})},getData:function(){var t=this,e=this;l({userId:c["a"].uid()}).then(function(s){e.collectionList=s,e.collectionList.forEach(function(e){e.publishDate=t.$common.transServDate(e.publishDate),"1"===e.collectorsType?e.typeStr="园区活动":"2"===e.collectorsType?e.typeStr="园区培训":"3"===e.collectorsType?e.typeStr="园区通知":"4"===e.collectorsType?e.typeStr="物业通知":"6"===e.collectorsType?e.typeStr="达人招募":"7"===e.collectorsType?e.typeStr="达人":"8"===e.collectorsType&&(e.typeStr="党员活动")})}).catch(function(){})},goDetail:function(t){"1"===t.collectorsType?this.$router.push({path:"/parkActivities/detail",query:{id:t.collectorsId}}):"2"===t.collectorsType?"线下"===t.onlineOfflineStatus?this.$router.push({path:"/parkTraining/detail",query:{id:t.collectorsId}}):this.$router.push({path:"/parkTraining/onlineDetail",query:{id:t.collectorsId}}):"3"===t.collectorsType?this.$router.push({path:"/announcement/detail",query:{type:"1",id:t.collectorsId}}):"4"===t.collectorsType?this.$router.push({path:"/announcement/detail",query:{type:"2",id:t.collectorsId}}):"6"===t.collectorsType?this.$router.push({path:"/parkMaster/index",query:{backType:"1",id:t.collectorsId}}):"7"===t.collectorsType?this.$router.push({path:"/parkMaster/detail",query:{backType:"1",id:t.collectorsId}}):"8"===t.collectorsType&&this.$router.push({path:"/partyBuildingLeadership/detail",query:{backType:"1",id:t.collectorsId}})},setStatusStyle:function(t){var e=null;switch(t){case"1":e="processed-btn";break;case"2":e="evaluated-btn";break;case"3":e="pending-btn";break;case"4":e="accepted-btn";break}return e}}},d=u,h=(s("00f9"),s("2877")),p=Object(h["a"])(d,a,o,!1,null,"39462932",null);e["default"]=p.exports},8982:function(t,e,s){"use strict";s.d(e,"a",function(){return p}),s.d(e,"b",function(){return y});var a=s("795b"),o=s.n(a),c=s("bc3a"),r=s.n(c),n=s("4328"),i=s.n(n),l=s("4360"),u=s("5cab"),d=s("a18c"),h=s("3089");function p(t,e){t.headers||(t.headers={}),t.headers&&u["a"].getToken()&&(t.headers["RC-Token"]=u["a"].getToken());var s={method:t.method,url:t.url,data:i.a.stringify(t.data)};return e&&(s.data=t.data),t.headers&&(s.headers=t.headers),new o.a(function(e,a){r()(s).then(function(t){if(t&&t.data&&200===t.status){var s=t.data;switch(s.errno){case 501:Object(h["Toast"])(s.errmsg),setTimeout(function(){l["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),a(s.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(h["Toast"])(s.errmsg),a(s.errmsg);break}e(s)}else console.log(t),a(t)}).catch(function(e,s){console.log(t.url+" fail",e,s),Object(h["Toast"])(e),a(e,s)})})}function y(t){t.headers||(t.headers={}),t.headers&&u["a"].getToken()&&(t.headers["RC-Token"]=u["a"].getToken());var e={method:t.method,url:t.url};return e.data=t.data,t.headers&&(e.headers=t.headers,e.headers["MVVM-Key"]=String((new Date).getTime()),e.headers["xx"]="anything",e.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new o.a(function(s,a){r.a.defaults.withCredentials=!0,r()(e).then(function(t){if(console.log("response:",t),t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(h["Toast"])(e.errmsg),setTimeout(function(){l["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),a(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(h["Toast"])(e.errmsg),a(e.errmsg);break}s(e)}else console.log(t),a(t)}).catch(function(e,s){console.log(t.url+" fail",e,s),Object(h["Toast"])(e),a(e,s)})})}}}]);
|