123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view>
- <view class="count-down">
- {{countDown}}
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- timer: null,
- countDown: 5,
- }
- },
- created() {
- this.timer = setInterval(() => {
- if (this.countDown > 0) {
- this.countDown--
- } else {
- clearInterval(this.timer)
- uni.reLaunch({
- url: '/pages/lr/list',
- })
- }
- }, 1000)
- },
- methods: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .count-down {
- position: absolute;
- top: 40%;
- left: 50%;
- transform: translateX(-50%);
- height: 150rpx;
- line-height: 150rpx;
- width: 150rpx;
- border: 2px dashed orange;
- border-radius: 50%;
- text-align: center;
- font-size: 100rpx;
- font-weight: bold;
- color: orange;
- }
- </style>
|