zhuli 1 ماه پیش
والد
کامیت
a9b1b79481

BIN
src/assets/images/home-bg.png


BIN
src/assets/images/home-icon.png


BIN
src/assets/images/home-income.png


BIN
src/assets/images/home-order.png


BIN
src/assets/images/home-wallet.png


+ 24 - 10
src/views/home/components/go-enter.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 首页:流程概览 -->
   <div v-if="currentStep === 0" class="home-entry">
-    <h3 class="title">免费入驻店铺</h3>
+    <h3 class="title"><el-image :src="homeIcon" class="homeIcon" />免费入驻店铺</h3>
     <div class="steps-container">
       <el-steps align-center>
         <el-step>
@@ -55,6 +55,7 @@
   </div>
 </template>
 <script setup lang="ts">
+import homeIcon from "../../../assets/images/home-icon.png";
 const props = defineProps({
   currentStep: {
     type: Number,
@@ -73,20 +74,31 @@ const handleRegister = () => {
 <style scoped lang="scss">
 // 首页样式
 .home-entry {
-  padding: 30px 40px;
-  background: #ffffff;
-  border: 1px solid #e4e7ed;
-  border-radius: 8px;
-  box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
+  box-sizing: border-box;
+  width: 100%;
+  height: calc(100vh - 105px);
+  overflow: hidden;
+  background: url("../../../assets/images/home-bg.png") center center no-repeat;
+  background-size: cover;
   .title {
-    margin: 0 0 30px;
+    display: flex;
+    align-items: center;
+    height: 105px;
     font-size: 20px;
     font-weight: 600;
-    color: #333333;
-    text-align: center;
+    color: #ffffff;
+    background: linear-gradient(90deg, #6c8ff8 0%, rgb(255 255 255 / 0%) 100%);
+    border-radius: 10px;
+    .homeIcon {
+      width: 76px;
+      height: 76px;
+      margin-right: 8px;
+      margin-left: 25px;
+    }
   }
   .steps-container {
-    margin-bottom: 40px;
+    margin-top: 60px;
+    margin-bottom: 60px;
     :deep(.el-steps) {
       .el-step__head {
         .el-step__icon {
@@ -138,7 +150,9 @@ const handleRegister = () => {
       height: 44px;
       font-size: 16px;
       font-weight: 500;
+      background: #6c8ff8;
       border-radius: 4px;
+      outline: none;
     }
   }
 }

+ 102 - 52
src/views/home/components/go-examine.vue

@@ -1,36 +1,45 @@
 <template>
   <div class="go-examine">
     <div class="panel">
-      <div class="panel-header">
-        <div class="store-name">
-          {{ storeName }}
-        </div>
-        <div class="expire">店铺到期时间:{{ expireDate }}</div>
-      </div>
-      <div class="verify-row">
-        <el-input v-model="voucherCode" placeholder="请输入劵码" class="verify-input" clearable />
-        <el-button type="primary" class="verify-btn" @click="handleVerify"> 验券 </el-button>
+      <div class="store-name">
+        <el-image :src="homeIcon" class="homeIcon" />
+        <div>{{ storeName }}</div>
       </div>
+      <div class="expire">店铺到期时间:{{ expireDate }}</div>
+    </div>
+
+    <div class="verify-row">
+      <el-input outline="none" v-model="voucherCode" placeholder="请输入劵码" class="verify-input" clearable />
+      <el-button type="primary" class="verify-btn" @click="handleVerify"> 验 券 </el-button>
     </div>
 
     <div class="stats">
-      <div class="stat-card">
-        <div class="stat-title">店铺钱包(元)</div>
-        <div class="stat-value">
-          {{ walletAmount.toFixed(2) }}
+      <div class="wallet">
+        <div class="stat-card">
+          <div class="stat-title">店铺钱包(元)</div>
+          <div class="stat-value">
+            {{ walletAmount.toFixed(2) }}
+          </div>
         </div>
+        <el-image :src="homeWallet" class="walletImg" />
       </div>
-      <div class="stat-card">
-        <div class="stat-title">今日订单量(单)</div>
-        <div class="stat-value">
-          {{ todayOrders }}
+      <div class="wallet">
+        <div class="stat-card">
+          <div class="stat-title">今日订单量(单)</div>
+          <div class="stat-value">
+            {{ todayOrders }}
+          </div>
         </div>
+        <el-image :src="homeOrder" class="walletImg" />
       </div>
-      <div class="stat-card">
-        <div class="stat-title">今日收益(元)</div>
-        <div class="stat-value">
-          {{ todayRevenue }}
+      <div class="wallet">
+        <div class="stat-card">
+          <div class="stat-title">今日收益(元)</div>
+          <div class="stat-value">
+            {{ todayRevenue.toFixed(2) }}
+          </div>
         </div>
+        <el-image :src="homeIncome" class="walletImg" />
       </div>
     </div>
   </div>
@@ -38,6 +47,10 @@
 
 <script setup lang="ts">
 import { ref } from "vue";
+import homeIcon from "../../../assets/images/home-icon.png";
+import homeWallet from "../../../assets/images/home-wallet.png";
+import homeOrder from "../../../assets/images/home-order.png";
+import homeIncome from "../../../assets/images/home-income.png";
 
 // 数据(可根据实际接口替换)
 const storeName = ref("时间图书馆");
@@ -58,58 +71,95 @@ const handleVerify = () => {
 
 <style scoped lang="scss">
 .go-examine {
+  box-sizing: border-box;
+  width: 100%;
+  height: calc(100vh - 105px);
+  overflow: hidden;
+  background: url("../../../assets/images/home-bg.png") center center no-repeat;
+  background-size: cover;
   .panel {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 105px;
     padding: 16px;
     margin-bottom: 16px;
     background: #ffffff;
+    background: linear-gradient(90deg, #6c8ff8 0%, rgb(255 255 255 / 0%) 100%);
     border: 1px solid #e4e7ed;
     border-radius: 6px;
-    .panel-header {
+    border-radius: 10px;
+    .store-name {
       display: flex;
       align-items: center;
-      justify-content: space-between;
-      margin-bottom: 14px;
-      .store-name {
-        font-size: 16px;
-        font-weight: 600;
-        color: #303133;
-      }
-      .expire {
-        font-size: 13px;
-        color: #606266;
+      font-size: 24px;
+      font-weight: 600;
+      color: #ffffff;
+      .homeIcon {
+        width: 76px;
+        height: 76px;
+        margin-right: 8px;
+        margin-left: 25px;
       }
     }
-    .verify-row {
-      display: flex;
-      gap: 12px;
-      align-items: center;
-      .verify-input {
-        flex: 1;
-      }
-      .verify-btn {
-        width: 96px;
+    .expire {
+      font-size: 13px;
+      color: #606266;
+    }
+  }
+  .verify-row {
+    display: flex;
+    align-items: center;
+    height: 228px;
+    padding: 0 50px;
+    background: linear-gradient(90deg, #6c8ff8 0%, rgb(255 255 255 / 0%) 100%);
+    border-radius: 10px;
+    .verify-input {
+      height: 132px;
+      font-size: 30px;
+
+      // 去除输入框获得焦点时的默认蓝框
+      :deep(.el-input__wrapper) {
+        outline: none;
+        box-shadow: none;
       }
     }
+    .verify-btn {
+      width: 356px;
+      height: 132px;
+      font-size: 30px;
+      background: #6c8ff8;
+    }
   }
   .stats {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 20px;
-    .stat-card {
-      padding: 26px 12px;
-      text-align: center;
+    margin-top: 30px;
+    .wallet {
+      display: flex;
+      align-items: center;
+      justify-content: center;
       background: #ffffff;
       border: 1px solid #e4e7ed;
       border-radius: 6px;
-      .stat-title {
-        margin-bottom: 14px;
-        font-size: 14px;
-        color: #606266;
+      .stat-card {
+        padding: 26px 12px;
+        text-align: center;
+        .stat-title {
+          margin-bottom: 14px;
+          font-size: 14px;
+          color: #606266;
+        }
+        .stat-value {
+          font-size: 22px;
+          font-weight: 600;
+          color: #303133;
+        }
       }
-      .stat-value {
-        font-size: 22px;
-        font-weight: 600;
-        color: #303133;
+      .walletImg {
+        width: 211px;
+        height: 211px;
       }
     }
   }

+ 2 - 7
src/views/home/index.vue

@@ -17,7 +17,7 @@ import { ref } from "vue";
 import goEnter from "./components/go-enter.vue";
 import goFlow from "./components/go-flow.vue";
 import goExamine from "./components/go-examine.vue";
-const userInfo = ref(1);
+const userInfo = ref(0);
 
 // 当前步骤:0-首页,1-第一步,2-第二步
 const currentStep = ref(0);
@@ -28,9 +28,4 @@ const handleUpdateCurrentStep = (step: number) => {
 };
 </script>
 
-<style scoped lang="scss">
-#home {
-  min-height: calc(100vh - 100px);
-  padding: 20px;
-}
-</style>
+<style scoped lang="scss"></style>