改接口

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;
uni.showLoading()
uni.uploadFile({
url: `${base_url}/api/ocr/businessLicense`, // POST
filePath,
@ -163,7 +164,9 @@
header: {
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {},
formData: {
biz: `temp`
},
success: uploadRes => {
if (!JSON.parse(uploadRes.data).success) {
uni.hideLoading()
@ -206,6 +209,28 @@
}
const fontphoto = ref("");
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({
url: `${base_url}/sys/common/upload`, // POST
filePath,
@ -214,7 +239,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
fontphoto.value = JSON.parse(uploadRes.data).message;

View File

@ -279,6 +279,28 @@
}
const uping = ref(true)
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({
url: `${base_url}/sys/common/upload`, // POST
filePath,
@ -287,7 +309,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {
@ -305,7 +327,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {

View File

@ -453,6 +453,28 @@
})
}
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({
url: `${base_url}/sys/common/upload`, // POST
filePath,
@ -461,7 +483,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
specialImge.value = JSON.parse(uploadRes.data).message
@ -626,6 +648,7 @@
width: 100%;
height: 700rpx;
}
.white-photo {
width: 100%;
height: 300rpx;
@ -640,6 +663,7 @@
height: 200rpx;
}
}
.photo-left {
.photo-weight {
font-size: 32rpx;

View File

@ -214,7 +214,8 @@
if (element) {
uni.previewImage({
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'
longPressActions: { // App
itemList: ['保存图片到相册'],
@ -380,6 +381,28 @@
}
const uping = ref(true)
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({
url: `${base_url}/sys/common/upload`, // POST
filePath,
@ -388,7 +411,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {
@ -408,7 +431,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {

View File

@ -270,6 +270,28 @@
}
const uping = ref(true)
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({
url: `${base_url}/sys/common/upload`, // POST
filePath,
@ -278,7 +300,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {
@ -296,7 +318,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {

View File

@ -237,6 +237,28 @@
}
const uping = ref(true)
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({
url: `${base_url}/sys/common/upload`, // POST
filePath,
@ -245,7 +267,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {
@ -265,7 +287,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
if (!type) {

View File

@ -122,7 +122,8 @@
onShow
} from '@dcloudio/uni-app';
import {
media_base_url,base_url
media_base_url,
base_url
} from '@/request/index.js'
import {
changemessage
@ -210,6 +211,28 @@
const fontphoto = ref("");
const savephoto = (filePath) => {
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({
url: `${base_url}/sys/common/upload`, // POST
filePath,
@ -218,7 +241,7 @@
'X-Access-Token': uni.getStorageSync('token') || '',
},
formData: {
biz: `temp`
biz: path
},
success: uploadRes => {
imgArray[imgetarget.value] = JSON.parse(uploadRes.data).message

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() {
const hosts = "192.168.2.27,127.0.0.1";
const port = "8090";
const id = "mp-weixin_iKurH_";
const id = "mp-weixin_bPP545";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();

View File

@ -84,7 +84,9 @@ const _sfc_main = {
header: {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {},
formData: {
biz: `temp`
},
success: (uploadRes) => {
if (!JSON.parse(uploadRes.data).success) {
common_vendor.index.hideLoading();
@ -126,6 +128,26 @@ const _sfc_main = {
}
const fontphoto = common_vendor.ref("");
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({
url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址
@ -136,7 +158,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes) => {
fontphoto.value = JSON.parse(uploadRes.data).message;

View File

@ -148,6 +148,26 @@ const _sfc_main = {
}
const uping = common_vendor.ref(true);
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({
url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址
@ -158,7 +178,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes) => {
if (!type) {
@ -178,7 +198,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes2) => {
if (!type) {

View File

@ -296,6 +296,26 @@ const _sfc_main = {
});
}
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({
url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址
@ -306,7 +326,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes) => {
specialImge.value = JSON.parse(uploadRes.data).message;

View File

@ -96,7 +96,7 @@ const _sfc_main = {
});
},
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 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({
url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址
@ -187,7 +207,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes) => {
if (!type) {
@ -209,7 +229,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes2) => {
if (!type) {
@ -394,7 +414,7 @@ const _sfc_main = {
});
},
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 {

View File

@ -138,6 +138,26 @@ const _sfc_main = {
}
const uping = common_vendor.ref(true);
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({
url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址
@ -148,7 +168,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes) => {
if (!type) {
@ -168,7 +188,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes2) => {
if (!type) {
@ -278,7 +298,7 @@ const _sfc_main = {
common_vendor.index.navigateBack();
};
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) {
let data = common_vendor.index.getStorageSync("backhuancun");
textArray[0] = data.name;

View File

@ -117,6 +117,26 @@ const _sfc_main = {
}
const uping = common_vendor.ref(true);
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({
url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址
@ -127,7 +147,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes) => {
if (!type) {
@ -149,7 +169,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes2) => {
if (!type) {

View File

@ -68,7 +68,7 @@ const _sfc_main = {
});
},
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("");
const savephoto = (filePath) => {
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({
url: `${request_index.base_url}/sys/common/upload`,
// 替换为您的POST接口地址
@ -88,7 +108,7 @@ const _sfc_main = {
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
},
formData: {
biz: `temp`
biz: path
},
success: (uploadRes) => {
imgArray[imgetarget.value] = JSON.parse(uploadRes.data).message;
@ -120,9 +140,9 @@ const _sfc_main = {
data.endTime = compontent_public_long.swapLongTerm(data.endTime);
}
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) => {
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 == "重复提交") {
common_vendor.index.showToast({
title: `重复提交`,

View File

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