organsInfoDetial.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view>
  3. <!-- 标题栏 -->
  4. <u-navbar
  5. :is-back="true"
  6. back-icon-color="#2af"
  7. :border-bottom="true"
  8. :back-text="$t('common.Back')"
  9. :back-text-style="{color:'#2af'}"
  10. :title="doctitle"
  11. >
  12. </u-navbar>
  13. <view class="detial">
  14. <view class="pageTitle">{{detial.title}}</view>
  15. <view class="pageContent">
  16. <rich-text :nodes="detial.contentHtml"></rich-text>
  17. </view>
  18. <view class="publishDate">{{publishLable}}: {{formatDate(detial.publishDate)}}</view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import UNavbar from '@/components/uni-nav-bar/uni-nav-bar.vue';
  24. export default {
  25. components:{
  26. UNavbar,
  27. },
  28. data() {
  29. return {
  30. iniData:{
  31. name:'固定资产贷款',
  32. label:'固定资产贷款'
  33. },
  34. doctitle:'',
  35. pageTitle:'',
  36. publishLable:''
  37. }
  38. },
  39. computed:{
  40. detial(){
  41. return uni.getStorageSync('detialInfo')
  42. }
  43. },
  44. onLoad(data) {
  45. this.doctitle= this.$i18n.locale == 'zh'? '详情': 'Detial';
  46. this.publishLable=this.$i18n.locale == 'zh'? '发布时间': 'Publish Date';
  47. this.pageTitle=''
  48. },
  49. onUnload(){
  50. uni.removeStorageSync('detialInfo')
  51. },
  52. methods: {
  53. //格式化日期
  54. publishDate(timenumber){
  55. return new Date(parseInt(timenumber)).toLocaleDateString().replace(new RegExp(/\//,'mg'),'-');
  56. },
  57. }
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .detial{
  62. position:absolute;
  63. width:100%;
  64. background-color:#fafafa;
  65. .pageTitle{
  66. height:100upx;
  67. line-height:100upx;
  68. text-align:center;
  69. font-weight:bold;
  70. }
  71. .pageContent,.publishDate{
  72. padding:3%;
  73. }
  74. .publishDate{
  75. font-size:20upx;
  76. color:#aaa;
  77. }
  78. }
  79. </style>