体检预约保存头像使用新接口

main
jinna 3 years ago
parent d1e9d58f1c
commit 473c96ea5e
  1. 26
      src/views/examProject.vue

@ -120,7 +120,8 @@
<script>
import { postExam } from "@/api/examination";
import { saveCupImg } from "@/api/hospital";
import { saveCupImg,saveCupImgLocal } from "@/api/hospital";
import QS from "qs"
export default {
data() {
return {
@ -198,10 +199,12 @@ export default {
message: '请求中',
duration: 0,
})
let params = {cupCardNo: this.Base64.encode(this.userInfo.papersnumber), cupImg: avatar}
try {
if (this.GlobalConfig.appMode) {
vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczdhqwzxq", JSON.stringify(param), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczdsctjrtx", JSON.stringify(param), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
this.$toast.clear();
console.log('value',value)
let retData = JSON.parse(value);
if (retData.code == 200) {
this.$toast('采集成功');
@ -214,7 +217,22 @@ export default {
})
}
else {
saveCupImg(JSON.stringify(param)).then(res => {
// let formData = new FormData();
// formData.append("data", JSON.stringify(params));
// console.log(formData)
// saveCupImg(formData).then(res => {
// this.$toast.clear();
// if (res.code == 200) {
// this.$toast('');
// this.avatar = avatar;
// console.log(this.avatar)
// } else {
// this.$toast(res.msg);
// }
// }, err => {
// this.$toast.clear();
// })
saveCupImgLocal(params).then(res => {
this.$toast.clear();
if (res.code == 200) {
this.$toast('采集成功');
@ -285,7 +303,7 @@ export default {
confirm() {
let param = this.proArr;
console.log(param)
console.log("param",param)
this.isShowAvatar = false
this.$toast.loading({
message: '请求中',

Loading…
Cancel
Save