Переглянути джерело

🎨 优化修改昵称报错提示

快乐的梦鱼 5 днів тому
батько
коміт
c108ec60cb
1 змінених файлів з 2 додано та 5 видалено
  1. 2 5
      src/pages/user/update/profile.vue

+ 2 - 5
src/pages/user/update/profile.vue

@@ -48,6 +48,7 @@ import Button from '@/components/basic/Button.vue';
 import Height from '@/components/layout/space/Height.vue';
 import type { Rules } from 'async-validator';
 import { navTo } from '@/components/utils/PageAction';
+import { showError } from '@/common/composeabe/ErrorDisplay';
 
 const DefaultAvatar = 'https://mncdn.wenlvti.net/app_static/xiangyuan/images/home/UserHead.png';
 
@@ -163,11 +164,7 @@ const submitForm = async () => {
     }, 2000);
     
   } catch (error: any) {
-    uni.showToast({
-      title: error?.message || '更新失败,请稍后重试',
-      icon: 'none',
-      duration: 2000
-    });
+    showError(error, '个人信息更新失败');
   } finally {
     loading.value = false;
   }