<template>
  <view class="content">
      <video id="coursewareVideo" src="https://arqsp.qhdsafety.com:10010/api/v1/stream/start?serial=34020000001110001307&code=34020000001320000004&channel=1&token=&_=1733366514489"
             controls autoplay="autoplay" style="width: 100%;"></video>
  </view>
</template>

<script>

import {getPlatVideoPlay, loginVideoPlat} from "@/api";

export default {
  data() {
    return {
      info: {}
    }
  },
  onLoad(options) {
    this.info = options
    this.fnInit()
  },
  methods: {
    fnInit(){
      this.fnInitVideoPlat()
    },
    async fnInitVideoPlat(){
    //   this.src = 'https://arqsp.qhdsafety.com:10010/api/v1/stream/start?serial=34020000001110001307&code=34020000001320000004&channel=1&token=&_=1733366514489'
	  // console.log(src)
    },
    fnBack() {
      uni.$u.route({
        type: 'navigateBack'
      })
    },
    getUrlParams(url) {
      const params = {};
      const paramStr = url.split('?')[1]; // 获取问号后面的参数部分
      if (paramStr) {
        const paramArr = paramStr.split('&'); // 将参数字符串分割成键值对数组
        paramArr.forEach((param) => {
          const [key, value] = param.split('='); // 将键值对字符串分割成键和值
          params[key] = value; // 将键值对添加到params对象中
        });
      }
      return params;
    }
  },
}
</script>

<style lang="scss" scoped>
.content {
  background-color: #fff;
  padding: 0 20upx;
}

.button {
  text-align: center;
  margin-top: 40upx;
  margin-bottom: 40upx;

  button {
    width: 70%;
  }
}
</style>
