1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b49a3f0"],{"1aa5":function(t,e,a){},"27f6":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:"top-add",on:{click:function(e){return t.goNavigator("announcement-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 white-box"},[a("div",{staticClass:"info-item-top"},[t._m(0,!0),a("div",{staticClass:"center"},[a("div",{staticClass:"top"},[t._v("\n "+t._s(e.title)+"\n ")]),a("div",{staticClass:"bottom"},[a("span",[t._v(" "+t._s(e.releaseTime))])])])]),a("div",{staticClass:"info-item-bottom"},["2"===e.source?a("span",{staticClass:"normal-button-app z-bt",on:{click:function(a){return t.goNavigator("announcement-edit-app",{id:e.id})}}},[t._v("编辑")]):t._e(),a("span",{staticClass:"normal-button-app y-bt",on:{click:function(a){return t.offShelf(e.id)}}},[t._v("撤回")])])])}),0)])},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"left"},[a("i",{staticClass:"iconfont icon-laba"})])}],o=(a("ac6a"),a("435e")),c=a("3089"),i=a("5cab"),r={data:function(){return{list:[],params:{pageNum:1,pageSize:10},totalPage:1}},created:function(){this.initParkNotice()},methods:{initParkNotice:function(){var t=this,e=this;e.params.userId=i["a"].currUser().id,e.params.status="published",Object(o["g"])(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;c["Dialog"].confirm({title:"提示",message:"确认撤回该通知吗?"}).then(function(a){Object(o["c"])({id:t,status:"off_shelf"}).then(function(t){Object(c["Toast"])("撤回成功"),e.list=[],e.initParkNotice()})}).catch(function(t){Object(c["Toast"])("已取消")})},getItemJson:function(t){return t.releaseTime=this.$common.transServDate(t.releaseTime),t}}},u=r,d=(a("2b0d"),a("2877")),l=Object(d["a"])(u,n,s,!1,null,"af80038e",null);e["default"]=l.exports},"2b0d":function(t,e,a){"use strict";var n=a("1aa5"),s=a.n(n);s.a},"435e":function(t,e,a){"use strict";a.d(e,"a",function(){return c}),a.d(e,"g",function(){return i}),a.d(e,"d",function(){return r}),a.d(e,"e",function(){return u}),a.d(e,"f",function(){return d}),a.d(e,"c",function(){return l}),a.d(e,"b",function(){return f});var n=a("8982"),s="/industryParkApi",o="/wx/announcementNotice";function c(t){return Object(n["a"])({url:s+o+"/add",method:"post",data:t})}function i(t){return Object(n["a"])({url:s+o+"/list",method:"post",data:t})}function r(t){return Object(n["a"])({url:s+o+"/getById",method:"post",data:t})}function u(t){return Object(n["a"])({url:s+o+"/getConsultPerson",method:"post",data:t})}function d(t){return Object(n["a"])({url:s+o+"/getPerson",method:"post",data:t})}function l(t){return Object(n["a"])({url:s+o+"/edit",method:"post",data:t})}function f(t){return Object(n["a"])({url:s+o+"/clickCollect",method:"post",data:t})}},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"),s=a.n(n),o=a("bc3a"),c=a.n(o),i=a("4328"),r=a.n(i),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:r.a.stringify(t.data)};return e&&(a.data=t.data),t.headers&&(a.headers=t.headers),new s.a(function(e,n){c()(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 m(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){c.a.defaults.withCredentials=!0,c()(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)})})}}}]);
|