Parcourir la source

fix(ticketManagement): 优化登录逻辑和优惠券验证规则

- 登录时清除 ticketManagement 的 activeName 缓存
- 更新优惠券面值验证规则,支持最多6位整数和2位小数
- 保留原有表单必填校验逻辑
congxuesong il y a 3 semaines
Parent
commit
789a177f06
2 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 1 0
      src/views/login/index.vue
  2. 1 1
      src/views/ticketManagement/newCoupon.vue

+ 1 - 0
src/views/login/index.vue

@@ -897,6 +897,7 @@ const handleLogin = async () => {
         } else {
           localRemove("businessSection");
         }
+        sessionStorage.removeItem("ticketManagement_activeName");
         await initDynamicRouter();
 
         // 3.清空 tabs、keepAlive 数据

+ 1 - 1
src/views/ticketManagement/newCoupon.vue

@@ -126,7 +126,7 @@ const rules = reactive({
   nominalValue: [
     { required: true, message: "请输入面值" },
     {
-      validator: validatePositiveNumber("面值必须为正数"),
+      validator: validatePriceFormat("整数部分最多6位,小数部分最多2位"),
       trigger: "blur"
     }
   ],