123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <view class="shipin">
- <web-view :src="url"></web-view>
- </view>
- </template>
- <script>
- // import EZUIKit from "../../../../static/ezuikit.js";
- // var player = null;
- export default {
- data() {
- return {
- urls:'',
- width:'',
- }
- },
- onLoad(options) {
- this.urls = options.companyOrgId;
-
- // this.accessToken();
- // this.width = uni.getSystemInfoSync().screenWidth;
- // console.log('111111111111111111', uni.getSystemInfoSync().screenWidth)
- },
- onShow() {
- this.selectVideoValue();
- },
-
- methods: {
- selectVideoValue(){
- var postdata ={
- 'appKey': 'bf1fe258e25b4556af2889b53cf2d835',
- 'appSecret': 'f814b3ce1653f7f909b6ccc358563fb3'
- };
- uni.request({
- url:'https://open.ys7.com/api/lapp/token/get',
- method: "POST",
- data: postdata,
- header: {
- 'content-type': 'application/x-www-form-urlencoded',
- },
- success: (res) => {
- // console.log('111111111111111111',res.data.data.accessToken)
-
- // let that = this;
- this.url = "../../../../static/sp.html?url="+ this.urls+"&accessToken="+res.data.data.accessToken;
-
- }
- });
-
-
-
- },
-
-
-
- accessToken(){
-
- var postdata ={
- 'appKey': 'bf1fe258e25b4556af2889b53cf2d835',
- 'appSecret': 'f814b3ce1653f7f909b6ccc358563fb3'
- };
- console.log('111111111111111111',postdata)
-
- uni.request({
- url:'https://open.ys7.com/api/lapp/token/get',
- method: "POST",
- data: postdata,
- header: {
- 'content-type': 'application/x-www-form-urlencoded',
- },
- success: (res) => {
- console.log('111111111111111111',res.data.data.accessToken)
-
- player = new EZUIKit.EZUIKitPlayer({
- id: 'video-container', // 视频容器ID
- accessToken: res.data.data.accessToken,
- url:this.urls,
- template: 'simple',
- plugin: ['talk'], // 加载插件,talk-对讲
- width:this.width,
- height: 250,
- autoplay: true,
- // decoderPath: EZUIKit,
-
- });
- window.player = player;
-
- }
- });
-
-
-
- }
- },
- //监听页面卸载
- onUnload(){
-
- },
-
- }
- </script>
- <style>
- .shipin{
- width: 750rpx;
- height: 100%;
- }
- #video-container{
- width: 750rpx;
- height: 600rpx;
- }
- </style>
|