panhui 2 lat temu
rodzic
commit
2c55b59344

+ 1 - 1
android/app/build.gradle

@@ -6,7 +6,7 @@ android {
         applicationId "com.bigauction.mobile"
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
-        versionCode 100
+        versionCode 101
         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 = 100;
+				CURRENT_PROJECT_VERSION = 101;
 				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 = 100;
+				CURRENT_PROJECT_VERSION = 101;
 				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": 100
+        "build": 101
     },
     "android": {
         "version": "1.0.0",
-        "build": 100,
+        "build": 101,
         "versionCode": 12
     },
-    "www": 1085
+    "www": 1086
 }

+ 11 - 32
src/views/HomePage.vue

@@ -223,37 +223,16 @@ function getBanner() {
 
 const saleBatches = ref([])
 function getSaleBatch() {
-    if (saleBatches.value.length === 0) {
-        return http.post('saleBatch/all', {}, { body: 'json' }).then(res => {
-            saleBatches.value = res.content.map(item => {
-                return {
-                    ...item,
-                    empty: false,
-                    hotInfo: {}
-                }
-            })
-            if (!res.empty) {
-                res.content.forEach((item, index) => {
-                    http.post(
-                        '/product/list',
-                        {
-                            query: {
-                                batchId: item.id,
-                                status: 'IN_STOCK'
-                            },
-                            size: 1,
-                            sort: 'modifiedAt,desc'
-                        },
-                        { body: 'json' }
-                    ).then(res => {
-                        saleBatches.value[index].empty = res.empty
-                    })
-                })
+    return http.post('saleBatch/all', {}, { body: 'json' }).then(res => {
+        saleBatches.value = res.content.map(item => {
+            return {
+                ...item,
+                empty: false,
+                hotInfo: {}
             }
         })
-    } else {
-        saleBatches.value.forEach((item, index) => {
-            if (getStatus(item) === '抢购中' && !item.empty) {
+        if (!res.empty) {
+            res.content.forEach((item, index) => {
                 http.post(
                     '/product/list',
                     {
@@ -268,9 +247,9 @@ function getSaleBatch() {
                 ).then(res => {
                     saleBatches.value[index].empty = res.empty
                 })
-            }
-        })
-    }
+            })
+        }
+    })
 }
 
 const i18n = useI18n()