posture-guide.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const _sfc_main = {
  4. data() {
  5. return {
  6. currentIndex: 0,
  7. isLastSlide: false,
  8. guideImages: [
  9. {
  10. url: "https://data.qicai321.com/minlong/85fbafbd-1b80-48cd-bcd6-fc4911e9ff54.jpg",
  11. description: "左手手掌"
  12. },
  13. {
  14. url: "https://data.qicai321.com/minlong/17d141e0-8f99-4a54-a534-f6b954c600f8.png",
  15. description: "左手手背"
  16. },
  17. {
  18. url: "https://data.qicai321.com/minlong/5c7d7d6f-5e14-4cd6-bb9f-11509473a8bb.png",
  19. description: "左手握拳"
  20. },
  21. {
  22. url: "https://data.qicai321.com/minlong/148eea00-21b4-49e1-a3b6-712fff08a5a8.png",
  23. description: "右手手掌"
  24. },
  25. {
  26. url: "https://data.qicai321.com/minlong/c67c303e-91c0-4e79-8e82-84096435481f.png",
  27. description: "右手手背"
  28. },
  29. {
  30. url: "https://data.qicai321.com/minlong/5a093f70-d397-4a36-9539-a8b4d11e0a13.png",
  31. description: "右手握拳"
  32. }
  33. ],
  34. instructions: [
  35. "第1步:请按图示展示左手手掌",
  36. "第2步:请按图示展示左手手背",
  37. "第3步:请按图示展示左手握拳",
  38. "第4步:请按图示展示右手手掌",
  39. "第5步:请按图示展示右手手背",
  40. "第6步:请按图示展示右手握拳"
  41. ]
  42. };
  43. },
  44. computed: {
  45. currentInstruction() {
  46. return this.instructions[this.currentIndex];
  47. }
  48. },
  49. methods: {
  50. handleSwiperChange(e) {
  51. this.currentIndex = e.detail.current;
  52. this.isLastSlide = this.currentIndex === this.guideImages.length - 1;
  53. },
  54. handleConfirm() {
  55. if (this.isLastSlide) {
  56. common_vendor.index.navigateTo({
  57. url: "/pages/interview/interview"
  58. });
  59. } else {
  60. common_vendor.index.showToast({
  61. title: "请查看完所有说明",
  62. icon: "none"
  63. });
  64. }
  65. }
  66. }
  67. };
  68. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  69. return {
  70. a: common_vendor.f($data.guideImages, (item, index, i0) => {
  71. return {
  72. a: item.url,
  73. b: common_vendor.t(item.description),
  74. c: index
  75. };
  76. }),
  77. b: common_vendor.o((...args) => $options.handleSwiperChange && $options.handleSwiperChange(...args)),
  78. c: common_vendor.t($data.isLastSlide ? "我知道了,开始采集" : "请查看完所有说明"),
  79. d: !$data.isLastSlide ? 1 : "",
  80. e: !$data.isLastSlide,
  81. f: common_vendor.o((...args) => $options.handleConfirm && $options.handleConfirm(...args))
  82. };
  83. }
  84. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  85. wx.createPage(MiniProgramPage);