Przeglądaj źródła

合伙人-我的合伙人列表

panyong 4 lat temu
rodzic
commit
550aa468bf

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

@@ -77,7 +77,7 @@
         })
       }
       this.$nextTick(() => {
-        this.$refreshTitle('销售')
+        this.$refreshTitle('我的合伙人')
       })
     },
     computed: {

+ 6 - 5
htmldev/loan/src/views/partner/goods/api/index.js

@@ -1,10 +1,11 @@
 import request from '@/api/request'
 
-export const productList = (page = 1, pageNum = 20) => request({
-  method: 'POST',
+export const productList = (page = 1, pageNum = 20, id) => request({
+  method: 'GET',
   url: '/home/productList',
-  data: {
-    page,
-    pageNum
+  params: {
+    // page,
+    // pageNum,
+    id
   }
 })

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

@@ -70,8 +70,9 @@
     methods: {
       funFetch () {
         const vm = this
+        const id = 1
         vm.numFetchStatus = 0
-        productList(vm.pager.pagenum, vm.pager.pagesize).then(response => {
+        productList(vm.pager.pagenum, vm.pager.pagesize, id).then(response => {
           if (response.status) {
             const data = response.data
             const temp = data.data

+ 27 - 3
htmldev/loan/src/views/partner/sign/index.vue

@@ -1,13 +1,37 @@
 <template>
-  <div>sign</div>
+  <Main :numPositionY="numPositionY"
+        ref="myOrder"></Main>
 </template>
 
 <script>
+  import Main from '../all/components/main'
+
   export default {
-    name: 'sign'
+    name: 'all',
+    components: {
+      Main
+    },
+    data () {
+      return {
+        numPositionY: 0
+      }
+    },
+    activated () {
+      if (!this.$route.meta.isUseCache) {
+        this.numPositionY = 0
+      }
+      this.$route.meta.isUseCache = false
+    },
+    beforeRouteLeave (to, from, next) {
+      if (['partnerAll', 'partnerUnsigned'].includes(to.name)) {
+        from.meta.isUseCache = true
+      }
+      this.numPositionY = this.$refs.myOrder.scroll ? this.$refs.myOrder.scroll.y : 0
+      next()
+    }
   }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
 
 </style>

+ 27 - 3
htmldev/loan/src/views/partner/unsigned/index.vue

@@ -1,13 +1,37 @@
 <template>
-  <div>unsigned</div>
+  <Main :numPositionY="numPositionY"
+        ref="myOrder"></Main>
 </template>
 
 <script>
+  import Main from '../all/components/main'
+
   export default {
-    name: 'unsigned'
+    name: 'all',
+    components: {
+      Main
+    },
+    data () {
+      return {
+        numPositionY: 0
+      }
+    },
+    activated () {
+      if (!this.$route.meta.isUseCache) {
+        this.numPositionY = 0
+      }
+      this.$route.meta.isUseCache = false
+    },
+    beforeRouteLeave (to, from, next) {
+      if (['partnerAll', 'partnerSign'].includes(to.name)) {
+        from.meta.isUseCache = true
+      }
+      this.numPositionY = this.$refs.myOrder.scroll ? this.$refs.myOrder.scroll.y : 0
+      next()
+    }
   }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
 
 </style>