info.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. {extend name="public/base"/}
  2. {block name="css"}
  3. {/block}
  4. {block name="body"}
  5. <van-nav-bar
  6. class="nav-theme"
  7. :fixed="true"
  8. :placeholder="true"
  9. >
  10. <template #title>
  11. <span class="text-white">简历</span>
  12. </template>
  13. </van-nav-bar>
  14. <van-form @submit="onSubmit">
  15. <div class="lw-title">基础信息</div>
  16. <van-cell-group inset>
  17. <van-field
  18. v-model="form.name"
  19. required
  20. label="姓名"
  21. placeholder="请填写姓名"
  22. :rules="[{ required: true, message: '请填写姓名' }]"
  23. ></van-field>
  24. <van-field required name="gender" label="性别">
  25. <template #input>
  26. <van-radio-group v-model="form.gender" direction="horizontal">
  27. <van-radio :name="1">男</van-radio>
  28. <van-radio :name="2">女</van-radio>
  29. </van-radio-group>
  30. </template>
  31. </van-field>
  32. <van-field
  33. v-model="form.mobile"
  34. required
  35. label="手机号"
  36. placeholder="请填写手机号"
  37. :rules="[
  38. { required: true, message: '请填写手机号' },
  39. { validator, message: '请输入正确的手机号'}
  40. ]"
  41. ></van-field>
  42. <van-field
  43. v-model="form.idcard"
  44. label="身份证"
  45. placeholder="请填写身份证号"
  46. ></van-field>
  47. <van-field
  48. v-model="form.age"
  49. type="digit"
  50. required
  51. label="年龄"
  52. placeholder="请填写年龄"
  53. :rules="[{ required: true, message: '请填写年龄' }]"
  54. ></van-field>
  55. </van-cell-group>
  56. <div class="lw-title">求职信息</div>
  57. <van-cell-group inset>
  58. <van-field
  59. v-model="form.jobintention"
  60. label="求职意向"
  61. placeholder="请填写求职意向"
  62. ></van-field>
  63. <van-field
  64. v-model="form.address"
  65. label="地址"
  66. placeholder="请填写地址"
  67. ></van-field>
  68. <van-field
  69. v-model="form.education"
  70. label="学历"
  71. placeholder="请填写学历"
  72. ></van-field>
  73. <van-field
  74. v-model="form.comment"
  75. rows="2"
  76. autosize
  77. label="备注"
  78. type="textarea"
  79. maxlength="1000"
  80. placeholder="请输入备注"
  81. show-word-limit
  82. ></van-field>
  83. </van-cell-group>
  84. <div style="margin: 16px;">
  85. <van-button round block type="primary" native-type="submit">
  86. 提交
  87. </van-button>
  88. </div>
  89. </van-form>
  90. {/block}
  91. {block name="script"}
  92. <script>
  93. function v_setup() {
  94. let base = {};
  95. base.broker = {$broker};
  96. //表单
  97. base.form = Vue.reactive({
  98. name: '',
  99. mobile: '',
  100. gender: 1,
  101. idcard: '',
  102. age: '',
  103. jobintention: '',
  104. address: '',
  105. education: '',
  106. brokerid: base.broker.id,
  107. });
  108. base.onSubmit = () => {
  109. postJson("{:url('candidate/infoPost')}", base.form).then(({data}) => {
  110. vant.showDialog({
  111. title: '提示',
  112. message: '提交成功',
  113. }).then(() => {
  114. location.href = "{:url('/mobile/worker/index')}?id=" + base.broker.agentid;
  115. });
  116. });
  117. };
  118. //手机号验证
  119. base.validator = (val) => {
  120. return /^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(val);
  121. };
  122. return base;
  123. }
  124. </script>
  125. {/block}