policyDetail.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="main">
  3. <navbar :config="config" backColor="#999999"></navbar>
  4. <view class="content">
  5. <view class="title">
  6. {{details.header}}
  7. </view>
  8. <view class="desc">
  9. <text class="iconfont2">&#xe6a4;</text>
  10. <text class="author">发布者:{{details.publisher}}</text>
  11. <text class="iconfont2">&#xe66c;</text>
  12. <text class="time">{{details.update_time}}</text>
  13. </view>
  14. <!-- <u-parse :html="details.content"></u-parse> -->
  15. <view class="top ql-editor-box" v-html="details.content"></view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. config: {
  24. back: true,
  25. title: '创业政策',
  26. color: 'black',
  27. backgroundColor: [1, '#fff'],
  28. statusBarFontColor: 'black'
  29. },
  30. imgFiles: [],
  31. details: ''
  32. }
  33. },
  34. onLoad(options) {
  35. if(options&&options.id){
  36. this.getDetails(options.id)
  37. }
  38. },
  39. methods: {
  40. getDetails(id){
  41. this.$http.get(`/workpolicy/${id}`).then(res=>{
  42. if(res&&res.code==200){
  43. this.details=res.data
  44. }
  45. })
  46. }
  47. }
  48. };
  49. </script>
  50. <style lang="scss" scoped>
  51. .main{
  52. .content{
  53. padding: 47rpx 30rpx 42rpx 30rpx;
  54. .title{
  55. font-size: 35rpx;
  56. font-family: PingFang SC, PingFang SC-Bold;
  57. font-weight: 700;
  58. text-align: left;
  59. color: #1a1a1a;
  60. line-height: 52rpx;
  61. margin-bottom: 10rpx;
  62. }
  63. .desc{
  64. margin-bottom: 40rpx;
  65. .iconfont2{
  66. font-size: 30rpx;
  67. color: #20A634;
  68. vertical-align: middle;
  69. }
  70. .author,.time{
  71. font-size: 24rpx;
  72. font-family: PingFang SC, PingFang SC-Medium;
  73. font-weight: 500;
  74. color: #999999;
  75. margin: 0 50rpx 0 9rpx;
  76. vertical-align: middle;
  77. }
  78. }
  79. }
  80. }
  81. .top {
  82. padding: 30rpx;
  83. .item {
  84. font-size: 28rpx;
  85. font-weight: 700;
  86. color: #050505;
  87. line-height: 40rpx;
  88. }
  89. .content {
  90. padding: 0 14rpx 26rpx 14rpx;
  91. font-size: 24rpx;
  92. color: #666666;
  93. font-weight: 500;
  94. line-height: 48rpx;
  95. }
  96. .title {
  97. font-size: 26rpx;
  98. font-weight: 700;
  99. color: #050505;
  100. line-height: 40rpx;
  101. }
  102. .title-item {
  103. color: #666666;
  104. font-weight: 500;
  105. line-height: 48rpx;
  106. font-size: 24rpx;
  107. padding: 0 14rpx;
  108. }
  109. }
  110. </style>