|
|
@@ -28,7 +28,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { Icon, Button, Notice } from "view-design";
|
|
|
+import { Icon, Button, Notice, Message } from "view-design";
|
|
|
import "view-design/dist/styles/iview.css";
|
|
|
import axios from "@/utils/axios";
|
|
|
import ImageCompressor from "js-image-compressor";
|
|
|
@@ -111,8 +111,8 @@ export default {
|
|
|
// 识别
|
|
|
async save() {
|
|
|
if (!this.newImg.length) return;
|
|
|
+ const start = Date.now();
|
|
|
try {
|
|
|
- console.log(this.newImg[0].data);
|
|
|
this.show = true;
|
|
|
const formData = new FormData();
|
|
|
formData.append("pic", this.newImg[0].data);
|
|
|
@@ -124,6 +124,11 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
this.show = false;
|
|
|
+ const end = Date.now();
|
|
|
+ Message.info({
|
|
|
+ content: "识别总用时:" + (start - end) / 1000 + "s",
|
|
|
+ duration: 5,
|
|
|
+ });
|
|
|
},
|
|
|
// 处理数据
|
|
|
setData(data) {
|