interview.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const common_config = require("../../common/config.js");
  4. const _sfc_main = {
  5. data() {
  6. return {
  7. currentStep: 0,
  8. photos: [null, null, null, null, null, null],
  9. // 存储6张照片:左手正面、左手反面、左手握拳、右手正面、右手反面、右手握拳
  10. instructions: [
  11. "请将左手掌正面朝上,保持手指自然伸展,确保整个手掌清晰可见",
  12. "请将左手掌反面朝上,保持手指自然伸展,确保整个手背清晰可见",
  13. "请握紧左手拳头,使拳面朝向相机,确保整个拳头清晰可见",
  14. "请将右手掌正面朝上,保持手指自然伸展,确保整个手掌清晰可见",
  15. "请将右手掌反面朝上,保持手指自然伸展,确保整个手背清晰可见",
  16. "请握紧右手拳头,使拳面朝向相机,确保整个拳头清晰可见"
  17. ],
  18. previewTexts: [
  19. "左手掌正面照片预览区",
  20. "左手掌反面照片预览区",
  21. "左手握拳照片预览区",
  22. "右手掌正面照片预览区",
  23. "右手掌反面照片预览区",
  24. "右手握拳照片预览区"
  25. ],
  26. photoTypes: ["left_palm", "left_back", "left_fist", "right_palm", "right_back", "right_fist"],
  27. // 照片类型标识
  28. isH5: false,
  29. showCamera: false,
  30. mediaStream: null,
  31. cameraContext: null,
  32. cameraMode: "normal",
  33. // 添加相机模式
  34. cameraInitRetries: 0,
  35. // 添加重试计数器
  36. gestureOverlays: [
  37. "https://data.qicai321.com/minlong/18590378-6792-4a26-be18-ad9f2bcc4159.png",
  38. "https://data.qicai321.com/minlong/e08cff2b-3b1d-478f-a62b-766b38445a16.png",
  39. "https://data.qicai321.com/minlong/d30ccab7-9cfe-4386-bf0e-ac1f0045bd76.png",
  40. "https://data.qicai321.com/minlong/8068a698-ac40-4a5d-a737-54dba47a668d.png",
  41. "https://data.qicai321.com/minlong/f04a1f7e-4f79-49c7-9a02-bbad296672ea.png",
  42. "https://data.qicai321.com/minlong/1d9bbc36-2fb8-4489-bff6-c36e7a31bd37.png"
  43. /* '/static/images/palm_overlay.png', // 手掌正面引导图
  44. '/static/images/back_overlay.png', // 手掌反面引导图
  45. '/static/images/fist_overlay.png' // 握拳引导图 */
  46. ],
  47. gestureHints: [
  48. "请将左手掌对准轮廓线",
  49. "请将左手背对准轮廓线",
  50. "请将左手拳头对准轮廓线",
  51. "请将右手掌对准轮廓线",
  52. "请将右手背对准轮廓线",
  53. "请将右手拳头对准轮廓线"
  54. ],
  55. photoLinks: [null, null, null, null, null, null],
  56. // 存储上传后的图片链接
  57. cameraPosition: "front",
  58. // 修改默认为前置摄像头
  59. guideIcon: [
  60. "http://data.qicai321.com/minlong/fd080e3b-67be-4ce7-87a3-58d047cfbbb1.mp4",
  61. "http://data.qicai321.com/minlong/394a858c-672a-44bd-8206-450913863900.mp4",
  62. "http://data.qicai321.com/minlong/37153e68-a8f0-4a93-b677-5e5678379243.mp4",
  63. "http://data.qicai321.com/minlong/ebf6e43f-ffdf-49bb-8b00-adeff9ce1b56.mp4",
  64. "http://data.qicai321.com/minlong/e0ca45e2-af3e-42a0-9dd1-4de545e9c720.mp4",
  65. "http://data.qicai321.com/minlong/77028dd6-22bb-41b4-8879-19699e8b1dbb.mp4"
  66. ]
  67. };
  68. },
  69. computed: {
  70. allPhotosCompleted() {
  71. return this.photos.every((photo) => photo !== null);
  72. },
  73. canGoNext() {
  74. if (this.currentStep === 5) {
  75. return this.photos.every((photo) => photo !== null);
  76. }
  77. return this.photos[this.currentStep] !== null;
  78. }
  79. },
  80. onLoad() {
  81. common_vendor.index.authorize({
  82. scope: "scope.camera",
  83. success: () => {
  84. console.log("相机权限已授权");
  85. this.takePhoto();
  86. },
  87. fail: () => {
  88. common_vendor.index.showModal({
  89. title: "提示",
  90. content: "请授权相机权限以完成手部照片采集",
  91. success: (res) => {
  92. if (res.confirm) {
  93. common_vendor.index.openSetting();
  94. }
  95. }
  96. });
  97. }
  98. });
  99. },
  100. beforeDestroy() {
  101. this.stopMediaStream();
  102. },
  103. methods: {
  104. takePhoto() {
  105. const isRetake = this.photos[this.currentStep] !== null;
  106. this.$set(this.photos, this.currentStep, null);
  107. this.$set(this.photoLinks, this.currentStep, null);
  108. if (isRetake) {
  109. common_vendor.index.showToast({
  110. title: "重新拍摄第" + (this.currentStep + 1) + "张照片",
  111. icon: "none",
  112. duration: 1500
  113. });
  114. }
  115. if (this.isH5) {
  116. this.startCamera();
  117. } else {
  118. this.showCamera = true;
  119. this.cameraInitRetries = 0;
  120. this.$nextTick(() => {
  121. try {
  122. this.cameraContext = common_vendor.index.createCameraContext();
  123. console.log("相机上下文创建成功");
  124. } catch (err) {
  125. console.error("创建相机上下文失败:", err);
  126. this.handleCameraInitError();
  127. }
  128. });
  129. }
  130. },
  131. uploadPhoto(filePathOrData, type) {
  132. console.log(`准备上传${type}类型的手部照片`);
  133. common_vendor.index.showLoading({
  134. title: "上传中..."
  135. });
  136. const currentIndex = this.currentStep;
  137. const userInfo = common_vendor.index.getStorageSync("userInfo");
  138. userInfo ? JSON.parse(userInfo).openid || "" : "";
  139. const tenant_id = common_vendor.index.getStorageSync("tenant_id") || "1";
  140. if (!tenant_id) {
  141. common_vendor.index.hideLoading();
  142. common_vendor.index.showToast({
  143. title: "用户信息不完整,请重新登录",
  144. icon: "none"
  145. });
  146. return;
  147. }
  148. const photoDescriptions = {
  149. "left_palm": "展示完整的左手手掌",
  150. "left_back": "展示完整的左手手背",
  151. "left_fist": "展示完整的左手握拳",
  152. "right_palm": "展示完整的右手手掌",
  153. "right_back": "展示完整的右手手背",
  154. "right_fist": "展示完整的右手握拳"
  155. };
  156. const description = photoDescriptions[type] || `手部照片-${type}`;
  157. if (this.isH5 && filePathOrData.startsWith("data:image")) {
  158. const base64Data = filePathOrData.split(",")[1];
  159. const blob = this.base64ToBlob(base64Data, "image/jpeg");
  160. const formData = new FormData();
  161. formData.append("photo", blob, `${type}.jpg`);
  162. formData.append("application_id", common_vendor.index.getStorageSync("appId"));
  163. formData.append("tenant_id", tenant_id);
  164. formData.append("description", description);
  165. console.log("H5上传参数:", {
  166. application_id: common_vendor.index.getStorageSync("appId"),
  167. tenant_id,
  168. description
  169. });
  170. fetch(`${common_config.apiBaseUrl}/job/upload_posture_photo`, {
  171. method: "POST",
  172. body: formData
  173. }).then((response) => response.json()).then((result) => {
  174. console.log("照片上传成功:", result);
  175. const index = this.photoTypes.indexOf(type);
  176. if (index !== -1 && result.data && result.data.url) {
  177. this.$set(this.photoLinks, index, result.data.url);
  178. console.log(`已保存${type}类型照片链接:`, result.data.url);
  179. }
  180. common_vendor.index.hideLoading();
  181. common_vendor.index.showToast({
  182. title: "照片上传成功",
  183. icon: "success",
  184. duration: 1500,
  185. success: () => {
  186. const isRetake = this.photos.filter((photo) => photo !== null).length > currentIndex + 1;
  187. if (!isRetake) {
  188. if (currentIndex === 5) {
  189. common_vendor.index.showToast({
  190. title: "最后一张照片已完成,请点击完成按钮提交",
  191. icon: "success",
  192. duration: 2e3
  193. });
  194. } else {
  195. setTimeout(() => {
  196. this.autoNextStep();
  197. }, 1500);
  198. }
  199. }
  200. }
  201. });
  202. }).catch((error) => {
  203. console.error("照片上传失败:", error);
  204. common_vendor.index.hideLoading();
  205. common_vendor.index.showToast({
  206. title: "照片上传失败,请重试",
  207. icon: "none"
  208. });
  209. });
  210. } else {
  211. console.log(`小程序环境上传文件路径:`, filePathOrData);
  212. console.log("小程序上传参数:", {
  213. application_id: common_vendor.index.getStorageSync("appId"),
  214. tenant_id,
  215. description
  216. });
  217. common_vendor.index.uploadFile({
  218. url: `${common_config.apiBaseUrl}/job/upload_posture_photo`,
  219. filePath: filePathOrData,
  220. name: "photo",
  221. // 确保文件参数名称正确
  222. formData: {
  223. // 使用formData替代data以确保参数正确传递
  224. "application_id": common_vendor.index.getStorageSync("appId"),
  225. "tenant_id": tenant_id,
  226. "description": description
  227. },
  228. success: (uploadRes) => {
  229. console.log("照片上传成功:", uploadRes);
  230. let result;
  231. try {
  232. if (typeof uploadRes.data === "string") {
  233. result = JSON.parse(uploadRes.data);
  234. } else {
  235. result = uploadRes.data;
  236. }
  237. console.log("解析后的上传结果:", result);
  238. const index = this.photoTypes.indexOf(type);
  239. if (index !== -1 && result.data && result.data.url) {
  240. this.$set(this.photoLinks, index, result.data.url);
  241. console.log(`已保存${type}类型照片链接:`, result.data.url);
  242. }
  243. } catch (e) {
  244. console.error("解析上传结果失败:", e);
  245. }
  246. common_vendor.index.hideLoading();
  247. common_vendor.index.showToast({
  248. title: "照片上传成功",
  249. icon: "success",
  250. duration: 1500,
  251. success: () => {
  252. const isRetake = this.photos.filter((photo) => photo !== null).length > currentIndex + 1;
  253. if (!isRetake) {
  254. if (currentIndex === 5) {
  255. common_vendor.index.showToast({
  256. title: "最后一张照片已完成,请点击完成按钮提交",
  257. icon: "success",
  258. duration: 2e3
  259. });
  260. } else {
  261. setTimeout(() => {
  262. this.autoNextStep();
  263. }, 1500);
  264. }
  265. }
  266. }
  267. });
  268. },
  269. fail: (err) => {
  270. console.error("照片上传失败:", err);
  271. common_vendor.index.hideLoading();
  272. common_vendor.index.showToast({
  273. title: "照片上传失败,请重试",
  274. icon: "none"
  275. });
  276. },
  277. complete: () => {
  278. common_vendor.index.hideLoading();
  279. }
  280. });
  281. }
  282. },
  283. prevStep() {
  284. if (this.currentStep > 0) {
  285. this.currentStep--;
  286. }
  287. },
  288. nextStep() {
  289. if (this.allPhotosCompleted) {
  290. this.submitAllPhotos();
  291. return;
  292. }
  293. if (this.currentStep < 5) {
  294. this.currentStep++;
  295. }
  296. },
  297. previewPhoto(index) {
  298. if (this.photos[index]) {
  299. this.currentStep = index;
  300. common_vendor.index.showActionSheet({
  301. itemList: ["在预览区查看", "重新拍摄此照片"],
  302. success: (res) => {
  303. if (res.tapIndex === 0) {
  304. common_vendor.index.previewImage({
  305. urls: [this.photos[index]],
  306. current: this.photos[index]
  307. });
  308. } else if (res.tapIndex === 1) {
  309. this.takePhoto();
  310. }
  311. }
  312. });
  313. } else {
  314. this.currentStep = index;
  315. }
  316. },
  317. submitAllPhotos() {
  318. if (this.allPhotosCompleted) {
  319. common_vendor.index.showLoading({
  320. title: "处理中..."
  321. });
  322. const application_id = common_vendor.index.getStorageSync("appId");
  323. const tenant_id = common_vendor.index.getStorageSync("tenant_id") || "1";
  324. common_vendor.index.request({
  325. url: `${common_config.apiBaseUrl}/api/system/job/trigger_visual_analysis?application_id=${application_id}&tenant_id=${tenant_id}`,
  326. method: "POST",
  327. success: (res) => {
  328. console.log("视觉分析触发成功:", res);
  329. common_vendor.index.hideLoading();
  330. common_vendor.index.showToast({
  331. title: "手部照片采集完成",
  332. icon: "success",
  333. duration: 2e3,
  334. success: () => {
  335. setTimeout(() => {
  336. common_vendor.index.redirectTo({
  337. url: "/pages/interview_success/interview_success"
  338. });
  339. }, 100);
  340. }
  341. });
  342. },
  343. fail: (err) => {
  344. console.error("视觉分析触发失败:", err);
  345. common_vendor.index.hideLoading();
  346. common_vendor.index.showToast({
  347. title: "处理失败,请重试",
  348. icon: "none"
  349. });
  350. }
  351. });
  352. } else {
  353. common_vendor.index.showToast({
  354. title: "请完成所有照片拍摄",
  355. icon: "none"
  356. });
  357. }
  358. },
  359. // H5环境下启动摄像头
  360. startCamera() {
  361. this.showCamera = true;
  362. if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
  363. const facingMode = this.cameraPosition === "front" ? "user" : "environment";
  364. navigator.mediaDevices.getUserMedia({
  365. video: { facingMode }
  366. }).then((stream) => {
  367. this.mediaStream = stream;
  368. this.$nextTick(() => {
  369. const videoElement = this.$refs.videoElement;
  370. if (videoElement) {
  371. videoElement.srcObject = stream;
  372. }
  373. });
  374. }).catch((error) => {
  375. console.error("获取摄像头失败:", error);
  376. common_vendor.index.showToast({
  377. title: "无法访问摄像头,请检查权限设置",
  378. icon: "none"
  379. });
  380. this.showCamera = false;
  381. });
  382. } else {
  383. common_vendor.index.showToast({
  384. title: "您的浏览器不支持摄像头功能",
  385. icon: "none"
  386. });
  387. this.showCamera = false;
  388. }
  389. },
  390. // H5环境下拍照
  391. capturePhoto() {
  392. console.log("执行H5拍照方法");
  393. const videoElement = this.$refs.videoElement;
  394. const canvasElement = this.$refs.canvasElement;
  395. if (videoElement && canvasElement) {
  396. try {
  397. const context = canvasElement.getContext("2d");
  398. canvasElement.width = videoElement.videoWidth;
  399. canvasElement.height = videoElement.videoHeight;
  400. context.drawImage(videoElement, 0, 0, canvasElement.width, canvasElement.height);
  401. const photoData = canvasElement.toDataURL("image/jpeg");
  402. this.$set(this.photos, this.currentStep, photoData);
  403. this.uploadPhoto(photoData, this.photoTypes[this.currentStep]);
  404. this.stopMediaStream();
  405. this.showCamera = false;
  406. } catch (err) {
  407. console.error("H5拍照失败:", err);
  408. common_vendor.index.showToast({
  409. title: "拍照失败,请重试",
  410. icon: "none"
  411. });
  412. }
  413. }
  414. },
  415. // 小程序环境下拍照
  416. capturePhotoMP() {
  417. console.log("执行小程序拍照方法");
  418. if (!this.cameraContext) {
  419. console.error("相机上下文不存在");
  420. this.handleCameraInitError();
  421. return;
  422. }
  423. try {
  424. common_vendor.index.showLoading({
  425. title: "拍照中...",
  426. mask: true
  427. });
  428. this.cameraContext.takePhoto({
  429. quality: "high",
  430. success: (res) => {
  431. console.log("拍照成功:", res);
  432. common_vendor.index.hideLoading();
  433. this.$set(this.photos, this.currentStep, null);
  434. this.$set(this.photoLinks, this.currentStep, null);
  435. this.$set(this.photos, this.currentStep, res.tempImagePath);
  436. this.uploadPhoto(res.tempImagePath, this.photoTypes[this.currentStep]);
  437. this.showCamera = false;
  438. },
  439. fail: (err) => {
  440. common_vendor.index.hideLoading();
  441. console.error("拍照失败:", err);
  442. common_vendor.index.showToast({
  443. title: "拍照失败,请重试",
  444. icon: "none"
  445. });
  446. this.fallbackToChooseImage();
  447. }
  448. });
  449. } catch (err) {
  450. common_vendor.index.hideLoading();
  451. console.error("takePhoto方法执行失败:", err);
  452. this.fallbackToChooseImage();
  453. }
  454. },
  455. // 添加相机初始化错误处理
  456. handleCameraInitError() {
  457. if (this.cameraInitRetries < 3) {
  458. this.cameraInitRetries++;
  459. common_vendor.index.showToast({
  460. title: `相机初始化失败,正在重试(${this.cameraInitRetries}/3)`,
  461. icon: "none"
  462. });
  463. setTimeout(() => {
  464. this.showCamera = false;
  465. setTimeout(() => {
  466. this.takePhoto();
  467. }, 500);
  468. }, 1e3);
  469. } else {
  470. common_vendor.index.showToast({
  471. title: "相机初始化失败,将使用系统相机",
  472. icon: "none"
  473. });
  474. this.fallbackToChooseImage();
  475. }
  476. },
  477. // 添加备用的系统相机方法
  478. fallbackToChooseImage() {
  479. this.showCamera = false;
  480. common_vendor.index.chooseImage({
  481. count: 1,
  482. sourceType: ["camera"],
  483. success: (res) => {
  484. this.$set(this.photos, this.currentStep, res.tempFilePaths[0]);
  485. this.uploadPhoto(res.tempFilePaths[0], this.photoTypes[this.currentStep]);
  486. },
  487. fail: (err) => {
  488. console.error("选择图片失败:", err);
  489. common_vendor.index.showToast({
  490. title: "拍照失败,请重试",
  491. icon: "none"
  492. });
  493. }
  494. });
  495. },
  496. // 修改相机错误处理方法
  497. handleCameraError(e) {
  498. console.error("相机错误:", e.detail);
  499. const errorInfo = JSON.stringify(e.detail);
  500. console.log("详细错误信息:", errorInfo);
  501. common_vendor.index.showToast({
  502. title: "相机启动失败,将使用系统相机",
  503. icon: "none"
  504. });
  505. this.fallbackToChooseImage();
  506. },
  507. // 取消拍照 - 更新为同时支持H5和小程序
  508. cancelCamera() {
  509. if (this.isH5) {
  510. this.stopMediaStream();
  511. }
  512. this.showCamera = false;
  513. this.$set(this.photos, this.currentStep, null);
  514. this.$set(this.photoLinks, this.currentStep, null);
  515. },
  516. // 停止摄像头流
  517. stopMediaStream() {
  518. if (this.mediaStream) {
  519. this.mediaStream.getTracks().forEach((track) => {
  520. track.stop();
  521. });
  522. this.mediaStream = null;
  523. }
  524. },
  525. // base64转blob工具方法
  526. base64ToBlob(base64, mimeType) {
  527. const byteCharacters = atob(base64);
  528. const byteArrays = [];
  529. for (let offset = 0; offset < byteCharacters.length; offset += 512) {
  530. const slice = byteCharacters.slice(offset, offset + 512);
  531. const byteNumbers = new Array(slice.length);
  532. for (let i = 0; i < slice.length; i++) {
  533. byteNumbers[i] = slice.charCodeAt(i);
  534. }
  535. const byteArray = new Uint8Array(byteNumbers);
  536. byteArrays.push(byteArray);
  537. }
  538. return new Blob(byteArrays, { type: mimeType });
  539. },
  540. retryCamera() {
  541. this.showCamera = false;
  542. setTimeout(() => {
  543. this.takePhoto();
  544. }, 500);
  545. },
  546. // 可以添加一个方法来切换蒙层显示
  547. toggleGestureOverlay() {
  548. },
  549. // 切换摄像头
  550. switchCamera() {
  551. this.cameraPosition = this.cameraPosition === "front" ? "back" : "front";
  552. if (this.isH5 && this.showCamera) {
  553. this.stopMediaStream();
  554. this.startCamera();
  555. }
  556. },
  557. // 添加自动进入下一步的方法
  558. autoNextStep() {
  559. const allPhotosCompleted = this.photos.every((photo) => photo !== null);
  560. if (allPhotosCompleted) {
  561. common_vendor.index.showToast({
  562. title: "所有照片已完成,请点击完成按钮提交",
  563. icon: "success",
  564. duration: 2e3
  565. });
  566. return;
  567. }
  568. if (this.currentStep < 5) {
  569. this.currentStep++;
  570. this.takePhoto();
  571. }
  572. }
  573. }
  574. };
  575. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  576. return common_vendor.e({
  577. a: common_vendor.t($data.instructions[$data.currentStep]),
  578. b: $data.photos[$data.currentStep]
  579. }, $data.photos[$data.currentStep] ? {
  580. c: $data.photos[$data.currentStep]
  581. } : {
  582. d: common_vendor.t($data.previewTexts[$data.currentStep])
  583. }, {
  584. e: common_vendor.f($data.photos, (photo, index, i0) => {
  585. return common_vendor.e({
  586. a: photo
  587. }, photo ? {
  588. b: photo,
  589. c: common_vendor.o(($event) => $options.previewPhoto(index), index)
  590. } : {
  591. d: common_vendor.t(index + 1)
  592. }, {
  593. e: index,
  594. f: $data.currentStep === index ? 1 : "",
  595. g: photo ? 1 : ""
  596. });
  597. }),
  598. f: $options.allPhotosCompleted
  599. }, $options.allPhotosCompleted ? common_vendor.e({
  600. g: common_vendor.t($data.photos[$data.currentStep] ? "重新拍摄" : "拍摄照片"),
  601. h: common_vendor.o((...args) => $options.takePhoto && $options.takePhoto(...args)),
  602. i: $options.allPhotosCompleted
  603. }, $options.allPhotosCompleted ? {
  604. j: common_vendor.t($options.allPhotosCompleted ? "完成" : "下一步"),
  605. k: !$options.canGoNext,
  606. l: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
  607. } : {}) : {}, {
  608. m: !$data.isH5 && $data.showCamera
  609. }, !$data.isH5 && $data.showCamera ? {
  610. n: common_vendor.t($data.gestureHints[$data.currentStep]),
  611. o: $data.cameraPosition,
  612. p: common_vendor.o((...args) => $options.handleCameraError && $options.handleCameraError(...args)),
  613. q: $data.cameraMode,
  614. r: $data.guideIcon[$data.currentStep],
  615. s: common_vendor.s($data.currentStep >= 3 ? "left:30rpx" : "right:30rpx"),
  616. t: $data.gestureOverlays[$data.currentStep],
  617. v: common_vendor.o((...args) => $options.capturePhotoMP && $options.capturePhotoMP(...args))
  618. } : {}, {
  619. w: $data.isH5
  620. }, $data.isH5 ? {
  621. x: $data.guideIcon[$data.currentStep],
  622. y: common_vendor.s($data.currentStep >= 3 ? "left:30rpx" : "right:30rpx"),
  623. z: $data.gestureOverlays[$data.currentStep],
  624. A: common_vendor.t($data.gestureHints[$data.currentStep]),
  625. B: common_vendor.o((...args) => $options.capturePhoto && $options.capturePhoto(...args)),
  626. C: common_vendor.o((...args) => $options.switchCamera && $options.switchCamera(...args)),
  627. D: common_vendor.o((...args) => $options.cancelCamera && $options.cancelCamera(...args)),
  628. E: $data.showCamera
  629. } : {});
  630. }
  631. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  632. wx.createPage(MiniProgramPage);