messageInfo.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="info">
  3. <u-navbar
  4. title-color="#fff"
  5. :custom-back="customBack"
  6. :border-bottom="false"
  7. back-icon-color="#CCE8FF"
  8. :background="{background: 'linear-gradient(99deg, #7A4398 0%, #5A5DB9 100%)' }"
  9. title="消息详情"></u-navbar>
  10. <view class="time">{{details.createTime}}</view>
  11. <view class="box">
  12. <view class="title">{{details.msgType|filterMsgType}}</view>
  13. <view class="content" v-html="details.content"></view>
  14. <!-- <view class="content">{{details.content}}</view> -->
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. details: {}
  23. };
  24. },
  25. onLoad(page) {
  26. const details = JSON.parse(page.details)
  27. if (details) {
  28. this.details = details
  29. }
  30. },
  31. methods: {
  32. customBack() {
  33. this.$u.route({
  34. url: 'pages/center/message/message'
  35. });
  36. }
  37. }
  38. }
  39. </script>
  40. <style>
  41. /* #ifndef H5 */
  42. page {
  43. height: 100%;
  44. background-color: #F6F6FF;
  45. }
  46. /* #endif */
  47. </style>
  48. <style lang="scss" scoped>
  49. .info {
  50. padding: 40rpx 40rpx;
  51. }
  52. .box {
  53. margin-top: 20rpx;
  54. background-color: white;
  55. border-radius: 15rpx;
  56. .title {
  57. padding-top: 20rpx;
  58. text-align: center;
  59. font-size: 40rpx;
  60. }
  61. }
  62. .content {
  63. text-indent: 2em;
  64. padding: 20rpx 40rpx;
  65. line-height: 44rpx;
  66. }
  67. </style>