1 line
5.5 KiB
JavaScript
1 line
5.5 KiB
JavaScript
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabbar/homepage/data-details"],{"0123":function(t,e,n){"use strict";var o=n("9d67"),a=n.n(o);a.a},"0412":function(t,e,n){"use strict";var o=n("3e47"),a=n.n(o);a.a},"0c0f":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.userName.slice(0,1));t.$mp.data=Object.assign({},{$root:{g0:n}})},i=[]},"0c9b":function(t,e,n){"use strict";n.r(e);var o=n("353a"),a=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a},"21b3":function(t,e,n){"use strict";n.r(e);var o=n("0c0f"),a=n("9d02");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("0412");var u,s=n("f0c5"),r=Object(s["a"])(a["default"],o["b"],o["c"],!1,null,"79e5d186",null,!1,o["a"],u);e["default"]=r.exports},"30a8":function(t,e,n){"use strict";n.r(e);var o=n("3a1d"),a=n("0c9b");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("0123");var u,s=n("f0c5"),r=Object(s["a"])(a["default"],o["b"],o["c"],!1,null,"1f41ba4d",null,!1,o["a"],u);e["default"]=r.exports},"353a":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=u(n("a34a")),a=u(n("1da1")),i=u(n("21b3"));function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n,o,a,i,u){try{var s=t[i](u),r=s.value}catch(c){return void n(c)}s.done?e(r):Promise.resolve(r).then(o,a)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function u(t){s(i,o,a,u,r,"next",t)}function r(t){s(i,o,a,u,r,"throw",t)}u(void 0)}))}}var c=function(){n.e("components/uni-fav/uni-fav").then(function(){return resolve(n("5bab"))}.bind(null,n)).catch(n.oe)},f={components:{avatar:i.default,uniFav:c},data:function(){return{InputBottom:0,noticeInfo:{},noticeId:"",noMessage:!1,messageList:[],messageDialog:!1,messageContent:"",isMessage:!0}},onLoad:function(t){this.noticeId=t.noticeId,this.isMessage=t.isMessage||!0},onReady:function(){},mounted:function(){var t=this;return r(o.default.mark((function e(){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getMessageList();case 2:return e.next=4,t.updateReadNumber();case 4:case"end":return e.stop()}}),e)})))()},onPullDownRefresh:function(){t.startPullDownRefresh()},methods:{updateReadNumber:function(){var e=this;a.default.post("/hs/updateReadNumber",{noticeId:this.noticeInfo.id,number:Number(this.noticeInfo.read_number)+1}).then((function(n){console.log("浏览量+1",n),n.data>0?e.getMessageList():t.showToast({icon:"none",title:"服务器出了小差,请稍后再试"})}),(function(t){console.log("err",t)}))},collection:function(e){var n=this,o={0:"/hs/addCollection",1:"/hs/cancelCollection"};a.default.post(o[e],{noticeId:this.noticeInfo.id,userId:t.getStorageSync("userInfo").user_id}).then((function(t){console.log("收藏/取消收藏",t),t.data>0&&n.getMessageList()}),(function(t){console.log("err",t)}))},InputFocus:function(t){this.InputBottom=t.detail.height},InputBlur:function(t){this.InputBottom=0},hideModal:function(){this.messageDialog=!1},goToUserInfo:function(e){e.author_id===t.getStorageSync("userInfo").user_id?t.switchTab({url:"/pages/tabbar/my/my"}):t.navigateTo({url:"/pages/person-info-page/person-info-page?userId=".concat(e.author_id)})},clickPromptConfirm:function(){var e=this;""===this.messageContent?t.showToast({icon:"none",title:"请输入留言,亲"}):a.default.post("/hs/addMessage",{noticeId:this.noticeInfo.id,userId:t.getStorageSync("userInfo").user_id,content:this.messageContent}).then((function(n){console.log("新增留言结果",n),1===n.data&&(e.messageDialog=!1,t.showToast({icon:"loading",title:"留言成功"}),setTimeout((function(){e.getMessageList()}),1e3))}),(function(t){console.log("err",t)}))},getMessageList:function(){var e=this;return a.default.post("/hs/getOneContent",{id:this.noticeId,userId:
|