|
@@ -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()
|
|
|
}
|