瀏覽代碼

feature_20250722_金牌店档案收集

zhujindu 4 月之前
父節點
當前提交
8e7bef4d80
共有 2 個文件被更改,包括 18 次插入4 次删除
  1. 9 0
      src/api/index.js
  2. 9 4
      src/views/deviceWithin/addStoreVisit.vue

+ 9 - 0
src/api/index.js

@@ -1039,3 +1039,12 @@ export function imgToBase64(data) {
     data,
   });
 }
+
+// 发送验证码并校验验证码
+export function sendAndCheckVerCode(query) {
+  return request({
+    url: '/mobile/storeGroup/sendAndCheckVerCode',
+    method: 'get',
+    params: query,
+  });
+}

+ 9 - 4
src/views/deviceWithin/addStoreVisit.vue

@@ -2859,6 +2859,7 @@ import {
   editDwellTime,
   deleteTaskAnswer,
   getCollectionShowHistory,
+  sendAndCheckVerCode,
 } from '@/api/index';
 import zRadio from '@/components/zRadio';
 import zCheckbox from '@/components/zCheckbox';
@@ -5004,10 +5005,14 @@ export default {
       }
       if (this.time) return;
       this.timeNum = 0;
-      this.time = setInterval(() => {
-        this.timeNum++;
-        if (this.timeNum == 60) this.time = null;
-      }, 1000);
+      sendAndCheckVerCode({}).then((res) => {
+        if (res.code == 200) {
+          this.time = setInterval(() => {
+            this.timeNum++;
+            if (this.timeNum == 60) this.time = null;
+          }, 1000);
+        }
+      });
     },
     verification(item) {},
     onClickLeft() {