1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ae87a0a"],{"7d34":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"announcement"},[a("div",{staticClass:"tap-part"},[a("div",{staticClass:"info-list"},t._l(t.list1,function(e){return a("div",{key:e.name,staticClass:"info-item",on:{click:function(a){return t.$router.push({path:"/announcement/detail",query:{id:e.id,readStatus:e.readStatus}})}}},[t._m(0,!0),a("div",{staticClass:"center"},[1!=e.readStatus?a("div",{staticClass:"top"},[t._v("\n "+t._s(e.noticeTitle)+"\n ")]):a("div",{staticClass:"top",staticStyle:{color:"#acaaaa"}},[t._v("\n "+t._s(e.noticeTitle)+"\n ")]),a("div",{staticClass:"bottom"},[a("span",[t._v("\n 【"+t._s(t.notice_type[e.type-1].label)+"】\n "+t._s(e.publishDate))])])]),a("div",{staticClass:"icon-collect right",on:{click:function(a){return a.stopPropagation(),t.changeCollectorsNoticeParkStatus(e)}}},["2"===e.collectorsStatus?a("i",{staticClass:"iconfont icon-xinaixin blue"}):a("i",{staticClass:"iconfont icon-xinaixin"})])])}),0)])])},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"left"},[a("i",{staticClass:"iconfont icon-tongzhi"})])}],c=(a("ac6a"),a("dbeb")),o=a("5cab"),r=a("3089"),i=a("8024"),u={data:function(){return{notice_type:[],active:0,list1:[],list2:[],params:{},totalPage:1}},created:function(){null!=o["a"].currUser().id&&""!==o["a"].currUser().id?this.getByCode():Object(r["Toast"])("请先登录后再试")},methods:{getByCode:function(){var t=this;Object(i["a"])({code:"notice_type"}).then(function(e){console.log("口味_:",e),t.notice_type=JSON.parse(e.data.dictValue),console.log(t.notice_type),t.initParkNotice()})},initParkNotice:function(){var t=this;t.params.userId=o["a"].currUser().id,Object(c["e"])(t.params).then(function(e){console.log(e),e&&(t.list1=[],e.forEach(function(e){t.list1.push(e)})),(!e||e.length<1)&&Object(r["Toast"])("暂无通知公告")})},initPropertyNotice:function(){var t=this,e=this;e.params.type="2",propertyNoticeList(e.params).then(function(a){console.log(a),a&&(e.list2=[],a.forEach(function(a){var n=t.getItemJson(a);e.list2.push(n)}))})},getItemJson:function(t){return t.releaseTime=this.$common.transServDate(t.releaseTime),t},changeCollectorsNoticeParkStatus:function(t){if("2"===t.collectorsStatus){var e=this;Object(c["b"])({id:t.id,userId:o["a"].currUser().id,collectorsStatus:"1"}).then(function(t){e.initParkNotice()})}else{var a=this;Object(c["b"])({id:t.id,userId:o["a"].currUser().id,collectorsStatus:"2"}).then(function(t){a.initParkNotice()})}},changeCollectorsPropertyNoticStatus:function(t){if("2"===t.collectorsStatus){var e=this;clickCollectPropertyNotice({id:t.id,userId:o["a"].currUser().id,collectorsStatus:"1"}).then(function(t){e.initPropertyNotice()})}else{var a=this;clickCollectPropertyNotice({id:t.id,userId:o["a"].currUser().id,collectorsStatus:"2"}).then(function(t){a.initPropertyNotice()})}}}},l=u,d=(a("d73d"),a("2877")),f=Object(d["a"])(l,n,s,!1,null,"2392c61a",null);e["default"]=f.exports},8024:function(t,e,a){"use strict";a.d(e,"a",function(){return o});a("f499");var n=a("8982"),s="/industryParkApi",c="/wx/dictController";function o(t){return Object(n["a"])({url:s+c+"/getByCode",method:"post",data:t})}},8982:function(t,e,a){"use strict";a.d(e,"a",function(){return h}),a.d(e,"b",function(){return p});var n=a("795b"),s=a.n(n),c=a("bc3a"),o=a.n(c),r=a("4328"),i=a.n(r),u=a("4360"),l=a("5cab"),d=a("a18c"),f=a("3089");function h(t,e){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var a={method:t.method,url:t.url,data:i.a.stringify(t.data)};return e&&(a.data=t.data),t.headers&&(a.headers=t.headers),new s.a(function(e,n){o()(a).then(function(t){if(t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(f["Toast"])(a.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(a.errmsg),n(a.errmsg);break}e(a)}else console.log(t),n(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(f["Toast"])(e),n(e,a)})})}function p(t){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["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 s.a(function(a,n){o.a.defaults.withCredentials=!0,o()(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(f["Toast"])(e.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(e.errmsg),n(e.errmsg);break}a(e)}else console.log(t),n(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(f["Toast"])(e),n(e,a)})})}},d73d:function(t,e,a){"use strict";var n=a("ef03"),s=a.n(n);s.a},dbeb:function(t,e,a){"use strict";a.d(e,"a",function(){return o}),a.d(e,"d",function(){return r}),a.d(e,"b",function(){return i}),a.d(e,"f",function(){return u}),a.d(e,"e",function(){return l}),a.d(e,"c",function(){return d});var n=a("8982"),s="/industryParkApi",c="/wx/noticePark";function o(t){return Object(n["a"])({url:s+c+"/add",method:"post",data:t})}function r(t){return Object(n["a"])({url:s+c+"/getById",method:"post",data:t})}function i(t){return Object(n["a"])({url:s+c+"/clickCollect",method:"post",data:t})}function u(t){return Object(n["a"])({url:s+c+"/updateReadStatus",method:"post",data:t})}function l(t){return Object(n["a"])({url:s+c+"/list",method:"post",data:t})}function d(t){return Object(n["a"])({url:s+c+"/edit",method:"post",data:t})}},ef03:function(t,e,a){}}]);
|