| | |
| | | ></evan-upload> |
| | | </u-form-item> |
| | | |
| | | <!-- <video :src="videoUrl"></video> --> |
| | | |
| | | <video id="myVideo" v-show="videoShow" :src="videoUrl" @fullscreenchange="fullScreenChange"></video> |
| | | <u-form-item label-position="top" label="备注:"> |
| | | <u-input v-model="form.remark" type="textarea" /> |
| | | </u-form-item> |
| | |
| | | uploadList:[], |
| | | videoUrl:"", |
| | | videoShow:false, |
| | | videoContext:null, |
| | | showType:false, |
| | | typeList:[], |
| | | showState:false, |
| | |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | this.videoContext = uni.createVideoContext("myVideo",this) |
| | | }, |
| | | onLoad(option) { |
| | | if(option.id){ |
| | |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | isHighAccuracy:true, |
| | | accuracy:'best', |
| | | geocode:true, |
| | | success: res=> { |
| | | console.log(res) |
| | |
| | | console.log('当前位置的纬度:' + res.latitude); |
| | | this.form.longitude = res.longitude |
| | | this.form.latitude = res.latitude |
| | | |
| | | //#ifdef APP-PLUS |
| | | //根据经纬度获取地址信息 |
| | | var point = new plus.maps.Point(res.longitude, res.latitude); |
| | | plus.maps.Map.reverseGeocode( |
| | | point, |
| | | {}, |
| | | (successRes)=>{ |
| | | this.form.address = successRes.address |
| | | } |
| | | ) |
| | | //#endif |
| | | } |
| | | }); |
| | | }, |
| | |
| | | res.imgCoverKey = thumbnail |
| | | return res |
| | | }, |
| | | //视频预览 |
| | | onPreVideo(video){ |
| | | // console.log(video) |
| | | // this.videoShow = true |
| | | this.videoUrl = video.url |
| | | // uni.previewMedia({ |
| | | // sources:[{ |
| | | // url:video.url |
| | | // }] |
| | | // }) |
| | | this.videoShow = true |
| | | this.videoContext.requestFullScreen({direction:0}) |
| | | }, |
| | | //退出全屏 |
| | | fullScreenChange(e){ |
| | | if(!e.detail.fullScreen){ |
| | | //隐藏视频 |
| | | this.videoShow = false |
| | | } |
| | | }, |
| | | } |
| | | }; |