messageInfo.vue 1.1 KB

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