notice-detail.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>消息列表-消息中心-创业帮</title>
  6. <meta name="keywords" content="消息列表-消息中心-创业帮">
  7. <meta name="description" content="消息列表-消息中心-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="消息列表-消息中心-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="back-color pb0">
  18. <div id="app" v-cloak>
  19. <van-nav-bar class="user_rank_explan_title user_title_normal bottom_line" :title="noticetitle" v-if="toptitleisshow" @click-left="goback" left-arrow>
  20. <template #left> <img src="./static/images/left.png" alt=""></template>
  21. </van-nav-bar>
  22. <div class="pl16 pr16 mt16" v-html="noticedetail"></div>
  23. </div>
  24. <script src="./static/js/klm-vv.min.js"></script>
  25. <script src="./static/js/klm-axios-config.js"></script>
  26. <script>
  27. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  28. // 可以通过下面的方式手动注册
  29. Vue.use(vant.Lazyload);
  30. // 在 #app 标签下渲染一个按钮组件
  31. let app = new Vue({
  32. el: '#app',
  33. data() {
  34. return {
  35. toptitleisshow:false,
  36. noticetitle:'',
  37. noticedetail:'',
  38. };
  39. },
  40. created() {
  41. this.toptitleisshow = toptitleisshow;
  42. this.getnoticelist();
  43. this.readflag();
  44. },
  45. methods: {
  46. async getnoticelist(){
  47. PublicLib.ShowLoading({Message:''});
  48. const Id = PublicLib.getCookieInfo('noticeArticleDetail');
  49. let requestUrl = '';
  50. if(PublicLib.getCookieInfo('noticeType') === '个人消息'){
  51. requestUrl = '/api/v1/msgpersonal/detail?t='+Math.random(6);
  52. }else{
  53. requestUrl = '/api/v1/msgplacard/detail?t='+Math.random(6);
  54. };
  55. const res = await getRequest(requestUrl,JSON.stringify({Id}));
  56. if(res.status !== '1') return;
  57. PublicLib.HideLoading();
  58. this.noticedetail = res.data.Content;
  59. this.noticetitle = res.data.Title;
  60. },
  61. readflag(){
  62. const Id = PublicLib.getCookieInfo('noticeArticleDetail');
  63. let requestUrl = '';
  64. if(PublicLib.getCookieInfo('noticeType') === '个人消息'){
  65. requestUrl = '/api/v1/msgpersonal/read?t='+Math.random(6);
  66. }else{
  67. requestUrl = '/api/v1/msgplacard/read?t='+Math.random(6);
  68. };
  69. postRequest(requestUrl,JSON.stringify({Id}));
  70. },
  71. goback(){
  72. PublicLib.GoBack({Level:1});
  73. }
  74. }
  75. });
  76. </script>
  77. </body>
  78. </html>