xiongzhu 3 anni fa
parent
commit
f64ab4a1f4

+ 1 - 1
android/app/build.gradle

@@ -6,7 +6,7 @@ android {
         applicationId "com.bigauction.mobile"
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
-        versionCode 84
+        versionCode 85
         versionName "1.0.0"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         aaptOptions {

+ 2 - 2
ios/App/App.xcodeproj/project.pbxproj

@@ -352,7 +352,7 @@
 				CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
 				CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 84;
+				CURRENT_PROJECT_VERSION = 85;
 				DEFINES_MODULE = NO;
 				DEVELOPMENT_TEAM = 72P5Y6N578;
 				INFOPLIST_FILE = App/Info.plist;
@@ -377,7 +377,7 @@
 				CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
 				CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 84;
+				CURRENT_PROJECT_VERSION = 85;
 				DEFINES_MODULE = NO;
 				DEVELOPMENT_TEAM = 72P5Y6N578;
 				INFOPLIST_FILE = App/Info.plist;

+ 3 - 3
src/version.json

@@ -1,12 +1,12 @@
 {
     "ios": {
         "version": "1.0.0",
-        "build": 84
+        "build": 85
     },
     "android": {
         "version": "1.0.0",
-        "build": 84,
+        "build": 85,
         "versionCode": 12
     },
-    "www": 1069
+    "www": 1070
 }

+ 24 - 8
src/views/HomePage.vue

@@ -46,7 +46,6 @@
                     @click="tutorial"
                 />
             </div>
-
             <!-- 通知 -->
             <div class="notice-box" v-if="news.length > 0">
                 <van-notice-bar ref="noticeBarRef" left-icon="volume-o">
@@ -341,15 +340,32 @@ const getStatus = info => {
 }
 
 const profitList = ref([])
+function randomS() {
+    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
+    return chars[Math.floor(Math.random() * chars.length)]
+}
 function getRank() {
-    http.get('/user/rankByInvite').then(res => {
-        profitList.value = res.map(item => {
-            return {
-                ...item,
-                val: randomNum(100, 1000)
-            }
-        })
+    let profitListJson = localStorage.getItem('profitList')
+    if (profitListJson) {
+        profitListJson = JSON.parse(profitListJson)
+        if (new Date().getTime() < profitListJson.expire) {
+            profitList.value = profitListJson.data
+            return
+        }
+    }
+    profitList.value = Array.from({ length: 10 }, (v, i) => {
+        return {
+            nickname: randomS() + '***' + randomS(),
+            val: randomNum(100, 1000)
+        }
     })
+    localStorage.setItem(
+        'profitList',
+        JSON.stringify({
+            data: profitList.value,
+            expire: new Date().getTime() + 1000 * 60 * 60 * 24
+        })
+    )
 }
 
 function randomNum(minNum, maxNum) {