shish 2 лет назад
Родитель
Сommit
71bdacee7e
2 измененных файлов с 11 добавлено и 2 удалено
  1. 7 2
      ghsApp/src/admin/cp/ptCpList.vue
  2. 4 0
      ghsApp/src/api/cp/index.js

+ 7 - 2
ghsApp/src/admin/cp/ptCpList.vue

@@ -50,7 +50,7 @@ import productContraposeMins from "@/mixins/ptProductContrapose";
 import { mapGetters } from "vuex";
 import { delStatusUpdate } from "@/api/product";
 import { changeAuth } from "@/api/pt-item";
-import { getPtCpList } from "@/api/cp"
+import { getPtCpList,usePtCp } from "@/api/cp"
 export default {
     name: "ptCpList",
     components: {
@@ -125,7 +125,12 @@ export default {
                     return
                 }
                 this.$util.confirmModal({content:'确认采用?'},() => {
-                    this.$util.pageTo({ url: '/admin/cp/addCp?ptCpId='+item.id,type:2})
+                    usePtCp({id:item.id}).then(res=>{
+                        if(res.code == 1){
+//                    this.$util.pageTo({ url: '/admin/cp/addCp?ptCpId='+item.id,type:2})
+                        }
+                    })
+
                 })
             }
         }

+ 4 - 0
ghsApp/src/api/cp/index.js

@@ -8,6 +8,10 @@ export const updateCpFn = data => {
 	return https.post('/cp/update-cp', data)
 }
 
+export const usePtCp = data => {
+	return https.get('/cp/use-pt-cp', data)
+}
+
 export const getPtCpInfo = data => {
 	return https.get('/pt-cp/detail', data)
 }