liyongli 1 månad sedan
förälder
incheckning
5e2e4f0450
1 ändrade filer med 6 tillägg och 7 borttagningar
  1. 6 7
      src/view/fenghui/index.vue

+ 6 - 7
src/view/fenghui/index.vue

@@ -70,7 +70,6 @@
                         :placeholder="lang[langType].ortherNotesContent" />
                 </van-cell-group>
             </div>
-
             <van-button class="btn_bottom" block type="primary" native-type="submit">
                 {{ lang[langType].submit }}
             </van-button>
@@ -154,7 +153,7 @@ const onConfirm = ({ selectedValues, selectedOptions }) => {
 };
 
 const beforeRead = () => {
-    if (!isFile) showToast(lang.value[langType.value].changePhono);
+    if (!isFile()) showToast(lang.value[langType.value].changePhono);
     const item = photo.value[0]
     const oriData = new FormData();
     oriData.append('file', item.file);
@@ -165,8 +164,7 @@ const beforeRead = () => {
             'Content-Type': 'multipart/form-data',
         },
         data: oriData,
-    })
-        .then(res => {
+    }).then(res => {
             if (res.status !== 200 || res.data.code !== 0) {
                 showToast(lang.value[langType.value].upFileError);
                 from.photoUrl = []
@@ -181,12 +179,13 @@ const beforeRead = () => {
                 }
             ]
         })
-    return true;
+    return false;
 };
 
 // 选择权限范围
-const onSubmit = () => {
-    if (!isFile) showToast(lang.value[langType.value].selectFile);
+const onSubmit = (values) => {
+    console.log('submit', values);
+    if (!isFile()) showToast(lang.value[langType.value].selectFile);
     saveData({
         "name": from.name,
         "photo": from.photoUrl[0].url,