12345678910111213141516171819202122232425262728293031323334 |
- <template>
- <view class="center"><image src="../../static/img/start.gif" mode=""></image></view>
- </template>
- <script>
- export default {
- onLoad() {
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.autoplay = true;
- innerAudioContext.startTime = 2;
- innerAudioContext.src = '../../static/icon/video.mp3';
- innerAudioContext.onPlay(() => {
- console.log('开始播放');
- });
- setTimeout(() => {
- innerAudioContext.stop()
- uni.switchTab({
- url: '/pages/index/index'
- });
- }, 5000);
- }
- };
- </script>
- <style lang="scss">
- .center {
- width: 100%;
- height: 100vh;
- image {
- width: 100%;
- height: 100%;
- }
- }
- </style>
|