complete.vue 3.99 KB
Newer Older
朱国瑞's avatar
朱国瑞 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
<template>
  <div class="page">
    <div class="main_content">
      <img class="page-bg" src="../assets/images/gesture/massage-entry-fullbg.png" alt srcset />
      <div class="massage-complete-modal" :class="{'noBaby':finalBabyStatus == 3 || finalBabyStatus == -1}">
        <div class="nickname">
          Hey,
          <span>{{nikeName}}</span>
        </div>
        <div class="title">
          <!-- <image src="{{images.title}}"></image> -->
          <img class="icon" src="../assets/images/gesture/massage-complete-title-icon.png" />
          {{$t('strings.completeText')}}
        </div>
        <div class="record" v-if="finalBabyStatus != 3 && finalBabyStatus != -1">
          <div>您已记录: {{time}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { calcAdapt } from "../common/util";

let calcs = calcAdapt();
let scale;
const calcCoord = function () {
  let width = 0;
  let height = 0;
  if (document.body.clientWidth > 750) {
    width = 750;
    height = document.body.clientHeight;
  } else {
    width = document.body.clientWidth;
    height = document.body.clientHeight;
  }
  if (height === 0) {
    height = window.innerHeight;
  }
  scale = height / width;
  let k = +scale.toFixed(2);
  if (k >= 2.16) {
    k = 2.16;
  } else if (k <= 1.78) {
    k = 1.78;
  }
  return calcs.calcCoord.call(null, ...arguments, k);
};
export default {
  data() {
    return {
      nikeName: "William",
      finalBabyStatus: 0,
      lying: 0,
      time: 0,
      total: 0,
      modalCalc: {
        top: ""
      }
    };
  },
  methods: {

  },
  created() {
    let finalBabyStatus = this.$route.query.finalBabyStatus;
    let lying = this.$route.query.lying;
    let time = this.$route.query.time;
    let total = this.$route.query.time;
    this.finalBabyStatus = finalBabyStatus;
    this.lying = lying;
    this.time = time;
    this.total = total;
  },
  mounted() {}
};
</script>

<style lang="scss" scoped>
.page {
  background: #000;
  display: flex;
  justify-content: center;
  height: 100vh;
}
@media only screen and (min-width: 750px) {
  .page {
    .main_content {
      width: 750px;
      height: 100%;
      background: #ffffff;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
      .page-bg {
        position: absolute;
        left: 0;
        top: 0;
        width: 750px;
        z-index: 0;
      }
    }
    .massage-complete-modal {
      box-sizing: border-box;
      width: 660px;
      height: 620px;
      padding: 80px 0 125px;
      background: #fff;
      display: flex;
      flex-direction: column;
      align-items: center;
      border-radius: 14px 14px;
      margin: 0 auto;
      position: relative;
      z-index: 1;
      &.noBaby {
        height: 420px;
      }
      .nickname {
        font-size: 46px;
        color: #fb7c76;
        font-family: "Gotham-Book";
        text-shadow: 2px 2px 4px #ffffff;
        span {
          font-size: 60px;
        }
      }
      .title {
        height: 53px;
        margin-top: 41px;
        color: #fb7c76;
        font-size: 46px;
        font-weight: bolder;
        .icon {
          width: 69px;
          height: 45px;
        }
      }
      .subTitle {
        width: 100%;
        text-align: center;
        color: #fb7c76;
        font-size: 26px;
        margin-top: 20px;
        font-weight: bolder;
        &.underline {
          text-decoration: underline;
        }
      }
      .record {
        margin-top: 100px;
        margin-bottom: 100px;
        width: 559px;
        height: 96px;
        line-height: 96px;
        border-radius: 48px 48px;
        font-size: 34.67px;
        color: #999999;
        background-color: #f5f5f5;
        text-align: center;
        text-shadow: 2px 2px 4px #ffffff;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
      }
    }
  }
}

@media screen and (max-width: 750px) {
  .page {
    .main_content {
    }
  }
}
</style>