12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <view>
- <image src="../../static/start/start.gif" mode="" :style="{height:QHeight+'px'}"></image>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- time: 3,
- QHeight: 0
- };
- },
- onLoad() {
- //获取页面高度
- uni.getSystemInfo({
- success: (res) => {
- let height = res.windowHeight - uni.upx2px(0)
- console.log(height,'222');
- this.QHeight = height
- }
- })
- let times = this.time
- this.getTime(times)
- },
- methods: {
- getTime(times) {
- let time = setInterval(
- function() {
- times--;
- if (times == 0) {
- clearInterval(time)
- // uni.redirectTo({
-
- // success: (res) => {
- // console.log(res,'dayin');
- // },fail: (res) => {
- // console.log(res,'错误');
- // }
- // })
- uni.reLaunch({
- url:'index',
- })
- }
- console.log(times);
- }, 1000)
- }
- }
- }
- </script>
- <style lang="scss">
- image {
- width: 750rpx;
- // height: 1300rpx;
- }
- </style>
|