Browse Source

fix issue

tags/v1.22.10.1^2
zhoupzh 3 years ago
parent
commit
d45de5a025
2 changed files with 15 additions and 10 deletions
  1. +13
    -0
      web_src/vuepages/apis/modules/desensitization.js
  2. +2
    -10
      web_src/vuepages/pages/model/tuomin/index.vue

+ 13
- 0
web_src/vuepages/apis/modules/desensitization.js View File

@@ -0,0 +1,13 @@
import service from "../service";

// 数据脱敏接口
export const postImgDesensitization = (params, data) => {
return service({
url: "/extension/tuomin/upload",
headers: { Accept: "image/png" },
responseType: "blob",
method: "POST",
params: params,
data: data,
});
};

+ 2
- 10
web_src/vuepages/pages/model/tuomin/index.vue View File

@@ -154,8 +154,7 @@
</template>

<script>
import axios from "axios";

import { postImgDesensitization } from "~/apis/modules/desensitization";
export default {
data() {
return {
@@ -215,14 +214,7 @@ export default {
let fd = new FormData();
fd.append("file", this.file.raw);
this.tranformImageLoading = true;
axios({
method: "POST",
url: "/extension/tuomin/upload",
headers: { Accept: "image/png" },
responseType: "blob",
params: { mode: this.radio },
data: fd,
})
postImgDesensitization({ mode: this.radio }, fd)
.then((res) => {
const objectURL = URL.createObjectURL(res.data);
this.resultImgSrc = objectURL;


Loading…
Cancel
Save