rk
2 天以前 38d111cb6defedff3bf06314ca30d22a01faae22
mini-program/pages/details/details.vue
@@ -47,17 +47,16 @@
            <view class="card-title-xian"></view>
            <text>擅长领域</text>
         </view>
         <view class="card-list" v-if="item.fieldList && item.fieldList.length > 0">
            <view class="card-list-item" v-for="(child, index) in item.fieldList" :key="index">
               <view class="card-list-item-title">{{child.name}}:</view>
               <view class="card-list-item-text">{{child.remark}}</view>
         <view class="card-list">
            <view class="card-list-item">
               <text v-for="(child, index) in item.fieldList" :key="index">{{child.name}} <template v-if="item.fieldList.length- 1 !== index">、</template></text>
            </view>
         </view>
      </view>
      <view class="card">
      <view class="card" v-if="item.casesList">
         <view class="card-title">
            <view class="card-title-xian"></view>
            <text>优秀项目案例 (40)</text>
            <text>优秀项目案例 ({{item.casesList.length}})</text>
         </view>
         <view class="work">
            <view class="work-item" v-for="(child, index) in item.casesList" :key="index">
@@ -69,22 +68,27 @@
                  </view>
                  <view class="left-info">{{child.detail}}</view>
               </view>
               <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan">
               <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan(child.fileList)">
                  <image :src="child.fileList[0].url" mode="widthFix"></image>
                  <view class="right-num">共{{child.fileList.length}}张</view>
               </view>
            </view>
         </view>
      </view>
      <previewImage ref="previewImage" :opacity="1" :circular="true" :imgs="imgs" />
   </view>
</template>
<script>
   import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
   export default {
      components: { previewImage}, //注册插件
      data() {
         return {
            id: null,
            item: null,
            imgs: []
         };
      },
      onLoad(option) {
@@ -92,6 +96,15 @@
         this.getDetails()
      },
      methods: {
         yulan(arr) {
            this.imgs = arr.map(item => item.url)
            this.$refs.previewImage.open(this.imgs[0]);
            // uni.previewImage({
            //    current: url,
            //    urls: this.item.casesList[index].fileList.map(item => item.url),
            //    indicator: 'number'
            // })
         },
         zhankai() {
            this.item.zhankai = !this.item.zhankai
         },
@@ -105,6 +118,16 @@
                     res.data.isShow = true
                     res.data.zhankai = false
                     res.data.contentCopy = res.data.content.substring(0, 30) + '...'
                  }
                  // let arr = []
                  // res.data.fieldList.forEach(item => {
                  //    if (item.remark) {
                  //       arr.push(item)
                  //    }
                  // })
                  // res.data.fieldList = arr;
                  if (res.data.casesList) {
                     this.imageUrls = res.data.casesList.map(item => item.url)
                  }
                  this.item = res.data
               }
@@ -179,18 +202,21 @@
            }
            .item-info-a {
               display: flex;
               align-items: center;
               align-items: flex-start;
               text {
                  &:nth-child(1) {
                     flex-shrink: 0;
                     font-weight: 600;
                     font-size: 30rpx;
                     color: #222222;
                  }
                  &:nth-child(2) {
                     width: 300rpx;
                     font-weight: 400;
                     font-size: 24rpx;
                     color: #777777;
                     margin-left: 10rpx;
                     margin-top: 7rpx;
                  }
               }
            }
@@ -198,7 +224,7 @@
               display: flex;
               flex-wrap: wrap;
               align-items: center;
               margin-top: 8rpx;
               margin-top: 16rpx;
               .item-info-b-row {
                  padding: 0 8rpx;
                  box-sizing: border-box;
@@ -210,8 +236,9 @@
                  font-size: 22rpx;
                  color: #2E68C4;
                  margin-right: 8rpx;
                  margin-bottom: 8rpx;
                  &:last-child {
                     margin: 0;
                     margin-right: 0;
                  }
               }
            }
@@ -226,20 +253,21 @@
                  align-items: center;
                  .item-info-c-item-label {
                     font-weight: 400;
                     font-size: 24rpx;
                     font-size: 26rpx;
                     color: #777777;
                  }
                  .item-info-c-item-val {
                     font-weight: 400;
                     font-size: 24rpx;
                     font-size: 26rpx;
                     color: #333333;
                  }
               }
            }
            .item-info-d {
               width: 100%;
               line-height: 40rpx;
               font-weight: 400;
               font-size: 24rpx;
               font-size: 26rpx;
               color: #333333;
               margin-top: 20rpx;
               text {
@@ -266,6 +294,7 @@
               margin-right: 12rpx;
            }
            text {
               line-height: 40rpx;
               font-weight: 600;
               font-size: 32rpx;
               color: #222222;
@@ -344,20 +373,17 @@
            width: 100%;
            .card-list-item {
               display: flex;
               flex-direction: column;
               margin-bottom: 20rpx;
               align-items: center;
               flex-wrap: wrap;
               margin-bottom: 30rpx;
               line-height: 40rpx;
               &:last-child {
                  margin: 0 !important;
               }
               .card-list-item-title {
                  font-weight: 500;
               text {
                  font-weight: 400;
                  font-size: 28rpx;
                  color: #333333;
               }
               .card-list-item-text {
                  font-weight: 500;
                  font-size: 26rpx;
                  color: #666666;
               }
            }
         }