zhuli 2 weeks ago
parent
commit
e10e5cd37a

+ 3 - 1
src/layouts/components/Header/ToolBarRight.vue

@@ -8,7 +8,7 @@
       <Message id="message" />
       <Fullscreen id="fullscreen" />
     </div>
-    <span class="username">{{ username }}</span>
+    <span class="username">{{ userInfo.name != null ? userInfo.name : userInfo.nickName }}</span>
     <Avatar />
   </div>
 </template>
@@ -23,9 +23,11 @@ import ThemeSetting from "./components/ThemeSetting.vue";
 import Message from "./components/Message.vue";
 import Fullscreen from "./components/Fullscreen.vue";
 import Avatar from "./components/Avatar.vue";
+import { localGet } from "@/utils/index";
 
 const userStore = useUserStore();
 const username = computed(() => userStore.userInfo.name);
+const userInfo = localGet("geeker-user")?.userInfo || {};
 </script>
 
 <style scoped lang="scss">

+ 0 - 3
src/views/financialManagement/cashApply.vue

@@ -322,9 +322,6 @@ onMounted(() => {
   border: 1px solid #dcdfe6;
   border-radius: 8px;
   transition: all 0.3s;
-  &:hover {
-    border-color: #7f9dff;
-  }
   &.active {
     background-color: #ecf5ff;
     border-color: #7f9dff;

+ 15 - 0
src/views/financialManagement/index.vue

@@ -178,6 +178,21 @@ const fetchGetTodayIncome = async () => {
 
 const handleAction = async (key: string) => {
   if (key == "withdraw") {
+    // 获取可提现金额
+    const withdrawAmount = stats[0].amount;
+
+    // 转换为数字类型
+    const numAmount = typeof withdrawAmount === "string" ? parseFloat(withdrawAmount) : Number(withdrawAmount);
+
+    // 校验金额是否小于0.1
+    if (isNaN(numAmount) || numAmount < 0.1) {
+      // 格式化金额显示
+      const formattedAmount = isNaN(numAmount) ? "0.00" : numAmount.toFixed(2);
+      ElMessage.warning(`可提现金额不足,最低提现金额为0.1元,当前可提现金额为¥${formattedAmount}元`);
+      return;
+    }
+
+    // 金额校验通过,继续原有逻辑
     if (userInfo.alipayAccount != null && userInfo.payPassword != null) {
       router.push({ path: "/financialManagement/cashApply" });
     } else {

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

@@ -17,7 +17,7 @@
 
 <script setup lang="ts">
 import { onMounted, ref, watch } from "vue";
-import { localGet } from "@/utils/index";
+import { localGet, localSet } from "@/utils/index";
 import goEnter from "./components/go-enter.vue";
 import goFlow from "./components/go-flow.vue";
 import goExamine from "./components/go-examine.vue";
@@ -100,6 +100,13 @@ const getUserInfo = async () => {
     const res: any = await getMerchantByPhone(param);
     storeId.value = res.data.storeId;
     if (res && res.code == 200 && res.data) {
+      // 更新缓存中的 storeId
+      geekerUser.userInfo.storeId = res.data.storeId;
+      localSet("geeker-user", geekerUser);
+      // 同时更新 createdId 缓存
+      if (res.data.storeId) {
+        localSet("createdId", res.data.storeId);
+      }
       if (res.data.storeId == null) {
         isEntry.value = true;
       }
@@ -110,8 +117,8 @@ const getUserInfo = async () => {
         const resStore: any = await getDetail(param1);
         if (resStore && resStore.code == 200 && resStore.data) {
           storeApplicationStatus.value = resStore.data.storeApplicationStatus;
-          console.log(storeApplicationStatus.value);
           if (storeApplicationStatus.value == 0) {
+            //
             currentStep.value = 3;
           }
           if (storeApplicationStatus.value == 2) {