Ver Fonte

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 há 4 meses atrás
pai
commit
2df23fcd44

+ 0 - 3
components.d.ts

@@ -72,7 +72,4 @@ declare module 'vue' {
     VerifySlide: typeof import('./src/components/Verifition/Verify/VerifySlide.vue')['default']
     WangEditor: typeof import('./src/components/FormUI/wangEditor/index.vue')['default']
   }
-  export interface ComponentCustomProperties {
-    vLoading: typeof import('element-plus/es')['ElLoadingDirective']
-  }
 }

+ 8 - 0
src/api/mall/prize.js

@@ -30,4 +30,12 @@ export const luckyLotteryRecordReceive = async (data) => {
 		url: `/app-api/promotion/luck-lottery-record/receive`,
 		data
 	})
+}
+
+// 根据商品id活动对应的奖品区域信息
+export const getPrizeAreaByGoodsId = async (params) => {
+  return await request.get({
+		url: 'app-api/promotion/luck-prize/get/extend/area',
+		params
+	})
 }

+ 10 - 74
src/views/mall/components/details/prizeDrawContent.vue

@@ -57,6 +57,10 @@
 <script setup>
 defineOptions({name: 'GoodsItem-prizeDrawContent'})
 import { ref } from 'vue'
+import { getPrizeAreaByGoodsId } from '@/api/mall/prize'
+import { useRouter } from 'vue-router'
+const router = useRouter()
+const { id } = router.currentRoute.value.params
 // import { getHotPositionList } from '@/api/common/index'
 
 const loading = ref(false)
@@ -92,82 +96,14 @@ const handleClick = (e) => {
 }
 
 const treeData = ref([])
-// 获取树形列表
+// 根据商品id活动对应的奖品区域信息
 const getTreeData = async () => {
-  // const data = await getHotPositionList()
+  const params = {
+    spuId: id
+  }
+  const data = await getPrizeAreaByGoodsId(params)
+  console.log('getPrizeAreaByGoodsId:', data)
   // if (!data) return
-  treeData.value = [
-    {
-      id: 1,
-      title: 'Applications11111111111111111111111111111111231651446s :',
-      children: [
-        { id: 2, title: 'Calendar : app' },
-        { id: 3, title: 'Chrome : app' },
-        { id: 4, title: 'Webstorm : app' },
-      ],
-    },
-    {
-      id: 5,
-      title: 'Documents :',
-      children: [
-        {
-          id: 6,
-          title: 'vuetify :',
-          children: [
-            {
-              id: 7,
-              title: 'src :',
-              children: [
-                { id: 8, title: 'index : ts' },
-                { id: 9, title: 'bootstrap : ts' },
-              ],
-            },
-          ],
-        },
-        {
-          id: 10,
-          title: 'material2 :',
-          children: [
-            {
-              id: 11,
-              title: 'src :',
-              children: [
-                { id: 12, title: 'v-btn : ts' },
-                { id: 13, title: 'v-card : ts' },
-                { id: 14, title: 'v-window : ts' },
-              ],
-            },
-          ],
-        },
-      ],
-    },
-    {
-      id: 15,
-      title: 'Downloads :',
-      children: [
-        { id: 16, title: 'October : pdf' },
-        { id: 17, title: 'November : pdf' },
-        { id: 18, title: 'Tutorial : html' },
-      ],
-    },
-    {
-      id: 19,
-      title: 'Videos :',
-      children: [
-        {
-          id: 20,
-          title: 'Tutorials :',
-          children: [
-            { id: 21, title: 'Basic layouts : mp4' },
-            { id: 22, title: 'Advanced techniques : mp4' },
-            { id: 23, title: 'All about app : dir' },
-          ],
-        },
-        { id: 24, title: 'Intro : mov' },
-        { id: 25, title: 'Conference introduction : avi' },
-      ],
-    },
-  ],
   // query.value.enterpriseId = data.id
   getDataList()
 }