shiyeyoushi.vue 3.7 KB
<template>
  <div class="containerbox">
    <div class="flextwo sharetopk zuixin" @click="back">
      <div class="leftrow leftrowkimg">
        <img src="../../../assets/leftrowk.png" alt />
      </div>
      <div class="sharemiddle newacty">唐元集事业优势</div>
      <div class="sharebtn">
        <!-- <img src="../../../assets/sharebtn.png" alt /> -->
      </div>
    </div>
    <div class="shiyeimg">
      <div class="comtexttop flexthree zhaoshangtop" style="margin-bottom:0.3rem">
        <div class="textleft flexone">
          <div class="textleftheng"></div>
          <div class="textyuan"></div>
        </div>
        <div class="textname zhaoshangvideo">{{intended.goodness_title}}</div>
        <div class="textleft flexone">
          <div class="textkyuan"></div>
          <div class="textrightheng"></div>
        </div>
      </div>

      <div class="shiyebox">
        <div v-html="goodness"></div>
      </div>
    </div>
    <div class="comtexttop flexthree zhaoshangtop" style="margin-bottom:0.3rem">
      <div class="textleft flexone">
        <div class="textleftheng"></div>
        <div class="textyuan"></div>
      </div>
      <div class="textname zhaoshangvideo">{{intended.business_video_title}}</div>
      <div class="textleft flexone">
        <div class="textkyuan"></div>
        <div class="textrightheng"></div>
      </div>
    </div>

    <div class="videoimg" @click="videoplay">
      <img :src="videoinfo.business_image" alt v-if="videoplaytrue" />
      <video
        v-else
        controls
        autoplay
        id="video"
        :src="videoinfo.business_video"
        loop="loop"
        controlslist="nodownload"
        height="100%"
        width="100%"
        webkit-playsinline="true"
        x5-video-player-type="h5"
        x5-video-player-fullscreen="true"
        x5-video-orientation="portraint"
      ></video>
      <img src="../../../assets/anniu.png" alt class="videobtn" v-if="showbtn" />
    </div>
    <div class="clicknext" style="margin-top:0.4rem">点击下一页查看唐元集经销商故事>> >></div>

    <div class="shibot flextwo">
      <div class="shibotleft" @click="prepage">上一页</div>
      <div class="shibotright" @click="nextpage">下一页</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      subid: "",
      goodness: "",
      videoinfo: "",
      showbtn: true,
      controls: false,
      videoplaytrue: true,
      intended: ""
    };
  },
  created() {
    document.title = "唐元集";
    this.subid = this.$route.query.subid;
    console.log("999", this.subid);
    this.getshiyeyoushi();
    this.intended = JSON.parse(localStorage.getItem("intended"));
    console.log(this.intended)
  },
  methods: {
    back() {
      this.$router.go(-1);
    },
    nextpage() {
      this.$router.push({
        path: "/dailistory",
        query: { subid: this.subid }
      });
    },
    prepage() {
      this.$router.go(-1);
    },
    getshiyeyoushi() {
      let that = this;
      var url = "/api/common/goodness";
      let param = {};

      that.$axios
        .post(url, param)
        .then(function (res) {
          console.log(res);
          that.videoinfo = res.data;
          that.goodness = res.data.goodness;
        })
        .catch(function (err) {
          console.log(err);
        });
    },
    videoplay() {
      console.log(344389);
      var video = document.getElementById("video");
      this.videoplaytrue = false;
      this.showbtn = false;
      if (video.paused) {
        video.play();
        this.showbtn = false;
      } else {
        video.pause();
        this.showbtn = true;
      }
    }
  }
};
</script>

<style scoped>
@import "../../../style/usercenter.css";
.shiyebox {
  top: 0.8rem;
  /* width: 6.2rem; */
}
</style>