Sfoglia il codice sorgente

去掉页码缓存

seyason 1 anno fa
parent
commit
c5ec0c513c

+ 1 - 21
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/product/list.vue

@@ -1405,17 +1405,13 @@ export default {
         // 进入页面所执行的函数
         mountedEnter() {
             this.cateId = this.$route.params.cateId;
+            this.page = 1;
             console.log('分类参数', this.cateId);
             this.getCateName();
             this.userssHu()
             this.getDepartment();
             this.getDepartment2();
             this.projectListPageComponentKey++;
-            //localStorage中为string类型,需转化为int类型才会发生渲染
-            if (localStorage.productPageIndex) {
-                this.page = parseInt(localStorage.productPageIndex);
-            }
-
             this.getList();
             this.getUsers();
         },
@@ -2973,7 +2969,6 @@ export default {
 
         //获取项目列表
         getList() {
-            localStorage.productPageIndex = this.page;
             this.listLoading = true;
             let parameter = {
                 pageIndex: this.page,
@@ -3599,21 +3594,6 @@ export default {
         console.log('activated分类参数', cateId);
     },
     mounted() {
-        // this.cateId =  this.$route.params.cateId;
-        // console.log('分类参数', this.cateId);
-        // this.getCateName();
-        // this.userssHu()
-        // this.getDepartment();
-        // this.getDepartment2();
-        // this.projectListPageComponentKey++;
-        // //localStorage中为string类型,需转化为int类型才会发生渲染
-        // if (localStorage.productPageIndex) {
-        //     this.page = parseInt(localStorage.productPageIndex);
-        // }
-
-        // this.getList();
-        // this.getUsers();
-
         // 进入页面需要执行的函数和方法全写在 mountedEnter 函数里面
         this.mountedEnter()
     }