interview.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. common_vendor.index.redirectTo({
  336. url: "/pages/interview_success/interview_success"
  337. });
  338. }
  339. });
  340. },
  341. fail: (err) => {
  342. console.error("视觉分析触发失败:", err);
  343. common_vendor.index.hideLoading();
  344. common_vendor.index.showToast({
  345. title: "处理失败,请重试",
  346. icon: "none"
  347. });
  348. }
  349. });
  350. } else {
  351. common_vendor.index.showToast({
  352. title: "请完成所有照片拍摄",
  353. icon: "none"
  354. });
  355. }
  356. },
  357. // H5环境下启动摄像头
  358. startCamera() {
  359. this.showCamera = true;
  360. if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
  361. const facingMode = this.cameraPosition === "front" ? "user" : "environment";
  362. navigator.mediaDevices.getUserMedia({
  363. video: { facingMode }
  364. }).then((stream) => {
  365. this.mediaStream = stream;
  366. this.$nextTick(() => {
  367. const videoElement = this.$refs.videoElement;
  368. if (videoElement) {
  369. videoElement.srcObject = stream;
  370. }
  371. });
  372. }).catch((error) => {
  373. console.error("获取摄像头失败:", error);
  374. common_vendor.index.showToast({
  375. title: "无法访问摄像头,请检查权限设置",
  376. icon: "none"
  377. });
  378. this.showCamera = false;
  379. });
  380. } else {
  381. common_vendor.index.showToast({
  382. title: "您的浏览器不支持摄像头功能",
  383. icon: "none"
  384. });
  385. this.showCamera = false;
  386. }
  387. },
  388. // H5环境下拍照
  389. capturePhoto() {
  390. console.log("执行H5拍照方法");
  391. const videoElement = this.$refs.videoElement;
  392. const canvasElement = this.$refs.canvasElement;
  393. if (videoElement && canvasElement) {
  394. try {
  395. const context = canvasElement.getContext("2d");
  396. canvasElement.width = videoElement.videoWidth;
  397. canvasElement.height = videoElement.videoHeight;
  398. context.drawImage(videoElement, 0, 0, canvasElement.width, canvasElement.height);
  399. const photoData = canvasElement.toDataURL("image/jpeg");
  400. this.$set(this.photos, this.currentStep, photoData);
  401. this.uploadPhoto(photoData, this.photoTypes[this.currentStep]);
  402. this.stopMediaStream();
  403. this.showCamera = false;
  404. } catch (err) {
  405. console.error("H5拍照失败:", err);
  406. common_vendor.index.showToast({
  407. title: "拍照失败,请重试",
  408. icon: "none"
  409. });
  410. }
  411. }
  412. },
  413. // 小程序环境下拍照
  414. capturePhotoMP() {
  415. console.log("执行小程序拍照方法");
  416. if (!this.cameraContext) {
  417. console.error("相机上下文不存在");
  418. this.handleCameraInitError();
  419. return;
  420. }
  421. try {
  422. common_vendor.index.showLoading({
  423. title: "拍照中...",
  424. mask: true
  425. });
  426. this.cameraContext.takePhoto({
  427. quality: "high",
  428. success: (res) => {
  429. console.log("拍照成功:", res);
  430. common_vendor.index.hideLoading();
  431. this.$set(this.photos, this.currentStep, null);
  432. this.$set(this.photoLinks, this.currentStep, null);
  433. this.$set(this.photos, this.currentStep, res.tempImagePath);
  434. this.uploadPhoto(res.tempImagePath, this.photoTypes[this.currentStep]);
  435. this.showCamera = false;
  436. },
  437. fail: (err) => {
  438. common_vendor.index.hideLoading();
  439. console.error("拍照失败:", err);
  440. common_vendor.index.showToast({
  441. title: "拍照失败,请重试",
  442. icon: "none"
  443. });
  444. this.fallbackToChooseImage();
  445. }
  446. });
  447. } catch (err) {
  448. common_vendor.index.hideLoading();
  449. console.error("takePhoto方法执行失败:", err);
  450. this.fallbackToChooseImage();
  451. }
  452. },
  453. // 添加相机初始化错误处理
  454. handleCameraInitError() {
  455. if (this.cameraInitRetries < 3) {
  456. this.cameraInitRetries++;
  457. common_vendor.index.showToast({
  458. title: `相机初始化失败,正在重试(${this.cameraInitRetries}/3)`,
  459. icon: "none"
  460. });
  461. setTimeout(() => {
  462. this.showCamera = false;
  463. setTimeout(() => {
  464. this.takePhoto();
  465. }, 500);
  466. }, 1e3);
  467. } else {
  468. common_vendor.index.showToast({
  469. title: "相机初始化失败,将使用系统相机",
  470. icon: "none"
  471. });
  472. this.fallbackToChooseImage();
  473. }
  474. },
  475. // 添加备用的系统相机方法
  476. fallbackToChooseImage() {
  477. this.showCamera = false;
  478. common_vendor.index.chooseImage({
  479. count: 1,
  480. sourceType: ["camera"],
  481. success: (res) => {
  482. this.$set(this.photos, this.currentStep, res.tempFilePaths[0]);
  483. this.uploadPhoto(res.tempFilePaths[0], this.photoTypes[this.currentStep]);
  484. },
  485. fail: (err) => {
  486. console.error("选择图片失败:", err);
  487. common_vendor.index.showToast({
  488. title: "拍照失败,请重试",
  489. icon: "none"
  490. });
  491. }
  492. });
  493. },
  494. // 修改相机错误处理方法
  495. handleCameraError(e) {
  496. console.error("相机错误:", e.detail);
  497. const errorInfo = JSON.stringify(e.detail);
  498. console.log("详细错误信息:", errorInfo);
  499. common_vendor.index.showToast({
  500. title: "相机启动失败,将使用系统相机",
  501. icon: "none"
  502. });
  503. this.fallbackToChooseImage();
  504. },
  505. // 取消拍照 - 更新为同时支持H5和小程序
  506. cancelCamera() {
  507. if (this.isH5) {
  508. this.stopMediaStream();
  509. }
  510. this.showCamera = false;
  511. this.$set(this.photos, this.currentStep, null);
  512. this.$set(this.photoLinks, this.currentStep, null);
  513. },
  514. // 停止摄像头流
  515. stopMediaStream() {
  516. if (this.mediaStream) {
  517. this.mediaStream.getTracks().forEach((track) => {
  518. track.stop();
  519. });
  520. this.mediaStream = null;
  521. }
  522. },
  523. // base64转blob工具方法
  524. base64ToBlob(base64, mimeType) {
  525. const byteCharacters = atob(base64);
  526. const byteArrays = [];
  527. for (let offset = 0; offset < byteCharacters.length; offset += 512) {
  528. const slice = byteCharacters.slice(offset, offset + 512);
  529. const byteNumbers = new Array(slice.length);
  530. for (let i = 0; i < slice.length; i++) {
  531. byteNumbers[i] = slice.charCodeAt(i);
  532. }
  533. const byteArray = new Uint8Array(byteNumbers);
  534. byteArrays.push(byteArray);
  535. }
  536. return new Blob(byteArrays, { type: mimeType });
  537. },
  538. retryCamera() {
  539. this.showCamera = false;
  540. setTimeout(() => {
  541. this.takePhoto();
  542. }, 500);
  543. },
  544. // 可以添加一个方法来切换蒙层显示
  545. toggleGestureOverlay() {
  546. },
  547. // 切换摄像头
  548. switchCamera() {
  549. this.cameraPosition = this.cameraPosition === "front" ? "back" : "front";
  550. if (this.isH5 && this.showCamera) {
  551. this.stopMediaStream();
  552. this.startCamera();
  553. }
  554. },
  555. // 添加自动进入下一步的方法
  556. autoNextStep() {
  557. const allPhotosCompleted = this.photos.every((photo) => photo !== null);
  558. if (allPhotosCompleted) {
  559. common_vendor.index.showToast({
  560. title: "所有照片已完成,请点击完成按钮提交",
  561. icon: "success",
  562. duration: 2e3
  563. });
  564. return;
  565. }
  566. if (this.currentStep < 5) {
  567. this.currentStep++;
  568. this.takePhoto();
  569. }
  570. }
  571. }
  572. };
  573. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  574. return common_vendor.e({
  575. a: common_vendor.t($data.instructions[$data.currentStep]),
  576. b: $data.photos[$data.currentStep]
  577. }, $data.photos[$data.currentStep] ? {
  578. c: $data.photos[$data.currentStep]
  579. } : {
  580. d: common_vendor.t($data.previewTexts[$data.currentStep])
  581. }, {
  582. e: common_vendor.f($data.photos, (photo, index, i0) => {
  583. return common_vendor.e({
  584. a: photo
  585. }, photo ? {
  586. b: photo,
  587. c: common_vendor.o(($event) => $options.previewPhoto(index), index)
  588. } : {
  589. d: common_vendor.t(index + 1)
  590. }, {
  591. e: index,
  592. f: $data.currentStep === index ? 1 : "",
  593. g: photo ? 1 : ""
  594. });
  595. }),
  596. f: $options.allPhotosCompleted
  597. }, $options.allPhotosCompleted ? common_vendor.e({
  598. g: common_vendor.t($data.photos[$data.currentStep] ? "重新拍摄" : "拍摄照片"),
  599. h: common_vendor.o((...args) => $options.takePhoto && $options.takePhoto(...args)),
  600. i: $options.allPhotosCompleted
  601. }, $options.allPhotosCompleted ? {
  602. j: common_vendor.t($options.allPhotosCompleted ? "完成" : "下一步"),
  603. k: !$options.canGoNext,
  604. l: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
  605. } : {}) : {}, {
  606. m: !$data.isH5 && $data.showCamera
  607. }, !$data.isH5 && $data.showCamera ? {
  608. n: common_vendor.t($data.gestureHints[$data.currentStep]),
  609. o: $data.cameraPosition,
  610. p: common_vendor.o((...args) => $options.handleCameraError && $options.handleCameraError(...args)),
  611. q: $data.cameraMode,
  612. r: $data.guideIcon[$data.currentStep],
  613. s: common_vendor.s($data.currentStep >= 3 ? "left:30rpx" : "right:30rpx"),
  614. t: $data.gestureOverlays[$data.currentStep],
  615. v: common_vendor.o((...args) => $options.capturePhotoMP && $options.capturePhotoMP(...args))
  616. } : {}, {
  617. w: $data.isH5
  618. }, $data.isH5 ? {
  619. x: $data.guideIcon[$data.currentStep],
  620. y: common_vendor.s($data.currentStep >= 3 ? "left:30rpx" : "right:30rpx"),
  621. z: $data.gestureOverlays[$data.currentStep],
  622. A: common_vendor.t($data.gestureHints[$data.currentStep]),
  623. B: common_vendor.o((...args) => $options.capturePhoto && $options.capturePhoto(...args)),
  624. C: common_vendor.o((...args) => $options.switchCamera && $options.switchCamera(...args)),
  625. D: common_vendor.o((...args) => $options.cancelCamera && $options.cancelCamera(...args)),
  626. E: $data.showCamera
  627. } : {});
  628. }
  629. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  630. wx.createPage(MiniProgramPage);