details.vue 2.9 KB

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