message_detail.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="content">
  3. <view class="content_head">
  4. <view class="content_head_title">{{allData.title}}</view>
  5. <view class="content_head_time">{{allData.date}}</view>
  6. </view>
  7. <view class="content_wrap">
  8. <view class="content_wrap_text">{{allData.content}} </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import api from "../../../../../api.js";
  14. let app = getApp();
  15. export default {
  16. data() {
  17. return {
  18. id:'',//消息id
  19. allData:null,//所有数据
  20. }
  21. },
  22. onLoad(options) {
  23. this.id = options.id;
  24. this.getData();
  25. },
  26. methods: {
  27. //加载数据
  28. getData(){
  29. let data = {
  30. id:this.id
  31. }
  32. api.getUserMessageDetail(data).then((res)=>{
  33. console.log(res);
  34. this.allData = res.data.data
  35. })
  36. }
  37. }
  38. }
  39. </script>
  40. <style>
  41. page{
  42. width:100%;
  43. border-top:1px solid #f2f2f2;
  44. box-sizing: border-box;
  45. overflow: hidden;
  46. padding:0 30rpx;
  47. }
  48. .content{
  49. width:100%;
  50. overflow: hidden;
  51. }
  52. .content_head{
  53. padding-bottom: 30rpx;
  54. border-bottom:1px solid #f2f2f2;
  55. box-sizing: border-box;
  56. }
  57. .content_head_title{
  58. font-size: 30rpx;
  59. color:#000000;
  60. font-weight: bold;
  61. margin-top:22rpx;
  62. }
  63. .content_head_time{
  64. font-size: 22rpx;
  65. color:#cccccc;
  66. margin-top:10rpx;
  67. }
  68. .content_wrap_text{
  69. font-size: 28rpx;
  70. color:#666666;
  71. line-height: 40rpx;
  72. margin: 30rpx 0 22rpx 0;
  73. }
  74. .content_wrap image{
  75. display: block;
  76. width:100%;
  77. height:234rpx;
  78. }
  79. </style>