|
@@ -5,10 +5,10 @@
|
|
|
</template>
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container register__form" @submit="formSubmit">
|
|
<Form ref="formRef" class="g-form__container register__form" @submit="formSubmit">
|
|
|
<CellGroup inset>
|
|
<CellGroup inset>
|
|
|
- <Field v-model="formData.mobilephone" type="tel" name="mobilephone" :label="$t('user.register.mobile')" :placeholder="$t('common.required')"
|
|
|
|
|
- :rules="formRules.mobilephone" />
|
|
|
|
|
- <Field v-model="formData.vcode" type="digit" name="vcode" :label="$t('user.register.vcode')" :placeholder="$t('common.required')"
|
|
|
|
|
- :rules="formRules.vcode">
|
|
|
|
|
|
|
+ <Field v-model="formData.mobilephone" type="tel" name="mobilephone" :label="$t('user.register.mobile')"
|
|
|
|
|
+ :placeholder="$t('common.required')" :rules="formRules.mobilephone" />
|
|
|
|
|
+ <Field v-model="formData.vcode" type="digit" name="vcode" :label="$t('user.register.vcode')"
|
|
|
|
|
+ :placeholder="$t('common.required')" :rules="formRules.vcode">
|
|
|
<template #button>
|
|
<template #button>
|
|
|
<Button size="small" type="danger" :disabled="isCountdown" @click="sendVerifyCode">
|
|
<Button size="small" type="danger" :disabled="isCountdown" @click="sendVerifyCode">
|
|
|
<span v-if="isCountdown">{{ $t('user.register.sendagain') }}({{ currentTime.seconds }})</span>
|
|
<span v-if="isCountdown">{{ $t('user.register.sendagain') }}({{ currentTime.seconds }})</span>
|
|
@@ -18,11 +18,12 @@
|
|
|
</Field>
|
|
</Field>
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<CellGroup inset>
|
|
<CellGroup inset>
|
|
|
- <Field v-model="formData.loginpwd" name="loginpwd" type="password" :label="$t('user.register.logipwd')" :placeholder="$t('common.required')"
|
|
|
|
|
- :rules="formRules.loginpwd" />
|
|
|
|
|
- <Field v-model="confirmpassword" name="confirmpassword" type="password" :label="$t('user.register.confirmpwd')" :placeholder="$t('common.required')"
|
|
|
|
|
- :rules="formRules.confirmpassword" />
|
|
|
|
|
- <Field v-model="formData.refernum" name="refernum" :label="$t('user.register.registercode')" :placeholder="registrationCodeRule ? $t('common.required') : $t('common.optional')"
|
|
|
|
|
|
|
+ <Field v-model="formData.loginpwd" name="loginpwd" type="password" :label="$t('user.register.logipwd')"
|
|
|
|
|
+ :placeholder="$t('common.required')" :rules="formRules.loginpwd" />
|
|
|
|
|
+ <Field v-model="confirmpassword" name="confirmpassword" type="password" :label="$t('user.register.confirmpwd')"
|
|
|
|
|
+ :placeholder="$t('common.required')" :rules="formRules.confirmpassword" />
|
|
|
|
|
+ <Field v-model="formData.refernum" name="refernum" :label="$t('user.register.registercode')"
|
|
|
|
|
+ :placeholder="registrationCodeRule ? $t('common.required') : $t('common.optional')"
|
|
|
:rules="formRules.refernum" v-if="registrationCodeRule > -1">
|
|
:rules="formRules.refernum" v-if="registrationCodeRule > -1">
|
|
|
<!-- <template #button>
|
|
<!-- <template #button>
|
|
|
<app-qrcode-scan @success="onScanSuccess">
|
|
<app-qrcode-scan @success="onScanSuccess">
|
|
@@ -35,9 +36,15 @@
|
|
|
<Cell>
|
|
<Cell>
|
|
|
<template #title>
|
|
<template #title>
|
|
|
<div style="display: flex;align-items: center;font-size: 12px;">
|
|
<div style="display: flex;align-items: center;font-size: 12px;">
|
|
|
- <Checkbox shape="square" icon-size="16px" v-model="checked">{{ $t('user.register.checked') }}</Checkbox>
|
|
|
|
|
- <span @click="routerTo('rules-zcxy')" style="color:#E92020">{{ $t('user.register.ruleszcxy') }}</span>
|
|
|
|
|
- <span @click="routerTo('rules-yhkhfxgzs')" style="color:#E92020">{{ $t('user.register.rulesfxgzs') }}</span>
|
|
|
|
|
|
|
+ <Checkbox shape="square" icon-size="16px" v-model="checked">
|
|
|
|
|
+ {{ $t('user.register.checked') }}
|
|
|
|
|
+ </Checkbox>
|
|
|
|
|
+ <span @click="routerTo('rules-zcxy')" style="color:#E92020">
|
|
|
|
|
+ {{ $t('user.register.ruleszcxy') }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span @click="routerTo('rules-yhkhfxgzs')" style="color:#E92020" v-if="showYhkhfxgzs">
|
|
|
|
|
+ {{ $t('user.register.rulesfxgzs') }}
|
|
|
|
|
+ </span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</Cell>
|
|
</Cell>
|
|
@@ -47,13 +54,14 @@
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
<Button type="danger" @click="formRef?.submit" round block>{{ $t('user.register.freeregister') }}</Button>
|
|
<Button type="danger" @click="formRef?.submit" round block>{{ $t('user.register.freeregister') }}</Button>
|
|
|
</div>
|
|
</div>
|
|
|
- <app-reward :show="showReward" :value="redEnvelope" :title="$t('user.register.registersuccess')" @click="router.back()" />
|
|
|
|
|
|
|
+ <app-reward :show="showReward" :value="redEnvelope" :title="$t('user.register.registersuccess')"
|
|
|
|
|
+ @click="router.back()" />
|
|
|
</template>
|
|
</template>
|
|
|
</app-view>
|
|
</app-view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { reactive, ref, computed, onMounted, shallowRef } from 'vue'
|
|
|
|
|
|
|
+import { reactive, ref, computed, onMounted } from 'vue'
|
|
|
import { CellGroup, Cell, Button, Field, Form, FormInstance, Checkbox, showFailToast, showToast, FieldRule } from 'vant'
|
|
import { CellGroup, Cell, Button, Field, Form, FormInstance, Checkbox, showFailToast, showToast, FieldRule } from 'vant'
|
|
|
import { useCountDown } from '@vant/use'
|
|
import { useCountDown } from '@vant/use'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
@@ -66,6 +74,13 @@ import plus from '@/utils/h5plus'
|
|
|
import AppReward from '@mobile/components/modules/reward/index.vue'
|
|
import AppReward from '@mobile/components/modules/reward/index.vue'
|
|
|
// import AppQrcodeScan from '@mobile/components/base/qrcode-scan/index.vue'
|
|
// import AppQrcodeScan from '@mobile/components/base/qrcode-scan/index.vue'
|
|
|
|
|
|
|
|
|
|
+defineProps({
|
|
|
|
|
+ showYhkhfxgzs: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: true
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const { router, routerTo } = useNavigation()
|
|
const { router, routerTo } = useNavigation()
|
|
|
const globalStore = useGlobalStore()
|
|
const globalStore = useGlobalStore()
|
|
|
const registrationCodeRule = globalStore.getSystemInfo('registrationCodeRule')
|
|
const registrationCodeRule = globalStore.getSystemInfo('registrationCodeRule')
|
|
@@ -76,7 +91,8 @@ const showReward = ref(false) // 显示红包
|
|
|
const redEnvelope = ref(0) // 红包金额
|
|
const redEnvelope = ref(0) // 红包金额
|
|
|
|
|
|
|
|
const { getSystemParamValue } = useUserStore()
|
|
const { getSystemParamValue } = useUserStore()
|
|
|
-const system_1010 = shallowRef(getSystemParamValue('1010') ?? '1')
|
|
|
|
|
|
|
+const param1010 = getSystemParamValue('1010') ?? '1'
|
|
|
|
|
+const param1013 = getSystemParamValue('1013') ?? '30'
|
|
|
|
|
|
|
|
const { global: { t } } = i18n
|
|
const { global: { t } } = i18n
|
|
|
|
|
|
|
@@ -84,7 +100,7 @@ const confirmpassword = ref('') // 确认密码
|
|
|
|
|
|
|
|
// 倒计时函数
|
|
// 倒计时函数
|
|
|
const countdown = useCountDown({
|
|
const countdown = useCountDown({
|
|
|
- time: 30 * 1000,
|
|
|
|
|
|
|
+ time: +param1013 * 1000,
|
|
|
onFinish: () => {
|
|
onFinish: () => {
|
|
|
countdown.reset()
|
|
countdown.reset()
|
|
|
isCountdown.value = false
|
|
isCountdown.value = false
|
|
@@ -114,17 +130,17 @@ const formRules: { [key: string]: FieldRule[] } = {
|
|
|
message: t('user.register.tips1'),
|
|
message: t('user.register.tips1'),
|
|
|
validator: (val) => {
|
|
validator: (val) => {
|
|
|
/// 值为”0“ 时 只校验长度20位,不限字符
|
|
/// 值为”0“ 时 只校验长度20位,不限字符
|
|
|
- if (system_1010.value === '0') {
|
|
|
|
|
- if (val.length <= 20) {
|
|
|
|
|
- return true
|
|
|
|
|
- }
|
|
|
|
|
- return t('banksign.tips6')
|
|
|
|
|
|
|
+ if (param1010 === '0') {
|
|
|
|
|
+ if (val.length <= 20) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return t('banksign.tips6')
|
|
|
} else {
|
|
} else {
|
|
|
if (validateRules.phone.validate(val)) {
|
|
if (validateRules.phone.validate(val)) {
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
return validateRules.phone.message
|
|
return validateRules.phone.message
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}],
|
|
}],
|
|
|
loginpwd: [{
|
|
loginpwd: [{
|