1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-news-detail"],{"22ab":function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.loaded?i("v-uni-view",{staticClass:"News-detail"},[t._l(t.items,(function(e,n){return t.items.length>0?i("v-uni-view",{key:n,staticClass:"item",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),""===e.read_at?t.read(n,e):t.noread(e)}}},[i("v-uni-view",{staticClass:"top"},[i("v-uni-image",{attrs:{src:"/static/imgs/news_2_1.png",mode:"widthFix"}}),i("v-uni-view",{style:""===e.read_at?"flex:1;":"flex:1;color:#808080;"},[t._v(t._s(e.title))])],1),i("v-uni-view",{staticClass:"des"},[t._v(t._s(e.content))]),i("v-uni-view",{staticClass:"time"},[t._v(t._s(e.created_at))]),""===e.read_at?i("v-uni-view",{staticClass:"read_at"}):t._e()],1):t._e()})),0===t.items.length?i("no-list",{attrs:{name:"no-new1",txt:"空空如也~"}}):t._e()],2):t._e()},o=[]},4910:function(t,e,i){"use strict";var n=i("6dd3"),a=i.n(n);a.a},5669:function(t,e,i){"use strict";i.r(e);var n=i("22ab"),a=i("6172");for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("4910");var s,r=i("f0c5"),d=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"5ff770e0",null,!1,n["a"],s);e["default"]=d.exports},6172:function(t,e,i){"use strict";i.r(e);var n=i("69ea"),a=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"69ea":function(t,e,i){"use strict";i("99af"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("dbe0"),a={data:function(){return{items:[],page:1,has_more:!0,loaded:!1}},onLoad:function(t){this.type=t.type,this.notificationsList()},onReachBottom:function(){this.notificationsList()},onNavigationBarButtonTap:function(t){},methods:{read:function(t,e){var i=this,a=e.notification_id;if((0,n.notificationsDetail)(a).then((function(e){i.$set(i.items[t],"read_at","已读已读"),uni.setStorageSync("refresh",!0)})).catch((function(t){uni.showToast({title:t.message,icon:"nonde"})})),e.url)switch(e.url.openType){case"web":window.location.href=e.url.url;break;case"navigateTo":uni.navigateTo({url:e.url.path});break;case"switchTab":uni.switchTab({url:e.url.path});break;default:uni.showToast({title:"活动过期,请联系系统管理员",icon:"none"});break}},notificationsList:function(){var t=this;this.has_more?(0,n.notificationsList)(this.type,{page:this.page}).then((function(e){t.items=t.items.concat(e.data),e.page.has_more&&(t.page=t.page+1),t.has_more=e.page.has_more,t.loaded=!0})).catch((function(t){uni.showToast({title:t.message,icon:"nonde"})})):uni.showToast({title:"没有更多啦~",icon:"none"})},noread:function(t){if(t.url)switch(t.url.openType){case"web":window.location.href=t.url.url;break;case"navigateTo":uni.navigateTo({url:t.url.path});break;case"switchTab":uni.switchTab({url:t.url.path});break;default:uni.showToast({title:"活动过期,请联系系统管理员",icon:"none"});break}else uni.showToast({title:"哎呦,已经读过了~",icon:"none"})}}};e.default=a},"6dd3":function(t,e,i){var n=i("dc18");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("b19fa902",n,!0,{sourceMap:!1,shadowMode:!1})},dbe0:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notificationsDelete=e.notificationsReaded=e.notificationsDetail=e.notificationsList=e.notificationsType=void 0;var n=i("89d9"),a=function(){return(0,n.request)({url:"notifications",method:"GET"})};e.notificationsType=a;var o=function(t,e){return(0,n.request)({url:"notifications/"+t+"/list",method:"GET",data:e})};e.notificationsList=o;var s=function(t){return(0,n.request)({url:"notifications/"+t,method:"PUT"})};e.notificationsReaded=s;var r=function(){return(0,n.request)({url:"notifications",method:"DELETE"})};e.notificationsDelete=r;var d=function(t){return(0,n.request)({url:"notifications/"+t,method:"get"})};e.notificationsDetail=d},dc18:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-5ff770e0]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-5ff770e0]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-5ff770e0]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-5ff770e0]{padding-top:0}.vertical[data-v-5ff770e0]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-5ff770e0]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-5ff770e0]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-5ff770e0]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-5ff770e0]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-5ff770e0]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.News-detail[data-v-5ff770e0]{min-height:100vh;width:100%;padding:0 %?45?% %?45?% %?45?%;box-sizing:border-box}.News-detail .item[data-v-5ff770e0]{background-color:#fff;padding:%?45?%;box-shadow:0 0 %?40?% %?2?% rgba(0,0,0,.1);border-radius:%?10?%;margin-top:%?45?%;position:relative}.News-detail .item .top[data-v-5ff770e0]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;box-sizing:border-box;color:#353535;font-weight:700;border-bottom:solid %?1?% #f8f8f8;padding-bottom:%?39?%}.News-detail .item .top uni-image[data-v-5ff770e0]{width:%?42?%;margin-right:%?30?%}.News-detail .item .top span[data-v-5ff770e0]{font-size:%?32?%}.News-detail .item .des[data-v-5ff770e0]{font-size:%?28?%;padding-top:%?30?%;color:grey}.News-detail .item .time[data-v-5ff770e0]{color:#999;font-size:%?28.8?%;padding-top:%?27?%}.no-news[data-v-5ff770e0]{font-size:%?28?%;color:#666;display:flex;flex-direction:column;justify-content:center;align-items:center;box-sizing:border-box}.no-news uni-image[data-v-5ff770e0]{width:70%;margin:%?210?% 0 %?90?% 0;opacity:.6}.read_at[data-v-5ff770e0]{background-color:red;width:%?14?%;height:%?14?%;position:absolute;top:%?20?%;right:%?20?%;border-radius:50%}',""]),t.exports=e}}]); |