123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <template>
- <view class="column" style="height: 100%;position: relative;">
- <view class="top-content ">
- <view class="status_bar" :style="{height: statusBarHeight+'px'}"></view>
- <!-- 这里是状态栏 -->
- <view class="top-title">企业理念</view>
- </view>
- <view :style="{marginTop: `calc(${statusBarHeight}px + 88rpx)`}">
- <view class="imgbox">
- <image :src="enterpriseimg[0]" mode="widthFix"></image>
- <view class="myVideobox">
- <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>
- <view class="imgbox column">
- <image :src="enterpriseimg[1]" mode="widthFix"></image>
- <image :src="enterpriseimg[2]" mode="widthFix"></image>
- <image :src="enterpriseimg[3]" mode="widthFix"></image>
- </view>
- </view>
- <!-- <tabbar :actindex="1"></tabbar> -->
- </view>
- </template>
- <script>
- // import{getenterprise} from '@/api/index.js'
- export default {
- data() {
- return {
- statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
- enterpriseurl:'https://hylj-1323137866.cos.ap-chongqing.myqcloud.com/userVideo/2025328/1743138661878.mp4',
- enterpriseimg:[
- 'https://cos.his.cdwjyyh.com/fs/20250328/35a52839074940cb9ba7c1208140e3c7.png',
- 'https://cos.his.cdwjyyh.com/fs/20250328/39f2e5fc37da4240850313e69caa120c.png',
- 'https://cos.his.cdwjyyh.com/fs/20250328/628f59a6f3864541a0599886fae8e54e.png',
- 'https://cos.his.cdwjyyh.com/fs/20250328/f13448a48d3c491ab40b44e749983fed.png'
- ],
- muted:true,
- }
- },
- //发送给朋友
- onShareAppMessage(res) {
- return {
- title: "御君方互联网医院",
- path: '/pages/index/index',
- imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- }
-
- },
- //分享到朋友圈
- onShareTimeline(res) {
- return {
- title: "御君方互联网医院",
- path: '/pages/index/index',
- imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- }
-
- },
- mounted() {
- const imgs = []
- // this.enterpriseimg= imgs.split(',')
- // this.enterpriseurl='https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com/fs/20250115/1736925706514.mp4'
- // 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) {
-
- },
- // navToTest() {
- // const course = {"companyId":100,"companyUserId":6806,"corpId":"ww5a88c4f879f204c5","courseId":63,"link":"1899022782092541952","linkType":3,"qwExternalId":9914983,"qwUserId":"18931","videoId":409}
- // uni.navigateTo({
- // url: '/pages_course/video?course='+JSON.stringify(course)
- // })
- // }
- }
- }
- </script>
- <style lang="scss" scoped>
- .top-content {
- width: 100%;
- z-index: 10;
- position: fixed;
- top: 0;
- left: 0;
- background-color: #FFFFFF;
- .top-title {
- height: 88rpx;
- line-height: 88rpx;
- font-size: 42rpx;
- font-family: Source Han Sans CN;
- font-weight: bold;
- color: #222222;
- padding-left: 41rpx;
- background-color: #FFFFFF;
- }
- }
- .imgbox{
- position: relative;
- image{
- width: 100%;
- display: block;
- }
- }
- .videotop{
- width: calc(100% - 60rpx);
- height: 421rpx;
- border-radius: 20rpx;
- position: absolute;
- bottom: 30rpx;
- left: 50%;
- z-index: 9;
- transform: translateX(-50%);
- }
- </style>
|