Browse Source

no message

BF-202210271038\Administrator 3 years ago
parent
commit
9e30c5973d
3 changed files with 11 additions and 5 deletions
  1. 1 0
      pages/index/components/earning-list.vue
  2. 9 5
      pages/index/index.vue
  3. 1 0
      pages/index/intro.vue

+ 1 - 0
pages/index/components/earning-list.vue

@@ -76,6 +76,7 @@ export default {
       getEarnings({'page': page}).then((res) => {
         if (res.code === 1) {
           this.$refs.earningObj.setList(res.data.items, res.data.total)
+          this.$emit('setTotal',res.data.total)
         }
       })
     }

+ 9 - 5
pages/index/index.vue

@@ -14,7 +14,7 @@
       <view class="top-bottom">
         <image class="bottom-img" src="@/static/img/index/dagou.svg" mode="aspectFill"></image>
         <text class="bottom-text">{{$t('index.index.top.five')}}</text>
-        <text class="bottom-text">{{$t('index.index.top.six')}}</text>
+        <text class="bottom-text" @click="goToUrl(2)">{{$t('index.index.top.six')}}</text>
       </view>
     </view>
     <view class="index-list">
@@ -22,10 +22,10 @@
         <view class="title-img">
           <image src="@/static/img/index/bnb2.png" mode="aspectFill"></image>
         </view>
-        <view class="title-text">{{$t('index.index.list.title')}}(100)</view>
+        <view class="title-text">{{$t('index.index.list.title')}}({{total}})</view>
       </view>
       <division></division>
-      <earning-list></earning-list>
+      <earning-list @setTotal="setTotal"></earning-list>
 
     </view>
     <view class="index-bottom"></view>
@@ -70,7 +70,8 @@ export default {
         "teamNum": 0
       },
       bnbNum: 0,
-      babAddress: ''
+      babAddress: '',
+      total:0
 
     }
 
@@ -85,6 +86,9 @@ export default {
 
   },
   methods: {
+    setTotal(total){
+      this.total=total
+    },
     goToUrl(type) {
       switch (type) {
         case 1:
@@ -94,7 +98,7 @@ export default {
           break
         case 2:
           uni.navigateTo({
-            'url': 'pages/index/contract'
+            'url': 'pages/index/intro'
           })
           break
         case 3:

+ 1 - 0
pages/index/intro.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="intro-box">
+ 
    <view>
      <image src="@/static/img/index/bg1.png" mode="widthFix"></image>
    </view>