zhangqi 2 лет назад
Родитель
Сommit
055d82f095
2 измененных файлов с 33 добавлено и 1 удалено
  1. 23 1
      src/DRP/SDrpManagement/productGroup/detail/index.vue
  2. 10 0
      src/router/SDrpManagement.js

+ 23 - 1
src/DRP/SDrpManagement/productGroup/detail/index.vue

@@ -129,7 +129,7 @@
 
 <script setup>
   import Api from '@/api/api'
-  import { ShoppingCartOutlined,LeftOutlined ,ExclamationCircleOutlined} from '@ant-design/icons-vue'
+  import { ShoppingCartOutlined,LeftOutlined ,ExclamationCircleOutlined,StarOutlined,StarFilled,FireOutlined} from '@ant-design/icons-vue'
   import { message,Modal } from 'ant-design-vue';
   import {ref,onMounted,createVNode} from 'vue'
   import { useRouter } from "vue-router"
@@ -323,6 +323,28 @@
     }
     
   }
+  const onCollection = (data)=>{
+    let collection = async (bool)=>{
+      const res = await Api.requested({
+        "id": 20231121143403,
+        "version":1,
+        "content": { 
+          "itemid":data.itemid,
+          "iscollection":bool
+        }
+      })
+    }
+    if (data.iscollection == 0) {
+      group.value.item[0].iscollection = 1
+      collection(true)
+    } else {
+      group.value.item[0].iscollection = 0
+      collection(false)
+    }
+  }
+  const linkToPromotion = (item)=>{
+    router.push({path:'/promotionDetail',query:{id:item.sa_promotionid}})
+  }
   onMounted(()=>{
     groupDetail(true)
   })

+ 10 - 0
src/router/SDrpManagement.js

@@ -59,6 +59,16 @@ const SDrpManagement = [
     },
     component: () => import(/* webpackChunkName: "about" */ '@/DRP/SDrpManagement/shopCart/index.vue')
   },
+  {
+    path: '/collection',
+    name: 'collection',
+    meta: {
+      title: '收藏夹',
+      name: 'shopCart',
+      keepAlive:true
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/DRP/SDrpManagement/collection/index.vue')
+  },
   {
     path: '/salerPromotion',
     name:'salerPromotion',