feat: govern knowledge assets and source citations
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
/>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="验证码" name="smsCode">
|
||||
<uni-forms-item v-if="smsVerificationEnabled" label="验证码" name="smsCode">
|
||||
<view class="code-row">
|
||||
<view class="field-shell code-shell">
|
||||
<uni-icons class="field-icon" type="locked" size="22" color="#a7adb8" />
|
||||
@@ -74,7 +74,7 @@
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
||||
<view v-if="showDevSmsHint" class="dev-hint-pill" @click="fillDevCredentials">
|
||||
<view v-if="smsVerificationEnabled && showDevSmsHint" class="dev-hint-pill" @click="fillDevCredentials">
|
||||
<uni-icons type="info-filled" size="14" color="#d97706" />
|
||||
<text class="dev-hint-text">测试验证码: {{ devSmsHintValue }}</text>
|
||||
<text class="dev-fill-btn">快捷填入</text>
|
||||
@@ -132,6 +132,8 @@ import { goToMobileTarget, nextUserRouteAfterLogin } from '@/services/position';
|
||||
|
||||
const stored = getAuth();
|
||||
const loginForm = ref();
|
||||
const smsVerificationEnabled = !import.meta.env.DEV
|
||||
|| import.meta.env.VITE_SMS_VERIFICATION_ENABLED === 'true';
|
||||
const formData = reactive({
|
||||
phone: stored.phone || uni.getStorageSync(phoneKey) || '',
|
||||
smsCode: ''
|
||||
@@ -144,10 +146,10 @@ const formRules = {
|
||||
]
|
||||
},
|
||||
smsCode: {
|
||||
rules: [
|
||||
rules: smsVerificationEnabled ? [
|
||||
{ required: true, errorMessage: '请输入短信验证码' },
|
||||
{ pattern: '^\\d{4,6}$', errorMessage: '验证码应为 4 至 6 位数字' }
|
||||
]
|
||||
] : []
|
||||
}
|
||||
};
|
||||
const sending = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user