annotationDetail.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view class="bg-white" style="height: 100vh;">
  3. <cu-custom :bgColor="NavBarColor" :isBack="true" backFlag="navigate">
  4. <block slot="backText">返回</block>
  5. <block slot="content">详情</block>
  6. </cu-custom>
  7. <view>
  8. <view class="title">
  9. <view class="padding" style="font-family: '宋体';">
  10. <text class="text-black title text-bold text-xl">{{annotation.titile}} </text>
  11. </view>
  12. </view>
  13. <view class=" text-df padding-left " style="color: #999;">
  14. <text class="title padding-right-xl" style="color: #999;">
  15. {{annotation.sender||''}}
  16. </text>
  17. <text class="" v-html="annotation.sendTime">
  18. </text>
  19. </view>
  20. <view class="desc" style="font-family: '仿宋';font-size: 18px;">
  21. <view class="text-content padding" v-html="annotation.msgContent">
  22. <!-- <annotation-block :content="annotation.msgContent"/> -->
  23. </view>
  24. </view>
  25. <view class="text-gray padding-left padding-bottom text-gray">
  26. <text class="cuIcon-attentionfill margin-lr-xs" @click="numberPlus"></text> 10
  27. <text class="cuIcon-appreciatefill padding-left margin-lr-xs" @click="numberPlus"></text> 20
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data(){
  35. return{
  36. NavBarColor:this.NavBarColor,
  37. annotation:{
  38. id:"",
  39. titile:"",
  40. startTime:"",
  41. sender:"",
  42. msgContent:"",
  43. },
  44. goodNumber:null,
  45. flg:true,
  46. }
  47. },
  48. // onLoad:function(){
  49. // console.log("this.$Route.query",this.$Route);
  50. // let query = this.$Route.query
  51. // if(query){
  52. // this.annotation = query;
  53. // }
  54. // },
  55. onLoad: function (option) {
  56. const annItem = JSON.parse(decodeURIComponent(option.item));
  57. console.log("ann",annItem)
  58. this.annotation = annItem
  59. this.readOk();
  60. },
  61. created(){
  62. console.log("created")
  63. //this.readOk();
  64. },
  65. methods:{
  66. readOk(){
  67. console.log("readOk")
  68. let param = {anntId:this.annotation.anntId}
  69. this.$http.put('/sys/sysAnnouncementSend/editByAnntIdAndUserId',param);
  70. },
  71. numberPlus(){
  72. if (this.flg){
  73. this.goodNumber++
  74. this.flg = false
  75. } else {
  76. this.goodNumber--
  77. if (this.goodNumber == 0){
  78. this.goodNumber = null
  79. }
  80. this.flg = true
  81. }
  82. }
  83. }
  84. }
  85. </script>
  86. <style>
  87. </style>