Jelajahi Sumber

产品管理

shish 2 tahun lalu
induk
melakukan
0cd5b427a2
3 mengubah file dengan 18 tambahan dan 6 penghapusan
  1. 0 1
      ghsApp/src/admin/cp/item.vue
  2. 18 2
      ghsApp/src/admin/cp/list.vue
  3. 0 3
      ghsApp/src/mixins/cp.js

+ 0 - 1
ghsApp/src/admin/cp/item.vue

@@ -165,7 +165,6 @@
       },
       },
       methods: {
       methods: {
         searchFn(e){
         searchFn(e){
-            console.log(e)
             if(!this.$util.isEmpty(e)){
             if(!this.$util.isEmpty(e)){
                 this.py = e
                 this.py = e
                 this.page = 1
                 this.page = 1

+ 18 - 2
ghsApp/src/admin/cp/list.vue

@@ -137,7 +137,8 @@
             page:1,
             page:1,
             currentClassId:0,
             currentClassId:0,
             finishGetCp:0,
             finishGetCp:0,
-            skip:0
+            skip:0,
+            py:''
           };
           };
       },
       },
       computed:{
       computed:{
@@ -162,6 +163,21 @@
         })
         })
       },
       },
       methods: {
       methods: {
+        searchFn(){
+            if(!this.$util.isEmpty(this.py)){
+                this.search = this.py
+                this.page = 1
+                this.classIndex = -1
+                this.finishGetCp = 0
+                this.getCpList()
+            }else{
+                this.search = ''
+                this.page = 1
+                this.classIndex = 0
+                this.finishGetCp = 0
+                this.getCpList()
+            }
+        },
         selectFlowerNumFn(){
         selectFlowerNumFn(){
             this.$msg('开发中')
             this.$msg('开发中')
         },
         },
@@ -183,7 +199,7 @@
                 return false
                 return false
             }
             }
             let that = this
             let that = this
-            getCpList({classId:that.currentClassId,page:that.page}).then(res=>{
+            getCpList({classId:that.currentClassId,page:that.page,search:this.py}).then(res=>{
                 if(res.code == 1){
                 if(res.code == 1){
                     that.globalCpList = that.page == 1 ? res.data.list : that.globalCpList.concat(res.data.list)
                     that.globalCpList = that.page == 1 ? res.data.list : that.globalCpList.concat(res.data.list)
                     if(res.data.moreData == 1){
                     if(res.data.moreData == 1){

+ 0 - 3
ghsApp/src/mixins/cp.js

@@ -21,9 +21,6 @@ export default {
 	methods: {
 	methods: {
 		init(){
 		init(){
 
 
-		},
-		searchFn() {
-
 		}
 		}
 	}
 	}
 }
 }