1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7377482a"],{"79fd":function(t,e,a){},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),r=a("bc3a"),o=a.n(r),c=a("4328"),i=a.n(c),u=a("4360"),d=a("5cab"),l=a("a18c"),f=a("3089");function h(t,e){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["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(){l["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&&d["a"].getToken()&&(t.headers["RC-Token"]=d["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(){l["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)})})}},"93b8":function(t,e,a){"use strict";var n=a("79fd"),s=a.n(n);s.a},d431: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:"parkNotice"},[a("div",{staticClass:"top-add",on:{click:function(e){return t.goNavigator("parkNotice-add-app")}}},[a("i",{staticClass:"iconfont icon-xinzeng"}),a("span",{staticClass:"txt"},[t._v("新增发布")])]),a("div",{staticClass:"info-list"},t._l(t.list,function(e){return a("div",{staticClass:"info-item text6",on:{click:function(a){return t.$router.push({path:"/parkNotice-app/detail",query:{type:"1",id:e.id}})}}},[a("div",{staticClass:"top"},[t._v("\n "+t._s(e.title)+"\n ")]),a("div",{staticClass:"bottom"},[a("span",{staticClass:"left"},[t._v(t._s(e.releaseTime))]),a("div",{staticClass:"right"},["2"===e.source?a("span",{staticClass:"normal-button-app z-bt",on:{click:function(a){return a.stopPropagation(),t.goNavigator("parkNotice-edit-app",{id:e.id})}}},[t._v("编辑")]):t._e(),"published"===e.status?a("span",{staticClass:"normal-button-app y-bt",on:{click:function(a){return a.stopPropagation(),t.offShelf(e.id)}}},[t._v("撤回")]):t._e()])])])}),0)])},s=[],r=(a("ac6a"),a("dbeb")),o=a("3089"),c=a("5cab"),i={data:function(){return{list:[],params:{pageNum:1,pageSize:10,publisherUserId:c["a"].currUser().id,userId:c["a"].currUser().id,type:"1"},totalPage:1}},created:function(){this.initParkNotice()},methods:{initParkNotice:function(){var t=this,e=this;Object(r["e"])(e.params).then(function(a){console.log(a),a&&(e.list=[],a.forEach(function(a){var n=t.getItemJson(a);e.list.push(n)}))})},offShelf:function(t){var e=this;o["Dialog"].confirm({title:"提示",message:"确认撤回该通知吗?"}).then(function(a){Object(r["c"])({id:t,status:"off_shelf"}).then(function(t){Object(o["Toast"])("撤回成功"),e.list=[],e.initParkNotice()})}).catch(function(t){Object(o["Toast"])("已取消")})},getItemJson:function(t){return t.releaseTime=this.$common.transServDate(t.releaseTime),t}}},u=i,d=(a("93b8"),a("2877")),l=Object(d["a"])(u,n,s,!1,null,"5af4f61e",null);e["default"]=l.exports},dbeb:function(t,e,a){"use strict";a.d(e,"a",function(){return o}),a.d(e,"d",function(){return c}),a.d(e,"b",function(){return i}),a.d(e,"f",function(){return u}),a.d(e,"e",function(){return d}),a.d(e,"c",function(){return l});var n=a("8982"),s="/industryParkApi",r="/wx/noticePark";function o(t){return Object(n["a"])({url:s+r+"/add",method:"post",data:t})}function c(t){return Object(n["a"])({url:s+r+"/getById",method:"post",data:t})}function i(t){return Object(n["a"])({url:s+r+"/clickCollect",method:"post",data:t})}function u(t){return Object(n["a"])({url:s+r+"/updateReadStatus",method:"post",data:t})}function d(t){return Object(n["a"])({url:s+r+"/list",method:"post",data:t})}function l(t){return Object(n["a"])({url:s+r+"/edit",method:"post",data:t})}}}]);
|