PhoneView.vue 6.76 KB
<!--
 * @Author: 前端 qianduan01@didihu.com.cn
 * @Date: 2023-05-15 15:08:32
 * @LastEditors: yangming yangming@didihu.com.cn
 * @LastEditTime: 2023-05-22 18:31:40
 * @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="review-body">
    <img src="@/assets/phone.png" class="review-phone" />
    <div class="review-title_top">{{ detail.title }}</div>
    <div class="review-content">
      <div class="review-main">
        <div class="review-bg-img">
          <img :src="detail.backgroundImg" v-if="detail.backgroundImg" />
        </div>
      </div>
      <div class="review-package">
        <div class="review-goods" v-if="selectedGoodsList && selectedGoodsList.length">
          <div class="goods-item" v-for="(item, index) in selectedGoodsList" :key="index">
            <div class="service-logo"></div>
            <div class="service-desc">
              <div class="title">{{ item.brandName }}{{ item.goodsName }}</div>
              <div class="content">x{{ item.couponAmount }} 抵扣券</div>
            </div>
            <div class="service-price">
              {{ (item.denomination / 100).toFixed(2) }}
              <span>元</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      detail: {},
      discount: {
        2: '折扣券',
        3: '代金券',
        4: '兑换券',
        7: '服务券'
      }
    }
  },
  props: {
    editForm: {
      type: Object,
      default: () => {}
    },
    selectedGoodsList: {
      type: Object,
      default: () => {}
    }
  },
  watch: {
    editForm: {
      handler(val) {
        this.detail = val
      },
      deep: true,
      immediate: true
    }
  }
}
</script>
<style lang="scss" scoped>
.review-body {
  margin: 10px auto;
  width: 305px;
  height: 645px;
  position: relative;
  .review-phone {
    width: 100%;
  }
  .review-title_top {
    position: absolute;
    top: 38px;
    left: 0px;
    width: 100%;
    text-align: center;
    line-height: 40px;
  }
  .review-footer {
    position: absolute;
    bottom: 52px;
    left: 109px;
    color: #f13c3d;
    font-size: 22px;
    label {
      font-size: 12px;
    }
  }
  .review-content {
    position: absolute;
    width: calc(100% - 20px);
    height: 504px;
    overflow-y: auto;
    top: 77px;
    left: 13px;
    .review-main {
      position: relative;
      img {
        width: 275px;
      }
    }
    .review-package {
      background: #ddd8c0;
      padding: 16px;
      .review-equity,
      .review-service,
      .review-goods {
        background: #ffffff;
        border-radius: 12px;
        padding: 10px;
        margin-bottom: 10px;
      }
      .service-item {
        height: 48px;
        background-image: linear-gradient(117deg, #ffead3 3%, #f0ca90 92%);
        border-radius: 4px;
        display: flex;
        align-items: center;
        padding: 4px;
        margin-top: 5px;
        &:first-child {
          margin-top: 0px;
        }
        .service-title {
          width: 74%;
          height: 40px;
          background: #ffffff;
          border-radius: 6px;
          font-size: 14px;
          color: #333333;
          line-height: 40px;
          padding-left: 12px;
        }

        .service-time {
          color: #8e5310;
          text-align: center;
          flex: 1;
          font-size: 12px;
          line-height: 48px;
        }
      }
      .coupon-item {
        height: 48px;
        background: #fff5f3;
        border-radius: 4px;
        display: flex;
        align-items: center;
        padding: 4px;
        margin-top: 5px;
        &:first-child {
          margin-top: 0px;
        }
        .service-title {
          width: 64%;
          height: 40px;
          background: #ffffff;
          border-radius: 6px;
          font-size: 14px;
          color: #333333;
          line-height: 40px;
          padding: 0px 12px;
          display: flex;
          justify-content: space-between;
          span {
            font-size: 14px;
            color: #333333;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            &:last-child {
              font-size: 11px;
              color: #9b9b9b;
            }
          }
        }

        .service-time {
          color: #fc5b32;
          text-align: center;
          flex: 1;
          font-size: 12px;
          line-height: 48px;
        }
      }
      .goods-item {
        display: flex;
        border-bottom: 1px solid #f8f7f2;
        padding: 5px;
        &:last-child {
          border-bottom: none;
        }
        .service-logo {
          width: 32px;
          height: 32px;
          margin-right: 10px;
        }

        .service-desc {
          width: 55%;
          .title {
            font-size: 12px;
            color: #111111;
          }

          .content {
            font-size: 11px;
            color: #9b9b9b;
          }
        }

        .service-price {
          margin-left: auto;
          color: #fc5b32;
          font-size: 14px;

          span {
            font-size: 12px;
          }
        }
      }
      .review-address {
        .title {
          display: flex;
          align-items: center;
          justify-content: space-between;
          width: 100%;
          height: 32px;
          background: rgba(255, 255, 255, 0.8);
          border-radius: 8px 8px 0 0;
          padding: 0px 10px;
          box-sizing: border-box;
        }

        .title-l {
          font-size: 15px;
          color: #333333;
        }

        .title-r {
          font-size: 10px;
          color: #9b9b9b;
          letter-spacing: 2px;
          span {
            margin-right: 5px;
          }
        }
        .address {
          display: flex;
          padding: 10px;
          background: #ffffff;
          .store {
            font-weight: 500;
            font-size: 14px;
            color: #2c2c2c;
            line-height: 20px;
          }
          .detail {
            font-weight: 400;
            font-size: 12px;
            color: #656566;
            margin: 2px 0 8px 0;
          }
        }
      }
      .review-line {
        color: #999999;
        font-size: 12px;
        font-weight: 400;
        background: #ffffff;
        border-radius: 4px;
        padding: 14px 10px;
        margin: 10px 0px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        img {
          width: 36px;
          margin-right: 10px;
        }
        i {
          margin-left: auto;
          color: #fc643e;
        }
      }
    }
  }
}
</style>