Quellcode durchsuchen

Merge branch 'iteration-20240102' into online

lex vor 1 Jahr
Ursprung
Commit
6d768a6d2c
1 geänderte Dateien mit 21 neuen und 9 gelöschten Zeilen
  1. 21 9
      src/components/m-img-code/index.tsx

+ 21 - 9
src/components/m-img-code/index.tsx

@@ -58,21 +58,31 @@ export default defineComponent({
         if ((this as any).code.length < 4) {
         if ((this as any).code.length < 4) {
           return;
           return;
         }
         }
-        await request.post(`${this.isSuffix}/code/verifyLoginImage`, {
+        // await request.post(`${this.isSuffix}/code/verifyLoginImage`, {
+        //   requestType: 'form',
+        //   hideLoading: true,
+        //   data: {
+        //     phone: this.phone,
+        //     code: this.code
+        //   }
+        // });
+        // await request.post(`${this.isSuffix}/code/sendSms`, {
+        //   requestType: 'form',
+        //   hideLoading: true,
+        //   data: {
+        //     mobile: this.phone
+        //   }
+        // });
+
+        await request.post(`${this.isSuffix}/code/sendSmsCode`, {
           requestType: 'form',
           requestType: 'form',
           hideLoading: true,
           hideLoading: true,
           data: {
           data: {
-            phone: this.phone,
+            mobile: this.phone,
             code: this.code
             code: this.code
           }
           }
         });
         });
-        await request.post(`${this.isSuffix}/code/sendSms`, {
-          requestType: 'form',
-          hideLoading: true,
-          data: {
-            mobile: this.phone
-          }
-        });
+
         setTimeout(() => {
         setTimeout(() => {
           showToast('验证码已发送');
           showToast('验证码已发送');
         }, 100);
         }, 100);
@@ -103,6 +113,8 @@ export default defineComponent({
                 placeholder="请输入验证码"
                 placeholder="请输入验证码"
                 v-model={this.code}
                 v-model={this.code}
                 class={styles.field}
                 class={styles.field}
+                autocomplete="off"
+                maxlength={4}
               />
               />
             </Col>
             </Col>
             <Col span="10" class={styles.img}>
             <Col span="10" class={styles.img}>