index.vue 43.1 KB
Newer Older
朱国瑞's avatar
朱国瑞 committed
1
<template>
朱国瑞's avatar
朱国瑞 committed
2
  <div class="page" :class="{'mobile':_isMobile,'pc':!_isMobile}">
朱国瑞's avatar
朱国瑞 committed
3 4
    <div class="main_content" :class="{'small':_isMobile && isSmall,'big':_isMobile && isBig}">
      <div class="top" :class="{'small':_isMobile && isSmall,'big':_isMobile && isBig}" :style="{'height':topHeiht}">
朱国瑞's avatar
朱国瑞 committed
5
        <div class="page_title">{{$t('strings.homeTitle')}}</div>
朱国瑞's avatar
朱国瑞 committed
6
        <div class="picture-box" :style="{'transform': scale>0?'scale('+scale+')':''}">
朱国瑞's avatar
朱国瑞 committed
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
          <img class="page_bg2" src="../assets/images/gesture/swiper1big_new.png" alt srcset />
          <div class="page_tips_1 page_tips">{{$t('strings.homeText1')}}</div>
          <div class="page_tips_2 page_tips">{{$t('strings.homeText2')}}</div>
          <div class="page_tips_3 page_tips">{{$t('strings.homeText3')}}</div>
        </div>
      </div>
      <div class="global_box">
        <img class="global_img" @click="clickGlobalPopup" src="../assets/images/gesture/icon_global.png" alt srcset />
        <div class="popup-box" v-if="showPopup">
          <img class="popup_bg" src="../assets/images/gesture/popup.png" alt srcset />
          <div class="poup-item" :class="{'active':currentLanguage === index}" v-for="(item,index) in languageList" :key="item" @click="clickLanguage(index)">
            <img v-if="currentLanguage === index" class="icon" src="../assets/images/gesture/select.png" alt srcset />
            <div v-else></div>
            <span>{{item}}</span>
          </div>
        </div>
      </div>
      <div class="bottom">
        <div class="bottomBtn">
          <light-button @click="clickAuthCamera" :text="$t('strings.homeButtonText')"></light-button>
        </div>
      </div>
      <div class="no_camera_dialog" v-if="showNoCameraDialog">
        <div class="no_camera_dialog_mask"></div>
        <div class="no_camera_dialog_content">
          <div class="no_camera_dialog_title">{{$t('strings.cameraText')}}</div>
朱国瑞's avatar
朱国瑞 committed
33 34
          <div class="no_camera_dialog_text_content">{{$t('strings.cameraText1')}}</div>
          <div class="no_camera_dialog_button" @click="clickConfirm">
朱国瑞's avatar
朱国瑞 committed
35 36 37 38 39 40 41 42 43 44
            <img class="no_camera_dialog_button_bg" src="../assets/images/gesture/light-btn-bg.png" alt srcset />
            <div class="no_camera_dialog_button_text">{{$t('strings.cameraButtonText')}}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
朱国瑞's avatar
朱国瑞 committed
45 46 47 48 49 50 51 52
import {
  calcAdapt,
  isBigScreen,
  isSmallScreen,
  authCamera,
  isMobile,
  getSystemInfo
} from "../common/util";
朱国瑞's avatar
朱国瑞 committed
53 54 55 56 57 58 59
import lightButton from "../components/lightButton.vue";

let calcs = calcAdapt();
let scale;
const calcCoord = function () {
  let width = 0;
  let height = 0;
朱国瑞's avatar
朱国瑞 committed
60
  if (!isMobile()) {
朱国瑞's avatar
朱国瑞 committed
61
    width = 375;
朱国瑞's avatar
朱国瑞 committed
62
    height =
朱国瑞's avatar
朱国瑞 committed
63
      document.body.clientHeight > 667 ? document.body.clientHeight : 667;
朱国瑞's avatar
朱国瑞 committed
64 65 66 67 68 69
  } else {
    width = document.body.clientWidth;
    height = document.body.clientHeight;
  }
  if (height === 0) {
    height = window.innerHeight;
朱国瑞's avatar
朱国瑞 committed
70
    if (!isMobile()) {
朱国瑞's avatar
朱国瑞 committed
71
      height = window.innerHeight > 667 ? window.innerHeight : 667;
朱国瑞's avatar
朱国瑞 committed
72
    }
朱国瑞's avatar
朱国瑞 committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
  }
  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 {
      showNoCameraDialog: false,
      topHeiht: 0,
      isBig: isBigScreen(),
朱国瑞's avatar
朱国瑞 committed
89
      isSmall: isSmallScreen(),
朱国瑞's avatar
朱国瑞 committed
90 91 92 93
      scale: scale,
      currentLanguage: 0,
      showPopup: false,
      languageList: ["English", "Français", "Español"],
朱国瑞's avatar
朱国瑞 committed
94 95 96 97 98 99
      cL: calcCoord({ minTop: 23.5, maxTop: 15.5 }).top + "px",
      cT: calcCoord({ minTop: 23.5, maxTop: 33.5 }).top + "px",
      cB: calcCoord({ minTop: 20, maxTop: 40 }).top + "px",
      cTs: calcCoord({ minTop: 20, maxTop: 30 }).top + "px", // title fontsize
      cTb: calcCoord({ minTop: 15, maxTop: 15 }).top + "px", // title bottom
      cCs: calcCoord({ minTop: 10, maxTop: 20 }).top + "px", // content
朱国瑞's avatar
朱国瑞 committed
100
      pageHeight: "",
朱国瑞's avatar
朱国瑞 committed
101 102
      _isMobile: false,
      scale: 0
朱国瑞's avatar
朱国瑞 committed
103 104 105 106 107 108 109 110 111 112
    };
  },
  components: {
    lightButton
  },
  methods: {
    clickGlobalPopup() {
      this.showPopup = !this.showPopup;
    },
    setLanguagePack() {
朱国瑞's avatar
朱国瑞 committed
113 114 115 116 117 118 119 120 121
      let lang = "en";
      if (this.currentLanguage === 0) {
        lang = "en";
      } else if (this.currentLanguage === 1) {
        lang = "fr";
      } else if (this.currentLanguage === 2) {
        lang = "es";
      }
      localStorage.setItem("lang", lang);
朱国瑞's avatar
朱国瑞 committed
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
      let _languagePack = {
        tipsString: {
          initInitial: "请调整姿势",
          sittingUnrecognition: "未识别到宝宝,请根据屏幕上的宝宝贴纸模拟动作",
          sittingBabyneckloc: "请用肘关节支撑宝宝颈部",
          sittingBabyhead: "请勿用手掌固定宝宝头部",
          sittingBabybackloc: "请将前臂顺着宝宝背部",
          sittingUpleft: "请抬高左手臂",
          sittingUpright: "请抬高右手臂",
          sittingDownleft: "请放低左手臂",
          sittingDownright: "请放低右手臂",
          sittingHeadupassdown: "请保持宝宝头部高于臀部",
          sittingBabystright: "请保持宝宝耳肩臀在同一直线",
          sittingBabyheadloc: "请确保宝宝头部正对妈妈乳房,不宜过高",
          nobabysittingBabyneckloc: "实际哺乳时,请注意用肘关节支撑宝宝颈部",
朱国瑞's avatar
朱国瑞 committed
137
          nobabysittingHeadupassdown: "实际哺乳时,请保持宝宝头部高于臀部",
朱国瑞's avatar
朱国瑞 committed
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
          nobabysittingBabystright: "实际哺乳时,请保持宝宝耳肩臀一条直线",

          /// 坐姿建议
          sittingSuggest: [
            "请采用舒适姿势,确保与宝宝始终胸腹相贴",
            "宝宝嘴巴尽量包裹住乳晕",
            "使宝宝下巴紧贴乳房,张嘴角度大于100度",
            "随时点击右上角指导图示调整含乳姿势",
            "放松肩膀",
            "妈妈抱宝宝的手,腰部和脚有支撑",
            "保持放松,直到哺乳结束"
          ]
        },
        commonmemsg: {
          initialMassage:
朱国瑞's avatar
朱国瑞 committed
153
            "请与屏幕保持1米左右距离使身体进入轮廓线,5秒后开始识别"
朱国瑞's avatar
朱国瑞 committed
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 181 182 183 184 185 186
        },
        sittingMsg: {
          babyneckloc: "请用肘关节支撑宝宝颈部",
          babyhead: "请勿用手掌固定宝宝头部",
          babybackloc: "请将前臂顺着宝宝背部",
          upleft: "请抬高左手臂",
          upright: "请抬高右手臂",
          downleft: "请放低左手臂",
          downright: "请放低右手臂",
          headupassdown: "请保持宝宝头部高于臀部",
          babystright: "请保持宝宝耳肩臀在同一直线",
          babyheadloc: "请确保宝宝头部正对妈妈乳房,不宜过高"
        },
        sittingMsgPart: {
          babyneckloc: "请用肘关节支撑宝宝颈部",
          babyhead: "请勿用手掌固定宝宝头部",
          babybackloc: "请将前臂顺着宝宝背部",
          headupassdown: "请保持宝宝头部高于臀部",
          babystright: "请保持宝宝耳肩臀在同一直线",
          babyheadloc: "请确保宝宝头部正对妈妈乳房,不宜过高"
        },
        successmsg: {
          recordMessage: "现在可以开始哺乳了!3秒后将自动开始计时",
          nobabyRecord: "您已掌握喂养姿势,期待您和宝宝一起来体验哺乳计时功能",
          suggest: "请及时点击右上角指导图示调整",
          posSuccess: "您的姿势正确,请继续保持"
        },
        strings: {
          suggestTitle: "在开始哺乳的时候可以保持:",
          suggestText1:
            "1.在哺乳过程中,应采用妈妈和宝宝都舒适的姿势,确保与宝宝始终胸腹相贴。",
          suggestText2:
            "2.请让宝宝嘴巴尽量包裹住乳晕,下巴紧贴乳房,张嘴角度大于100度。",
朱国瑞's avatar
朱国瑞 committed
187 188
          suggestText3: "3.请放松肩膀,用垫子或枕头支撑抱宝宝的手,腰部和脚。",
          suggestText4: "4.全程请保持放松,愉悦的状态,直到宝宝主动吐出乳头。",
朱国瑞's avatar
朱国瑞 committed
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
          suggestConfirmText: "知道了",
          discardReasonTitle: "放弃的原因是...",
          discardReason1: "不知道怎么用",
          discardReason2: "担心我的个人隐私",
          discardReason3: "觉得没有用处",
          mainTipsText:
            "请在安全环境安全设备使用本功能。在使用过程中,我们不会存储您的图像。",
          guidance: "指导",
          briefSummaryTitleFront: "恭喜您在",
          briefSummaryTitleAfter: "秒内完成了本次姿势矫正",
          sitMainPointsText1: "婴儿头高臀低,妈妈能看到婴儿的表情",
          sitMainPointsText2: "妈妈和婴儿应该腹胸相贴",
          sitMainPointsText3: "婴儿的头枕于妈妈手肘处,不要用手固定婴儿头部",
          sitMainPointsText4: "婴儿的耳、肩、臀成一条直线",
          sitMainPointsConfirmText: "好 的",
朱国瑞's avatar
朱国瑞 committed
204
          momLeft: "当未检测到您,将自动停止计时后续流程,停留5s后跳转至结束页面",
朱国瑞's avatar
朱国瑞 committed
205
          successStatusTips: "您的姿势正确,请继续保持大约20秒",
朱国瑞's avatar
朱国瑞 committed
206 207 208
          errorTitle: "Error message",
          keyErrorText: "Forbidden",
          originErrorText: "Not allowed by CORS"
朱国瑞's avatar
朱国瑞 committed
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
        }
      };
      let _englishLanguagePack = {
        tipsString: {
          initInitial: "Please adjust your posture",
          sittingUnrecognition:
            "No baby detected. Please follow the on-screen instructions",
          sittingBabyneckloc: "Make sure baby's neck is on your elbow",
          sittingBabyhead: "Do not restrict baby's head with your hands",
          sittingBabybackloc:
            "Make sure your forearm is supporting baby's back",
          sittingUpleft: "Raise your left arm",
          sittingUpright: "Raise your right arm",
          sittingDownleft: "Lower your left arm",
          sittingDownright: "Lower your right arm",
          sittingHeadupassdown:
            "Keep baby's head in higher position than the rest of the body",
          sittingBabystright:
            "Keep baby's ear, shoulder and butt at the same level",
          sittingBabyheadloc:
            "Make sure baby is facing the breast at proper height",
          nobabysittingBabyneckloc:
            "During actual breastfeeding, make sure baby's neck is on your elbow",
          nobabysittingHeadupassdown:
朱国瑞's avatar
朱国瑞 committed
233
            "During actual breastfeeding, keep baby's head in higher position than the rest of the body",
朱国瑞's avatar
朱国瑞 committed
234
          nobabysittingBabystright:
朱国瑞's avatar
朱国瑞 committed
235
            "During actual breastfeeding, keep baby's ear, shoulder and butt at the same level",
朱国瑞's avatar
朱国瑞 committed
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250

          /// 坐姿建议
          sittingSuggest: [
            "Adjust to a comfortable posture, and keep baby very close to you at all times",
            "Make sure baby is latched properly (mouth should fully cover the nipple and areola)",
            "Keep baby's chin close to your breast, and mouth fully covering the nipple and areola",
            "Tap top right icon to view more info",
            "Relax your shoulder",
            "There should be support to your hand, waist and feet when holding baby",
            "Keep relaxed until the end of session"
          ]
        },
        commonmemsg: {
          initialMassage:
            "Keep one meter away from the camera, and fit your body into the guide line. Session starts in 5 seconds…",
朱国瑞's avatar
朱国瑞 committed
251
          slogan: ""
朱国瑞's avatar
朱国瑞 committed
252 253
        },
        sittingMsg: {
朱国瑞's avatar
朱国瑞 committed
254 255 256 257 258 259 260 261 262 263 264
          babyneckloc: "Make sure baby's neck is on your elbow",
          babyhead: "Do not restrict baby's head with your hands",
          babybackloc: "Make sure your forearm is supporting baby's back",
          upleft: "Raise your left arm",
          upright: "Raise your right arm",
          downleft: "Lower your left arm",
          downright: "Lower your right arm",
          headupassdown:
            "Keep baby's head in higher position than the rest of the body",
          babystright: "Keep baby's ear, shoulder and butt at the same level",
          babyheadloc: "Make sure baby is facing the breast at proper height"
朱国瑞's avatar
朱国瑞 committed
265 266
        },
        sittingMsgPart: {
朱国瑞's avatar
朱国瑞 committed
267 268 269 270 271 272 273
          babyneckloc: "Make sure baby's neck is on your elbow",
          babyhead: "Do not restrict baby's head with your hands",
          babybackloc: "Make sure your forearm is supporting baby's back",
          headupassdown:
            "Keep baby's head in higher position than the rest of the body",
          babystright: "Keep baby's ear, shoulder and butt at the same level",
          babyheadloc: "Make sure baby is facing the breast at proper height"
朱国瑞's avatar
朱国瑞 committed
274 275 276 277 278
        },
        successmsg: {
          recordMessage:
            "You may start breastfeeding now! Timer starts in 3 seconds…",
          nobabyRecord:
朱国瑞's avatar
朱国瑞 committed
279
            "You have learned the correct posture. You may try this AI coach with your baby next time",
朱国瑞's avatar
朱国瑞 committed
280
          suggest: "Tap top right icon to view more info",
朱国瑞's avatar
朱国瑞 committed
281
          posSuccess: "Your posture is correct. Please keep it going"
朱国瑞's avatar
朱国瑞 committed
282 283
        },
        strings: {
朱国瑞's avatar
朱国瑞 committed
284
          suggestTitle: "During actual breastfeeding:",
朱国瑞's avatar
朱国瑞 committed
285
          suggestText1:
朱国瑞's avatar
朱国瑞 committed
286
            "Adjust to a comfortable posture, and keep baby very close to you at all times",
朱国瑞's avatar
朱国瑞 committed
287
          suggestText2:
朱国瑞's avatar
朱国瑞 committed
288
            "Make sure baby is latched properly (mouth should fully cover the nipple and areola); keep baby's chin close to your breast, and mouth fully covering the nipple and areola",
朱国瑞's avatar
朱国瑞 committed
289
          suggestText3:
朱国瑞's avatar
朱国瑞 committed
290 291
            "There should be support to your hand, waist and feet when holding baby",
          suggestText4: "Keep relaxed until the end of session",
朱国瑞's avatar
朱国瑞 committed
292 293
          suggestConfirmText: "OK",
          discardReasonTitle: "Reasons to give up?",
朱国瑞's avatar
朱国瑞 committed
294 295 296 297
          discardReason1: "Not sure how to use it",
          discardReason2: "Concern about my personal privacy",
          discardReason3: "Do not think it is helpful",
          mainTipsText:
朱国瑞's avatar
朱国瑞 committed
298 299
            "Your images and videos will only be used for AI coach recognition. They will not be stored.",
          guidance: "Tips",
朱国瑞's avatar
朱国瑞 committed
300
          briefSummaryTitleFront:
301
            "Congratulations! You have completed the session in ",
朱国瑞's avatar
朱国瑞 committed
302 303 304 305 306 307 308 309 310
          briefSummaryTitleAfter: " seconds",
          sitMainPointsText1:
            "Keep baby's head in higher position so you can see baby's face",
          sitMainPointsText2: "Keep baby very close to you",
          sitMainPointsText3:
            "Keep baby's neck on your elbow, and do not restrict baby's head with your hand",
          sitMainPointsText4:
            "Keep baby's ear, shoulder and butt at the same level",
          sitMainPointsConfirmText: "OK",
朱国瑞's avatar
朱国瑞 committed
311
          momLeft:
朱国瑞's avatar
朱国瑞 committed
312
            "No person detected. The finish page will be shown after 5 seconds",
朱国瑞's avatar
朱国瑞 committed
313
          successStatusTips:
朱国瑞's avatar
朱国瑞 committed
314
            "Correct! Please keep the posture for about 20 seconds",
朱国瑞's avatar
朱国瑞 committed
315 316 317
          errorTitle: "Error message",
          keyErrorText: "Forbidden",
          originErrorText: "Not allowed by CORS"
朱国瑞's avatar
朱国瑞 committed
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
        }
      };
      let _frenchLanguagePack = {
        tipsString: {
          initInitial: "Veuillez ajuster votre posture",
          sittingUnrecognition:
            "Aucun bébé détecté. Veuillez suivre les instructions à l'écran",
          sittingBabyneckloc:
            "Assurez-vous que le cou de bébé est sur votre coude",
          sittingBabyhead: "Ne limitez pas la tête de bébé avec vos mains",
          sittingBabybackloc:
            "Assurez-vous que votre avant-bras soutient le dos de bébé",
          sittingUpleft: "Levez votre bras gauche",
          sittingUpright: "Levez votre bras droit",
          sittingDownleft: "Abaissez votre bras gauche",
          sittingDownright: "Abaissez votre bras droit",
          sittingHeadupassdown:
            "Gardez la tête de bébé en position plus haute que le reste du corps",
          sittingBabystright:
            "Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
          sittingBabyheadloc:
            "Assurez-vous que bébé est face au sein à la bonne hauteur",
          nobabysittingBabyneckloc:
            "Pendant l'allaitement, assurez-vous que le cou du bébé est sur votre coude",
          nobabysittingHeadupassdown:
朱国瑞's avatar
朱国瑞 committed
343
            "Pendant l'allaitement, gardez la tête de bébé en position plus haute que le reste du corps",
朱国瑞's avatar
朱国瑞 committed
344
          nobabysittingBabystright:
朱国瑞's avatar
朱国瑞 committed
345
            "Pendant l'allaitement, gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
朱国瑞's avatar
朱国瑞 committed
346 347 348 349 350 351 352 353 354 355 356 357 358 359

          /// 坐姿建议
          sittingSuggest: [
            "Ajustez-vous à une posture confortable et gardez bébé très près de vous à tout moment",
            "Assurez-vous que le bébé prend correctement le sein (la bouche doit couvrir entièrement le mamelon et l'aréole)",
            "Gardez le menton de bébé près de votre sein, sa bouche couvrant entièrement le mamelon et l'aréole",
            "Appuyez sur l'icône en haut à droite pour afficher plus d'informations",
            "Détendez votre épaule",
            "Votre main, votre taille et vos pieds doivent être soutenus lorsque vous tenez bébé",
            "Restez détendu jusqu'à la fin de la séance"
          ]
        },
        commonmemsg: {
          initialMassage:
朱国瑞's avatar
朱国瑞 committed
360
            "Tenez-vous à un mètre de la caméra et placez votre corps dans la ligne de guidage. La session démarre dans 5 secondes…"
朱国瑞's avatar
朱国瑞 committed
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393
        },
        sittingMsg: {
          babyneckloc: "Assurez-vous que le cou de bébé est sur votre coude",
          babyhead: "Ne limitez pas la tête de bébé avec vos mains",
          babybackloc:
            "Assurez-vous que votre avant-bras soutient le dos de bébé",
          upleft: "Levez votre bras gauche",
          upright: "Levez votre bras droit",
          downleft: "Abaissez votre bras gauche",
          downright: "Abaissez votre bras droit",
          headupassdown:
            "Gardez la tête de bébé en position plus haute que le reste du corps",
          babystright:
            "Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
          babyheadloc:
            "Assurez-vous que bébé est face au sein à la bonne hauteur"
        },
        sittingMsgPart: {
          babyneckloc: "Assurez-vous que le cou de bébé est sur votre coude",
          babyhead: "Ne limitez pas la tête de bébé avec vos mains",
          babybackloc:
            "Assurez-vous que votre avant-bras soutient le dos de bébé",
          headupassdown:
            "Gardez la tête de bébé en position plus haute que le reste du corps",
          babystright:
            "Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
          babyheadloc:
            "Assurez-vous que bébé est face au sein à la bonne hauteur"
        },
        successmsg: {
          recordMessage:
            "Vous pouvez commencer à allaiter maintenant ! La minuterie démarre dans 3 secondes…",
          nobabyRecord:
朱国瑞's avatar
朱国瑞 committed
394
            "Vous avez appris la bonne posture. Vous pouvez essayer cet entraîneur AI avec votre bébé la prochaine fois",
朱国瑞's avatar
朱国瑞 committed
395 396
          suggest:
            "Appuyez sur l'icône en haut à droite pour afficher plus d'informations",
朱国瑞's avatar
朱国瑞 committed
397
          posSuccess: "Votre posture est correcte. Vous pouvez continuer"
朱国瑞's avatar
朱国瑞 committed
398 399
        },
        strings: {
400
          suggestTitle: "Pendant l'allaitement:",
朱国瑞's avatar
朱国瑞 committed
401
          suggestText1:
朱国瑞's avatar
朱国瑞 committed
402
            "Ajustez-vous à une posture confortable et gardez bébé très près de vous à tout moment",
朱国瑞's avatar
朱国瑞 committed
403
          suggestText2:
朱国瑞's avatar
朱国瑞 committed
404
            "Assurez-vous que le bébé prend correctement le sein (la bouche doit couvrir entièrement le mamelon et l'aréole); gardez le menton de bébé près de votre sein, sa bouche couvrant entièrement le mamelon et l'aréole",
朱国瑞's avatar
朱国瑞 committed
405
          suggestText3:
朱国瑞's avatar
朱国瑞 committed
406
            "Votre main, votre taille et vos pieds doivent être soutenus lorsque vous tenez bébé",
407
          suggestText4: "Restez détendu jusqu'à la fin de la séance",
朱国瑞's avatar
朱国瑞 committed
408 409
          suggestConfirmText: "OK.",
          discardReasonTitle: "Raisons d'abandonner?",
朱国瑞's avatar
朱国瑞 committed
410 411 412 413
          discardReason1: "Je ne sais pas comment l'utiliser",
          discardReason2: "Inquiétude pour ma vie privée",
          discardReason3: "Je ne pense pas que c'est utile",
          mainTipsText:
朱国瑞's avatar
朱国瑞 committed
414 415
            "Vos images et vidéos ne seront utilisées que pour la reconnaissance des coachs IA. Elles ne seront pas stockés.",
          guidance: "des astuces",
416 417
          briefSummaryTitleFront:
            "Toutes nos félicitations! Vous avez terminé la session en ",
朱国瑞's avatar
朱国瑞 committed
418
          briefSummaryTitleAfter: " secondes",
朱国瑞's avatar
朱国瑞 committed
419 420 421 422 423 424
          sitMainPointsText1:
            "Gardez la tête de bébé en position haute pour que vous puissiez voir le visage de bébé",
          sitMainPointsText2: "Gardez bébé très près de vous",
          sitMainPointsText3:
            "Gardez le cou de bébé sur votre coude et ne limitez pas la tête de bébé avec votre main",
          sitMainPointsText4:
朱国瑞's avatar
朱国瑞 committed
425
            "Gardez l'oreille, l'épaule et les fesses de bébé au même niveau",
朱国瑞's avatar
朱国瑞 committed
426
          sitMainPointsConfirmText: "OK",
朱国瑞's avatar
朱国瑞 committed
427
          momLeft:
朱国瑞's avatar
朱国瑞 committed
428
            "Aucune personne détectée. La page d'arrivée s'affichera après 5 secondes",
朱国瑞's avatar
朱国瑞 committed
429
          successStatusTips:
朱国瑞's avatar
朱国瑞 committed
430
            "Corriger! Veuillez garder la posture pendant environ 20 secondes",
朱国瑞's avatar
朱国瑞 committed
431 432 433
          errorTitle: "Message d'erreur",
          keyErrorText: "Forbidden",
          originErrorText: "Not allowed by CORS"
朱国瑞's avatar
朱国瑞 committed
434 435 436 437 438 439 440 441
        }
      };
      let _spanishLanguagePack = {
        tipsString: {
          initInitial: "Por favor, ajuste su postura",
          sittingUnrecognition:
            "Ningún bebé detectado. Siga las instrucciones mostradas en pantalla",
          sittingBabyneckloc:
朱国瑞's avatar
朱国瑞 committed
442 443
            "Asegúrese de que el cuello del bebé esté sobre su codo",
          sittingBabyhead: "No restrinja la cabeza del bebé con las manos",
朱国瑞's avatar
朱国瑞 committed
444
          sittingBabybackloc:
朱国瑞's avatar
朱国瑞 committed
445
            "Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
朱国瑞's avatar
朱国瑞 committed
446 447 448 449 450
          sittingUpleft: "Levante su brazo izquierdo",
          sittingUpright: "Levante su brazo derecho",
          sittingDownleft: "Baje su brazo izquierdo",
          sittingDownright: "Baje su brazo derecho",
          sittingHeadupassdown:
朱国瑞's avatar
朱国瑞 committed
451
            "Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
朱国瑞's avatar
朱国瑞 committed
452 453 454 455 456 457 458
          sittingBabystright:
            "Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
          sittingBabyheadloc:
            "Asegúrese de que el bebé esté frente al pecho a la altura adecuada",
          nobabysittingBabyneckloc:
            "Durante la lactancia real, asegúrese de que el cuello del bebé esté sobre su codo.",
          nobabysittingHeadupassdown:
朱国瑞's avatar
朱国瑞 committed
459
            "Durante la lactancia real, mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
朱国瑞's avatar
朱国瑞 committed
460
          nobabysittingBabystright:
朱国瑞's avatar
朱国瑞 committed
461
            "Durante la lactancia real, mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
朱国瑞's avatar
朱国瑞 committed
462 463 464

          /// 坐姿建议
          sittingSuggest: [
朱国瑞's avatar
朱国瑞 committed
465
            "Tome una postura cómoda y mantén al bebé muy cerca de usted en todo momento",
朱国瑞's avatar
朱国瑞 committed
466
            "Asegúrese de que el bebé esté bien sujeto (la boca debe cubrir completamente el pezón y la areola)",
朱国瑞's avatar
朱国瑞 committed
467
            "Mantenga la barbilla del bebé cerca de su seno y la boca cubriendo completamente el pezón y la areola",
朱国瑞's avatar
朱国瑞 committed
468 469
            "Toque el icono superior derecho para ver más información",
            "Relaje su hombro",
朱国瑞's avatar
朱国瑞 committed
470 471
            "Debe haber apoyo en su mano, su cintura y sus pies al sostener al bebé",
            "Manténgase relajada hasta el final de la sesión"
朱国瑞's avatar
朱国瑞 committed
472 473 474 475
          ]
        },
        commonmemsg: {
          initialMassage:
朱国瑞's avatar
朱国瑞 committed
476
            "Manténgase a un metro de distancia de la cámara y coloque su cuerpo en la línea. La sesión comienza en 5 segundos..."
朱国瑞's avatar
朱国瑞 committed
477 478
        },
        sittingMsg: {
479
          babyneckloc: "Asegúrese de que el cuello del bebé esté sobre su codo",
朱国瑞's avatar
朱国瑞 committed
480
          babyhead: "No restrinja la cabeza del bebé con las manos",
朱国瑞's avatar
朱国瑞 committed
481
          babybackloc:
朱国瑞's avatar
朱国瑞 committed
482
            "Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
朱国瑞's avatar
朱国瑞 committed
483 484 485 486 487
          upleft: "Levante su brazo izquierdo",
          upright: "Levante su brazo derecho",
          downleft: "Baje su brazo izquierdo",
          downright: "Baje su brazo derecho",
          headupassdown:
朱国瑞's avatar
朱国瑞 committed
488
            "Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
朱国瑞's avatar
朱国瑞 committed
489 490 491 492 493 494
          babystright:
            "Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
          babyheadloc:
            "Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
        },
        sittingMsgPart: {
495
          babyneckloc: "Asegúrese de que el cuello del bebé esté sobre su codo",
朱国瑞's avatar
朱国瑞 committed
496 497
          babyhead: "No restrinja la cabeza del bebé con las manos.",
          babybackloc:
朱国瑞's avatar
朱国瑞 committed
498
            "Asegúrese de que su antebrazo esté sosteniendo la espalda del bebé",
朱国瑞's avatar
朱国瑞 committed
499
          headupassdown:
朱国瑞's avatar
朱国瑞 committed
500
            "Mantenga la cabeza del bebé en una posición más alta que el resto del cuerpo",
朱国瑞's avatar
朱国瑞 committed
501 502 503 504 505 506 507 508 509
          babystright:
            "Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
          babyheadloc:
            "Asegúrese de que el bebé esté frente al pecho a la altura adecuada"
        },
        successmsg: {
          recordMessage:
            "¡Puede comenzar a darle el pecho ahora! El temporizador comienza en 3 segundos...",
          nobabyRecord:
朱国瑞's avatar
朱国瑞 committed
510
            "Ha aprendido la postura correcta. Puede probar este asistente de IA con su bebé la próxima vez",
朱国瑞's avatar
朱国瑞 committed
511
          suggest: "Toque el icono superior derecho para ver más información",
朱国瑞's avatar
朱国瑞 committed
512
          posSuccess: "Su postura es correcta. Por favor, sigua así"
朱国瑞's avatar
朱国瑞 committed
513 514
        },
        strings: {
朱国瑞's avatar
朱国瑞 committed
515
          suggestTitle: "Durante la lactancia real:",
朱国瑞's avatar
朱国瑞 committed
516
          suggestText1:
朱国瑞's avatar
朱国瑞 committed
517
            "Tome una postura cómoda y mantén al bebé muy cerca de usted en todo momento",
朱国瑞's avatar
朱国瑞 committed
518
          suggestText2:
朱国瑞's avatar
朱国瑞 committed
519
            "Asegúrese de que el bebé esté bien sujeto (la boca debe cubrir completamente el pezón y la areola); mantenga la barbilla del bebé cerca de su seno y la boca cubriendo completamente el pezón y la areola",
朱国瑞's avatar
朱国瑞 committed
520
          suggestText3:
朱国瑞's avatar
朱国瑞 committed
521 522
            "Debe haber apoyo en su mano, su cintura y sus pies al sostener al bebé",
          suggestText4: "Manténgase relajada hasta el final de la sesión",
朱国瑞's avatar
朱国瑞 committed
523 524
          suggestConfirmText: "DE ACUERDO",
          discardReasonTitle: "Razones para rendirse?",
朱国瑞's avatar
朱国瑞 committed
525 526 527 528
          discardReason1: "No estoy segura de cómo usarlo",
          discardReason2: "Preocupación por mi privacidad",
          discardReason3: "No creo que sea útil",
          mainTipsText:
朱国瑞's avatar
朱国瑞 committed
529 530
            "Sus imágenes y videos solo se utilizarán para el reconocimiento del asistente de IA. No se almacenarán.",
          guidance: "consejos",
531
          briefSummaryTitleFront: "¡Felicidades! Has completado la sesión en ",
朱国瑞's avatar
朱国瑞 committed
532
          briefSummaryTitleAfter: " segundos",
朱国瑞's avatar
朱国瑞 committed
533 534 535 536
          sitMainPointsText1:
            "Mantenga la cabeza del bebé en una posición más alta para que pueda ver la cara del bebé",
          sitMainPointsText2: "Mantenga al bebé muy cerca de usted",
          sitMainPointsText3:
朱国瑞's avatar
朱国瑞 committed
537
            "Mantenga el cuello del bebé sobre su codo y no restrinja la cabeza del bebé con su mano",
朱国瑞's avatar
朱国瑞 committed
538 539 540
          sitMainPointsText4:
            "Mantenga la oreja, el hombro y el trasero del bebé al mismo nivel",
          sitMainPointsConfirmText: "DE ACUERDO",
朱国瑞's avatar
朱国瑞 committed
541
          momLeft:
朱国瑞's avatar
朱国瑞 committed
542
            "No se detectó ninguna persona. La página de finalización se mostrará después de 5 segundos",
朱国瑞's avatar
朱国瑞 committed
543
          successStatusTips:
朱国瑞's avatar
朱国瑞 committed
544
            "¡Correcto! Mantenga la postura durante unos 20 segundos",
朱国瑞's avatar
朱国瑞 committed
545 546 547
          errorTitle: "Mensaje de error",
          keyErrorText: "Forbidden",
          originErrorText: "Not allowed by CORS"
朱国瑞's avatar
朱国瑞 committed
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586
        }
      };
      switch (this.currentLanguage) {
        case 0:
          localStorage.setItem(
            "languagePack",
            JSON.stringify(_englishLanguagePack)
          );
          break;
        case 1:
          localStorage.setItem(
            "languagePack",
            JSON.stringify(_frenchLanguagePack)
          );
          break;
        case 2:
          localStorage.setItem(
            "languagePack",
            JSON.stringify(_spanishLanguagePack)
          );
          break;
        // case 3:
        //   _prefs.setString("languagePack", json.encode(_spanishLanguagePack));
        //   break;
        default:
      }
    },
    clickLanguage(index) {
      this.showPopup = false;
      this.currentLanguage = index;
      let lang = "zh";
      if (index === 0) {
        lang = "en";
      } else if (index === 1) {
        lang = "fr";
      } else if (index === 2) {
        lang = "es";
      }
      this.$i18n.locale = lang;
朱国瑞's avatar
朱国瑞 committed
587
      localStorage.setItem("lang", lang);
朱国瑞's avatar
朱国瑞 committed
588
    },
朱国瑞's avatar
朱国瑞 committed
589 590 591
    clickConfirm() {
      this.showNoCameraDialog = false;
    },
朱国瑞's avatar
朱国瑞 committed
592 593 594 595 596 597
    async clickAuthCamera() {
      this.setLanguagePack();
      if (this.showNoCameraDialog) {
        this.showNoCameraDialog = false;
      }
      let { camera } = await authCamera(0);
598
      console.log(import.meta.env);
朱国瑞's avatar
朱国瑞 committed
599

朱国瑞's avatar
朱国瑞 committed
600
      if (camera) {
601 602 603
        let apiKey = "DLAB-customername-12345687";
        let env = import.meta.env.VITE_TRACKING_ENV;
        console.log(env);
朱国瑞's avatar
朱国瑞 committed
604
        let aiParams = {
605
          env: env,
朱国瑞's avatar
朱国瑞 committed
606
          apiKey: apiKey,
朱国瑞's avatar
朱国瑞 committed
607
          region: "apac"
608
        };
朱国瑞's avatar
朱国瑞 committed
609
        localStorage.setItem("aiParams", JSON.stringify(aiParams));
朱国瑞's avatar
朱国瑞 committed
610 611
        let openDev = this.$route.query.openDev;
        localStorage.setItem(
612
          "completeUrl",
朱国瑞's avatar
朱国瑞 committed
613
          "https://bfai-service-apac-uat.d-lab-services.danone.com/demo/#/complete"
朱国瑞's avatar
朱国瑞 committed
614
        );
615
        localStorage.setItem("incompleteUrl", document.URL);
朱国瑞's avatar
朱国瑞 committed
616
        let url =
617
          "https://bfai-service-apac-uat.d-lab-services.danone.com/sdk/#/";
朱国瑞's avatar
朱国瑞 committed
618 619 620 621
        if (openDev) {
          url = url + "&openDev=true";
        }
        window.location.href = url;
朱国瑞's avatar
朱国瑞 committed
622 623 624 625 626 627
      } else {
        this.showNoCameraDialog = true;
      }
    }
  },
  created() {
朱国瑞's avatar
朱国瑞 committed
628 629 630 631 632 633 634
    document.body.addEventListener(
      "touchmove",
      function (e) {
        e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)
      },
      { passive: false }
    ); //passive 参数不能省略,用来兼容ios和android
朱国瑞's avatar
朱国瑞 committed
635 636 637 638 639
    let { scale } = getSystemInfo();
    if (scale > 1 && scale < 2) {
      this.scale = 1 - (scale - 1) / 100;
      console.log(this.scale);
    }
朱国瑞's avatar
朱国瑞 committed
640 641 642 643
    this.$i18n.locale = "en";
    this._isMobile = isMobile();
    if (!isMobile()) {
      document.getElementsByTagName("body")[0].style.minWidth = "750px";
朱国瑞's avatar
朱国瑞 committed
644 645
      this.topHeiht = calcCoord({ minTop: 459, maxTop: 571.3 }).top;
      this.topHeiht = 521.3;
朱国瑞's avatar
朱国瑞 committed
646
    } else {
朱国瑞's avatar
朱国瑞 committed
647
      this.topHeiht = calcCoord({ minTop: 918, maxTop: 1142.6 }).top;
朱国瑞's avatar
朱国瑞 committed
648 649 650
    }

    if (!this._isMobile) {
朱国瑞's avatar
朱国瑞 committed
651
      this.topHeiht = this.topHeiht + "px";
朱国瑞's avatar
朱国瑞 committed
652 653 654 655 656 657
      this.cL = calcCoord({ minTop: 23.5, maxTop: 25.5 }).top + "px";
      this.cT = calcCoord({ minTop: 23.5, maxTop: 33.5 }).top + "px";
      this.cB = calcCoord({ minTop: 20, maxTop: 40 }).top + "px";
      this.cTs = calcCoord({ minTop: 20, maxTop: 30 }).top + "px"; // title fontsize
      this.cTb = calcCoord({ minTop: 15, maxTop: 15 }).top + "px"; // title bottom
      this.cCs = calcCoord({ minTop: 10, maxTop: 20 }).top + "px"; // content
朱国瑞's avatar
朱国瑞 committed
658 659 660 661 662 663 664 665 666 667
    } else {
      this.topHeiht = this.topHeiht / 75 + "rem";
      this.cL = calcCoord({ minTop: 47, maxTop: 51 }).top / 75 + "rem";
      this.cT = calcCoord({ minTop: 47, maxTop: 67 }).top / 75 + "rem";
      this.cB = calcCoord({ minTop: 40, maxTop: 80 }).top / 75 + "rem";
      this.cTs = calcCoord({ minTop: 40, maxTop: 60 }).top / 75 + "rem"; // title fontsize
      this.cTb = calcCoord({ minTop: 30, maxTop: 30 }).top / 75 + "rem"; // title bottom
      this.cCs = calcCoord({ minTop: 20, maxTop: 40 }).top / 75 + "rem"; // content
    }
  },
朱国瑞's avatar
朱国瑞 committed
668 669 670 671 672
  mounted() {
    window.onresize = () => {
      return (() => {})();
    };
  }
朱国瑞's avatar
朱国瑞 committed
673 674 675 676 677 678 679 680
};
</script>

<style lang="scss" scoped>
.page {
  background: #000;
  display: flex;
  justify-content: center;
朱国瑞's avatar
朱国瑞 committed
681
  height: 100%;
朱国瑞's avatar
朱国瑞 committed
682
}
朱国瑞's avatar
朱国瑞 committed
683
.pc {
朱国瑞's avatar
朱国瑞 committed
684 685
  height: 100vh;
  align-items: center;
朱国瑞's avatar
朱国瑞 committed
686
  .main_content {
朱国瑞's avatar
朱国瑞 committed
687 688
    width: 375px;
    height: 667px;
朱国瑞's avatar
朱国瑞 committed
689 690 691 692 693 694
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
朱国瑞's avatar
朱国瑞 committed
695

朱国瑞's avatar
朱国瑞 committed
696
    .global_box {
朱国瑞's avatar
朱国瑞 committed
697
      width: 31px;
朱国瑞's avatar
朱国瑞 committed
698
      position: absolute;
朱国瑞's avatar
朱国瑞 committed
699
      right: 9px;
朱国瑞's avatar
朱国瑞 committed
700
      top: 10px;
朱国瑞's avatar
朱国瑞 committed
701 702 703 704
      z-index: 10;
      .global_img {
        width: 100%;
      }
朱国瑞's avatar
朱国瑞 committed
705

朱国瑞's avatar
朱国瑞 committed
706
      .popup-box {
朱国瑞's avatar
朱国瑞 committed
707 708
        width: 70px;
        height: 75px;
朱国瑞's avatar
朱国瑞 committed
709
        position: absolute;
朱国瑞's avatar
朱国瑞 committed
710 711 712
        right: -4.5px;
        top: 36px;
        padding-top: 6px;
朱国瑞's avatar
朱国瑞 committed
713 714
        box-sizing: border-box;
        overflow: hidden;
朱国瑞's avatar
朱国瑞 committed
715
        border-radius: 6px;
朱国瑞's avatar
朱国瑞 committed
716
        .popup_bg {
朱国瑞's avatar
朱国瑞 committed
717
          position: absolute;
朱国瑞's avatar
朱国瑞 committed
718 719
          left: 0;
          top: 0;
朱国瑞's avatar
朱国瑞 committed
720
          width: 70px;
朱国瑞's avatar
朱国瑞 committed
721 722 723
        }
        .poup-item {
          position: relative;
朱国瑞's avatar
朱国瑞 committed
724 725
          height: 22.5px;
          font-size: 10px;
朱国瑞's avatar
朱国瑞 committed
726 727 728
          font-family: Source Han Sans SC;
          font-weight: 500;
          color: #303030;
朱国瑞's avatar
朱国瑞 committed
729
          line-height: 22.5px;
朱国瑞's avatar
朱国瑞 committed
730 731 732 733 734
          display: flex;
          align-items: center;
          justify-content: start;
          cursor: pointer;
          img {
朱国瑞's avatar
朱国瑞 committed
735 736 737
            width: 7px;
            margin-left: 9.5px;
            margin-right: 5.5px;
朱国瑞's avatar
朱国瑞 committed
738 739
          }
          div {
朱国瑞's avatar
朱国瑞 committed
740 741 742
            width: 7px;
            margin-left: 9.5px;
            margin-right: 5.5px;
朱国瑞's avatar
朱国瑞 committed
743
          }
朱国瑞's avatar
朱国瑞 committed
744 745
          &.active {
            color: #f68682;
朱国瑞's avatar
朱国瑞 committed
746 747 748
          }
        }
      }
朱国瑞's avatar
朱国瑞 committed
749 750 751 752
    }
    .top {
      position: relative;
      width: 100%;
朱国瑞's avatar
朱国瑞 committed
753 754
      background: url("../assets/images/gesture/introduceBg.png") no-repeat top
        center;
朱国瑞's avatar
朱国瑞 committed
755 756
      overflow: hidden;
      .page_bg {
朱国瑞's avatar
朱国瑞 committed
757
        width: 100%;
朱国瑞's avatar
朱国瑞 committed
758 759 760 761 762 763
        position: absolute;
        left: 0;
        top: 0;
      }

      .page_title {
朱国瑞's avatar
朱国瑞 committed
764
        font-size: 21px;
朱国瑞's avatar
朱国瑞 committed
765 766 767
        font-family: Source Han Sans SC;
        font-weight: bold;
        color: #f68682;
朱国瑞's avatar
朱国瑞 committed
768
        line-height: 30px;
朱国瑞's avatar
朱国瑞 committed
769 770
        // -webkit-text-stroke: 1px #fff9fb;
        // text-stroke: 1px #fff9fb;
朱国瑞's avatar
朱国瑞 committed
771 772 773
        width: 100%;
        position: absolute;
        left: 0;
朱国瑞's avatar
朱国瑞 committed
774
        top: 58px;
朱国瑞's avatar
朱国瑞 committed
775 776 777 778 779 780 781 782 783
        z-index: 2;
      }
      .picture-box {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        .page_bg2 {
朱国瑞's avatar
朱国瑞 committed
784 785 786
          width: 100%;
          position: absolute;
          left: 0;
朱国瑞's avatar
朱国瑞 committed
787
          top: 50px;
朱国瑞's avatar
朱国瑞 committed
788 789
        }

朱国瑞's avatar
朱国瑞 committed
790
        .page_tips {
朱国瑞's avatar
朱国瑞 committed
791
          font-size: 12px;
朱国瑞's avatar
朱国瑞 committed
792 793
          color: #7d7c7a;
          text-align: left;
朱国瑞's avatar
朱国瑞 committed
794 795
          word-wrap: break-word;
          hyphens: auto;
朱国瑞's avatar
朱国瑞 committed
796
          &.page_tips_1 {
朱国瑞's avatar
朱国瑞 committed
797
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
798 799 800
            top: 165px;
            left: 50px;
            width: 130px;
朱国瑞's avatar
朱国瑞 committed
801
          }
朱国瑞's avatar
朱国瑞 committed
802 803
          &.page_tips_2 {
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
804 805
            width: 215px;
            left: 155px;
朱国瑞's avatar
朱国瑞 committed
806
            top: 356px;
朱国瑞's avatar
朱国瑞 committed
807
          }
朱国瑞's avatar
朱国瑞 committed
808 809
          &.page_tips_3 {
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
810 811 812
            width: 265px;
            left: 55px;
            top: 445px;
朱国瑞's avatar
朱国瑞 committed
813 814 815 816 817
          }
        }
      }
      &.small {
        .page_title {
朱国瑞's avatar
朱国瑞 committed
818
          top: 20px;
朱国瑞's avatar
朱国瑞 committed
819
        }
朱国瑞's avatar
朱国瑞 committed
820 821 822 823
        .page_bg2 {
          width: 60%;
          position: absolute;
          left: 20%;
朱国瑞's avatar
朱国瑞 committed
824
          top: 30px;
朱国瑞's avatar
朱国瑞 committed
825 826
        }
        .page_tips {
朱国瑞's avatar
朱国瑞 committed
827
          font-size: 10px;
朱国瑞's avatar
朱国瑞 committed
828 829
          &.page_tips_1 {
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
830 831 832
            top: 96px;
            left: calc(20% + 27.4987px);
            width: 130.0012px;
朱国瑞's avatar
朱国瑞 committed
833
          }
朱国瑞's avatar
朱国瑞 committed
834
          &.page_tips_2 {
朱国瑞's avatar
朱国瑞 committed
835
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
836 837 838
            width: 215px;
            left: calc(20% + 92px);
            top: 212px;
朱国瑞's avatar
朱国瑞 committed
839
          }
朱国瑞's avatar
朱国瑞 committed
840 841
          &.page_tips_3 {
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
842 843 844
            width: 265px;
            left: calc(20% + 30px);
            top: 264px;
朱国瑞's avatar
朱国瑞 committed
845 846 847
          }
        }
      }
朱国瑞's avatar
朱国瑞 committed
848 849 850
    }
    .bottom {
      flex: 1;
朱国瑞's avatar
朱国瑞 committed
851
      width: 375px;
朱国瑞's avatar
朱国瑞 committed
852
      display: flex;
朱国瑞's avatar
朱国瑞 committed
853
      justify-content: center;
朱国瑞's avatar
朱国瑞 committed
854 855 856
      align-items: center;
      position: relative;
      .bottomBtn {
朱国瑞's avatar
朱国瑞 committed
857 858
        display: flex;
        flex-direction: column;
朱国瑞's avatar
朱国瑞 committed
859
        justify-content: center;
朱国瑞's avatar
朱国瑞 committed
860
        align-items: center;
朱国瑞's avatar
朱国瑞 committed
861 862
        position: absolute;
        .bottom-tips {
朱国瑞's avatar
朱国瑞 committed
863 864
          margin-top: 10px;
          font-size: 12px;
朱国瑞's avatar
朱国瑞 committed
865
          color: #999999;
朱国瑞's avatar
朱国瑞 committed
866 867
        }
      }
朱国瑞's avatar
朱国瑞 committed
868 869 870 871 872 873
    }
    .no_camera_dialog {
      position: fixed;
      left: 0;
      top: 0;
      width: 100vw;
朱国瑞's avatar
朱国瑞 committed
874
      height: calc(var(--vh, 1vh) * 100);
朱国瑞's avatar
朱国瑞 committed
875 876 877
      display: flex;
      align-items: center;
      justify-content: center;
朱国瑞's avatar
朱国瑞 committed
878
      z-index: 99;
朱国瑞's avatar
朱国瑞 committed
879 880
      &_mask {
        position: absolute;
朱国瑞's avatar
朱国瑞 committed
881 882 883
        left: 0;
        top: 0;
        width: 100vw;
朱国瑞's avatar
朱国瑞 committed
884
        height: calc(var(--vh, 1vh) * 100);
朱国瑞's avatar
朱国瑞 committed
885 886 887 888
        background: rgba(0, 0, 0, 0.5);
        z-index: 0;
      }
      &_content {
朱国瑞's avatar
朱国瑞 committed
889 890
        width: 296.5px;
        min-height: 248px;
朱国瑞's avatar
朱国瑞 committed
891
        background: #ffffff;
朱国瑞's avatar
朱国瑞 committed
892
        border-radius: 8px;
朱国瑞's avatar
朱国瑞 committed
893 894 895 896 897 898
        z-index: 1;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
朱国瑞's avatar
朱国瑞 committed
899
        padding: 22px 0 32px 0;
朱国瑞's avatar
朱国瑞 committed
900 901
      }
      &_title {
朱国瑞's avatar
朱国瑞 committed
902
        font-size: 23px;
朱国瑞's avatar
朱国瑞 committed
903 904 905 906
        line-height: 1.2;
        font-family: Source Han Sans SC;
        font-weight: 500;
        color: #000000;
朱国瑞's avatar
朱国瑞 committed
907
        width: 228px;
朱国瑞's avatar
朱国瑞 committed
908
        text-align: center;
朱国瑞's avatar
朱国瑞 committed
909
        margin-bottom: 26px;
朱国瑞's avatar
朱国瑞 committed
910 911
      }
      &_text_content {
朱国瑞's avatar
朱国瑞 committed
912
        width: 250px;
朱国瑞's avatar
朱国瑞 committed
913
        text-align: left;
朱国瑞's avatar
朱国瑞 committed
914
        font-size: 20px;
朱国瑞's avatar
朱国瑞 committed
915 916 917
        font-family: Source Han Sans SC;
        font-weight: 400;
        color: #010101;
朱国瑞's avatar
朱国瑞 committed
918 919
        line-height: 33px;
        margin-bottom: 41.5px;
朱国瑞's avatar
朱国瑞 committed
920 921
      }
      &_button {
朱国瑞's avatar
朱国瑞 committed
922 923
        width: 215.5px;
        height: 34.5px;
朱国瑞's avatar
朱国瑞 committed
924 925 926
        display: flex;
        align-items: center;
        justify-content: center;
朱国瑞's avatar
朱国瑞 committed
927 928 929 930
        position: relative;
        &_bg {
          width: 100%;
          height: 100%;
朱国瑞's avatar
朱国瑞 committed
931 932 933 934
          position: absolute;
          left: 0;
          top: 0;
        }
朱国瑞's avatar
朱国瑞 committed
935
        &_text {
朱国瑞's avatar
朱国瑞 committed
936
          font-size: 16.5px;
朱国瑞's avatar
朱国瑞 committed
937 938
          font-family: Source Han Sans SC;
          font-weight: 500;
朱国瑞's avatar
朱国瑞 committed
939 940
          color: #ffffff;
          z-index: 1;
朱国瑞's avatar
朱国瑞 committed
941 942 943 944 945
        }
      }
    }
  }
}
朱国瑞's avatar
朱国瑞 committed
946 947 948
.mobile {
  .main_content {
    width: 10rem;
朱国瑞's avatar
朱国瑞 committed
949
    height: calc(var(--vh, 1vh) * 100);
朱国瑞's avatar
朱国瑞 committed
950 951 952 953
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
朱国瑞's avatar
朱国瑞 committed
954
    justify-content: space-between;
朱国瑞's avatar
朱国瑞 committed
955
    align-items: center;
朱国瑞's avatar
朱国瑞 committed
956

朱国瑞's avatar
朱国瑞 committed
957 958 959 960
    .global_box {
      width: 0.8267rem;
      position: absolute;
      right: 0.24rem;
朱国瑞's avatar
朱国瑞 committed
961
      top: 0.1333rem;
朱国瑞's avatar
朱国瑞 committed
962 963 964 965
      z-index: 10;
      .global_img {
        width: 100%;
      }
朱国瑞's avatar
朱国瑞 committed
966

朱国瑞's avatar
朱国瑞 committed
967 968 969
      .popup-box {
        width: 1.8667rem;
        height: 2rem;
朱国瑞's avatar
朱国瑞 committed
970
        position: absolute;
朱国瑞's avatar
朱国瑞 committed
971 972 973 974 975 976 977
        right: -0.12rem;
        top: 0.96rem;
        padding-top: 0.16rem;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 0.16rem;
        .popup_bg {
朱国瑞's avatar
朱国瑞 committed
978
          position: absolute;
朱国瑞's avatar
朱国瑞 committed
979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003
          left: 0;
          top: 0;
          width: 1.8667rem;
        }
        .poup-item {
          position: relative;
          height: 0.6rem;
          font-size: 0.2667rem;
          font-family: Source Han Sans SC;
          font-weight: 500;
          color: #303030;
          line-height: 0.6rem;
          display: flex;
          align-items: center;
          justify-content: start;
          cursor: pointer;
          img {
            width: 0.1867rem;
            margin-left: 0.2533rem;
            margin-right: 0.1467rem;
          }
          div {
            width: 0.1867rem;
            margin-left: 0.2533rem;
            margin-right: 0.1467rem;
朱国瑞's avatar
朱国瑞 committed
1004
          }
朱国瑞's avatar
朱国瑞 committed
1005 1006
          &.active {
            color: #f68682;
朱国瑞's avatar
朱国瑞 committed
1007 1008 1009
          }
        }
      }
朱国瑞's avatar
朱国瑞 committed
1010 1011 1012 1013 1014 1015 1016
    }
    .top {
      position: relative;
      width: 100%;
      background: url("../assets/images/gesture/introduceBg.png") no-repeat top
        center;
      overflow: hidden;
朱国瑞's avatar
朱国瑞 committed
1017
      flex: 1;
朱国瑞's avatar
朱国瑞 committed
1018
      .page_bg {
朱国瑞's avatar
朱国瑞 committed
1019
        width: 100%;
朱国瑞's avatar
朱国瑞 committed
1020 1021 1022 1023 1024 1025
        position: absolute;
        left: 0;
        top: 0;
      }

      .page_title {
朱国瑞's avatar
朱国瑞 committed
1026
        font-size: 0.28rem;
朱国瑞's avatar
朱国瑞 committed
1027 1028 1029 1030
        font-family: Source Han Sans SC;
        font-weight: bold;
        color: #f68682;
        line-height: 0.8rem;
朱国瑞's avatar
朱国瑞 committed
1031 1032
        // -webkit-text-stroke: 0.0267rem #fff9fb;
        // text-stroke: 0.0267rem #fff9fb;
朱国瑞's avatar
朱国瑞 committed
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045
        width: 100%;
        position: absolute;
        left: 0;
        top: 1.5467rem;
        z-index: 2;
      }
      .picture-box {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        .page_bg2 {
朱国瑞's avatar
朱国瑞 committed
1046 1047 1048
          width: 100%;
          position: absolute;
          left: 0;
朱国瑞's avatar
朱国瑞 committed
1049
          top: 1.3333rem;
朱国瑞's avatar
朱国瑞 committed
1050 1051
        }

朱国瑞's avatar
朱国瑞 committed
1052
        .page_tips {
朱国瑞's avatar
朱国瑞 committed
1053
          font-size: 0.2933rem;
朱国瑞's avatar
朱国瑞 committed
1054 1055
          color: #7d7c7a;
          text-align: left;
朱国瑞's avatar
朱国瑞 committed
1056
          font-weight: bold;
朱国瑞's avatar
朱国瑞 committed
1057 1058
          white-space: pre-line;
          &.page_tips_1 {
朱国瑞's avatar
朱国瑞 committed
1059
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
1060 1061 1062
            top: 4.4rem;
            left: 1.3333rem;
            width: 3.4667rem;
朱国瑞's avatar
朱国瑞 committed
1063
          }
朱国瑞's avatar
朱国瑞 committed
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074
          &.page_tips_2 {
            position: absolute;
            width: 5.7333rem;
            left: 4.1333rem;
            top: 9.4933rem;
          }
          &.page_tips_3 {
            position: absolute;
            width: 7.0667rem;
            left: 1.4667rem;
            top: 11.8667rem;
朱国瑞's avatar
朱国瑞 committed
1075 1076
          }
        }
朱国瑞's avatar
朱国瑞 committed
1077 1078 1079
      }
      &.small {
        .page_bg2 {
朱国瑞's avatar
朱国瑞 committed
1080
          width: 80%;
朱国瑞's avatar
朱国瑞 committed
1081
          position: absolute;
朱国瑞's avatar
朱国瑞 committed
1082
          left: 10%;
朱国瑞's avatar
朱国瑞 committed
1083 1084 1085 1086 1087 1088
          top: 0.8rem;
        }
        .page_tips {
          font-size: 0.2667rem;
          &.page_tips_1 {
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
1089 1090
            top: 3.3067rem;
            left: calc(10% + 1.0667rem);
朱国瑞's avatar
朱国瑞 committed
1091
            width: 3.4667rem;
朱国瑞's avatar
朱国瑞 committed
1092
          }
朱国瑞's avatar
朱国瑞 committed
1093
          &.page_tips_2 {
朱国瑞's avatar
朱国瑞 committed
1094
            position: absolute;
朱国瑞's avatar
朱国瑞 committed
1095
            width: 5.7333rem;
朱国瑞's avatar
朱国瑞 committed
1096 1097
            left: calc(10% + 3.2rem);
            top: 7.36rem;
朱国瑞's avatar
朱国瑞 committed
1098
          }
朱国瑞's avatar
朱国瑞 committed
1099 1100 1101
          &.page_tips_3 {
            position: absolute;
            width: 7.0667rem;
朱国瑞's avatar
朱国瑞 committed
1102 1103
            left: calc(10% + 1.0667rem);
            top: 9.28rem;
朱国瑞's avatar
朱国瑞 committed
1104 1105 1106
          }
        }
      }
朱国瑞's avatar
朱国瑞 committed
1107 1108 1109 1110 1111
    }
    .bottom {
      flex: 1;
      width: 10rem;
      display: flex;
朱国瑞's avatar
朱国瑞 committed
1112
      justify-content: center;
朱国瑞's avatar
朱国瑞 committed
1113 1114
      align-items: center;
      position: relative;
朱国瑞's avatar
朱国瑞 committed
1115 1116
      min-height: 3rem;
      max-height: 3.4rem;
朱国瑞's avatar
朱国瑞 committed
1117
      .bottomBtn {
朱国瑞's avatar
朱国瑞 committed
1118
        display: flex;
朱国瑞's avatar
朱国瑞 committed
1119
        justify-content: center;
朱国瑞's avatar
朱国瑞 committed
1120
        align-items: center;
朱国瑞's avatar
朱国瑞 committed
1121 1122 1123 1124
        .bottom-tips {
          margin-top: 0.2667rem;
          font-size: 0.32rem;
          color: #999999;
朱国瑞's avatar
朱国瑞 committed
1125 1126
        }
      }
朱国瑞's avatar
朱国瑞 committed
1127 1128 1129 1130 1131 1132
    }
    .no_camera_dialog {
      position: fixed;
      left: 0;
      top: 0;
      width: 100vw;
朱国瑞's avatar
朱国瑞 committed
1133
      height: calc(var(--vh, 1vh) * 100);
朱国瑞's avatar
朱国瑞 committed
1134 1135 1136
      display: flex;
      align-items: center;
      justify-content: center;
朱国瑞's avatar
朱国瑞 committed
1137
      z-index: 99;
朱国瑞's avatar
朱国瑞 committed
1138 1139
      &_mask {
        position: absolute;
朱国瑞's avatar
朱国瑞 committed
1140 1141 1142
        left: 0;
        top: 0;
        width: 100vw;
朱国瑞's avatar
朱国瑞 committed
1143
        height: calc(var(--vh, 1vh) * 100);
朱国瑞's avatar
朱国瑞 committed
1144 1145 1146 1147 1148
        background: rgba(0, 0, 0, 0.5);
        z-index: 0;
      }
      &_content {
        width: 7.9067rem;
朱国瑞's avatar
朱国瑞 committed
1149
        min-height: 6.6133rem;
朱国瑞's avatar
朱国瑞 committed
1150 1151 1152 1153 1154 1155 1156 1157
        background: #ffffff;
        border-radius: 0.2133rem;
        z-index: 1;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
朱国瑞's avatar
朱国瑞 committed
1158
        padding: 0.5867rem 0 0.8533rem 0;
朱国瑞's avatar
朱国瑞 committed
1159 1160 1161 1162 1163 1164 1165 1166
      }
      &_title {
        font-size: 0.6133rem;
        line-height: 1.2;
        font-family: Source Han Sans SC;
        font-weight: 500;
        color: #000000;
        width: 6.08rem;
朱国瑞's avatar
朱国瑞 committed
1167 1168 1169 1170 1171
        text-align: center;
        margin-bottom: 0.6933rem;
      }
      &_text_content {
        width: 6.6667rem;
朱国瑞's avatar
朱国瑞 committed
1172
        text-align: left;
朱国瑞's avatar
朱国瑞 committed
1173 1174 1175 1176 1177 1178
        font-size: 0.5333rem;
        font-family: Source Han Sans SC;
        font-weight: 400;
        color: #010101;
        line-height: 0.88rem;
        margin-bottom: 1.1067rem;
朱国瑞's avatar
朱国瑞 committed
1179 1180 1181 1182
      }
      &_button {
        width: 5.7467rem;
        height: 0.92rem;
朱国瑞's avatar
朱国瑞 committed
1183 1184 1185
        display: flex;
        align-items: center;
        justify-content: center;
朱国瑞's avatar
朱国瑞 committed
1186 1187 1188 1189
        position: relative;
        &_bg {
          width: 100%;
          height: 100%;
朱国瑞's avatar
朱国瑞 committed
1190 1191 1192 1193
          position: absolute;
          left: 0;
          top: 0;
        }
朱国瑞's avatar
朱国瑞 committed
1194 1195
        &_text {
          font-size: 0.44rem;
朱国瑞's avatar
朱国瑞 committed
1196 1197
          font-family: Source Han Sans SC;
          font-weight: 500;
朱国瑞's avatar
朱国瑞 committed
1198 1199
          color: #ffffff;
          z-index: 1;
朱国瑞's avatar
朱国瑞 committed
1200 1201 1202
        }
      }
    }
朱国瑞's avatar
朱国瑞 committed
1203 1204 1205 1206 1207 1208 1209 1210 1211

    &.big {
      .top {
        flex: none;
      }
      .bottom {
        max-height: none;
      }
    }
朱国瑞's avatar
朱国瑞 committed
1212 1213 1214
  }
}
</style>