浏览代码

feat: 优化认证页面逻辑;禁用推荐人编号和渠道来源字段以提升用户体验

EvilDragon 1 月之前
父节点
当前提交
afc092c54e
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      packages/app/src/pages/mine/authentication/index.vue

+ 4 - 6
packages/app/src/pages/mine/authentication/index.vue

@@ -58,7 +58,7 @@ const schema = ref<DataFormSchema>({
     labelWidth: 63,
     props: {
       placeholder: '请填写推荐人编号',
-      disabled: userAuthInfo.value != null,
+      disabled: false,
     },
   },
   designerName: {
@@ -109,7 +109,7 @@ const setReferrerExisting = (value: string) => {
 }
 const handleSubmit = async () => {
   console.log(formData.value)
-  if (formData.value.channelSource && formData.value.channelSource !== '4') {
+  if (formData.value.channelSource && formData.value.channelSource !== '4' && !userAuthInfo.value) {
     if ((formData.value.referrer ?? '') === '') {
       uni.showToast({ title: messages.mine.authentication.referrerErrorText, icon: 'none' })
       return
@@ -182,11 +182,7 @@ const handleSubmit = async () => {
 }
 onMounted(async () => {
   await setUserAuthInfo()
-  console.log(userAuthInfo.value)
-  console.log(userAuthInfo.value)
-
   if (userAuthInfo.value) {
-    console.log(userAuthInfo.value)
     formData.value = {
       ...pick(userAuthInfo.value, [
         'channelSource',
@@ -201,6 +197,8 @@ onMounted(async () => {
     }
     setReferrerExisting(userAuthInfo.value.channelSource.toString())
     attachment.value = userAuthInfo.value.attachment
+    schema.value.channelSource.props.disabled = true
+    schema.value.referrer.props.disabled = true
   }
   const { data } = await getByDictType('member_channel_source')
   const { data: res } = await getByDictType(DictType.memberSpatialExpertiseType)