|
@@ -127,6 +127,15 @@ const _sfc_main = {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ const photoDescriptions = {
|
|
|
+ "left_palm": "展示完整的左手手掌",
|
|
|
+ "left_back": "展示完整的左手手背",
|
|
|
+ "left_fist": "展示完整的左手握拳",
|
|
|
+ "right_palm": "展示完整的右手手掌",
|
|
|
+ "right_back": "展示完整的右手手背",
|
|
|
+ "right_fist": "展示完整的右手握拳"
|
|
|
+ };
|
|
|
+ const description = photoDescriptions[type] || `手部照片-${type}`;
|
|
|
if (this.isH5 && filePathOrData.startsWith("data:image")) {
|
|
|
const base64Data = filePathOrData.split(",")[1];
|
|
|
const blob = this.base64ToBlob(base64Data, "image/jpeg");
|
|
@@ -134,11 +143,11 @@ const _sfc_main = {
|
|
|
formData.append("photo", blob, `${type}.jpg`);
|
|
|
formData.append("application_id", common_vendor.index.getStorageSync("appId"));
|
|
|
formData.append("tenant_id", tenant_id);
|
|
|
- formData.append("description", `手部照片-${type}`);
|
|
|
+ formData.append("description", description);
|
|
|
console.log("H5上传参数:", {
|
|
|
application_id: common_vendor.index.getStorageSync("appId"),
|
|
|
tenant_id,
|
|
|
- description: `手部照片-${type}`
|
|
|
+ description
|
|
|
});
|
|
|
fetch(`${common_config.apiBaseUrl}/job/upload_posture_photo`, {
|
|
|
method: "POST",
|
|
@@ -174,7 +183,7 @@ const _sfc_main = {
|
|
|
console.log("小程序上传参数:", {
|
|
|
application_id: common_vendor.index.getStorageSync("appId"),
|
|
|
tenant_id,
|
|
|
- description: `手部照片-${type}`
|
|
|
+ description
|
|
|
});
|
|
|
common_vendor.index.uploadFile({
|
|
|
url: `${common_config.apiBaseUrl}/job/upload_posture_photo`,
|
|
@@ -185,7 +194,7 @@ const _sfc_main = {
|
|
|
// 使用formData替代data以确保参数正确传递
|
|
|
"application_id": common_vendor.index.getStorageSync("appId"),
|
|
|
"tenant_id": tenant_id,
|
|
|
- "description": `手部照片-${type}`
|
|
|
+ "description": description
|
|
|
},
|
|
|
success: (uploadRes) => {
|
|
|
console.log("照片上传成功:", uploadRes);
|