改接口

This commit is contained in:
Teng 2025-11-25 11:25:32 +08:00
parent b2f85c35c3
commit ca75e2674d
23 changed files with 387 additions and 83 deletions

View File

@ -156,6 +156,7 @@
uping.value = false; uping.value = false;
uni.showLoading() uni.showLoading()
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/api/ocr/businessLicense`, // POST url: `${base_url}/api/ocr/businessLicense`, // POST
filePath, filePath,
@ -163,7 +164,9 @@
header: { header: {
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: {}, formData: {
biz: `temp`
},
success: uploadRes => { success: uploadRes => {
if (!JSON.parse(uploadRes.data).success) { if (!JSON.parse(uploadRes.data).success) {
uni.hideLoading() uni.hideLoading()
@ -206,6 +209,28 @@
} }
const fontphoto = ref(""); const fontphoto = ref("");
const savephoto = (filePath) => { const savephoto = (filePath) => {
// category: 'jg' | 'yg' | 'zz' | 'jhr'
const now = new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 0
let path = '';
switch ('jg') {
case 'jg': //
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case 'yg': //
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case 'zz': //
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case 'jhr': //
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/sys/common/upload`, // POST url: `${base_url}/sys/common/upload`, // POST
filePath, filePath,
@ -214,7 +239,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
fontphoto.value = JSON.parse(uploadRes.data).message; fontphoto.value = JSON.parse(uploadRes.data).message;

View File

@ -279,6 +279,28 @@
} }
const uping = ref(true) const uping = ref(true)
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
// category: 'jg' | 'yg' | 'zz' | 'jhr'
const now = new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 0
let path = '';
switch ('jg') {
case 'jg': //
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case 'yg': //
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case 'zz': //
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case 'jhr': //
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/sys/common/upload`, // POST url: `${base_url}/sys/common/upload`, // POST
filePath, filePath,
@ -287,7 +309,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {
@ -305,7 +327,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {

View File

@ -95,7 +95,7 @@
import { import {
getMessage getMessage
} from '@/api/loginApi.js' } from '@/api/loginApi.js'
const bottomshow = ref(false); const bottomshow = ref(false);
const form = reactive({ const form = reactive({
@ -150,9 +150,9 @@
} }
if (specialImge.value) { if (specialImge.value) {
bottomshow.value = true; bottomshow.value = true;
} else { } else {
angetMessage() angetMessage()
} }
@ -430,18 +430,18 @@
uping.value = true; uping.value = true;
return return
} }
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) { if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data; let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
specialImgeshow.value = filePath; specialImgeshow.value = filePath;
form.name = father.name; form.name = father.name;
form.idCard = father.idNumber; form.idCard = father.idNumber;
form.homeAddress = father.address form.homeAddress = father.address
savephoto(filePath); savephoto(filePath);
} }
}, },
fail: err => { fail: err => {
uni.showToast({ uni.showToast({
@ -453,6 +453,28 @@
}) })
} }
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
// category: 'jg' | 'yg' | 'zz' | 'jhr'
const now = new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 0
let path = '';
switch ('zz') {
case 'jg': //
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case 'yg': //
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case 'zz': //
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case 'jhr': //
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/sys/common/upload`, // POST url: `${base_url}/sys/common/upload`, // POST
filePath, filePath,
@ -461,12 +483,12 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
specialImge.value = JSON.parse(uploadRes.data).message specialImge.value = JSON.parse(uploadRes.data).message
uni.hideLoading() uni.hideLoading()
uping.value = true; uping.value = true;
}, },
fail: err => { fail: err => {
@ -626,6 +648,7 @@
width: 100%; width: 100%;
height: 700rpx; height: 700rpx;
} }
.white-photo { .white-photo {
width: 100%; width: 100%;
height: 300rpx; height: 300rpx;
@ -634,24 +657,25 @@
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
display: flex; display: flex;
.photo { .photo {
width: 300rpx; width: 300rpx;
height: 200rpx; height: 200rpx;
} }
} }
.photo-left { .photo-left {
.photo-weight { .photo-weight {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
} }
.photo-font { .photo-font {
font-size: 28rpx; font-size: 28rpx;
margin-top: 10rpx; margin-top: 10rpx;
color: #666; color: #666;
} }
} }
</style> </style>

View File

@ -213,8 +213,9 @@
const photoclick = (element) => { const photoclick = (element) => {
if (element) { if (element) {
uni.previewImage({ uni.previewImage({
urls: [headImge.value, backImge.value,specialImgeshow.value], // urls: [headImge.value, backImge.value, specialImgeshow.value], //
current: targetphoto.value ? (targetphoto.value==1?backImge.value:specialImgeshow.value) : headImge.value, // urls[0] current: targetphoto.value ? (targetphoto.value == 1 ? backImge.value : specialImgeshow
.value) : headImge.value, // urls[0]
indicator: 'default', // H5/App 'default' 'number' indicator: 'default', // H5/App 'default' 'number'
longPressActions: { // App longPressActions: { // App
itemList: ['保存图片到相册'], itemList: ['保存图片到相册'],
@ -236,25 +237,25 @@
} }
// specialImge // specialImge
targetphoto.value = number targetphoto.value = number
if (!number){ if (!number) {
if(headImge.value){ if (headImge.value) {
bottomshow.value = true; bottomshow.value = true;
}else{ } else {
getMessage() getMessage()
} }
}else if(number==1){ } else if (number == 1) {
if(backImge.value){ if (backImge.value) {
bottomshow.value = true; bottomshow.value = true;
}else{ } else {
getMessage() getMessage()
} }
}else if(number == 2){ } else if (number == 2) {
if(specialImge.value){ if (specialImge.value) {
bottomshow.value = true; bottomshow.value = true;
}else{ } else {
isspecial.value = true; isspecial.value = true;
getMessage() getMessage()
} }
@ -324,7 +325,7 @@
uping.value = true; uping.value = true;
return return
} }
if(isspecial.value || targetphoto.value == 2){ if (isspecial.value || targetphoto.value == 2) {
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) { if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data; let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
// textArray[0] = father.name; // textArray[0] = father.name;
@ -340,7 +341,7 @@
savephoto(filePath, 2); savephoto(filePath, 2);
} }
isspecial.value = false isspecial.value = false
}else{ } else {
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) { if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data; let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
textArray[0] = father.name; textArray[0] = father.name;
@ -367,7 +368,7 @@
uping.value = true; uping.value = true;
} }
} }
}, },
fail: err => { fail: err => {
uni.showToast({ uni.showToast({
@ -380,6 +381,28 @@
} }
const uping = ref(true) const uping = ref(true)
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
// category: 'jg' | 'yg' | 'zz' | 'jhr'
const now = new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 0
let path = '';
switch ('zz') {
case 'jg': //
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case 'yg': //
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case 'zz': //
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case 'jhr': //
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/sys/common/upload`, // POST url: `${base_url}/sys/common/upload`, // POST
filePath, filePath,
@ -388,14 +411,14 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {
fontphoto.value = JSON.parse(uploadRes.data).message fontphoto.value = JSON.parse(uploadRes.data).message
} else if(type==1) { } else if (type == 1) {
endphoto.value = JSON.parse(uploadRes.data).message endphoto.value = JSON.parse(uploadRes.data).message
} else if(type==2){ } else if (type == 2) {
specialImge.value = JSON.parse(uploadRes.data).message specialImge.value = JSON.parse(uploadRes.data).message
} }
uni.hideLoading() uni.hideLoading()
@ -408,14 +431,14 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {
fontphoto.value = JSON.parse(uploadRes.data).message fontphoto.value = JSON.parse(uploadRes.data).message
} else if(type==1) { } else if (type == 1) {
endphoto.value = JSON.parse(uploadRes.data).message endphoto.value = JSON.parse(uploadRes.data).message
} else if(type==2){ } else if (type == 2) {
specialImge.value = JSON.parse(uploadRes.data).message specialImge.value = JSON.parse(uploadRes.data).message
} }
uping.value = true; uping.value = true;

View File

@ -270,6 +270,28 @@
} }
const uping = ref(true) const uping = ref(true)
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
// category: 'jg' | 'yg' | 'zz' | 'jhr'
const now = new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 0
let path = '';
switch ('yg') {
case 'jg': //
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case 'yg': //
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case 'zz': //
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case 'jhr': //
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/sys/common/upload`, // POST url: `${base_url}/sys/common/upload`, // POST
filePath, filePath,
@ -278,7 +300,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {
@ -296,7 +318,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {

View File

@ -237,6 +237,28 @@
} }
const uping = ref(true) const uping = ref(true)
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
// category: 'jg' | 'yg' | 'zz' | 'jhr'
const now = new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 0
let path = '';
switch ('yg') {
case 'jg': //
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case 'yg': //
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case 'zz': //
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case 'jhr': //
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/sys/common/upload`, // POST url: `${base_url}/sys/common/upload`, // POST
filePath, filePath,
@ -245,7 +267,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {
@ -265,7 +287,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
if (!type) { if (!type) {

View File

@ -122,7 +122,8 @@
onShow onShow
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import { import {
media_base_url,base_url media_base_url,
base_url
} from '@/request/index.js' } from '@/request/index.js'
import { import {
changemessage changemessage
@ -210,6 +211,28 @@
const fontphoto = ref(""); const fontphoto = ref("");
const savephoto = (filePath) => { const savephoto = (filePath) => {
uping.value = false; uping.value = false;
// category: 'jg' | 'yg' | 'zz' | 'jhr'
const now = new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 0
let path = '';
switch ('yg') {
case 'jg': //
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case 'yg': //
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case 'zz': //
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case 'jhr': //
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
uni.uploadFile({ uni.uploadFile({
url: `${base_url}/sys/common/upload`, // POST url: `${base_url}/sys/common/upload`, // POST
filePath, filePath,
@ -218,7 +241,7 @@
'X-Access-Token': uni.getStorageSync('token') || '', 'X-Access-Token': uni.getStorageSync('token') || '',
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: uploadRes => { success: uploadRes => {
imgArray[imgetarget.value] = JSON.parse(uploadRes.data).message imgArray[imgetarget.value] = JSON.parse(uploadRes.data).message
@ -276,9 +299,9 @@
// title: "888888888888", // title: "888888888888",
// icon: 'error' // icon: 'error'
// }) // })
console.log("AAAA",data,ukey.value) console.log("AAAA", data, ukey.value)
changemessage(data, ukey.value).then(res => { changemessage(data, ukey.value).then(res => {
console.log("BBBB",res) console.log("BBBB", res)
// uni.showToast({ // uni.showToast({
// title: res, // title: res,
// // icon: 'error' // // icon: 'error'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7052,7 +7052,7 @@ function isConsoleWritable() {
function initRuntimeSocketService() { function initRuntimeSocketService() {
const hosts = "192.168.2.27,127.0.0.1"; const hosts = "192.168.2.27,127.0.0.1";
const port = "8090"; const port = "8090";
const id = "mp-weixin_iKurH_"; const id = "mp-weixin_bPP545";
const lazy = typeof swan !== "undefined"; const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => { let restoreError = lazy ? () => {
} : initOnError(); } : initOnError();

View File

@ -84,7 +84,9 @@ const _sfc_main = {
header: { header: {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: {}, formData: {
biz: `temp`
},
success: (uploadRes) => { success: (uploadRes) => {
if (!JSON.parse(uploadRes.data).success) { if (!JSON.parse(uploadRes.data).success) {
common_vendor.index.hideLoading(); common_vendor.index.hideLoading();
@ -126,6 +128,26 @@ const _sfc_main = {
} }
const fontphoto = common_vendor.ref(""); const fontphoto = common_vendor.ref("");
const savephoto = (filePath) => { const savephoto = (filePath) => {
const now = /* @__PURE__ */ new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, "0");
let path = "";
switch ("jg") {
case "jg":
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case "yg":
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case "zz":
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case "jhr":
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
common_vendor.index.uploadFile({ common_vendor.index.uploadFile({
url: `${request_index.base_url}/sys/common/upload`, url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址 // 替换为您的POST接口地址
@ -136,7 +158,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes) => { success: (uploadRes) => {
fontphoto.value = JSON.parse(uploadRes.data).message; fontphoto.value = JSON.parse(uploadRes.data).message;

View File

@ -148,6 +148,26 @@ const _sfc_main = {
} }
const uping = common_vendor.ref(true); const uping = common_vendor.ref(true);
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
const now = /* @__PURE__ */ new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, "0");
let path = "";
switch ("jg") {
case "jg":
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case "yg":
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case "zz":
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case "jhr":
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
common_vendor.index.uploadFile({ common_vendor.index.uploadFile({
url: `${request_index.base_url}/sys/common/upload`, url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址 // 替换为您的POST接口地址
@ -158,7 +178,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes) => { success: (uploadRes) => {
if (!type) { if (!type) {
@ -178,7 +198,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes2) => { success: (uploadRes2) => {
if (!type) { if (!type) {

View File

@ -296,6 +296,26 @@ const _sfc_main = {
}); });
} }
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
const now = /* @__PURE__ */ new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, "0");
let path = "";
switch ("zz") {
case "jg":
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case "yg":
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case "zz":
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case "jhr":
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
common_vendor.index.uploadFile({ common_vendor.index.uploadFile({
url: `${request_index.base_url}/sys/common/upload`, url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址 // 替换为您的POST接口地址
@ -306,7 +326,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes) => { success: (uploadRes) => {
specialImge.value = JSON.parse(uploadRes.data).message; specialImge.value = JSON.parse(uploadRes.data).message;

View File

@ -96,7 +96,7 @@ const _sfc_main = {
}); });
}, },
fail: (err) => { fail: (err) => {
common_vendor.index.__f__("error", "at pages/addoldman/oldIDcard.vue:278", "拍照失败:", err); common_vendor.index.__f__("error", "at pages/addoldman/oldIDcard.vue:279", "拍照失败:", err);
} }
}); });
} }
@ -177,6 +177,26 @@ const _sfc_main = {
} }
const uping = common_vendor.ref(true); const uping = common_vendor.ref(true);
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
const now = /* @__PURE__ */ new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, "0");
let path = "";
switch ("zz") {
case "jg":
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case "yg":
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case "zz":
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case "jhr":
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
common_vendor.index.uploadFile({ common_vendor.index.uploadFile({
url: `${request_index.base_url}/sys/common/upload`, url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址 // 替换为您的POST接口地址
@ -187,7 +207,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes) => { success: (uploadRes) => {
if (!type) { if (!type) {
@ -209,7 +229,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes2) => { success: (uploadRes2) => {
if (!type) { if (!type) {
@ -394,7 +414,7 @@ const _sfc_main = {
}); });
}, },
fail: (e) => { fail: (e) => {
common_vendor.index.__f__("log", "at pages/addoldman/oldIDcard.vue:630", "????", e); common_vendor.index.__f__("log", "at pages/addoldman/oldIDcard.vue:653", "????", e);
} }
}); });
} else { } else {

View File

@ -138,6 +138,26 @@ const _sfc_main = {
} }
const uping = common_vendor.ref(true); const uping = common_vendor.ref(true);
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
const now = /* @__PURE__ */ new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, "0");
let path = "";
switch ("yg") {
case "jg":
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case "yg":
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case "zz":
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case "jhr":
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
common_vendor.index.uploadFile({ common_vendor.index.uploadFile({
url: `${request_index.base_url}/sys/common/upload`, url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址 // 替换为您的POST接口地址
@ -148,7 +168,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes) => { success: (uploadRes) => {
if (!type) { if (!type) {
@ -168,7 +188,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes2) => { success: (uploadRes2) => {
if (!type) { if (!type) {
@ -278,7 +298,7 @@ const _sfc_main = {
common_vendor.index.navigateBack(); common_vendor.index.navigateBack();
}; };
common_vendor.onLoad(() => { common_vendor.onLoad(() => {
common_vendor.index.__f__("log", "at pages/addstaff/IDcard.vue:418", "11", common_vendor.index.getStorageSync("backhuancun")); common_vendor.index.__f__("log", "at pages/addstaff/IDcard.vue:440", "11", common_vendor.index.getStorageSync("backhuancun"));
if (common_vendor.index.getStorageSync("backhuancun").name) { if (common_vendor.index.getStorageSync("backhuancun").name) {
let data = common_vendor.index.getStorageSync("backhuancun"); let data = common_vendor.index.getStorageSync("backhuancun");
textArray[0] = data.name; textArray[0] = data.name;

View File

@ -117,6 +117,26 @@ const _sfc_main = {
} }
const uping = common_vendor.ref(true); const uping = common_vendor.ref(true);
const savephoto = (filePath, type) => { const savephoto = (filePath, type) => {
const now = /* @__PURE__ */ new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, "0");
let path = "";
switch ("yg") {
case "jg":
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case "yg":
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case "zz":
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case "jhr":
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
common_vendor.index.uploadFile({ common_vendor.index.uploadFile({
url: `${request_index.base_url}/sys/common/upload`, url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址 // 替换为您的POST接口地址
@ -127,7 +147,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes) => { success: (uploadRes) => {
if (!type) { if (!type) {
@ -149,7 +169,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes2) => { success: (uploadRes2) => {
if (!type) { if (!type) {

View File

@ -68,7 +68,7 @@ const _sfc_main = {
}); });
}, },
fail: (err) => { fail: (err) => {
common_vendor.index.__f__("error", "at pages/addstaff/healthcertificate.vue:202", "拍照失败:", err); common_vendor.index.__f__("error", "at pages/addstaff/healthcertificate.vue:203", "拍照失败:", err);
} }
}); });
} }
@ -78,6 +78,26 @@ const _sfc_main = {
common_vendor.ref(""); common_vendor.ref("");
const savephoto = (filePath) => { const savephoto = (filePath) => {
uping.value = false; uping.value = false;
const now = /* @__PURE__ */ new Date();
const yyyy = now.getFullYear();
const mm = String(now.getMonth() + 1).padStart(2, "0");
let path = "";
switch ("yg") {
case "jg":
path = `${yyyy}/${mm}/jgxx/jg`;
break;
case "yg":
path = `${yyyy}/${mm}/ygxx/yg`;
break;
case "zz":
path = `${yyyy}/${mm}/zzxx/zz`;
break;
case "jhr":
path = `${yyyy}/${mm}/zzxx/jhr`;
break;
default:
path = `${yyyy}/${mm}/temp`;
}
common_vendor.index.uploadFile({ common_vendor.index.uploadFile({
url: `${request_index.base_url}/sys/common/upload`, url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址 // 替换为您的POST接口地址
@ -88,7 +108,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || "" "X-Access-Token": common_vendor.index.getStorageSync("token") || ""
}, },
formData: { formData: {
biz: `temp` biz: path
}, },
success: (uploadRes) => { success: (uploadRes) => {
imgArray[imgetarget.value] = JSON.parse(uploadRes.data).message; imgArray[imgetarget.value] = JSON.parse(uploadRes.data).message;
@ -120,9 +140,9 @@ const _sfc_main = {
data.endTime = compontent_public_long.swapLongTerm(data.endTime); data.endTime = compontent_public_long.swapLongTerm(data.endTime);
} }
data.orgCode = common_vendor.index.getStorageSync("changeyuangongorgCode"); data.orgCode = common_vendor.index.getStorageSync("changeyuangongorgCode");
common_vendor.index.__f__("log", "at pages/addstaff/healthcertificate.vue:279", "AAAA", data, ukey.value); common_vendor.index.__f__("log", "at pages/addstaff/healthcertificate.vue:302", "AAAA", data, ukey.value);
pages_addstaff_api_addjigou.changemessage(data, ukey.value).then((res) => { pages_addstaff_api_addjigou.changemessage(data, ukey.value).then((res) => {
common_vendor.index.__f__("log", "at pages/addstaff/healthcertificate.vue:281", "BBBB", res); common_vendor.index.__f__("log", "at pages/addstaff/healthcertificate.vue:304", "BBBB", res);
if (res.result == "重复提交") { if (res.result == "重复提交") {
common_vendor.index.showToast({ common_vendor.index.showToast({
title: `重复提交`, title: `重复提交`,

View File

@ -5,11 +5,12 @@
}, },
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": false, "es6": true,
"postcss": false, "postcss": false,
"minified": true, "minified": true,
"newFeature": true, "newFeature": true,
"bigPackageSizeSupport": true "bigPackageSizeSupport": true,
"enhance": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "latest", "libVersion": "latest",