details.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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="box">
  7. <!-- 标题 -->
  8. <view class="title" v-if="detail.title">{{detail.title}}</view>
  9. <!-- 客户 -->
  10. <view class="client" v-if="detail.client">客户:<span>{{detail.client}}</span></view>
  11. <!-- 详细介绍 -->
  12. <view class="intro" v-if="detail.intro">
  13. <u-parse :content="detail.intro"></u-parse>
  14. </view>
  15. <!-- 效果 -->
  16. <view class="title t2" v-if="detail.effect">效果</view>
  17. <view class="intro" v-if="detail.effect">
  18. <u-parse :content="detail.effect"></u-parse>
  19. </view>
  20. <!-- 横隔线(1) -->
  21. <image src="../../static/imgs/line.png" class="line" v-if="detail.line1"></image>
  22. <!-- 改造方案 -->
  23. <view v-if="detail.gzfa">
  24. <view class="title" v-if="detail.gzfa.title">{{detail.gzfa.title}}</view>
  25. <view class="intro" v-if="detail.gzfa.content">
  26. <u-parse :content="detail.gzfa.content"></u-parse>
  27. </view>
  28. </view>
  29. <!-- 横隔线(2) -->
  30. <image src="../../static/imgs/line.png" class="line" v-if="detail.line2"></image>
  31. <!-- 功能列表(function) -->
  32. <view v-if="detail.function">
  33. <view class="title" v-if="detail.function.title">{{detail.function.title}}</view>
  34. <block v-if="detail.function.list&&detail.function.list.length">
  35. <uFunction :showTitle="false" :title="item.title" :list="item.list" v-for="(item,index) in detail.function.list" :key="index"></uFunction>
  36. </block>
  37. </view>
  38. </view>
  39. </block>
  40. </view>
  41. </template>
  42. <script>
  43. import { data } from '../plan/data.js'
  44. export default {
  45. data(){
  46. return {
  47. detail:null
  48. }
  49. },
  50. created() {
  51. uni.setNavigationBarTitle({
  52. title:'案例'
  53. })
  54. },
  55. onLoad(option) {
  56. if(option.id&&option.key){
  57. this.getDetails(option.id,option.key);
  58. }
  59. },
  60. methods:{
  61. getDetails(id,key){
  62. let temp = data[key];
  63. if(temp.length){
  64. this.detail = temp.find(t=>t.id == id).details || null;
  65. }
  66. }
  67. }
  68. }
  69. </script>
  70. <style scoped lang="less">
  71. .content{
  72. overflow-x: hidden;
  73. padding-bottom: 50rpx;
  74. .top{
  75. width: 100%;
  76. }
  77. .box{
  78. width: 100%;
  79. padding: 0 30rpx 30rpx;
  80. box-sizing: border-box;
  81. .title{
  82. font-family: PingFang-SC, PingFang-SC;
  83. font-weight: bold;
  84. font-size: 32rpx;
  85. color: #111111;
  86. line-height: 45rpx;
  87. margin-top: 36rpx;
  88. &.t2{
  89. margin-top: 48rpx;
  90. }
  91. }
  92. .client{
  93. font-family: PingFangSC, PingFang SC;
  94. font-weight: bold;
  95. font-size: 32rpx;
  96. color: #333333;
  97. line-height: 45rpx;
  98. margin-top: 21rpx;
  99. span{
  100. font-size: 30rpx;
  101. line-height: 42rpx;
  102. color: #134F99;
  103. }
  104. }
  105. .intro{
  106. font-family: PingFangSC, PingFang SC;
  107. font-weight: 400;
  108. font-size: 28rpx;
  109. color: #666666;
  110. line-height: 48rpx;
  111. letter-spacing: 2rpx;
  112. margin-top: 21rpx;
  113. }
  114. .effect{
  115. font-family: PingFangSC, PingFang SC;
  116. font-weight: 400;
  117. font-size: 28rpx;
  118. color: #666666;
  119. line-height: 40rpx;
  120. margin-top: 6rpx;
  121. }
  122. .line{
  123. width: calc(100% + 60rpx);
  124. height: 10rpx;
  125. margin-top: 48rpx;
  126. position: relative;
  127. left: -30rpx;
  128. }
  129. }
  130. }
  131. </style>