Browse Source

bug修改

喻文俊 3 years ago
parent
commit
a2d518cb45

+ 2 - 0
components/LdmLogin/index.vue

@@ -15,6 +15,7 @@
                 type="text"
                 type="text"
                 placeholder="手机号"
                 placeholder="手机号"
                 v-model="formData.mobile"
                 v-model="formData.mobile"
+                maxlength="11"
               />
               />
             </div>
             </div>
             <div class="form-item mb-4">
             <div class="form-item mb-4">
@@ -23,6 +24,7 @@
                 placeholder="验证码"
                 placeholder="验证码"
                 class="code"
                 class="code"
                 v-model="formData.verifyCode"
                 v-model="formData.verifyCode"
+                maxlength="6"
               />
               />
               <span class="send" @click="onSend">{{ sendCodeBtnText }}</span>
               <span class="send" @click="onSend">{{ sendCodeBtnText }}</span>
             </div>
             </div>

+ 2 - 0
components/SimpleLogin/index.vue

@@ -11,6 +11,7 @@
                 type="text"
                 type="text"
                 placeholder="手机号"
                 placeholder="手机号"
                 v-model="formData.mobile"
                 v-model="formData.mobile"
+                maxlength="11"
               />
               />
             </div>
             </div>
             <div class="form-item mb-4 code">
             <div class="form-item mb-4 code">
@@ -19,6 +20,7 @@
                 placeholder="验证码"
                 placeholder="验证码"
                 class="code"
                 class="code"
                 v-model="formData.verifyCode"
                 v-model="formData.verifyCode"
+                maxlength="6"
               />
               />
               <span class="send" @click="onSend">{{ sendCodeBtnText }}</span>
               <span class="send" @click="onSend">{{ sendCodeBtnText }}</span>
             </div>
             </div>

+ 10 - 6
layouts/app-ldm.vue

@@ -32,6 +32,7 @@ export default {
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     window.removeEventListener('resize', () => {})
     window.removeEventListener('resize', () => {})
+    localStorage.removeItem('zp-locations')
   },
   },
   methods: {
   methods: {
     init() {
     init() {
@@ -40,16 +41,19 @@ export default {
     },
     },
     // 初始化数据页面公共数据
     // 初始化数据页面公共数据
     initPageData() {
     initPageData() {
-      const id = this.$route.params.template
+      const id = parseInt(this.$route.params.template)
       // 保存页面入口
       // 保存页面入口
-      this.$store.commit('user/SET_TYPE', `${id}/app`)
+      this.$store.commit('user/SET_TYPE', `${id}/ldm`)
       // 保存用户AppId
       // 保存用户AppId
       this.$store.commit('user/SET_AUTHUSERID', id)
       this.$store.commit('user/SET_AUTHUSERID', id)
 
 
       // 获取用户信息
       // 获取用户信息
-      const userInfo = getCookies('userInfo')
-      if (userInfo && userInfo.authUserId === id) {
-        this.$store.commit('user/SET_USERINFO', JSON.parse(userInfo))
+      let userInfo = getCookies('userInfo')
+      if (userInfo) {
+        userInfo = JSON.parse(userInfo)
+        if (userInfo.authUserId === id) {
+          this.$store.commit('user/SET_USERINFO', userInfo)
+        }
       }
       }
       // 初始化供应商信息
       // 初始化供应商信息
       this.fetchSupplierInfo()
       this.fetchSupplierInfo()
@@ -77,7 +81,7 @@ export default {
     async checkAccountType(appId) {
     async checkAccountType(appId) {
       try {
       try {
         // 1订阅号,2服务号
         // 1订阅号,2服务号
-        const res = this.$http.api.checkAccountType({ appId })
+        const res = await this.$http.api.checkAccountType({ appId })
         this.$store.commit('user/SET_ACCOUNT_TYPE', res.data)
         this.$store.commit('user/SET_ACCOUNT_TYPE', res.data)
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)

+ 8 - 4
layouts/app.vue

@@ -65,6 +65,7 @@ export default {
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     window.removeEventListener('resize', () => {})
     window.removeEventListener('resize', () => {})
+    localStorage.removeItem('zp-locations')
   },
   },
   methods: {
   methods: {
     init() {
     init() {
@@ -73,16 +74,19 @@ export default {
     },
     },
     // 初始化数据页面公共数据
     // 初始化数据页面公共数据
     initPageData() {
     initPageData() {
-      const id = this.$route.params.template
+      const id = parseInt(this.$route.params.template)
       // 保存页面入口
       // 保存页面入口
       this.$store.commit('user/SET_TYPE', `${id}/app`)
       this.$store.commit('user/SET_TYPE', `${id}/app`)
       // 保存用户AppId
       // 保存用户AppId
       this.$store.commit('user/SET_AUTHUSERID', id)
       this.$store.commit('user/SET_AUTHUSERID', id)
 
 
       // 获取用户信息
       // 获取用户信息
-      const userInfo = getCookies('userInfo')
-      if (userInfo && userInfo.authUserId === id) {
-        this.$store.commit('user/SET_USERINFO', JSON.parse(userInfo))
+      let userInfo = getCookies('userInfo')
+      if (userInfo) {
+        userInfo = JSON.parse(userInfo)
+        if (userInfo.authUserId === id) {
+          this.$store.commit('user/SET_USERINFO', userInfo)
+        }
       }
       }
       // 初始化供应商信息
       // 初始化供应商信息
       this.fetchSupplierInfo()
       this.fetchSupplierInfo()

+ 25 - 17
pages/_template/app/approve/club/index.vue

@@ -125,22 +125,30 @@ export default {
         message: '正在获取您附近的机构...',
         message: '正在获取您附近的机构...',
         duration: 0,
         duration: 0,
       })
       })
-      // 获取定位信息 百度坐标转高德坐标
-      try {
-        const location = await loactionSelf()
-        const result = await this.$http.api.assistant({
-          key: '1bcc97330f6cf517e8dd9d5278957e67',
-          locations: `${location.point.lng},${location.point.lat}`,
-          coordsys: 'baidu',
-          output: 'JSON',
-        })
-        const res = await result.json()
-        this.listQuery.lngAndLat = res.locations
-      } catch (error) {
-        this.$toast.clear()
-        this.$toast('获取定位信息失败,请确保您开启的定位权限并保存网络畅通')
-        this.isRequest = false
+      const locations = localStorage.getItem('zp-locations')
+
+      if (!locations) {
+        // 获取定位信息 百度坐标转高德坐标
+        try {
+          const location = await loactionSelf()
+          const result = await this.$http.api.assistant({
+            key: '1bcc97330f6cf517e8dd9d5278957e67',
+            locations: `${location.point.lng},${location.point.lat}`,
+            coordsys: 'baidu',
+            output: 'JSON',
+          })
+          const res = await result.json()
+          this.listQuery.lngAndLat = res.locations
+          localStorage.setItem('zp-locations', res.locations)
+        } catch (error) {
+          this.$toast.clear()
+          this.$toast('获取定位信息失败,请确保您开启的定位权限并保存网络畅通')
+          this.isRequest = false
+        }
+      } else {
+        this.listQuery.lngAndLat = locations
       }
       }
+
       this.listQuery.authUserId = this.authUserId
       this.listQuery.authUserId = this.authUserId
       // 获取机构列表
       // 获取机构列表
       this.fetchList()
       this.fetchList()
@@ -152,12 +160,13 @@ export default {
         this.total = res.data.total
         this.total = res.data.total
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.$toast.clear()
         this.$toast.clear()
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
     // 获取地址列表
     // 获取地址列表
@@ -209,7 +218,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 2 - 2
pages/_template/app/approve/device/index.vue

@@ -91,11 +91,12 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
@@ -118,7 +119,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 2 - 2
pages/_template/app/approve/device/list.vue

@@ -100,11 +100,12 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
     // 搜索
     // 搜索
@@ -130,7 +131,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 2 - 2
pages/_template/app/approve/personnel/operate/index.vue

@@ -99,11 +99,12 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.listQuery.pageNum += 1
+        this.isLoadingMore = false
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
@@ -131,7 +132,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 8 - 4
pages/_template/app/database/article.vue

@@ -17,7 +17,11 @@
       <div class="page-content">
       <div class="page-content">
         <!-- 搜索区域 -->
         <!-- 搜索区域 -->
         <div class="search">
         <div class="search">
-          <simple-search v-model="listQuery.articleTitle" @search="onSearch" />
+          <simple-search
+            v-model="listQuery.articleTitle"
+            @search="onSearch"
+            placeholder="搜索文章标题"
+          />
         </div>
         </div>
         <div class="divider"></div>
         <div class="divider"></div>
         <!-- tabbar -->
         <!-- tabbar -->
@@ -91,11 +95,12 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
@@ -108,7 +113,7 @@ export default {
     // tab切换
     // tab切换
     onTabChange(item) {
     onTabChange(item) {
       console.log(item)
       console.log(item)
-      this.$router.push(`/ph${item.path}`)
+      this.$router.push(`/${this.authUserId}/app${item.path}`)
     },
     },
     // 搜索
     // 搜索
     onSearch(keyword) {
     onSearch(keyword) {
@@ -123,7 +128,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 9 - 5
pages/_template/app/database/file.vue

@@ -17,7 +17,11 @@
       <div class="page-content">
       <div class="page-content">
         <!-- 搜索区域 -->
         <!-- 搜索区域 -->
         <div class="search">
         <div class="search">
-          <simple-search v-model="listQuery.fileTitle" @search="onSearch" />
+          <simple-search
+            v-model="listQuery.fileTitle"
+            @search="onSearch"
+            placeholder="搜索文件名称"
+          />
         </div>
         </div>
         <div class="divider"></div>
         <div class="divider"></div>
         <!-- tabbar -->
         <!-- tabbar -->
@@ -78,7 +82,7 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['userInfo', 'supplierInfo']),
+    ...mapGetters(['userInfo', 'supplierInfo', 'authUserId']),
   },
   },
   mounted() {
   mounted() {
     this.fetchList()
     this.fetchList()
@@ -102,17 +106,18 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
     // tab切换
     // tab切换
     onTabChange(item) {
     onTabChange(item) {
       console.log(item)
       console.log(item)
-      this.$router.push(`/ph${item.path}`)
+      this.$router.push(`/${this.authUserId}/app${item.path}`)
     },
     },
     // 搜索
     // 搜索
     onSearch(keyword) {
     onSearch(keyword) {
@@ -127,7 +132,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 9 - 5
pages/_template/app/database/image.vue

@@ -17,7 +17,11 @@
       <div class="page-content">
       <div class="page-content">
         <!-- 搜索区域 -->
         <!-- 搜索区域 -->
         <div class="search">
         <div class="search">
-          <simple-search v-model="listQuery.imageTitle" @search="onSearch" />
+          <simple-search
+            v-model="listQuery.imageTitle"
+            @search="onSearch"
+            placeholder="搜索图片标题"
+          />
         </div>
         </div>
         <div class="divider"></div>
         <div class="divider"></div>
         <!-- tabbar -->
         <!-- tabbar -->
@@ -85,7 +89,7 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['userInfo', 'supplierInfo']),
+    ...mapGetters(['userInfo', 'supplierInfo', 'authUserId']),
   },
   },
   mounted() {
   mounted() {
     this.fetchList()
     this.fetchList()
@@ -102,11 +106,12 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
@@ -124,7 +129,7 @@ export default {
     // tab切换
     // tab切换
     onTabChange(item) {
     onTabChange(item) {
       console.log(item)
       console.log(item)
-      this.$router.push(`/ph${item.path}`)
+      this.$router.push(`/${this.authUserId}/app${item.path}`)
     },
     },
     // 搜索
     // 搜索
     onSearch(keyword) {
     onSearch(keyword) {
@@ -139,7 +144,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 9 - 5
pages/_template/app/database/package.vue

@@ -17,7 +17,11 @@
       <div class="page-content">
       <div class="page-content">
         <!-- 搜索区域 -->
         <!-- 搜索区域 -->
         <div class="search">
         <div class="search">
-          <simple-search v-model="listQuery.fileTitle" @search="onSearch" />
+          <simple-search
+            v-model="listQuery.fileTitle"
+            @search="onSearch"
+            placeholder="搜索资料包"
+          />
         </div>
         </div>
         <div class="divider"></div>
         <div class="divider"></div>
         <!-- tabbar -->
         <!-- tabbar -->
@@ -77,7 +81,7 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['userInfo', 'supplierInfo']),
+    ...mapGetters(['userInfo', 'supplierInfo', 'authUserId']),
   },
   },
   mounted() {
   mounted() {
     this.fetchList()
     this.fetchList()
@@ -97,18 +101,19 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
     // tab切换
     // tab切换
     onTabChange(item) {
     onTabChange(item) {
       console.log(item)
       console.log(item)
-      this.$router.push(`/ph${item.path}`)
+      this.$router.push(`/${this.authUserId}/app${item.path}`)
     },
     },
     // 搜索
     // 搜索
     onSearch(keyword) {
     onSearch(keyword) {
@@ -123,7 +128,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 9 - 5
pages/_template/app/database/video.vue

@@ -17,7 +17,11 @@
       <div class="page-content">
       <div class="page-content">
         <!-- 搜索区域 -->
         <!-- 搜索区域 -->
         <div class="search">
         <div class="search">
-          <simple-search v-model="listQuery.videoTitle" @search="onSearch" />
+          <simple-search
+            v-model="listQuery.videoTitle"
+            @search="onSearch"
+            placeholder="搜索视频"
+          />
         </div>
         </div>
         <div class="divider"></div>
         <div class="divider"></div>
         <!-- tabbar -->
         <!-- tabbar -->
@@ -78,7 +82,7 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['userInfo', 'supplierInfo']),
+    ...mapGetters(['userInfo', 'supplierInfo', 'authUserId']),
   },
   },
   mounted() {
   mounted() {
     this.fetchList()
     this.fetchList()
@@ -97,19 +101,20 @@ export default {
         const res = await this.$http.api.getVideoList(this.listQuery)
         const res = await this.$http.api.getVideoList(this.listQuery)
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
+        this.listQuery.pageNum += 1
+        this.isLoadingMore = false
         this.total = res.data.total
         this.total = res.data.total
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
     // tab切换
     // tab切换
     onTabChange(item) {
     onTabChange(item) {
       console.log(item)
       console.log(item)
-      this.$router.push(`/ph${item.path}`)
+      this.$router.push(`/${this.authUserId}/app${item.path}`)
     },
     },
     // 搜索
     // 搜索
     onSearch(keyword) {
     onSearch(keyword) {
@@ -124,7 +129,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 3 - 9
pages/_template/app/feedback/index.vue

@@ -38,18 +38,11 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['supplierInfo', 'userInfo']),
+    ...mapGetters(['supplierInfo', 'userInfo', 'authUserId', 'type']),
     isEmpty() {
     isEmpty() {
       return this.content.length === 0
       return this.content.length === 0
     },
     },
   },
   },
-  async created() {
-    try {
-      await this.$http.api.checkToken()
-    } catch (error) {
-      console.log(error)
-    }
-  },
   methods: {
   methods: {
     async onSubmit() {
     async onSubmit() {
       const { clubUserId } = this.userInfo
       const { clubUserId } = this.userInfo
@@ -67,7 +60,8 @@ export default {
     },
     },
     onConfirm() {
     onConfirm() {
       this.showModal = false
       this.showModal = false
-      this.$router.replace('/ph')
+      const url = `/${this.type}`
+      this.$router.push(url)
     },
     },
   },
   },
 }
 }

+ 26 - 17
pages/_template/ldm/approve/club/index.vue

@@ -114,22 +114,31 @@ export default {
         message: '正在获取您附近的机构...',
         message: '正在获取您附近的机构...',
         duration: 0,
         duration: 0,
       })
       })
-      // 获取定位信息 百度坐标转高德坐标
-      try {
-        const location = await loactionSelf()
-        const result = await this.$http.api.assistant({
-          key: '1bcc97330f6cf517e8dd9d5278957e67',
-          locations: `${location.point.lng},${location.point.lat}`,
-          coordsys: 'baidu',
-          output: 'JSON',
-        })
-        const res = await result.json()
-        this.listQuery.lngAndLat = res.locations
-      } catch (error) {
-        this.$toast.clear()
-        this.$toast('获取定位信息失败,请确保您开启的定位权限并保存网络畅通')
-        this.isRequest = false
+
+      const locations = localStorage.getItem('zp-locations')
+
+      if (!locations) {
+        // 获取定位信息 百度坐标转高德坐标
+        try {
+          const location = await loactionSelf()
+          const result = await this.$http.api.assistant({
+            key: '1bcc97330f6cf517e8dd9d5278957e67',
+            locations: `${location.point.lng},${location.point.lat}`,
+            coordsys: 'baidu',
+            output: 'JSON',
+          })
+          const res = await result.json()
+          this.listQuery.lngAndLat = res.locations
+          localStorage.setItem('zp-locations', res.locations)
+        } catch (error) {
+          this.$toast.clear()
+          this.$toast('获取定位信息失败,请确保您开启的定位权限并保存网络畅通')
+          this.isRequest = false
+        }
+      } else {
+        this.listQuery.lngAndLat = locations
       }
       }
+
       this.listQuery.authUserId = this.authUserId
       this.listQuery.authUserId = this.authUserId
       // 获取机构列表
       // 获取机构列表
       this.fetchList()
       this.fetchList()
@@ -142,12 +151,13 @@ export default {
         this.total = res.data.total
         this.total = res.data.total
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.$toast.clear()
         this.$toast.clear()
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
@@ -198,7 +208,6 @@ export default {
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
       if (this.isRequest) return
       if (this.isRequest) return
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 2 - 2
pages/_template/ldm/approve/personnel/training/index.vue

@@ -66,11 +66,12 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.total = res.data.total
         this.total = res.data.total
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       } finally {
       } finally {
         this.isRequest = false
         this.isRequest = false
-        this.isLoadingMore = false
       }
       }
     }, 400),
     }, 400),
 
 
@@ -82,7 +83,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
     // 页码变化
     // 页码变化

+ 4 - 6
pages/_template/ldm/database/package.vue

@@ -50,7 +50,7 @@ export default {
   layout: 'app-ldm',
   layout: 'app-ldm',
   data() {
   data() {
     return {
     return {
-      isLoadingMore: false,
+      isLoadingMore: true,
       finished: false,
       finished: false,
       isRequest: true,
       isRequest: true,
       listQuery: {
       listQuery: {
@@ -85,12 +85,11 @@ export default {
         this.list = [...this.list, ...res.data.list]
         this.list = [...this.list, ...res.data.list]
         this.finished = !res.data.hasNextPage
         this.finished = !res.data.hasNextPage
         this.total = res.data.total
         this.total = res.data.total
+        this.isLoadingMore = false
+        this.listQuery.pageNum += 1
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
-      } finally {
-        this.isRequest = false
-        this.isLoadingMore = false
-      }
+      } 
     }, 400),
     }, 400),
 
 
     // 页码变化
     // 页码变化
@@ -100,7 +99,6 @@ export default {
     },
     },
     // 加载更多
     // 加载更多
     onLoadMore() {
     onLoadMore() {
-      this.listQuery.pageNum += 1
       this.fetchList()
       this.fetchList()
     },
     },
   },
   },

+ 1 - 0
plugins/axios.js

@@ -31,6 +31,7 @@ export default function (context) {
         theme: 'round-button',
         theme: 'round-button',
         confirmButtonColor: 'linear-gradient(to left, #404040, #101010)',
         confirmButtonColor: 'linear-gradient(to left, #404040, #101010)',
       })
       })
+      console.log(store.getters.type)
       if (result === 'confirm') {
       if (result === 'confirm') {
         const path = '/' + store.getters.type
         const path = '/' + store.getters.type
         redirect(path)
         redirect(path)