| | |
| | | <template> |
| | | <view class="video-container"> |
| | | <top-bar selectedTitleIndex="home" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <!-- 视频加载 --> |
| | | <zero-loading v-show="videoLoading" type="circle" color="#0ebd57" text=""></zero-loading> |
| | | <!-- 视频列表 --> |
| | |
| | | import { silentLogin } from "@/api/connect.js"; |
| | | import { getUserInfo } from "@/api/members"; |
| | | import storage from "@/utils/storage.js"; |
| | | import TopBar from "@/components/TopBar.vue"; |
| | | |
| | | export default { |
| | | components: {TopBar}, |
| | | computed: { |
| | | hasPlayTime() { |
| | | return this.sliderFormatTime(this.progress > 0 ? this.duration * this.progress / 100 : 0); |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | topBarChange(titleObj) { |
| | | if (titleObj.index === 'home') { |
| | | uni.switchTab({ |
| | | url: titleObj.pagePath |
| | | }); |
| | | } else { |
| | | uni.redirectTo({ |
| | | url: titleObj.pagePath |
| | | }); |
| | | } |
| | | }, |
| | | // 静默登录 |
| | | wxSilentLogin(callback) { |
| | | //获取code |
| | |
| | | .custom-share-btn::after { |
| | | border: none; |
| | | } |
| | | .topBar { |
| | | position: fixed; |
| | | top: 20rpx; |
| | | left: 20rpx; |
| | | z-index: 1000 |
| | | } |
| | | </style> |