1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0b37153e"],{2374:function(t,e,a){"use strict";a.d(e,"a",function(){return i}),a.d(e,"b",function(){return r});var s=a("8982"),n="",o="/wx/noticePark";function i(t){return Object(s["a"])({url:n+o+"/add",method:"post",data:t})}function r(t){return Object(s["a"])({url:n+o+"/edit",method:"post",data:t})}},"2e3e":function(t,e,a){"use strict";a.r(e);var s=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("propertyNotice-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:"/propertyNotice-app/detail",query:{type:"2",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("propertyNotice-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)])},n=[],o=(a("ac6a"),a("2374")),i=a("3089"),r=a("5cab"),c={data:function(){return{list:[],params:{pageNum:1,pageSize:10,publisherUserId:r["a"].currUser().id,userId:r["a"].currUser().id,type:"2"},totalPage:1}},created:function(){this.initParkNotice(),window.history&&window.history.pushState&&(history.pushState(null,null,document.URL),window.addEventListener("popstate",this.goBack,!1))},destroyed:function(){window.removeEventListener("popstate",this.goBack,!1)},methods:{goBack:function(){this.$router.push({path:"/home-app"})},initParkNotice:function(){var t=this,e=this;Object(o["propertyNoticeList"])(e.params).then(function(a){console.log(a),a&&(e.list=[],a.forEach(function(a){var s=t.getItemJson(a);e.list.push(s)}))})},offShelf:function(t){var e=this;i["Dialog"].confirm({title:"提示",message:"确认撤回该通知吗?"}).then(function(a){Object(o["b"])({id:t,status:"off_shelf"}).then(function(t){Object(i["Toast"])("撤回成功"),e.list=[],e.initParkNotice()})}).catch(function(t){Object(i["Toast"])("已取消")})},getItemJson:function(t){return t.releaseTime=this.$common.transServDate(t.releaseTime),t}}},u=c,d=(a("e0cb"),a("2877")),l=Object(d["a"])(u,s,n,!1,null,"9fccd784",null);e["default"]=l.exports},8982:function(t,e,a){"use strict";a.d(e,"a",function(){return p}),a.d(e,"b",function(){return f});var s=a("795b"),n=a.n(s),o=a("bc3a"),i=a.n(o),r=a("4328"),c=a.n(r),u=a("4360"),d=a("5cab"),l=a("a18c"),h=a("3089");function p(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:c.a.stringify(t.data)};return e&&(a.data=t.data),t.headers&&(a.headers=t.headers),new n.a(function(e,s){i()(a).then(function(t){if(t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(h["Toast"])(a.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),s(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(h["Toast"])(a.errmsg),s(a.errmsg);break}e(a)}else console.log(t),s(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(h["Toast"])(e),s(e,a)})})}function f(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 n.a(function(a,s){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(h["Toast"])(e.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),s(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(h["Toast"])(e.errmsg),s(e.errmsg);break}a(e)}else console.log(t),s(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(h["Toast"])(e),s(e,a)})})}},b6c0:function(t,e,a){},e0cb:function(t,e,a){"use strict";var s=a("b6c0"),n=a.n(s);n.a}}]);
|