96df177df771186442a67d53c064849af0ae98aa.svn-base 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div style="height:100vh">
  3. <yd-layout>
  4. <yd-navbar title="消息详情" color="#fff" slot="navbar">
  5. <router-link :to="{path: '/MessageCenter' }" replace slot="left">
  6. <yd-navbar-back-icon style="color: #fff"></yd-navbar-back-icon>
  7. </router-link>
  8. </yd-navbar>
  9. <div class="title_info">
  10. <h3 class="title">{{info.title}}</h3>
  11. <!-- <p>发件人:188金宝博</p>-->
  12. <p>发件时间:{{info.write_time}}</p>
  13. </div>
  14. <div class="text_info">
  15. {{info.details}}
  16. </div>
  17. <yd-tabbar slot="tabbar">
  18. <yd-button size="large" type="primary" @click.native="deleteItem(info)">删除消息</yd-button>
  19. </yd-tabbar>
  20. </yd-layout>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. name: "MessageDetail",
  26. data(){
  27. return {
  28. info:{}
  29. }
  30. },
  31. computed: {
  32. },
  33. watch:{
  34. },
  35. mounted(){
  36. console.log(this.$store.getters.getMessageDetail)
  37. this.info = this.$store.getters.getMessageDetail
  38. },
  39. methods: {
  40. deleteItem(item){
  41. console.log(item)
  42. this.$http.get(this.$ports.login.delUserNews, {
  43. identity: item.identity,
  44. token: localStorage.getItem("token")
  45. }).then((res) => {
  46. console.log(res, '删除成功')
  47. this.$dialog.toast({mes: '删除成功'});
  48. clearTimeout(timer);
  49. let timer = setTimeout(()=>{
  50. this.$router.go(-1);
  51. },1000)
  52. });
  53. }
  54. }
  55. }
  56. </script>
  57. <style scoped>
  58. .yd-btn-block {
  59. margin-top: 0.6rem;
  60. }
  61. .yd-navbar {
  62. background-image: linear-gradient(0deg, #565656 0%, #999999 100%);
  63. }
  64. .title_info {
  65. padding: 0.3rem;
  66. height:1.6rem;
  67. background:rgba(239,239,239,1);
  68. }
  69. .title_info h3 {
  70. font-size: 15px;
  71. margin-bottom: 10px;
  72. }
  73. .title_info p {
  74. color: #666666;
  75. line-height: 1.8;
  76. }
  77. .text_info {
  78. margin-top: 0.20rem;
  79. padding: 0.3rem;
  80. background:rgba(239,239,239,1);
  81. font-size: 14px;
  82. color: #333333;
  83. line-height: 1.8;
  84. }
  85. .yd-tabbar {
  86. margin: 0 auto;
  87. width: 80%;
  88. background-color: transparent !important;
  89. }
  90. .yd-btn-block {
  91. margin-top: 0;
  92. border-radius: 10px;
  93. background:linear-gradient(0deg,rgba(90,90,90,1) 0%,rgba(138,138,138,1) 100%);
  94. }
  95. </style>