Xiao_123 4 місяців тому
батько
коміт
05f94cb521
3 змінених файлів з 71 додано та 0 видалено
  1. 3 0
      components.d.ts
  2. 10 0
      src/router/modules/recruit.js
  3. 58 0
      src/views/mall/user/prize/index.vue

+ 3 - 0
components.d.ts

@@ -72,4 +72,7 @@ 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']
+  }
 }

+ 10 - 0
src/router/modules/recruit.js

@@ -97,6 +97,16 @@ const recruit = [
               enName: 'Shipping Address',
               icon: 'mdi-map-marker-outline'
             }
+          },
+          {
+            path: '/mall/user/prize',
+            component: () => import('@/views/mall/user/prize/index.vue'),
+            name: 'mallUserPrize',
+            meta: {
+              title: '我的奖品',
+              enName: 'My Award',
+              icon: 'mdi-order-bool-ascending'
+            }
           }
         ]
       },

+ 58 - 0
src/views/mall/user/prize/index.vue

@@ -0,0 +1,58 @@
+<template>
+	<CtTable
+    class="mt-3"
+    :items="items"
+    :headers="headers"
+    :loading="false"
+    :elevation="0"
+    :isTools="false"
+    :showPage="true"
+    :showSelect="false"
+		:page-info="queryParams"
+    itemKey="id"
+  >
+    <template #actions="{ item }">
+      <v-btn color="primary" @click.stop="handleSelectAddress(item)" variant="text">选择收货地址</v-btn>
+    </template>
+  </CtTable>
+</template>
+
+<script setup>
+defineOptions({ name: 'mall-user-prize-index' })
+import { ref } from 'vue'
+
+const queryParams = ref({
+	pageNo: 1,
+	pageSize: 10,
+})
+const items = ref([
+	{
+		lotteryName: '抽奖活动1',
+		name: '奖品1',
+		address: '收货地址1',
+		phone: '联系电话1',
+	},
+	{
+		lotteryName: '抽奖活动2',
+		name: '奖品2',
+		address: '收货地址2',
+		phone: '联系电话2',
+	}
+])
+const headers = [
+  { title: '活动名称', key: 'lotteryName', sortable: false },
+  { title: '奖品信息', key: 'name', sortable: false },
+  { title: '收货地址', key: 'address', sortable: false },
+  { title: '联系电话', key: 'phone', sortable: false },
+  { title: '快递信息', key: 'deliveryInfo', sortable: false },
+  { title: '操作', key: 'actions', sortable: false }
+]
+
+const handleSelectAddress = (item) => {
+	console.log(item, 'select')
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>