chunk-2c6b30a4.0712447c.js 6.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c6b30a4"],{2374:function(t,e,a){"use strict";a.d(e,"a",function(){return i}),a.d(e,"b",function(){return c});var n=a("8982"),r="",s="/wx/noticePark";function i(t){return Object(n["a"])({url:r+s+"/add",method:"post",data:t})}function c(t){return Object(n["a"])({url:r+s+"/edit",method:"post",data:t})}},"7f7f":function(t,e,a){var n=a("86cc").f,r=Function.prototype,s=/^\s*function ([^ (]*)/,i="name";i in r||a("9e1e")&&n(r,i,{configurable:!0,get:function(){try{return(""+this).match(s)[1]}catch(t){return""}}})},8982:function(t,e,a){"use strict";a.d(e,"a",function(){return h}),a.d(e,"b",function(){return m});var n=a("795b"),r=a.n(n),s=a("bc3a"),i=a.n(s),c=a("4328"),o=a.n(c),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:o.a.stringify(t.data)};return e&&(a.data=t.data),t.headers&&(a.headers=t.headers),new r.a(function(e,n){i()(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 m(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 r.a(function(a,n){i.a.defaults.withCredentials=!0,i()(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)})})}},"995c":function(t,e,a){"use strict";var n=a("d63d"),r=a.n(n);r.a},d63d:function(t,e,a){},dbeb:function(t,e,a){"use strict";a.d(e,"a",function(){return i}),a.d(e,"d",function(){return c}),a.d(e,"b",function(){return o}),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"),r="/industryParkApi",s="/wx/noticePark";function i(t){return Object(n["a"])({url:r+s+"/add",method:"post",data:t})}function c(t){return Object(n["a"])({url:r+s+"/getById",method:"post",data:t})}function o(t){return Object(n["a"])({url:r+s+"/clickCollect",method:"post",data:t})}function u(t){return Object(n["a"])({url:r+s+"/updateReadStatus",method:"post",data:t})}function l(t){return Object(n["a"])({url:r+s+"/list",method:"post",data:t})}function d(t){return Object(n["a"])({url:r+s+"/edit",method:"post",data:t})}},dc8c: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:"detail"},[a("div",{staticClass:"detail-body"},[a("div",{staticClass:"detail-card top-tit-card"},[a("div",{staticClass:"left"},["1"==t.type?a("i",{staticClass:"iconfont icon-tongzhi"}):a("i",{staticClass:"iconfont icon-wuyetongzhi"})]),a("div",{staticClass:"right"},[a("div",{staticClass:"top"},[t._v("\n\t\t\t\t\t"+t._s(t.title)+"\n\t\t\t\t")]),a("div",{staticClass:"bottom"},[a("span",[t._v(" "+t._s(t.releaseTime))]),a("span",[t._v("园区管委会")])])]),a("div")]),"1"==t.source?a("div",{staticClass:"detail-card info",domProps:{innerHTML:t._s(t.content)}}):a("div",{staticClass:"detail-card info"},[a("van-field",{attrs:{autosize:"",readonly:"",type:"textarea",placeholder:"请输入","show-word-limit":""},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}})],1),t.imgUrlList.length>0?a("div",{staticClass:"img-list"},t._l(t.imgUrlList,function(t){return a("img",{staticStyle:{width:"100%",height:"100%"},attrs:{src:t.url,alt:""}})}),0):t._e(),t._l(t.fileUrlList,function(e){return a("div",{staticStyle:{"font-size":"16px",margin:"10px",color:"#0000FF"}},[a("a",{attrs:{href:e.url}},[t._v(t._s(e.name))])])})],2),a("div",{staticClass:"white-bottom"})])},r=[],s=(a("7f7f"),a("ac6a"),a("a481"),a("dbeb")),i=a("2374"),c=(a("5cab"),{data:function(){return{type:"",id:"",title:"",content:"",releaseTime:"",parkName:"",source:"",fileUrlList:[],imgUrlList:[]}},mounted:function(){this.type=this.$route.query.type,this.id=this.$route.query.id,this.selectById()},methods:{selectById:function(){var t=this;"1"===t.type?Object(s["d"])({id:t.id}).then(function(e){var a=e.data;if(t.title=a.title,t.source=a.source,-1!==a.content.indexOf("src=")&&(a.content=a.content.replace("server","industryParkApi")),t.content=a.content,t.releaseTime=t.$common.transServDate(a.releaseTime),a.fileUrl&&a.fileUrl.length>2){var n=[],r=[],s=t.$common.castEval(a.fileUrl);s.forEach(function(t){if(t.url){var e={name:t.name,url:t.url.replace("server","industryParkApi")};t.name.indexOf("png")>-1||t.name.indexOf("jpg")>-1||t.name.indexOf("jpeg")>-1?r.push(e):n.push(e)}}),r.length>0&&(t.imgUrlList=r),t.fileUrlList=n}}):Object(i["getPropertyNoticeById"])({id:t.id}).then(function(e){var a=e.data;if(t.title=a.title,-1!==a.content.indexOf("src=")&&(a.content=a.content.replace("server","industryParkApi").replace('class="wscnph"','class="wscnph" width="100%"')),t.content=a.content,t.releaseTime=t.$common.transServDate(a.releaseTime),a.fileUrl&&a.fileUrl.length>2){var n=[],r=t.$common.castEval(a.fileUrl);r.forEach(function(t){if(t.url){var e={url:t.url.replace("server","industryParkApi")};n.push(e)}}),t.fileUrlList=n}})}}}),o=c,u=(a("995c"),a("2877")),l=Object(u["a"])(o,n,r,!1,null,"1f505e82",null);e["default"]=l.exports}}]);