Pārlūkot izejas kodu

合伙人-导航切换优化

panyong 4 gadi atpakaļ
vecāks
revīzija
f63241556f

+ 2 - 6
htmldev/loan/src/views/partner/all/components/main.vue

@@ -52,8 +52,7 @@ export default {
       scroll: null,
       numFetchStatus: 0,
       arrFetchStatus: ['正在加载,请稍后~', '上拉加载更多', '没有更多了', '出错啦'],
-      booFetchData: false,
-      numPositionY: 0
+      booFetchData: false
     }
   },
   activated () {
@@ -66,13 +65,11 @@ export default {
       this.listData = []
       this.numFetchStatus = 0
       this.booFetchData = false
-      this.numPositionY = 0
       this.funFetch()
     } else {
       this.$nextTick(() => {
         if (this.scroll) {
           this.scroll.refresh()
-          this.scroll.scrollTo(0, this.numPositionY)
         }
       })
     }
@@ -97,7 +94,6 @@ export default {
         this.listData = []
         this.numFetchStatus = 0
         this.booFetchData = false
-        this.numPositionY = 0
         this.funFetch()
       }
     }
@@ -111,7 +107,7 @@ export default {
       if (this.isSearch) {
         vm.$store.dispatch('business/setIsSearch', 0)
       }
-      partnerList(vm.pager.pagenum, vm.pager.pagesize, this.search, partnerStatus).then(response => {
+      partnerList(vm.pager.pagenum, vm.pager.pagesize, this.search).then(response => {
         if (response.status) {
           const data = response.data
           const temp = data.data

+ 3 - 7
htmldev/loan/src/views/partner/all/index.vue

@@ -1,6 +1,5 @@
 <template>
-  <Main :numPositionY="numPositionY"
-        ref="myOrder"></Main>
+  <Main/>
 </template>
 
 <script>
@@ -12,13 +11,10 @@ export default {
     Main
   },
   data () {
-    return {
-      numPositionY: 0
-    }
+    return {}
   },
   activated () {
     if (!this.$route.meta.isUseCache) {
-      this.numPositionY = 0
     }
     this.$nextTick(() => {
       this.$refreshTitle('妥妥推手')
@@ -29,7 +25,7 @@ export default {
     if (['partnerCustomer', 'partnerGoods', 'partnerMine'].includes(to.name)) {
       from.meta.isUseCache = true
     }
-    this.numPositionY = this.$refs.myOrder.scroll ? this.$refs.myOrder.scroll.y : 0
+    this.$store.dispatch('business/defaultNav', from.path)
     next()
   }
 }

+ 3 - 2
htmldev/loan/src/views/partner/customer/api/index.js

@@ -1,10 +1,11 @@
 import request from '@/api/request'
 
-export const saleList = (page = 1, pageNum = 20) => request({
+export const saleList = (page = 1, pageNum = 20, userName = '') => request({
   method: 'POST',
   url: '/partner/saleList',
   data: {
     page,
-    pageNum
+    pageNum,
+    userName
   }
 })

+ 2 - 1
htmldev/loan/src/views/partner/customer/index.vue

@@ -109,7 +109,7 @@ export default {
       if (this.isSearch) {
         vm.$store.dispatch('business/setIsSearch', 0)
       }
-      saleList(vm.pager.pagenum, vm.pager.pagesize).then(response => {
+      saleList(vm.pager.pagenum, vm.pager.pagesize, this.search).then(response => {
         if (response.status) {
           const data = response.data
           const temp = data.data
@@ -159,6 +159,7 @@ export default {
     if (['partnerAll', 'partnerGoods', 'partnerMine'].includes(to.name)) {
       from.meta.isUseCache = true
     }
+    this.$store.dispatch('business/defaultNav', from.path)
     next()
   }
 }

+ 0 - 1
htmldev/loan/src/views/partner/marketing/index.vue

@@ -93,7 +93,6 @@ export default {
     },
     funJump (path) {
       this.$router.replace({ path: path })
-      this.$store.dispatch('business/defaultNav', path)
     },
     searchHandle () {
       this.$store.dispatch('business/setIsSearch', 1)