details.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="content">
  3. <block v-if="detail">
  4. <!-- 顶部图片 -->
  5. <image class="top" v-if="detail.img" :src="detail.img" mode="widthFix"></image>
  6. <view class="headline">
  7. <view class="title" v-if="detail.industry">行业:<span>{{detail.industry}}</span></view>
  8. <view class="title" v-if="detail.scheme">方案:<span>{{detail.scheme}}</span></view>
  9. <view class="title" v-if="detail.client">客户:<span>{{detail.client}}</span></view>
  10. </view>
  11. <image class="line" src="../../static/imgs/line.png"></image>
  12. <view class="boxs" v-if="detail.descriptions&&detail.descriptions.length">
  13. <view class="box" v-for="(item,index) in detail.descriptions" :key="index">
  14. <view class="b_title">{{item.title}}</view>
  15. <view class="intro">
  16. <u-parse :content="item.content"></u-parse>
  17. </view>
  18. </view>
  19. </view>
  20. </block>
  21. </view>
  22. </template>
  23. <script>
  24. import { data } from '../plan/data.js'
  25. export default {
  26. data(){
  27. return {
  28. detail:null
  29. }
  30. },
  31. created() {
  32. uni.setNavigationBarTitle({
  33. title:'案例'
  34. })
  35. },
  36. onLoad(option) {
  37. if(option.id&&option.key){
  38. this.getDetails(option.id,option.key);
  39. }
  40. },
  41. methods:{
  42. getDetails(id,key){
  43. let temp = data[key];
  44. if(temp.length){
  45. this.detail = temp.find(t=>t.id == id).details || null;
  46. }
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="less">
  52. .content{
  53. overflow-x: hidden;
  54. padding-bottom: 100rpx;
  55. .top{
  56. width: 100%;
  57. }
  58. .headline{
  59. width: 100%;
  60. padding: 10rpx 30rpx;
  61. box-sizing: border-box;
  62. .title{
  63. margin-top: 20rpx;
  64. font-family: PingFangSC, PingFang SC;
  65. font-weight: 400;
  66. font-size: 30rpx;
  67. color: #111111;
  68. line-height: 42rpx;
  69. text-align: left;
  70. span{
  71. margin-left: 20rpx;
  72. font-weight: bold;
  73. color: #333333;
  74. }
  75. }
  76. }
  77. .line{
  78. width: 100%;
  79. height: 6rpx;
  80. margin: 30rpx 0 40rpx;
  81. }
  82. .boxs{
  83. width: 100%;
  84. padding: 0 30rpx;
  85. box-sizing: border-box;
  86. .box{
  87. margin-top: 48rpx;
  88. &:first-child{
  89. margin-top: 0;
  90. }
  91. .b_title{
  92. font-family: PingFang-SC, PingFang-SC;
  93. font-weight: bold;
  94. font-size: 32rpx;
  95. color: #333333;
  96. line-height: 45rpx;
  97. letter-spacing: 2rpx;
  98. }
  99. .intro{
  100. font-family: PingFangSC, PingFang SC;
  101. font-weight: 400;
  102. font-size: 28rpx;
  103. color: #666666;
  104. line-height: 48rpx;
  105. margin-top: 20rpx;
  106. letter-spacing: 2rpx;
  107. }
  108. }
  109. }
  110. }
  111. </style>