Personal.js 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218
  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. // 添加承诺书相关数据
  8. showPromiseModal: true,
  9. promiseChecked: false,
  10. formData: {
  11. name: "",
  12. gender: "",
  13. threePeriod: "",
  14. birthDate: "",
  15. idCard: "",
  16. political: "",
  17. ethnic: "",
  18. height: "",
  19. weight: "",
  20. nativePlace: "",
  21. residence: "",
  22. marriage: "",
  23. expectedSalary: "",
  24. phone: "",
  25. email: "",
  26. currentAddress: "",
  27. emergencyContact: "",
  28. emergencyPhone: "",
  29. hobby: "",
  30. motto: "",
  31. // 添加应聘来源相关字段
  32. sourceType: "social",
  33. // 默认为社招
  34. socialSource: "",
  35. // 社招来源
  36. otherSocialSource: "",
  37. // 其他社招来源
  38. otherSchoolSource: "",
  39. // 其他学校来源
  40. // 添加技能和培训字段
  41. skills: "",
  42. training: ""
  43. },
  44. genderOptions: ["男", "女"],
  45. genderIndex: -1,
  46. threePeriodOptions: ["无", "孕期", "产期", "哺乳期"],
  47. threePeriodIndex: -1,
  48. politicalOptions: ["群众", "共青团员", "中共党员", "民主党派"],
  49. politicalIndex: -1,
  50. ethnicOptions: ["汉族", "蒙古族", "回族", "藏族", "维吾尔族", "其他"],
  51. ethnicIndex: -1,
  52. marriageOptions: ["未婚", "已婚", "离异", "丧偶"],
  53. marriageIndex: -1,
  54. familyMembers: [],
  55. familyMemberForm: {
  56. relation: "",
  57. name: "",
  58. workplaceOrAddress: "",
  59. position: "",
  60. phone: "",
  61. isEmergencyContact: false
  62. // 添加新字段
  63. },
  64. isEditing: false,
  65. editingIndex: -1,
  66. // 添加教育经历相关数据
  67. educationList: [],
  68. educationForm: {
  69. startTime: "",
  70. endTime: "",
  71. schoolName: "",
  72. major: "",
  73. degree: ""
  74. },
  75. isEditingEducation: false,
  76. editingEducationIndex: -1,
  77. degreeOptions: ["高中", "中专", "大专", "本科", "硕士", "博士"],
  78. degreeIndex: -1,
  79. // 添加工作经历相关数据
  80. workList: [],
  81. workForm: {
  82. startTime: "",
  83. endTime: "",
  84. companyName: "",
  85. department: "",
  86. employeeCount: "",
  87. position: "",
  88. monthlySalary: "",
  89. supervisor: "",
  90. supervisorPhone: ""
  91. },
  92. isEditingWork: false,
  93. editingWorkIndex: -1,
  94. // 添加步骤控制
  95. currentStep: 1,
  96. steps: [
  97. { id: 1, name: "基本信息" },
  98. { id: 3, name: "家庭成员" },
  99. { id: 5, name: "教育经历" },
  100. { id: 6, name: "专业技能" },
  101. { id: 8, name: "工作经历" }
  102. ],
  103. formErrors: {
  104. name: "",
  105. idCard: "",
  106. phone: ""
  107. },
  108. // Add loading state
  109. isLoading: true
  110. };
  111. },
  112. onLoad() {
  113. this.fetchUserData();
  114. },
  115. computed: {
  116. // 添加计算属性来控制按钮显示
  117. showPrevButton() {
  118. return this.currentStep !== 1;
  119. },
  120. showNextButton() {
  121. return this.currentStep !== 8;
  122. },
  123. showSubmitButton() {
  124. return this.currentStep === 8;
  125. },
  126. // 获取当前步骤在数组中的索引
  127. currentStepIndex() {
  128. return this.steps.findIndex((step) => step.id === this.currentStep);
  129. }
  130. },
  131. methods: {
  132. // 添加承诺书相关方法
  133. togglePromiseChecked() {
  134. this.promiseChecked = !this.promiseChecked;
  135. },
  136. confirmPromise() {
  137. if (this.promiseChecked) {
  138. this.showPromiseModal = false;
  139. } else {
  140. common_vendor.index.showToast({
  141. title: "请先阅读并同意承诺书内容",
  142. icon: "none"
  143. });
  144. }
  145. },
  146. bindGenderChange(e) {
  147. this.genderIndex = e.detail.value;
  148. this.formData.gender = this.genderOptions[this.genderIndex];
  149. if (this.formData.gender !== "女") {
  150. this.formData.threePeriod = "";
  151. this.threePeriodIndex = -1;
  152. }
  153. },
  154. bindThreePeriodChange(e) {
  155. this.threePeriodIndex = e.detail.value;
  156. this.formData.threePeriod = this.threePeriodOptions[this.threePeriodIndex];
  157. },
  158. bindPoliticalChange(e) {
  159. this.politicalIndex = e.detail.value;
  160. this.formData.political = this.politicalOptions[this.politicalIndex];
  161. },
  162. bindEthnicChange(e) {
  163. this.ethnicIndex = e.detail.value;
  164. this.formData.ethnic = this.ethnicOptions[this.ethnicIndex];
  165. },
  166. bindMarriageChange(e) {
  167. this.marriageIndex = e.detail.value;
  168. this.formData.marriage = this.marriageOptions[this.marriageIndex];
  169. },
  170. bindDateChange(e) {
  171. this.formData.birthDate = e.detail.value;
  172. },
  173. saveFamilyMember() {
  174. if (!this.familyMemberForm.relation) {
  175. common_vendor.index.showToast({
  176. title: "请输入称谓",
  177. icon: "none"
  178. });
  179. return;
  180. }
  181. if (!this.familyMemberForm.name) {
  182. common_vendor.index.showToast({
  183. title: "请输入姓名",
  184. icon: "none"
  185. });
  186. return;
  187. }
  188. if (!this.familyMemberForm.phone) {
  189. common_vendor.index.showToast({
  190. title: "请输入联系电话",
  191. icon: "none"
  192. });
  193. return;
  194. }
  195. if (this.isEditing) {
  196. if (!this.familyMemberForm.isEmergencyContact && this.familyMembers[this.editingIndex].isEmergencyContact) {
  197. this.formData.emergencyContact = "";
  198. this.formData.emergencyPhone = "";
  199. }
  200. this.familyMembers[this.editingIndex] = { ...this.familyMemberForm };
  201. common_vendor.index.showToast({
  202. title: "修改成功",
  203. icon: "success"
  204. });
  205. this.isEditing = false;
  206. this.editingIndex = -1;
  207. } else {
  208. this.familyMembers.push({ ...this.familyMemberForm });
  209. common_vendor.index.showToast({
  210. title: "添加成功",
  211. icon: "success"
  212. });
  213. }
  214. this.familyMemberForm = {
  215. relation: "",
  216. name: "",
  217. workplaceOrAddress: "",
  218. position: "",
  219. phone: "",
  220. isEmergencyContact: false
  221. };
  222. },
  223. editFamilyMember(index) {
  224. this.isEditing = true;
  225. this.editingIndex = index;
  226. this.familyMemberForm = { ...this.familyMembers[index] };
  227. common_vendor.index.pageScrollTo({
  228. selector: ".family-member-form",
  229. duration: 300
  230. });
  231. },
  232. cancelEdit() {
  233. this.isEditing = false;
  234. this.editingIndex = -1;
  235. this.familyMemberForm = {
  236. relation: "",
  237. name: "",
  238. workplaceOrAddress: "",
  239. position: "",
  240. phone: "",
  241. isEmergencyContact: false
  242. };
  243. },
  244. deleteFamilyMember(index) {
  245. if (this.isEditing && this.editingIndex === index) {
  246. this.cancelEdit();
  247. }
  248. this.familyMembers.splice(index, 1);
  249. common_vendor.index.showToast({
  250. title: "已删除",
  251. icon: "none"
  252. });
  253. },
  254. // 选择应聘来源类型
  255. selectSourceType(type) {
  256. this.formData.sourceType = type;
  257. if (type === "social") {
  258. this.formData.socialSource = "BOSS";
  259. } else {
  260. this.formData.socialSource = "";
  261. }
  262. },
  263. // 选择社招来源
  264. selectSocialSource(source) {
  265. this.formData.sourceType = "social";
  266. this.formData.socialSource = source;
  267. },
  268. // 教育经历相关方法
  269. bindStartTimeChange(e) {
  270. this.educationForm.startTime = e.detail.value;
  271. },
  272. bindEndTimeChange(e) {
  273. this.educationForm.endTime = e.detail.value;
  274. },
  275. bindDegreeChange(e) {
  276. this.degreeIndex = e.detail.value;
  277. this.educationForm.degree = this.degreeOptions[this.degreeIndex];
  278. },
  279. saveEducation() {
  280. if (!this.educationForm.startTime) {
  281. common_vendor.index.showToast({
  282. title: "请选择开始时间",
  283. icon: "none"
  284. });
  285. return;
  286. }
  287. if (!this.educationForm.endTime) {
  288. common_vendor.index.showToast({
  289. title: "请选择结束时间",
  290. icon: "none"
  291. });
  292. return;
  293. }
  294. if (!this.educationForm.schoolName) {
  295. common_vendor.index.showToast({
  296. title: "请输入学校名称",
  297. icon: "none"
  298. });
  299. return;
  300. }
  301. if (!this.educationForm.major) {
  302. common_vendor.index.showToast({
  303. title: "请输入专业",
  304. icon: "none"
  305. });
  306. return;
  307. }
  308. if (!this.educationForm.degree) {
  309. common_vendor.index.showToast({
  310. title: "请选择学历",
  311. icon: "none"
  312. });
  313. return;
  314. }
  315. if (this.isEditingEducation) {
  316. this.educationList[this.editingEducationIndex] = { ...this.educationForm };
  317. common_vendor.index.showToast({
  318. title: "修改成功",
  319. icon: "success"
  320. });
  321. this.isEditingEducation = false;
  322. this.editingEducationIndex = -1;
  323. } else {
  324. this.educationList.push({ ...this.educationForm });
  325. common_vendor.index.showToast({
  326. title: "添加成功",
  327. icon: "success"
  328. });
  329. }
  330. this.educationForm = {
  331. startTime: "",
  332. endTime: "",
  333. schoolName: "",
  334. major: "",
  335. degree: ""
  336. };
  337. this.degreeIndex = -1;
  338. },
  339. editEducation(index) {
  340. this.isEditingEducation = true;
  341. this.editingEducationIndex = index;
  342. this.educationForm = { ...this.educationList[index] };
  343. this.degreeIndex = this.degreeOptions.findIndex((item) => item === this.educationForm.degree);
  344. common_vendor.index.pageScrollTo({
  345. selector: ".education-form",
  346. duration: 300
  347. });
  348. },
  349. cancelEditEducation() {
  350. this.isEditingEducation = false;
  351. this.editingEducationIndex = -1;
  352. this.educationForm = {
  353. startTime: "",
  354. endTime: "",
  355. schoolName: "",
  356. major: "",
  357. degree: ""
  358. };
  359. this.degreeIndex = -1;
  360. },
  361. deleteEducation(index) {
  362. if (this.isEditingEducation && this.editingEducationIndex === index) {
  363. this.cancelEditEducation();
  364. }
  365. this.educationList.splice(index, 1);
  366. common_vendor.index.showToast({
  367. title: "已删除",
  368. icon: "none"
  369. });
  370. },
  371. // 工作经历相关方法
  372. bindWorkStartTimeChange(e) {
  373. this.workForm.startTime = e.detail.value;
  374. },
  375. bindWorkEndTimeChange(e) {
  376. this.workForm.endTime = e.detail.value;
  377. },
  378. saveWork() {
  379. if (!this.workForm.startTime) {
  380. common_vendor.index.showToast({
  381. title: "请选择开始时间",
  382. icon: "none"
  383. });
  384. return;
  385. }
  386. if (!this.workForm.endTime) {
  387. common_vendor.index.showToast({
  388. title: "请选择结束时间",
  389. icon: "none"
  390. });
  391. return;
  392. }
  393. if (!this.workForm.companyName) {
  394. common_vendor.index.showToast({
  395. title: "请输入单位名称",
  396. icon: "none"
  397. });
  398. return;
  399. }
  400. if (!this.workForm.department) {
  401. common_vendor.index.showToast({
  402. title: "请输入任职部门",
  403. icon: "none"
  404. });
  405. return;
  406. }
  407. if (!this.workForm.position) {
  408. common_vendor.index.showToast({
  409. title: "请输入担任职务",
  410. icon: "none"
  411. });
  412. return;
  413. }
  414. if (this.isEditingWork) {
  415. this.workList[this.editingWorkIndex] = { ...this.workForm };
  416. common_vendor.index.showToast({
  417. title: "修改成功",
  418. icon: "success"
  419. });
  420. this.isEditingWork = false;
  421. this.editingWorkIndex = -1;
  422. } else {
  423. this.workList.push({ ...this.workForm });
  424. common_vendor.index.showToast({
  425. title: "添加成功",
  426. icon: "success"
  427. });
  428. }
  429. this.workForm = {
  430. startTime: "",
  431. endTime: "",
  432. companyName: "",
  433. department: "",
  434. employeeCount: "",
  435. position: "",
  436. monthlySalary: "",
  437. supervisor: "",
  438. supervisorPhone: ""
  439. };
  440. },
  441. editWork(index) {
  442. this.isEditingWork = true;
  443. this.editingWorkIndex = index;
  444. this.workForm = { ...this.workList[index] };
  445. common_vendor.index.pageScrollTo({
  446. selector: ".work-form",
  447. duration: 300
  448. });
  449. },
  450. cancelEditWork() {
  451. this.isEditingWork = false;
  452. this.editingWorkIndex = -1;
  453. this.workForm = {
  454. startTime: "",
  455. endTime: "",
  456. companyName: "",
  457. department: "",
  458. employeeCount: "",
  459. position: "",
  460. monthlySalary: "",
  461. supervisor: "",
  462. supervisorPhone: ""
  463. };
  464. },
  465. deleteWork(index) {
  466. if (this.isEditingWork && this.editingWorkIndex === index) {
  467. this.cancelEditWork();
  468. }
  469. this.workList.splice(index, 1);
  470. common_vendor.index.showToast({
  471. title: "已删除",
  472. icon: "none"
  473. });
  474. },
  475. submitForm() {
  476. if (!this.validateCurrentStep()) {
  477. return;
  478. }
  479. const userInfo = common_vendor.index.getStorageSync("userInfo");
  480. if (!userInfo) {
  481. common_vendor.index.showToast({
  482. title: "用户信息获取失败,请重新登录",
  483. icon: "none",
  484. duration: 2e3
  485. });
  486. return;
  487. }
  488. try {
  489. const userData = JSON.parse(userInfo);
  490. const submitData = {
  491. tenant_id: 1,
  492. user_id: userData.id,
  493. personal_info: {
  494. name: this.formData.name,
  495. gender: this.formData.gender,
  496. phone: this.formData.phone,
  497. id_card: this.formData.idCard,
  498. address: this.formData.currentAddress,
  499. professional_skills: this.formData.skills ? this.formData.skills.split(",") : []
  500. },
  501. profile: {
  502. female_status: this.getFemaleStatus(),
  503. marital_status: this.getMaritalStatus(),
  504. height: parseFloat(this.formData.height) || 0,
  505. weight: parseFloat(this.formData.weight) || 0,
  506. ethnicity: this.formData.ethnic,
  507. current_address: this.formData.currentAddress,
  508. expected_salary: parseFloat(this.formData.expectedSalary) || 0
  509. },
  510. educations: this.formatEducations(),
  511. family_members: this.formatFamilyMembers(),
  512. work_experiences: this.formatWorkExperiences()
  513. };
  514. if (!submitData.personal_info.name || !submitData.personal_info.gender || !submitData.personal_info.phone) {
  515. common_vendor.index.showToast({
  516. title: "基本信息不完整",
  517. icon: "none",
  518. duration: 2e3
  519. });
  520. return;
  521. }
  522. this.sendFormData(submitData);
  523. } catch (error) {
  524. console.error("数据处理错误:", error);
  525. common_vendor.index.showToast({
  526. title: "数据处理错误,请重试",
  527. icon: "none",
  528. duration: 2e3
  529. });
  530. }
  531. },
  532. // 辅助方法:发送表单数据
  533. sendFormData(submitData) {
  534. common_vendor.index.showLoading({ title: "提交中..." });
  535. const token = common_vendor.index.getStorageSync("token");
  536. common_vendor.index.request({
  537. url: `${common_config.apiBaseUrl}/wechat/user/profile/update`,
  538. method: "POST",
  539. data: submitData,
  540. header: {
  541. "content-type": "application/json",
  542. "Authorization": token ? `Bearer ${token}` : ""
  543. },
  544. success: (res) => {
  545. common_vendor.index.hideLoading();
  546. if (res.statusCode === 200) {
  547. if (res.data.code === 2e3) {
  548. common_vendor.index.showToast({
  549. title: "提交成功",
  550. icon: "success",
  551. duration: 2e3
  552. });
  553. setTimeout(() => {
  554. common_vendor.index.navigateTo({
  555. url: "/pages/interview-notice/interview-notice"
  556. });
  557. }, 2e3);
  558. } else {
  559. common_vendor.index.showToast({
  560. title: res.data.msg || "提交失败",
  561. icon: "none",
  562. duration: 2e3
  563. });
  564. }
  565. } else {
  566. common_vendor.index.showToast({
  567. title: "服务器响应错误",
  568. icon: "none",
  569. duration: 2e3
  570. });
  571. }
  572. },
  573. fail: (err) => {
  574. console.error("提交失败:", err);
  575. common_vendor.index.hideLoading();
  576. if (err.errMsg.includes("timeout")) {
  577. common_vendor.index.showToast({
  578. title: "请求超时,请检查网络后重试",
  579. icon: "none",
  580. duration: 2e3
  581. });
  582. } else if (err.errMsg.includes("fail")) {
  583. common_vendor.index.showToast({
  584. title: "网络连接失败,请检查网络设置",
  585. icon: "none",
  586. duration: 2e3
  587. });
  588. } else {
  589. common_vendor.index.showToast({
  590. title: "提交失败,请稍后重试",
  591. icon: "none",
  592. duration: 2e3
  593. });
  594. }
  595. },
  596. complete: () => {
  597. }
  598. });
  599. },
  600. // 数据格式化方法
  601. getFemaleStatus() {
  602. if (this.formData.gender !== "女")
  603. return 0;
  604. const statusMap = { "孕期": 1, "产期": 2, "哺乳期": 3 };
  605. return statusMap[this.formData.threePeriod] || 0;
  606. },
  607. getMaritalStatus() {
  608. const statusMap = { "未婚": 0, "已婚": 1, "离异": 2, "丧偶": 3 };
  609. return statusMap[this.formData.marriage] || 0;
  610. },
  611. formatEducations() {
  612. return this.educationList.map((edu, index) => ({
  613. education_type: index === 0 ? 1 : 2,
  614. degree: this.mapDegreeToNumber(edu.degree),
  615. start_date: edu.startTime,
  616. end_date: edu.endTime,
  617. school_name: edu.schoolName,
  618. major: edu.major
  619. }));
  620. },
  621. formatFamilyMembers() {
  622. return this.familyMembers.map((member) => ({
  623. relation: member.relation,
  624. name: member.name,
  625. workplace: member.workplaceOrAddress,
  626. position: member.position,
  627. phone: member.phone
  628. //is_emergency_contact: member.isEmergencyContact||false // 添加紧急联系人标识
  629. }));
  630. },
  631. formatWorkExperiences() {
  632. return this.workList.map((work) => ({
  633. start_date: work.startTime,
  634. end_date: work.endTime,
  635. company_name: work.companyName,
  636. department: work.department,
  637. company_size: work.employeeCount,
  638. position: work.position,
  639. monthly_salary: work.monthlySalary,
  640. supervisor_name: work.supervisor,
  641. supervisor_phone: work.supervisorPhone
  642. }));
  643. },
  644. // 学历映射辅助方法
  645. mapDegreeToNumber(degreeText) {
  646. const degreeMap = {
  647. "高中": 1,
  648. "中专": 1,
  649. "大专": 2,
  650. "本科": 3,
  651. "硕士": 4,
  652. "博士": 5
  653. };
  654. return degreeMap[degreeText] || 6;
  655. },
  656. prevStep() {
  657. const prevIndex = this.currentStepIndex - 1;
  658. if (prevIndex >= 0) {
  659. this.currentStep = this.steps[prevIndex].id;
  660. common_vendor.index.pageScrollTo({
  661. scrollTop: 0,
  662. duration: 300
  663. });
  664. }
  665. },
  666. nextStep() {
  667. if (!this.validateCurrentStep()) {
  668. return;
  669. }
  670. if (this.currentStep === 1) {
  671. this.verifyIdentity();
  672. return;
  673. }
  674. const nextIndex = this.currentStepIndex + 1;
  675. if (nextIndex < this.steps.length) {
  676. this.currentStep = this.steps[nextIndex].id;
  677. common_vendor.index.pageScrollTo({
  678. scrollTop: 0,
  679. duration: 300
  680. });
  681. }
  682. },
  683. // 身份验证方法
  684. verifyIdentity() {
  685. this.formErrors = {
  686. name: "",
  687. idCard: "",
  688. phone: ""
  689. };
  690. common_vendor.index.showLoading({
  691. title: "身份验证中..."
  692. });
  693. common_vendor.index.request({
  694. url: `${common_config.apiBaseUrl}/wechat/identity/verify`,
  695. method: "POST",
  696. data: {
  697. name: this.formData.name,
  698. id_number: this.formData.idCard,
  699. mobile: this.formData.phone
  700. },
  701. header: {
  702. "content-type": "application/x-www-form-urlencoded"
  703. },
  704. success: (res) => {
  705. common_vendor.index.hideLoading();
  706. console.log(res);
  707. if (res.data.code === 200) {
  708. const nextIndex = this.currentStepIndex + 1;
  709. if (nextIndex < this.steps.length) {
  710. this.currentStep = this.steps[nextIndex].id;
  711. common_vendor.index.pageScrollTo({
  712. scrollTop: 0,
  713. duration: 300
  714. });
  715. }
  716. this.setUserInfo(this.formData);
  717. } else {
  718. this.handleVerificationError(res.data);
  719. }
  720. },
  721. fail: (err) => {
  722. this.handleRequestError(err);
  723. }
  724. });
  725. },
  726. setUserInfo(data) {
  727. common_vendor.index.request({
  728. url: `${common_config.apiBaseUrl}/wechat/updateUserInfo`,
  729. method: "POST",
  730. data: {
  731. openid: JSON.parse(common_vendor.index.getStorageSync("userInfo")).openid,
  732. name: data.name,
  733. id_number: data.idCard,
  734. purePhoneNumber: data.phone,
  735. tenant_id: 1,
  736. examine: 0
  737. },
  738. header: {
  739. "content-type": "application/x-www-form-urlencoded"
  740. },
  741. success: (res) => {
  742. console.log(res);
  743. }
  744. });
  745. },
  746. // 处理验证错误
  747. handleVerificationError(data) {
  748. this.formErrors.name = "姓名验证失败,请检查姓名是否正确";
  749. this.formErrors.idCard = "身份证号验证失败,请检查身份证号是否正确";
  750. this.formErrors.phone = "手机号验证失败,请检查手机号是否正确";
  751. common_vendor.index.showToast({
  752. title: data.msg || "身份验证失败",
  753. icon: "none"
  754. });
  755. },
  756. // 处理请求错误
  757. handleRequestError(err) {
  758. common_vendor.index.hideLoading();
  759. common_vendor.index.showToast({
  760. title: "网络错误,请检查网络连接",
  761. icon: "none",
  762. duration: 2e3
  763. });
  764. console.error("请求失败:", err);
  765. },
  766. // 验证当前步骤的必填项
  767. validateCurrentStep() {
  768. const validations = {
  769. // 第一步:基本信息验证
  770. 1: () => {
  771. const basicChecks = [
  772. { value: this.formData.name, message: "请输入姓名" },
  773. { value: this.formData.gender, message: "请选择性别" },
  774. { value: this.formData.phone, message: "请输入手机号" },
  775. { value: this.formData.idCard, message: "请输入身份证号" }
  776. ];
  777. for (const check of basicChecks) {
  778. if (!check.value) {
  779. common_vendor.index.showToast({ title: check.message, icon: "none" });
  780. return false;
  781. }
  782. }
  783. if (this.formData.gender === "女" && this.threePeriodIndex === -1) {
  784. common_vendor.index.showToast({ title: "请选择是否为三期", icon: "none" });
  785. return false;
  786. }
  787. return true;
  788. },
  789. // 第二步:家庭成员验证
  790. 3: () => {
  791. if (this.familyMembers.length === 0) {
  792. common_vendor.index.showToast({ title: "请至少添加一位家庭成员", icon: "none" });
  793. return false;
  794. }
  795. return true;
  796. },
  797. // 第三步:教育经历验证
  798. 5: () => {
  799. if (this.educationList.length === 0) {
  800. common_vendor.index.showToast({ title: "请至少添加一项教育经历", icon: "none" });
  801. return false;
  802. }
  803. return true;
  804. },
  805. // 第四步:专业技能验证
  806. 6: () => {
  807. if (!this.formData.skills) {
  808. common_vendor.index.showToast({ title: "请描述您的专业技能", icon: "none" });
  809. return false;
  810. }
  811. return true;
  812. },
  813. // 第五步:工作经历验证
  814. 8: () => {
  815. if (this.workList.length === 0) {
  816. common_vendor.index.showToast({ title: "请至少添加一项工作经历", icon: "none" });
  817. return false;
  818. }
  819. for (let i = 0; i < this.workList.length; i++) {
  820. const work = this.workList[i];
  821. const workChecks = [
  822. { value: work.startTime, message: `单位${i + 1}:请选择开始时间` },
  823. { value: work.endTime, message: `单位${i + 1}:请选择结束时间` },
  824. { value: work.companyName, message: `单位${i + 1}:请输入单位名称` },
  825. { value: work.department, message: `单位${i + 1}:请输入任职部门` },
  826. { value: work.position, message: `单位${i + 1}:请输入担任职务` }
  827. ];
  828. for (const check of workChecks) {
  829. if (!check.value) {
  830. common_vendor.index.showToast({ title: check.message, icon: "none" });
  831. return false;
  832. }
  833. }
  834. }
  835. return true;
  836. }
  837. };
  838. return validations[this.currentStep] ? validations[this.currentStep]() : true;
  839. },
  840. // Add method to fetch user data
  841. fetchUserData() {
  842. this.isLoading = true;
  843. const userInfo = common_vendor.index.getStorageSync("userInfo") ? JSON.parse(common_vendor.index.getStorageSync("userInfo")) : {};
  844. const openid = userInfo.openid;
  845. if (!openid) {
  846. common_vendor.index.showToast({
  847. title: "用户信息获取失败,请重新登录",
  848. icon: "none"
  849. });
  850. this.isLoading = false;
  851. return;
  852. }
  853. common_vendor.index.request({
  854. url: `${common_config.apiBaseUrl}/api/wechat/user/get_full_info?tenant_id=1&openid=${openid}`,
  855. method: "GET",
  856. success: (res) => {
  857. this.showPromiseModal = true;
  858. this.populateFormData(res.data.data);
  859. },
  860. fail: (err) => {
  861. },
  862. complete: () => {
  863. this.isLoading = false;
  864. }
  865. });
  866. },
  867. // Add method to populate form data with fetched data
  868. populateFormData(data) {
  869. const { user_info, profile, educations, work_experiences, family_members } = data;
  870. if (user_info) {
  871. this.formData.name = user_info.name || "";
  872. this.formData.gender = user_info.gender_text || "";
  873. this.genderIndex = this.genderOptions.findIndex((item) => item === this.formData.gender);
  874. this.formData.idCard = user_info.id_card || "";
  875. this.formData.phone = user_info.phone || "";
  876. this.formData.email = user_info.email || "";
  877. }
  878. if (profile) {
  879. this.formData.political = profile.political_status || "";
  880. this.politicalIndex = this.politicalOptions.findIndex((item) => item === this.formData.political);
  881. this.formData.ethnic = profile.ethnicity || "";
  882. this.ethnicIndex = this.ethnicOptions.findIndex((item) => item === this.formData.ethnic);
  883. this.formData.height = profile.height || "";
  884. this.formData.weight = profile.weight || "";
  885. this.formData.nativePlace = profile.native_place || "";
  886. this.formData.residence = profile.household_location || "";
  887. this.formData.currentAddress = profile.current_address || "";
  888. this.formData.marriage = profile.marital_status_text || "";
  889. this.marriageIndex = this.marriageOptions.findIndex((item) => item === this.formData.marriage);
  890. if (this.formData.gender === "女" && profile.female_status !== void 0) {
  891. const femaleStatusMap = { 0: "无", 1: "孕期", 2: "产期", 3: "哺乳期" };
  892. this.formData.threePeriod = femaleStatusMap[profile.female_status] || "无";
  893. this.threePeriodIndex = this.threePeriodOptions.findIndex((item) => item === this.formData.threePeriod);
  894. }
  895. this.formData.expectedSalary = profile.expected_salary || "";
  896. this.formData.emergencyContact = profile.emergency_contact || "";
  897. this.formData.emergencyPhone = profile.emergency_phone || "";
  898. this.formData.hobby = profile.specialties || "";
  899. this.formData.motto = profile.life_motto || "";
  900. const sourceTypeMap = {
  901. 1: "school",
  902. 2: "social",
  903. 3: "social",
  904. 4: "social",
  905. 5: "social"
  906. };
  907. const socialSourceMap = {
  908. 2: "BOSS",
  909. 3: "zhilian",
  910. 4: "liepin",
  911. 5: "other"
  912. };
  913. this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || "social";
  914. if (this.formData.sourceType === "social") {
  915. this.formData.socialSource = socialSourceMap[profile.recruitment_source] || "";
  916. if (this.formData.socialSource === "other") {
  917. this.formData.otherSocialSource = profile.recruitment_source_detail || "";
  918. }
  919. } else if (this.formData.sourceType === "school") {
  920. this.formData.otherSchoolSource = profile.recruitment_source_detail || "";
  921. }
  922. }
  923. if (educations && educations.length > 0) {
  924. this.educationList = educations.map((edu) => {
  925. const degreeMap = {
  926. 1: "高中",
  927. 2: "大专",
  928. 3: "本科",
  929. 4: "硕士",
  930. 5: "博士"
  931. };
  932. return {
  933. startTime: edu.start_date || "",
  934. endTime: edu.end_date || "",
  935. schoolName: edu.school_name || "",
  936. major: edu.major || "",
  937. degree: degreeMap[edu.degree] || ""
  938. };
  939. });
  940. }
  941. if (work_experiences && work_experiences.length > 0) {
  942. this.workList = work_experiences.map((work) => {
  943. return {
  944. startTime: work.start_date || "",
  945. endTime: work.end_date || "",
  946. companyName: work.company_name || "",
  947. department: work.department || "",
  948. employeeCount: work.company_size || "",
  949. position: work.position || "",
  950. monthlySalary: work.monthly_salary || "",
  951. supervisor: work.supervisor_name || "",
  952. supervisorPhone: work.supervisor_phone || ""
  953. };
  954. });
  955. }
  956. if (family_members && family_members.length > 0) {
  957. this.familyMembers = family_members.map((member) => {
  958. return {
  959. relation: member.relation || "",
  960. name: member.name || "",
  961. workplaceOrAddress: member.workplace || "",
  962. position: member.position || "",
  963. phone: member.phone || "",
  964. isEmergencyContact: member.isEmergencyContact || false
  965. };
  966. });
  967. }
  968. },
  969. // 处理紧急联系人开关变化
  970. handleEmergencyContactChange(e) {
  971. this.familyMemberForm.isEmergencyContact = e.detail.value;
  972. if (e.detail.value) {
  973. this.formData.emergencyContact = this.familyMemberForm.name;
  974. this.formData.emergencyPhone = this.familyMemberForm.phone;
  975. }
  976. }
  977. },
  978. // 添加监听器来清除错误信息
  979. watch: {
  980. "formData.name": function(newVal) {
  981. if (newVal && this.formErrors.name) {
  982. this.formErrors.name = "";
  983. }
  984. },
  985. "formData.idCard": function(newVal) {
  986. if (newVal && this.formErrors.idCard) {
  987. this.formErrors.idCard = "";
  988. }
  989. },
  990. "formData.phone": function(newVal) {
  991. if (newVal && this.formErrors.phone) {
  992. this.formErrors.phone = "";
  993. }
  994. }
  995. }
  996. };
  997. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  998. return common_vendor.e({
  999. a: $data.isLoading
  1000. }, $data.isLoading ? {} : {}, {
  1001. b: $data.showPromiseModal
  1002. }, $data.showPromiseModal ? {
  1003. c: $data.promiseChecked,
  1004. d: common_vendor.o((...args) => $options.togglePromiseChecked && $options.togglePromiseChecked(...args)),
  1005. e: !$data.promiseChecked,
  1006. f: common_vendor.o((...args) => $options.confirmPromise && $options.confirmPromise(...args))
  1007. } : {}, {
  1008. g: $data.currentStep === 1
  1009. }, $data.currentStep === 1 ? common_vendor.e({
  1010. h: $data.formErrors.name ? 1 : "",
  1011. i: $data.formData.name,
  1012. j: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
  1013. k: $data.formErrors.name
  1014. }, $data.formErrors.name ? {
  1015. l: common_vendor.t($data.formErrors.name)
  1016. } : {}, {
  1017. m: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
  1018. n: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
  1019. o: $data.genderIndex,
  1020. p: $data.genderOptions,
  1021. q: $data.formData.gender === "女"
  1022. }, $data.formData.gender === "女" ? {
  1023. r: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
  1024. s: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
  1025. t: $data.threePeriodIndex,
  1026. v: $data.threePeriodOptions
  1027. } : {}, {
  1028. w: $data.formErrors.phone ? 1 : "",
  1029. x: $data.formData.phone,
  1030. y: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
  1031. z: $data.formErrors.phone
  1032. }, $data.formErrors.phone ? {
  1033. A: common_vendor.t($data.formErrors.phone)
  1034. } : {}, {
  1035. B: $data.formErrors.idCard ? 1 : "",
  1036. C: $data.formData.idCard,
  1037. D: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
  1038. E: $data.formErrors.idCard
  1039. }, $data.formErrors.idCard ? {
  1040. F: common_vendor.t($data.formErrors.idCard)
  1041. } : {}, {
  1042. G: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
  1043. H: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
  1044. I: $data.ethnicIndex,
  1045. J: $data.ethnicOptions,
  1046. K: $data.formData.height,
  1047. L: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
  1048. M: $data.formData.weight,
  1049. N: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
  1050. O: $data.formData.currentAddress,
  1051. P: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
  1052. Q: $data.formData.residence,
  1053. R: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
  1054. S: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
  1055. T: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
  1056. U: $data.marriageIndex,
  1057. V: $data.marriageOptions,
  1058. W: $data.formData.expectedSalary,
  1059. X: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
  1060. }) : {}, {
  1061. Y: $data.currentStep === 3
  1062. }, $data.currentStep === 3 ? common_vendor.e({
  1063. Z: $data.familyMembers.length > 0
  1064. }, $data.familyMembers.length > 0 ? {
  1065. aa: common_vendor.f($data.familyMembers, (member, index, i0) => {
  1066. return {
  1067. a: common_vendor.t(index + 1),
  1068. b: common_vendor.o(($event) => $options.editFamilyMember(index), index),
  1069. c: common_vendor.o(($event) => $options.deleteFamilyMember(index), index),
  1070. d: common_vendor.t(member.relation),
  1071. e: common_vendor.t(member.name),
  1072. f: common_vendor.t(member.workplaceOrAddress),
  1073. g: common_vendor.t(member.position),
  1074. h: common_vendor.t(member.phone),
  1075. i: common_vendor.t(member.isEmergencyContact ? "是" : "否"),
  1076. j: index
  1077. };
  1078. })
  1079. } : {}, {
  1080. ab: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
  1081. ac: $data.isEditing
  1082. }, $data.isEditing ? {
  1083. ad: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
  1084. } : {}, {
  1085. ae: $data.familyMemberForm.relation,
  1086. af: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
  1087. ag: $data.familyMemberForm.name,
  1088. ah: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
  1089. ai: $data.familyMemberForm.workplaceOrAddress,
  1090. aj: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
  1091. ak: $data.familyMemberForm.position,
  1092. al: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
  1093. am: $data.familyMemberForm.phone,
  1094. an: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
  1095. ao: $data.familyMemberForm.isEmergencyContact,
  1096. ap: common_vendor.o((...args) => $options.handleEmergencyContactChange && $options.handleEmergencyContactChange(...args)),
  1097. aq: common_vendor.t($data.isEditing ? "✓" : "+"),
  1098. ar: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
  1099. as: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
  1100. }) : {}, {
  1101. at: $data.currentStep === 5
  1102. }, $data.currentStep === 5 ? common_vendor.e({
  1103. av: $data.educationList.length > 0
  1104. }, $data.educationList.length > 0 ? {
  1105. aw: common_vendor.f($data.educationList, (edu, index, i0) => {
  1106. return {
  1107. a: common_vendor.t(index === 0 ? "第一学历" : "最高学历"),
  1108. b: common_vendor.o(($event) => $options.editEducation(index), index),
  1109. c: common_vendor.o(($event) => $options.deleteEducation(index), index),
  1110. d: common_vendor.t(edu.startTime),
  1111. e: common_vendor.t(edu.endTime),
  1112. f: common_vendor.t(edu.schoolName),
  1113. g: common_vendor.t(edu.major),
  1114. h: common_vendor.t(edu.degree),
  1115. i: index
  1116. };
  1117. })
  1118. } : {}, {
  1119. ax: $data.educationList.length < 2 || $data.isEditingEducation
  1120. }, $data.educationList.length < 2 || $data.isEditingEducation ? common_vendor.e({
  1121. ay: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
  1122. az: $data.isEditingEducation
  1123. }, $data.isEditingEducation ? {
  1124. aA: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
  1125. } : {}, {
  1126. aB: common_vendor.t($data.educationForm.startTime || "开始时间"),
  1127. aC: $data.educationForm.startTime,
  1128. aD: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
  1129. aE: common_vendor.t($data.educationForm.endTime || "结束时间"),
  1130. aF: $data.educationForm.endTime,
  1131. aG: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
  1132. aH: $data.educationForm.schoolName,
  1133. aI: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
  1134. aJ: $data.educationForm.major,
  1135. aK: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
  1136. aL: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
  1137. aM: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
  1138. aN: $data.degreeIndex,
  1139. aO: $data.degreeOptions,
  1140. aP: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
  1141. aQ: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
  1142. aR: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
  1143. }) : {}) : {}, {
  1144. aS: $data.currentStep === 6
  1145. }, $data.currentStep === 6 ? {
  1146. aT: $data.formData.skills,
  1147. aU: common_vendor.o(($event) => $data.formData.skills = $event.detail.value),
  1148. aV: $data.formData.training,
  1149. aW: common_vendor.o(($event) => $data.formData.training = $event.detail.value)
  1150. } : {}, {
  1151. aX: $data.currentStep === 8
  1152. }, $data.currentStep === 8 ? common_vendor.e({
  1153. aY: $data.workList.length > 0
  1154. }, $data.workList.length > 0 ? {
  1155. aZ: common_vendor.f($data.workList, (work, index, i0) => {
  1156. return {
  1157. a: common_vendor.t(index + 1),
  1158. b: common_vendor.o(($event) => $options.editWork(index), index),
  1159. c: common_vendor.o(($event) => $options.deleteWork(index), index),
  1160. d: common_vendor.t(work.startTime),
  1161. e: common_vendor.t(work.endTime),
  1162. f: common_vendor.t(work.companyName),
  1163. g: common_vendor.t(work.department),
  1164. h: common_vendor.t(work.employeeCount),
  1165. i: common_vendor.t(work.position),
  1166. j: common_vendor.t(work.monthlySalary),
  1167. k: common_vendor.t(work.supervisor),
  1168. l: common_vendor.t(work.supervisorPhone),
  1169. m: index
  1170. };
  1171. })
  1172. } : {}, {
  1173. ba: $data.workList.length < 2 || $data.isEditingWork
  1174. }, $data.workList.length < 2 || $data.isEditingWork ? common_vendor.e({
  1175. bb: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
  1176. bc: $data.isEditingWork
  1177. }, $data.isEditingWork ? {
  1178. bd: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
  1179. } : {}, {
  1180. be: common_vendor.t($data.workForm.startTime || "开始时间"),
  1181. bf: $data.workForm.startTime,
  1182. bg: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
  1183. bh: common_vendor.t($data.workForm.endTime || "结束时间"),
  1184. bi: $data.workForm.endTime,
  1185. bj: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
  1186. bk: $data.workForm.companyName,
  1187. bl: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
  1188. bm: $data.workForm.employeeCount,
  1189. bn: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
  1190. bo: $data.workForm.department,
  1191. bp: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
  1192. bq: $data.workForm.position,
  1193. br: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
  1194. bs: $data.workForm.monthlySalary,
  1195. bt: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
  1196. bv: $data.workForm.supervisor,
  1197. bw: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
  1198. bx: $data.workForm.supervisorPhone,
  1199. by: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
  1200. bz: common_vendor.t($data.isEditingWork ? "✓" : "+"),
  1201. bA: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
  1202. bB: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
  1203. }) : {}) : {}, {
  1204. bC: $options.showPrevButton
  1205. }, $options.showPrevButton ? {
  1206. bD: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
  1207. } : {}, {
  1208. bE: $options.showNextButton
  1209. }, $options.showNextButton ? {
  1210. bF: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
  1211. } : {}, {
  1212. bG: $options.showSubmitButton
  1213. }, $options.showSubmitButton ? {
  1214. bH: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
  1215. } : {});
  1216. }
  1217. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  1218. wx.createPage(MiniProgramPage);