|
|
@@ -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: [{
|