Browse Source

新增loading页面

nanMing 1 year ago
parent
commit
cbc6e05104
5 changed files with 982 additions and 936 deletions
  1. 0 2
      App.vue
  2. 8 0
      pages.json
  3. 1 2
      pages/index/index.vue
  4. 922 932
      pages/info/add-files.vue
  5. 51 0
      pages/loading/loading.vue

+ 0 - 2
App.vue

@@ -9,13 +9,11 @@
 		},
 		onLaunch: function() {
 			if (getToken()) {
-				console.log('存在');
 				// uni.reLaunch({
 				// 	url: '/pages/index/index'
 				// })
 
 			} else {
-				console.log('不存在');
 				uni.reLaunch({
 					url: '/pages/login/index'
 				})

+ 8 - 0
pages.json

@@ -163,6 +163,14 @@
 			"style": {
 				"navigationBarTitleText": "用户协议"
 			}
+		},
+		{
+		  "path" : "pages/loading/loading",
+		  "style" : 
+		  {
+		    "navigationBarTitleText" : "跳转倒计时",
+		    "enablePullDownRefresh" : false
+		  }
 		}
 	],
 

+ 1 - 2
pages/index/index.vue

@@ -43,8 +43,6 @@
       </uni-card>
     </view>
 
-
-
   </view>
 </template>
 
@@ -63,6 +61,7 @@
     ListKhjbxx,
     ListKhShxx
   } from '@/api/kh.js'
+
   export default {
     data() {
       return {

File diff suppressed because it is too large
+ 922 - 932
pages/info/add-files.vue


+ 51 - 0
pages/loading/loading.vue

@@ -0,0 +1,51 @@
+<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>