123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <view class="column" style="height: 100%;">
- <view class="top-content ">
- <view class="status_bar" :style="{height: statusBarHeight}"></view>
- <!-- 这里是状态栏 -->
- <view class="top-title">企业理念</view>
- </view>
- <view class="flex-1 scrolly ">
- <view class="imgbox">
- <image :src="enterpriseimg[0]" mode="widthFix"></image>
- </view>
- <view class="p20 ">
- <video id="myVideo" :src='enterpriseurl'
- show-mute-btn='true' @fullscreenchange='changvideo'
- vslide-gesture-in-fullscreen='true' :muted='muted' loop='true'
- @error="videoErrorCallback" enable-danmu controls autoplay="true"
- class="videotop"></video>
- <!-- <video class="myVideo" id="myVideo" :src="enterpriseurl"
- @error="videoErrorCallback" controls></video> -->
- </view>
- <view class="imgbox column">
- <image :src="enterpriseimg[3]" mode="widthFix"></image>
- <image :src="enterpriseimg[2]" mode="widthFix"></image>
- <image :src="enterpriseimg[1]" mode="widthFix"></image>
- </view>
- </view>
- <!-- <tabbar :actindex="1"></tabbar> -->
- </view>
- </template>
- <script>
- import{getenterprise} from '@/api/index.js'
- export default {
- data() {
- return {
- statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
- enterpriseurl:'',
- enterpriseimg:'',
- muted:true,
- }
- },
- mounted() {
- this.getenterprise()
- },
- methods: {
- changvideo(e){
- if(e.target.fullScreen==true){
- this.muted=false
- }else{
- this.muted=true
- }
- e.target.fullScreen
- },
- getenterprise(){
- getenterprise().then(res=>{
- this.enterpriseurl=res.data.videoUrl
- this.enterpriseimg=res.data.images
- const url=this.enterpriseimg.split(',')
- this.enterpriseimg=url
- uni.setStorageSync('enterpriseurl',this.enterpriseurl)
- console.log(res)
- })
- },
- videoErrorCallback: function(e) {
-
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .top-content {
- width: 100%;
- z-index: 10;
- .top-title {
- height: 88upx;
- line-height: 88upx;
- font-size: 42upx;
- font-family: Source Han Sans CN;
- font-weight: bold;
- color: #222222;
- padding-left: 41upx;
- background-color: #FFFFFF;
- }
- }
- .imgbox{
- image{
- width: 100%;
- }
- }
- .videotop{
- width: 100%;
- border-radius: 20rpx;
- }
- </style>
|