panhui vor 2 Jahren
Ursprung
Commit
0425e2e4c6

+ 1 - 1
android/app/build.gradle

@@ -6,7 +6,7 @@ android {
         applicationId "com.bigauction.mobile"
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
-        versionCode 101
+        versionCode 102
         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 = 101;
+				CURRENT_PROJECT_VERSION = 102;
 				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 = 101;
+				CURRENT_PROJECT_VERSION = 102;
 				DEFINES_MODULE = NO;
 				DEVELOPMENT_TEAM = 72P5Y6N578;
 				INFOPLIST_FILE = App/Info.plist;

+ 3 - 3
src/plugins/list.js

@@ -16,7 +16,7 @@ function useList(url, beforeData = null, httpType) {
     const size = ref(20)
     const list = ref([])
 
-    const getData = (isRefresh = false) => {
+    const getData = (isRefresh = false, isFinished = false) => {
         if (isRefresh) {
             page.value = 0
             list.value = []
@@ -43,7 +43,7 @@ function useList(url, beforeData = null, httpType) {
                     list.value = [...list.value, ...res.content]
                     empty.value = res.empty
                     loading.value = false
-                    finished.value = res.last
+                    finished.value = isFinished || res.last
                     if (!finished.value) {
                         page.value = page.value + 1
                     }
@@ -62,7 +62,7 @@ function useList(url, beforeData = null, httpType) {
                     list.value = [...list.value, ...res.content]
                     empty.value = res.empty
                     loading.value = false
-                    finished.value = res.last
+                    finished.value = isFinished || res.last
                     if (!finished.value) {
                         page.value = page.value + 1
                     }

+ 3 - 3
src/version.json

@@ -1,12 +1,12 @@
 {
     "ios": {
         "version": "1.0.0",
-        "build": 101
+        "build": 102
     },
     "android": {
         "version": "1.0.0",
-        "build": 101,
+        "build": 102,
         "versionCode": 12
     },
-    "www": 1086
+    "www": 1087
 }

+ 5 - 3
src/views/ProductListPage.vue

@@ -44,6 +44,7 @@
                 :finished="finished"
                 :finished-text="$t('common.loadFinish')"
                 @load="getData"
+                :immediate-check="false"
             >
                 <template v-if="listType === 'list'">
                     <div class="product-list" v-for="item in list" :key="item.id">
@@ -80,7 +81,7 @@ const {
 const batchInfo = ref({})
 const batchId = route.query.batchId
 
-const { empty, loading, finished, list, getData } = useList('/product/list', () => {
+const { empty, size, loading, finished, list, getData } = useList('/product/list', () => {
     return {
         query: {
             batchId: route.query.batchId,
@@ -90,7 +91,7 @@ const { empty, loading, finished, list, getData } = useList('/product/list', ()
     }
 })
 const handleRefresh = event => {
-    getData(true).then(() => {
+    getData(true, true).then(() => {
         event.target.complete()
     })
 }
@@ -135,7 +136,8 @@ const changeType = type => {
 // })
 
 onMounted(() => {
-    getData(true)
+    size.value = 10
+    getData(true, true)
     getBatch()
 })
 </script>