Ver código fonte

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

lifanagju_citu 4 meses atrás
pai
commit
957f904c34

+ 1 - 1
src/version.js

@@ -1,2 +1,2 @@
 // 版本号
-export const vue_version = 'v25.01.02.1746'
+export const vue_version = 'v25.01.02.1854'

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

@@ -1,9 +1,8 @@
 <template>
   <div>
-    <div class="d-flex justify-space-between color-666">
+    <!-- <div class="d-flex justify-space-between color-666">
       <div class="color-primary" style="font-size: 25px;">热门商品</div>
-      <!-- <div class="cursor-pointer" @click="router.push('/mall/goodsList')">查看更多</div> -->
-    </div>
+    </div> -->
     <div v-if="goodList.length" class="goods-box mt-5">
       <v-card v-for="val in goodList" :key="val.id" class="goods-box-item" hover elevation="2" @click="handleClickGood(val)">
         <v-img :src="val.picUrl" width="100%" height="68%" cover></v-img>

+ 32 - 11
src/views/mall/home/index.vue

@@ -4,15 +4,31 @@
     <Navbar />
 
     <div id="contentBox" ref="scrollBox">
-      <!-- 轮播图 -->
-      <Carousel :templateData="template" class="mb-10" style="max-height: 594.5px;" />
-
       <div class="default-width pb-10">
+        <!-- 轮播图 -->
+        <div v-if="carouselList.length" style="height: 400px;">
+          <v-carousel cycle hide-delimiter-background show-arrows="hover" style="height: 100%;">
+            <v-carousel-item v-for="(item, i) in carouselList" :key="i">
+              <v-img :src="item.imgUrl" :lazy-src="item.imgUrl" cover>
+                <template v-slot:placeholder>
+                  <v-row align="center" class="fill-height ma-0" justify="center">
+                    <v-progress-circular color="grey-lighten-5" indeterminate></v-progress-circular>
+                  </v-row>
+                </template>
+              </v-img>
+            </v-carousel-item>
+          </v-carousel>
+        </div>
+
+        <v-tabs class="mt-10" v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa">
+          <v-tab v-for="(val, i) in tabList" :key="i" :value="val.value">{{ val.title }}</v-tab>
+        </v-tabs>
+
         <!-- 热门商品 -->
-        <HotGoods :templateData="template" class="mb-10" />
+        <HotGoods v-if="tab === 0" :templateData="template" />
 
         <!-- 积分兑换 -->
-        <PointExchange :point="accountData.point" @login="handleLogin" />
+        <PointExchange v-if="tab === 1" :point="accountData.point" @login="handleLogin" />
       </div>
     </div>
   </div>
@@ -25,7 +41,6 @@
 defineOptions({ name: 'mall-home-index'})
 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 loginPage from '@/views/common/loginDialog.vue'
@@ -41,6 +56,12 @@ onMounted(async () => {
   await useMallStore().getMallDiyTemplate()
 })
 
+const tab = ref(0)
+const tabList = [
+  { title: '热门商品', value: 0 },
+  { title: '积分兑换', value: 1 }
+]
+
 let template = ref(JSON.parse(localStorage.getItem('mallTemplate')) || {})
 useMallStore().$subscribe((mutation, state) => {
   if (state.template && Object.keys(state.template).length) template.value = state?.template
@@ -53,6 +74,10 @@ userStore.$subscribe((mutation, state) => {
   if (Object.keys(state.userAccount).length) accountData.value = state.userAccount
 })
 
+const carouselList = ref([])
+const Carousel = template.value?.home?.components.find(item => item.id === 'Carousel')
+carouselList.value = Carousel?.property?.items || []
+
 const showLogin = ref(false)
 const returnUrl = ref('')
 const handleLogin = (path) => {
@@ -76,11 +101,7 @@ const loginClose = () => {
   showLogin.value = false
   Snackbar.warning('您已取消登录')
 }
-
-const handleSearch = (val) => {
-  
-}
 </script>
 
 <style scoped lang="scss">
-</style>
+</style>

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

@@ -1,7 +1,7 @@
 <template>
   <div>
-    <div class="d-flex justify-space-between color-666">
-      <div class="color-primary" style="font-size: 25px;">积分兑换</div>
+    <div class="d-flex justify-end color-666 mt-3">
+      <!-- <div class="color-primary" style="font-size: 25px;">积分兑换</div> -->
       <div>
         <span class="cursor-pointer active" @click="handleTo('/recruit/personal/personalCenter/wallet')">当前账户积分:{{ point }}</span>
         <span class="septal-line"></span>

+ 2 - 2
src/views/mall/user/order/index.vue

@@ -33,9 +33,9 @@
     <Empty v-else :elevation="false" :message="tab === -1 ? '暂无订单' : '暂无' + tabList.find(e => e.value === tab).title + '订单'"></Empty>
   </div>
 
-  <CtDialog :visible="showDialog" titleClass="text-h6" :footer="true" :widthType="3" title="商品评论" @submit="handleSubmit" @close="handleClose">
+  <!-- <CtDialog :visible="showDialog" titleClass="text-h6" :footer="true" :widthType="3" title="商品评论" @submit="handleSubmit" @close="handleClose">
     <CommentForm ref="commentFormRef" v-if="showDialog" :orderId="commentOrderId" />
-  </CtDialog>
+  </CtDialog> -->
   <!-- 支付 -->
   <CtDialog :visible="showPay" titleClass="text-h6" :widthType="3" title="收银台" :footer="false" @close="payCancel">
     <pay ref="payRef" :id="payOrderId" @paySuccess="paySuccess"></pay>

+ 3 - 0
src/views/recruit/personal/home/components/advertisement/preferred.vue

@@ -169,8 +169,11 @@ const handleToTop = () => {
 .culture {
   width: 100%;
   display: flex;
+  flex-wrap: wrap;
+  justify-content: center;
   &-item {
     width: 33.3%;
+    margin-bottom: 40px;
   }
 }
 h2 {