<template>
  <div>
    <!--顯示教材內容-->
    <div class="title" v-if="this.$store.getters.getCurrentSelectedReadingName != '隨堂考'">
      <h2>
        {{$t('studentWeb.preview.previewContent.tutorial')}} {{ this.$store.getters.getCurrentPhase + 1 }} -
        <span
          v-if="this.$store.getters.getisSelectedReadingNow == false"
        >1</span>
        {{ this.$store.getters.getCurrentSelectedReadingName }}
      </h2>

      <br />
      {{$t('studentWeb.preview.previewContent.Des')}} {{ Randomdesc() }}
      <br />
      <br />
      <div class="image" v-for="(item, index) in Math.floor(Math.random() * 10)" :key="index">
        <img :src="RandomImage()" />
      </div>
    </div>
    <!--顯示教材內容End-->
  </div>
</template>

<script>
import { Random } from "mockjs";
export default {
  name: "PreviewMissionUnitContent",
  methods: {
    RandomImage: function () {
      return Random.image("200x180");
    },
    Randomdesc: function () {
      if (localStorage.getItem('lang') == "tw") {
        return Random.cparagraph(7, 80);
      } else {
        return Random.paragraph(7, 20);
      }
    },
  },
};
</script>

<style></style>
