Handy_Cao 1 yıl önce
ebeveyn
işleme
2682b25405

+ 15 - 4
src/packages/mobile/views/order/position/components/spot/pickup/Index.vue

@@ -64,7 +64,7 @@ import { validateRules } from '@/constants/regex'
 import { getReceiptTypeName } from '@/constants/receipt'
 import { getAppointmentModelOutList } from '@/constants/order'
 import { useWrOutInApply } from '@/business/trade'
-import { i18n } from '@/stores'
+import { i18n, useUserStore } from '@/stores'
 
 import AppModal from '@/components/base/modal/index.vue'
 import AppSelect from '@mobile/components/base/select/index.vue'
@@ -90,6 +90,9 @@ const showReceipt = shallowRef(false) // 显示发票选择列表
 const refresh = shallowRef(false) // 是否刷新父组件数据
 const regionName = shallowRef('') // 地区名称
 
+const { getSystemParamValue } = useUserStore()
+const system_1010 = shallowRef(getSystemParamValue('1010') ?? '1')
+
 // 表单验证规则
 const formRules: { [key in keyof Proto.WROutApplyReq | 'orderQty' | 'Region']?: FieldRule[] } = {
     orderQty: [{
@@ -106,10 +109,18 @@ const formRules: { [key in keyof Proto.WROutApplyReq | 'orderQty' | 'Region']?:
         required: true,
         message: t('position.spot.tips10'),
         validator: (val) => {
-            if (validateRules.phone.validate(val)) {
+            /// 值为”0“ 时 只校验长度20位,不限字符
+            if (system_1010.value === '0') {
+                if (val.length <= 20) {
+                    return true
+                }
+                return t('banksign.tips6')
+            } else {
+                if (validateRules.phone.validate(val)) {
                 return true
-            }
-            return validateRules.phone.message
+                }
+                return validateRules.phone.message
+            } 
         }
     }],
     Region: [{

+ 15 - 4
src/packages/mobile/views/user/forget/Index.vue

@@ -31,7 +31,7 @@
 </template>
 
 <script lang="ts" setup>
-import { reactive, ref, computed } from 'vue'
+import { reactive, ref, computed, shallowRef } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule } from 'vant'
 import { useCountDown } from '@vant/use'
 import { fullloading, dialog } from '@/utils/vant'
@@ -41,12 +41,15 @@ import { useNavigation } from '@mobile/router/navigation'
 import { queryLoginId } from '@/services/api/account'
 import { resetPassword, sendResetVerifyCode } from '@/services/api/common'
 import cryptojs from 'crypto-js'
-import { i18n } from '@/stores'
+import { i18n, useUserStore } from '@/stores'
 
 const { router } = useNavigation()
 const formRef = ref<FormInstance>()
 const isCountdown = ref(false) // 是否正在倒计时
 
+const { getSystemParamValue } = useUserStore()
+const system_1010 = shallowRef(getSystemParamValue('1010') ?? '1')
+
 const { global: { t } } = i18n
 
 // 倒计时函数
@@ -76,10 +79,18 @@ const formRules: { [key in keyof Model.ResetPasswordReq | 'confirmpassword']?: F
         required: true,
         message: t('user.forget.tips1'),
         validator: (val) => {
-            if (validateRules.phone.validate(val)) {
+            /// 值为”0“ 时 只校验长度20位,不限字符
+            if (system_1010.value === '0') {
+                if (val.length <= 20) {
+                    return true
+                }
+                return t('banksign.tips6')
+            } else {
+                if (validateRules.phone.validate(val)) {
                 return true
+                }
+                return validateRules.phone.message
             }
-            return validateRules.phone.message
         }
     }],
     password: [{