1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-62d9444d"],{2374:function(t,e,n){"use strict";n.d(e,"a",function(){return s}),n.d(e,"b",function(){return c});var a=n("8982"),r="",i="/wx/noticePark";function s(t){return Object(a["a"])({url:r+i+"/add",method:"post",data:t})}function c(t){return Object(a["a"])({url:r+i+"/edit",method:"post",data:t})}},"2a1a":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"detail"},[n("div",{staticClass:"detail-body"},[n("div",{staticClass:"detail-card top-tit-card"},[n("div",{staticClass:"left"},["1"==t.type?n("i",{staticClass:"iconfont icon-tongzhi"}):n("i",{staticClass:"iconfont icon-wuyetongzhi"})]),n("div",{staticClass:"right"},[n("div",{staticClass:"top"},[t._v("\n\t\t\t\t\t"+t._s(t.title)+"\n\t\t\t\t")]),n("div",{staticClass:"bottom"},[n("span",[t._v(" "+t._s(t.releaseTime))]),n("span",[t._v("园区管委会")])])]),n("div")]),"1"==t.source?n("div",{staticClass:"detail-card info",domProps:{innerHTML:t._s(t.content)}}):n("div",{staticClass:"detail-card info"},[n("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?n("div",{staticClass:"img-list"},t._l(t.imgUrlList,function(t){return n("img",{staticStyle:{width:"100%",height:"100%"},attrs:{src:t.url,alt:""}})}),0):t._e(),t._l(t.fileUrlList,function(e){return n("div",{staticStyle:{"font-size":"16px",margin:"10px",color:"#0000FF"}},[n("a",{staticStyle:{color:"#0000FF"},attrs:{href:e.url}},[t._v(t._s(e.name))])])})],2)])},r=[],i=(n("7f7f"),n("ac6a"),n("a481"),n("dbeb")),s=n("2374"),c=n("5cab"),o={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(i["d"])({id:t.id}).then(function(e){var n=e.data;if(t.title=n.title,-1!==n.content.indexOf("src=")&&(n.content=n.content.replace("server","industryParkApi")),-1!==n.content.indexOf("width")&&-1!==n.content.indexOf("height")&&(n.content=n.content.replace(/width="(\S*)"/,'width="100%"').replace(/height="(\S*)"/,'height="100%"')),t.content=n.content,t.releaseTime=t.$common.transServDate(n.releaseTime),n.fileUrl&&n.fileUrl.length>2){var a=[],r=[],i=t.$common.castEval(n.fileUrl);i.forEach(function(t){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):a.push(e)}),r.length>0&&(t.imgUrlList=r),t.fileUrlList=a}t.source=n.source;c["a"].currUser().id,t.id}):Object(s["getPropertyNoticeById"])({id:t.id}).then(function(e){var n=e.data;if(t.title=n.title,-1!==n.content.indexOf("src=")&&(n.content=n.content.replace("server","industryParkApi").replace('class="wscnph"','class="wscnph" width="100%"')),-1!==n.content.indexOf("width")&&-1!==n.content.indexOf("height")&&(n.content=n.content.replace(/width="(\S*)"/,'width="100%"').replace(/height="(\S*)"/,'height="100%"')),t.content=n.content,t.releaseTime=t.$common.transServDate(n.releaseTime),n.fileUrl&&n.fileUrl.length>2){var a=[],r=[],i=t.$common.castEval(n.fileUrl);i.forEach(function(t){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):a.push(e)}),r.length>0&&(t.imgUrlList=r),t.fileUrlList=a}c["a"].currUser().id,t.id})}}},d=o,l=(n("8965"),n("2877")),u=Object(l["a"])(d,a,r,!1,null,"4b2ec1c1",null);e["default"]=u.exports},"5afc":function(t,e,n){},"7f7f":function(t,e,n){var a=n("86cc").f,r=Function.prototype,i=/^\s*function ([^ (]*)/,s="name";s in r||n("9e1e")&&a(r,s,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8965:function(t,e,n){"use strict";var a=n("5afc"),r=n.n(a);r.a},8982:function(t,e,n){"use strict";n.d(e,"a",function(){return h}),n.d(e,"b",function(){return p});var a=n("795b"),r=n.n(a),i=n("bc3a"),s=n.n(i),c=n("4328"),o=n.n(c),d=n("4360"),l=n("5cab"),u=n("a18c"),f=n("3089");function h(t,e){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var n={method:t.method,url:t.url,data:o.a.stringify(t.data)};return e&&(n.data=t.data),t.headers&&(n.headers=t.headers),new r.a(function(e,a){s()(n).then(function(t){if(t&&t.data&&200===t.status){var n=t.data;switch(n.errno){case 501:Object(f["Toast"])(n.errmsg),setTimeout(function(){d["a"].dispatch("user/logout").then(function(){u["a"].push("/login")})},1500),a(n.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"])(n.errmsg),a(n.errmsg);break}e(n)}else console.log(t),a(t)}).catch(function(e,n){console.log(t.url+" fail",e,n),Object(f["Toast"])(e),a(e,n)})})}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 r.a(function(n,a){s.a.defaults.withCredentials=!0,s()(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(){d["a"].dispatch("user/logout").then(function(){u["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(f["Toast"])(e.errmsg),a(e.errmsg);break}n(e)}else console.log(t),a(t)}).catch(function(e,n){console.log(t.url+" fail",e,n),Object(f["Toast"])(e),a(e,n)})})}},dbeb:function(t,e,n){"use strict";n.d(e,"a",function(){return s}),n.d(e,"d",function(){return c}),n.d(e,"b",function(){return o}),n.d(e,"f",function(){return d}),n.d(e,"e",function(){return l}),n.d(e,"c",function(){return u});var a=n("8982"),r="/industryParkApi",i="/wx/noticePark";function s(t){return Object(a["a"])({url:r+i+"/add",method:"post",data:t})}function c(t){return Object(a["a"])({url:r+i+"/getById",method:"post",data:t})}function o(t){return Object(a["a"])({url:r+i+"/clickCollect",method:"post",data:t})}function d(t){return Object(a["a"])({url:r+i+"/updateReadStatus",method:"post",data:t})}function l(t){return Object(a["a"])({url:r+i+"/list",method:"post",data:t})}function u(t){return Object(a["a"])({url:r+i+"/edit",method:"post",data:t})}}}]);
|