Browse Source

no message

BF-202210271038\Administrator 2 years ago
parent
commit
3849aa656c
9 changed files with 40 additions and 22 deletions
  1. 1 2
      App.vue
  2. 5 6
      common/js/tools.js
  3. 1 0
      locale/en.json
  4. 1 0
      locale/ko.json
  5. 3 2
      locale/zh-Hans.json
  6. 1 1
      pages/index/contract.vue
  7. 25 8
      pages/index/index.vue
  8. 1 1
      pages/login/index.vue
  9. 2 2
      pages/login/register.vue

+ 1 - 2
App.vue

@@ -13,8 +13,7 @@ export default {
           'url':'pages/index/error?errorType=2'
         })
       }else {
-        uni.setStorageSync('babAddress',accounts[0])
-        uni.setStorageSync('token', '');
+        uni.clearStorageSync()
         this.login(accounts[0])
       }
 

+ 5 - 6
common/js/tools.js

@@ -254,12 +254,11 @@ tools.getAddress=function (address){
 }
 
 tools.isDevelopment=function () {
-    return true
-    // if(process.env.NODE_ENV==='development'){
-    //     return true
-    // }else {
-    //     return false
-    // }
+    if(process.env.NODE_ENV==='development'){
+        return true
+    }else {
+        return false
+    }
 }
 
 

+ 1 - 0
locale/en.json

@@ -30,6 +30,7 @@
   "index.index.list.item.service": "Service",
   "index.index.list.item.date": "time",
   "index.index.list.item.status": "state",
+  "index.index.pay": "pay",
 
   "index.index.list.common.title": "Amount of declaration",
   "index.index.list.common.num": "Common order",

+ 1 - 0
locale/ko.json

@@ -30,6 +30,7 @@
   "index.index.list.item.service": "수수료",
   "index.index.list.item.date": "시간",
   "index.index.list.item.status": "상태",
+  "index.index.pay": "지불",
 
   "index.index.list.common.title": "청구서 금액",
   "index.index.list.common.num": "공통 순위",

+ 3 - 2
locale/zh-Hans.json

@@ -21,8 +21,8 @@
 	"index.index.top.three": "是当下足不出户的你",
 	"index.index.top.four": "天!",
 	"index.index.top.cp": "点击复制邀请链接",
-	"index.index.top.five": "平台已稳定运行",
-	"index.index.top.six": "运行机制!",
+	"index.index.top.five": "平台",
+	"index.index.top.six": "平台运营机制!",
 	"index.index.list.title": "我的收支",
 	"index.index.list.title-two": "我的共排",
 	"index.index.list.item.title": "平台分润",
@@ -30,6 +30,7 @@
 	"index.index.list.item.service": "手续费",
 	"index.index.list.item.date": "时间",
 	"index.index.list.item.status": "状态",
+	"index.index.pay": "支付",
 
 	"index.index.list.common.title": "报单金额",
 	"index.index.list.common.num": "共排顺序",

+ 1 - 1
pages/index/contract.vue

@@ -20,7 +20,7 @@
         </view>
       </view>
       <view class="data-but">
-        <button @click="setInvest">支付</button>
+        <button @click="setInvest">{{$t('index.index.pay')}}</button>
       </view>
       <view v-if="false" class="data-button" @click="goToUrl(1)">
         <image src="@/static/img/index/msg.svg"></image>

+ 25 - 8
pages/index/index.vue

@@ -2,7 +2,7 @@
   <view class="index-data">
     <view class="index-top">
       <top-head @setBabAddress="setBabAddress"></top-head>
-      <view class="top-text">
+      <view class="top-text" @click="goToUrl(2)">
         {{ $t('index.index.top.one') }}
         <!--        <view class="text-item">{{$t('index.index.top.one')}}</view>-->
         <!--        <view class="text-item">{{$t('index.index.top.two')}}</view>-->
@@ -14,11 +14,12 @@
       </view>
       <view class="top-bottom" @click="setClipboardData">
         <image class="bottom-img" src="@/static/img/index/cp.png" mode="aspectFill"></image>
-        <text class="bottom-text">{{ $t('index.index.top.cp') }}</text>
+        <text class="bottom-text bottom-text-two">{{ $t('index.index.top.cp') }}</text>
       </view>
-      <view class="top-bottom">
+      <view class="top-bottom" v-if="false">
         <image class="bottom-img" src="@/static/img/index/dagou.svg" mode="aspectFill"></image>
-        <text class="bottom-text">{{ $t('index.index.top.five') }}{{days}}{{$t('index.index.top.four')}}</text>
+<!--        <text class="bottom-text">{{ $t('index.index.top.five') }}{{days}}{{$t('index.index.top.four')}}</text>-->
+<!--        <text class="bottom-text">{{ $t('index.index.top.five') }}</text>-->
         <text class="bottom-text" @click="goToUrl(2)">{{ $t('index.index.top.six') }}</text>
       </view>
     </view>
@@ -65,6 +66,7 @@ import Division from "@/pages/index/components/division";
 import TopHead from "@/pages/index/components/top-head";
 import EarningList from "@/pages/index/components/earning-list";
 import CommonList from "@/pages/index/components/common-list";
+import tokenpocketBnb from "@/common/wallet/tokenpocket-wallet/tokenpocket-bnb";
 
 export default {
   components: {CommonList, EarningList, TopHead, Division},
@@ -175,6 +177,14 @@ export default {
         getMemberInfo().then((res) => {
           if (res.code === 1) {
             this.memberData = res.data
+            tokenpocketBnb.getAccounts().then((babAddress)=>{
+              if(babAddress && this.memberData.address.toLocaleLowerCase()!==babAddress.toLocaleLowerCase()){
+                uni.clearStorageSync()
+                uni.reLaunch({
+                  'url': 'pages/login/index'
+                })
+              }
+            })
           }
         })
       }
@@ -302,16 +312,23 @@ export default {
         font-size: 24rpx;
         color: #7484a4;
       }
+      bottom-text-two{
+        font-size: 23rpx !important;
+      }
 
       .bottom-text:nth-of-type(2) {
         margin-left: 0.5em;
         text-decoration: underline;
       }
     }
-
-    .top-bottom:first-child {
-      padding: 40rpx 40rpx 0 40rpx;
-    }
+    //.top-bottom
+
+    //.top-bottom:nth-of-type(0) {
+    //  //padding: 40rpx 40rpx 0 40rpx;
+    //  .bottom-text{
+    //    font-size: 28rpx;
+    //  }
+    //}
   }
   .list-tab {
     width: 90%;

+ 1 - 1
pages/login/index.vue

@@ -44,7 +44,7 @@
             tools.setLoginInfo(res.data)
             setTimeout(()=>{
               uni.reLaunch({
-                url: '/pages/index/contract'
+                url: '/pages/index/index'
               })
             },50)
           }else {

+ 2 - 2
pages/login/register.vue

@@ -14,7 +14,7 @@
       <view class="data-but">
         <button @click="register">{{$t('index.index.affirm')}}</button>
       </view>
-      <view class="data-button" @click="goToUrl(1)">
+      <view class="data-button"  v-if="false" @click="goToUrl(1)">
         <image src="@/static/img/index/msg.svg"></image>
         <view>{{$t('index.contract.word')}}>></view>
       </view>
@@ -86,7 +86,7 @@ export default {
           tools.setLoginInfo(res.data)
           setTimeout(() => {
             uni.reLaunch({
-              url: '/pages/index/contract'
+              url: '/pages/index/index'
             })
           }, 50)
         } else {