liyongli 1 年之前
父節點
當前提交
4f807d96c3
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      src/view/finance/index.vue

+ 14 - 0
src/view/finance/index.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="finance">
+    <van-loading class="loading_position" color="#ffffff" v-show="loading" />
     <img src="../../assets/img/financeBanner.jpg" style="width: 100%" />
     <div class="guize" @click="showGuize">投票规则</div>
     <div class="guize" style="top: 10em" @click="paiming">查看排名</div>
@@ -274,6 +275,7 @@ const screenWidth = window.screen.width * 0.9;
 const hxrDialog = ref(false);
 const showPaihang = ref(false);
 const showLogin = ref(false);
+const loading = ref(false);
 const selectItem = ref({});
 const imgObj = ref({});
 
@@ -305,6 +307,7 @@ let clod2 = null;
 let clod3 = null;
 
 const getList = call => {
+  loading.value = true;
   getEnrollList({
     operateId,
   }).then(r => {
@@ -342,6 +345,7 @@ const getList = call => {
     }
     ids.value = ids_list;
     orilist.value = obj;
+    loading.value = false;
     call && call();
   });
 };
@@ -365,6 +369,7 @@ const getIndex = key => {
 };
 
 const getRankList = async Call => {
+  loading.value = true;
   getEnrollRank({
     operateId,
   }).then(async r => {
@@ -400,6 +405,7 @@ const getRankList = async Call => {
       else obj[num] = [v];
     }
     rankList.value = obj;
+    loading.value = false;
     Call && Call();
   });
 };
@@ -650,6 +656,14 @@ const close = () => {};
   background-color: #e0f2fa;
   min-height: 100vh;
 
+  .loading_position {
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    z-index: 10;
+  }
+
   .van-cell__value {
     color: #000;
   }