浏览代码

修改图形验证码功能

lex 1 年之前
父节点
当前提交
fb28390663
共有 1 个文件被更改,包括 20 次插入9 次删除
  1. 20 9
      src/components/m-img-code/index.tsx

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

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