BF-202210271038\Administrator 3 жил өмнө
parent
commit
f536a827e6

+ 1 - 0
locale/zh-Hans.json

@@ -24,6 +24,7 @@
 	"index.index.list.item.date": "时间",
 	"index.index.list.item.status": "状态",
 
+	"index.contract.list.title": "报单记录",
 	"index.contract.num": "数量",
 	"index.contract.money": "可用余额",
 	"index.contract.word": "阅读文档",

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

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

+ 6 - 1
pages/index/components/top-head.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="head-box" :class="{'top-two':topType!==1}">
     <view class="top-head">
-      <view class="head-item head-left">
+      <view class="head-item head-left" @click="goToUrl">
         <view class="left-img">
           <image src="@/static/img/index/logo1.png" mode="aspectFill"></image>
         </view>
@@ -52,6 +52,11 @@ export default {
     this.babAddress = tokenpocketBnb.getMyAddress()
   },
   methods: {
+    goToUrl() {
+      uni.navigateTo({
+        'url': 'pages/index/index'
+      })
+    },
     setLocaleLang(code) {
       uni.setLocale(code);
       this.$i18n.locale = code;

+ 8 - 3
pages/index/contract.vue

@@ -32,10 +32,10 @@
         <view class="title-img">
           <image src="@/static/img/index/bnb2.png" mode="aspectFill"></image>
         </view>
-        <view class="title-text">我的收支明细(100)</view>
+        <view class="title-text">{{$t('index.contract.list.title')}}({{total}})</view>
       </view>
       <division></division>
-      <contract-list></contract-list>
+      <contract-list @setTotal="setTotal"></contract-list>
     </view>
     <view class="contract-bottom"></view>
   </view>
@@ -52,13 +52,18 @@ export default {
   components: { ContractList, Division, TopHead},
   props: {},
   data() {
-    return {}
+    return {
+      total:0
+    }
   },
   watch: {},
   mounted() {
 
   },
   methods: {
+    setTotal(total){
+      this.total=total
+    },
     goToUrl(type) {
       switch (type) {
         case 1: