Xiao_123 vor 4 Monaten
Ursprung
Commit
6add7f803a

+ 1 - 1
src/router/modules/recruit.js

@@ -53,7 +53,7 @@ const recruit = [
       },
       {
         path: '/mall/pointExchange/records',
-        component: () => import('@/views/mall/pointExchange/records.vue'),
+        component: () => import('@/views/mall/home/pointExchange/records.vue'),
         name: 'mallPointExchangeRecords',
         meta: {
           title: '积分兑换记录'

+ 3 - 3
src/views/mall/components/navbar.vue

@@ -7,10 +7,10 @@
           <v-icon>mdi-account-circle-outline</v-icon>
           我的
         </span>
-        <span class="cursor-pointer" @click="router.push('/pointsExchange')">
+        <!-- <span class="cursor-pointer" @click="emit('pointExchange')">
           <v-icon>mdi-octagram-outline</v-icon>
           积分兑换
-        </span>
+        </span> -->
         <span class="cursor-pointer mx-8">
           <v-icon size="20">mdi-cart-outline</v-icon>
           购物车
@@ -42,7 +42,7 @@ import { useRouter } from 'vue-router'
 import { getToken } from '@/utils/auth'
 import Snackbar from '@/plugins/snackbar'
 
-const emit = defineEmits(['login'])
+const emit = defineEmits(['login', 'pointExchange'])
 const router = useRouter()
 const isActive = computed(() => (path, hasChild) => {
   const currentPath = router.currentRoute.value.path

+ 3 - 2
src/views/mall/home/components/carousel.vue

@@ -8,9 +8,10 @@
             </v-row>
         </template>
       </v-img> -->
-      <figure>
+
+      <!-- <figure> -->
         <img :src="item.imgUrl" :lazy-src="item.imgUrl" style="width: 100%;" />
-      </figure>
+      <!-- </figure> -->
     </v-carousel-item>
   </v-carousel>
 </template>

+ 10 - 8
src/views/mall/home/index.vue

@@ -3,15 +3,17 @@
     <!-- 导航栏 -->
     <Navbar @login="handleLogin" />
 
-    <!-- 轮播图 -->
-    <Carousel :templateData="template" class="mb-10" style="max-height: 594.5px;" />
+    <div id="contentBox" ref="scrollBox">
+      <!-- 轮播图 -->
+      <Carousel :templateData="template" class="mb-10" style="max-height: 594.5px;" />
 
-    <div class="default-width pb-10">
-      <!-- 热门商品 -->
-      <HotGoods :templateData="template" class="mb-10" />
+      <div class="default-width pb-10">
+        <!-- 热门商品 -->
+        <HotGoods :templateData="template" class="mb-10" />
 
-      <!-- 积分兑换 -->
-      <PointExchange :point="accountData.point" @login="handleLogin" />
+        <!-- 积分兑换 -->
+        <PointExchange :point="accountData.point" @login="handleLogin" />
+      </div>
     </div>
   </div>
 
@@ -25,7 +27,7 @@ import { ref, onMounted } from 'vue'
 import Navbar from '../components/navbar.vue'
 import Carousel from './components/carousel.vue'
 import HotGoods from './components/hotGoods.vue'
-import PointExchange from '../pointExchange'
+import PointExchange from './pointExchange'
 import loginPage from '@/views/common/loginDialog.vue'
 import { useMallStore } from '@/store/mall'
 import { useUserStore } from '@/store/user'

+ 1 - 2
src/views/mall/pointExchange/index.vue → src/views/mall/home/pointExchange/index.vue

@@ -23,8 +23,7 @@
       </v-card>
     </div>
   </div>
-
-  <CtDialog :visible="showDetail" titleClass="text-h6" :footer="point >= detailItem?.point" :widthType="3" title="详情说明" @submit="handleSubmit" @close="showDetail = false">
+  <CtDialog scroll-strategy="none" :visible="showDetail" titleClass="text-h6" :footer="point >= detailItem?.point" :widthType="3" title="详情说明" @submit="handleSubmit" @close="showDetail = false">
     <div class="color-primary font-size-20">{{ detailItem.name }}</div>
     <div class="tips">
       <div>使用说明:积分一经兑换概不退回,敬请谅解。</div>

+ 4 - 1
src/views/mall/pointExchange/records.vue → src/views/mall/home/pointExchange/records.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="pa-5 white-bgc" style="height: calc(100vh - 50px);">
-    <v-breadcrumbs color="primary" :items="breadcrumbs"></v-breadcrumbs>
+    <!-- <v-breadcrumbs color="primary" :items="breadcrumbs"></v-breadcrumbs> -->
+    <v-btn class="mb-3" size="large" color="primary" variant="text" prepend-icon="mdi-chevron-triple-left" @click="router.go(-1)">返回上一页</v-btn>
     <v-card elevation="5">
       <CtTable
         :items="dataList"
@@ -24,7 +25,9 @@ defineOptions({name: 'mall-point-exchange-records'})
 import { ref } from 'vue'
 import { getRedeemPage } from '@/api/mall/index.js'
 import { getToken } from '@/utils/auth'
+import { useRouter } from 'vue-router'
 
+const router = useRouter()
 const total = ref(0)
 const headers = [
   { title: '商品名称', key: 'name', sortable: false },