perSign.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image src="../../static/index/geren.jpg" mode=""></image>
  5. </view>
  6. <view class="freeSign">
  7. 免费报名
  8. </view>
  9. <view class="signInfo">
  10. 完成信息填写,即可参加红十字会救护员培训
  11. </view>
  12. <view class="box">
  13. <!-- <view class="red-box">
  14. 申请登记表
  15. </view> -->
  16. <view class="box-1">
  17. <view class="box-left">
  18. 姓名<text class="imp">*</text>:
  19. </view>
  20. <input type="text" value="" class="list-input" v-model="name" placeholder="请填写姓名" />
  21. </view>
  22. <view class="box-1">
  23. <view class="box-left">
  24. 联系方式<text class="imp">*</text>:
  25. </view>
  26. <input type="text" value="" class="list-input" v-model="phone" placeholder="请输入联系方式" />
  27. </view>
  28. <view class="box-1">
  29. <view class="box-left">
  30. 工作单位(或地址)<text class="imp">*</text>:
  31. </view>
  32. <input type="text" value="" class="list-input" v-model="address" placeholder="请输入工作单位(或地址)" />
  33. </view>
  34. </view>
  35. <view class="statement">
  36. <view class="title">
  37. 免费报名
  38. </view>
  39. <view class="main">
  40. <view>
  41. 请参训学员在培训当天携带身份证复印件1张,一寸证件照2张。
  42. </view>
  43. <view style="margin-top: 16rpx;">
  44. 报名电话: 0716-2202950
  45. </view>
  46. </view>
  47. </view>
  48. <view class="buttom" :class="{ action: loding }" @click="!loding?join():''">
  49. 立即报名
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. import {
  55. joinSec
  56. } from '@/api/index.js';
  57. import {
  58. upload
  59. } from '@/api/ask.js';
  60. export default {
  61. data() {
  62. const currentDate = this.getDate({
  63. format: true
  64. })
  65. return {
  66. otherjob: '',
  67. otherspe: '',
  68. loding: false, //是否提交中
  69. array: ['男', '女'],
  70. chooseEdu: ['博士后', '博士', '硕士', '本科', '专科', '其他'],
  71. chooseVol: ['有', '无'],
  72. is_vol: '',
  73. is_experience: '',
  74. chooseExp: ['是', '否'],
  75. items: [{
  76. value: '我自愿捐献全部遗体(含器官组织)'
  77. }, {
  78. value: '或只捐献眼角膜'
  79. }],
  80. timeList: [{
  81. id: 0,
  82. num: "周一",
  83. list: {
  84. morning: '周一上午',
  85. after: '周一下午',
  86. night: '周一晚上'
  87. }
  88. },
  89. {
  90. id: 1,
  91. num: "周二",
  92. list: {
  93. morning: '周二上午',
  94. after: '周二下午',
  95. night: '周二晚上'
  96. }
  97. },
  98. {
  99. id: 2,
  100. num: "周三",
  101. list: {
  102. morning: '周三上午',
  103. after: '周三下午',
  104. night: '周三晚上'
  105. }
  106. },
  107. {
  108. id: 3,
  109. num: "周四",
  110. list: {
  111. morning: '周四上午',
  112. after: '周四下午',
  113. night: '周四晚上'
  114. }
  115. },
  116. {
  117. id: 4,
  118. num: "周五",
  119. list: {
  120. morning: '周五上午',
  121. after: '周五下午',
  122. night: '周五晚上'
  123. }
  124. },
  125. {
  126. id: 5,
  127. num: "周六",
  128. list: {
  129. morning: '周六上午',
  130. after: '周六下午',
  131. night: '周六晚上'
  132. }
  133. },
  134. {
  135. id: 6,
  136. num: "周日",
  137. list: {
  138. morning: '周日上午',
  139. after: '周日下午',
  140. night: '周日晚上'
  141. }
  142. },
  143. ],
  144. jobList: [{
  145. id: 0,
  146. class_name: "赈灾工作"
  147. },
  148. {
  149. id: 1,
  150. class_name: "救护培训"
  151. },
  152. {
  153. id: 2,
  154. class_name: "活动策划"
  155. },
  156. {
  157. id: 3,
  158. class_name: "护送服务"
  159. },
  160. {
  161. id: 4,
  162. class_name: "医疗护理服务"
  163. },
  164. {
  165. id: 5,
  166. class_name: "探访服务"
  167. },
  168. {
  169. id: 6,
  170. class_name: "外语翻译"
  171. },
  172. {
  173. id: 7,
  174. class_name: "调查服务"
  175. },
  176. {
  177. id: 8,
  178. class_name: "宣传推广"
  179. },
  180. {
  181. id: 9,
  182. class_name: "文书档案工作"
  183. },
  184. {
  185. id: 10,
  186. class_name: "其他(请注明)"
  187. },
  188. ],
  189. specialityList: [{
  190. id: 0,
  191. class_name: "医疗护理"
  192. },
  193. {
  194. id: 1,
  195. class_name: "紧急救护"
  196. },
  197. {
  198. id: 2,
  199. class_name: "家电维修"
  200. },
  201. {
  202. id: 3,
  203. class_name: "影音制作"
  204. },
  205. {
  206. id: 4,
  207. class_name: "文艺演出"
  208. },
  209. {
  210. id: 5,
  211. class_name: "理发"
  212. },
  213. {
  214. id: 6,
  215. class_name: "摄影摄像"
  216. },
  217. {
  218. id: 7,
  219. class_name: "电脑中文打字"
  220. },
  221. {
  222. id: 8,
  223. class_name: "汽车驾驶"
  224. },
  225. {
  226. id: 9,
  227. class_name: "外语翻译"
  228. },
  229. {
  230. id: 10,
  231. class_name: "法律咨询"
  232. },
  233. {
  234. id: 11,
  235. class_name: "文案策划"
  236. },
  237. {
  238. id: 12,
  239. class_name: "其他(请注明)"
  240. },
  241. ],
  242. current: "",
  243. index: 0,
  244. mz: '',
  245. cardimg: '', //证件照
  246. card: '',
  247. checklist: [],
  248. name: '',
  249. sex: '',
  250. birth: '',
  251. fillingDate: '',
  252. phone: '',
  253. address: '',
  254. work: '',
  255. specialty: '',
  256. education: '',
  257. }
  258. },
  259. computed: {
  260. startDate() {
  261. return this.getDate('start');
  262. },
  263. endDate() {
  264. return this.getDate('end');
  265. }
  266. },
  267. methods: {
  268. async join() {
  269. let obj = this;
  270. if (obj.name == '') {
  271. obj.$api.msg('请输入您的姓名');
  272. return;
  273. }
  274. // if (obj.sex == '') {
  275. // obj.$api.msg('请输入您的性别');
  276. // return;
  277. // }
  278. // if (obj.birth == '') {
  279. // obj.$api.msg('请填写您的生日');
  280. // return;
  281. // }
  282. const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  283. if (!reg.test(obj.phone)) {
  284. obj.$api.msg('请填写正确的手机号码');
  285. return;
  286. }
  287. if (obj.address == '') {
  288. obj.$api.msg('请填写您的地址');
  289. return;
  290. }
  291. // /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
  292. // if (obj.work == '') {
  293. // obj.$api.msg('请填写您的工作单位');
  294. // return;
  295. // }
  296. // if (obj.cardimg == '') {
  297. // obj.$api.msg('请上传您的证件');
  298. // return
  299. // }
  300. // let reg1 =
  301. // /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
  302. // if (!reg1.test(obj.card)) {
  303. // obj.$api.msg('请填写正确的身份证信息');
  304. // return;
  305. // }
  306. // if (obj.mz == '') {
  307. // obj.$api.msg('请填写您所属的名族');
  308. // return;
  309. // }
  310. // if (obj.specialty == '') {
  311. // obj.$api.msg('请填写您的职位');
  312. // return;
  313. // }
  314. // if (obj.education == '') {
  315. // obj.$api.msg('请填写您的教育程度');
  316. // return;
  317. // }
  318. // if (obj.is_vol == '') {
  319. // obj.$api.msg('请填写您的是否受过志愿服务');
  320. // return;
  321. // }
  322. // if (obj.is_experience == '') {
  323. // obj.$api.msg('请填写您的有无服务经验');
  324. // return;
  325. // }
  326. obj.loding = true;
  327. joinSec({
  328. name: obj.name,
  329. sex: obj.sex,
  330. education: obj.education,
  331. birth: obj.birth,
  332. mz: obj.mz,
  333. phone: obj.phone,
  334. address: obj.address,
  335. work: obj.work,
  336. specialty: obj.specialty,
  337. img: obj.cardimg,
  338. card: obj.card,
  339. }).then(e => {
  340. obj.name = '';
  341. obj.sex = '';
  342. obj.education = '';
  343. obj.birth = '';
  344. obj.mz = '',
  345. obj.phone = '';
  346. obj.address = '';
  347. obj.work = '';
  348. obj.specialty = '';
  349. obj.cardimg = '',
  350. obj.card = ''
  351. uni.navigateTo({
  352. url: '../joinSuc/joinNow'
  353. });
  354. }).catch(function(e) {
  355. console.log('出错了')
  356. console.log(e);
  357. });
  358. },
  359. imgsub() {
  360. console.log('imgsub')
  361. upload({
  362. filename: ''
  363. }).then(data => {
  364. this.cardimg = data[0].url;
  365. })
  366. },
  367. // 选择性别
  368. bindPickerSex: function(e) {
  369. this.sex = this.array[e.target.value];
  370. this.index = e.target.value + 1;
  371. },
  372. // 选择教育程度
  373. bindPickerEdu: function(e) {
  374. this.education = this.chooseEdu[e.target.value];
  375. this.index = e.target.value + 1;
  376. },
  377. // 选择日期
  378. bindDateChange: function(e) {
  379. this.birth = e.target.value
  380. },
  381. //选择填写日期
  382. fillingDateChange: function(e) {
  383. this.fillingDate = e.target.value
  384. },
  385. // 是否参加志愿活动
  386. bindPickerVol: function(e) {
  387. this.is_vol = this.chooseVol[e.target.value];
  388. this.index = e.target.value + 1;
  389. },
  390. // 有无服务经验
  391. bindPickerExp: function(e) {
  392. this.is_experience = this.chooseExp[e.target.value];
  393. this.index = e.target.value + 1;
  394. },
  395. // 选择捐献
  396. radioChange: function(evt) {
  397. for (let i = 0; i < this.items.length; i++) {
  398. if (this.items[i].value === evt.target.value) {
  399. this.current = i;
  400. break;
  401. }
  402. }
  403. },
  404. getDate(type) {
  405. const date = new Date();
  406. let year = date.getFullYear();
  407. let month = date.getMonth() + 1;
  408. let day = date.getDate();
  409. if (type === 'start') {
  410. year = year - 60;
  411. } else if (type === 'end') {
  412. year = year + 2;
  413. }
  414. month = month > 9 ? month : '0' + month;;
  415. day = day > 9 ? day : '0' + day;
  416. return `${year}-${month}-${day}`;
  417. },
  418. // 选择可提供时间
  419. // this.quantum = item.detail.value.join(',');
  420. checktime1(e) {
  421. // var items = this.timeList,
  422. // let quantum = [];
  423. this.quantum = e.detail.value.join(',');
  424. console.log(this.quantum);
  425. },
  426. checktime2(e) {
  427. // var items = this.timeList,
  428. let values = e.detail.value;
  429. // let quantum = [];
  430. console.log(values);
  431. },
  432. checktime3(e) {
  433. // var items = this.timeList,
  434. let values = e.detail.value;
  435. // let quantum = [];
  436. console.log(values);
  437. },
  438. // 选择可提供时间
  439. timeOnChange: function(item1) {
  440. this.quantum = item1.detail.value.join(',');
  441. console.log('可选择时间', this.quantum)
  442. },
  443. //选择有兴趣参与的工作
  444. checkjob(item) {
  445. this.taste = item.detail.value.join(',');
  446. console.log('选择工作:', this.taste)
  447. this.otherjob = item.detail.value
  448. },
  449. // 选择专长checkspeciality
  450. checkspeciality(item) {
  451. this.speciali = item.detail.value.join(',');
  452. console.log('选择专长', this.speciali)
  453. this.otherspe = item.detail.value
  454. },
  455. }
  456. }
  457. </script>
  458. <style lang="scss">
  459. page {
  460. background-color: #FFFFFF
  461. }
  462. .content {
  463. // padding-top: 64rpx;
  464. // background-color: #f3afad;
  465. .top {
  466. width: 100%;
  467. height: 368rpx;
  468. image {
  469. width: 100%;
  470. height: 368rpx;
  471. }
  472. }
  473. .freeSign {
  474. padding: 24rpx 0;
  475. display: flex;
  476. align-items: center;
  477. justify-content: center;
  478. background-color: #FFFFFF;
  479. border-bottom: 1rpx solid #F2F2F2;
  480. }
  481. .signInfo {
  482. padding: 24rpx 0;
  483. display: flex;
  484. font-size: 28rpx;
  485. align-items: center;
  486. justify-content: center;
  487. background-color: #FFFFFF;
  488. border-bottom: 1rpx solid #F2F2F2;
  489. }
  490. .statement {
  491. // margin: 32rpx;
  492. background-color: #FFFFFF;
  493. // padding: 32rpx 23rpx;
  494. border-radius: 12rpx;
  495. .title {
  496. height: 84rpx;
  497. display: flex;
  498. justify-content: center;
  499. align-items: center;
  500. font-size: 32rpx;
  501. border-bottom: 2rpx dotted #f3f3f3;
  502. }
  503. .main {
  504. padding: 32rpx;
  505. text-indent: 48rpx;
  506. color: #666;
  507. font-weight: 400;
  508. }
  509. }
  510. .buttom {
  511. width: 500rpx;
  512. height: 100rpx;
  513. background: linear-gradient(0deg, #C90F1B, #F14D33);
  514. border-radius: 20rpx;
  515. margin: 20rpx auto;
  516. font-size: 36rpx;
  517. font-weight: 400;
  518. color: #FFFFFF;
  519. line-height: 100rpx;
  520. text-align: center;
  521. &.action {
  522. background: #999999;
  523. }
  524. }
  525. .box {
  526. // margin-top: 44rpx;
  527. // width: 690rpx;
  528. // margin: 32rpx auto 0;
  529. background-color: #FFFFFF;
  530. border-radius: 10rpx;
  531. padding: 28rpx 20rpx 84rpx 20rpx;
  532. position: relative;
  533. // .red-box {
  534. // width: 405rpx;
  535. // line-height: 66rpx;
  536. // text-align: center;
  537. // background: linear-gradient(0deg, #C90F1B, #F14D33);
  538. // border-radius: 10rpx;
  539. // font-size: 30rpx;
  540. // font-weight: 500;
  541. // color: #FFFFFF;
  542. // // position: relative;
  543. // position: absolute;
  544. // top: -36rpx;
  545. // left: 50%;
  546. // transform: translateX(-50%);
  547. // z-index: 1;
  548. // }
  549. .box-check {
  550. font-size: 28rpx;
  551. font-weight: 500;
  552. color: #666666;
  553. line-height: 100rpx;
  554. }
  555. .imp {
  556. color: red;
  557. margin-left: 5rpx;
  558. }
  559. .check-box {
  560. margin: 44rpx 0rpx;
  561. padding: 25rpx 25rpx;
  562. border: 3rpx solid #e9b2af;
  563. width: 100%;
  564. display: flex;
  565. flex-direction: column;
  566. border-radius: 25rpx;
  567. color: #E63931;
  568. .info {
  569. margin-bottom: 32rpx;
  570. text-align: center;
  571. }
  572. .chooseTim {
  573. text-align: center;
  574. font-size: 42rpx;
  575. }
  576. .choose-job {
  577. color: #666666;
  578. // height: 45rpx; 爱心捐赠
  579. .goods_check {
  580. display: flex;
  581. flex-direction: column;
  582. .uni-label-pointer {
  583. // width: 50%;
  584. // display: flex;
  585. }
  586. }
  587. .other {
  588. width: 100%;
  589. border-bottom: 2rpx solid #f3f3f3;
  590. }
  591. }
  592. .box-cent {
  593. font-size: 28rpx;
  594. font-weight: 500;
  595. color: #666666;
  596. display: flex;
  597. .cent-left {
  598. margin-right: 28rpx;
  599. .left-txt {
  600. line-height: 100rpx;
  601. }
  602. }
  603. .cent-right {
  604. flex: 1;
  605. display: flex;
  606. justify-content: space-around;
  607. .right-check {
  608. line-height: 100rpx;
  609. }
  610. }
  611. }
  612. }
  613. .box-1 {
  614. display: flex;
  615. flex-direction: column;
  616. align-items: center;
  617. width: 100%;
  618. margin-top: 34rpx;
  619. // height: 133rpx;
  620. .box-left {
  621. padding-left: 2rpx;
  622. width: 100%;
  623. text-align: left;
  624. color: black;
  625. font-size: 30rpx;
  626. font-weight: 500;
  627. }
  628. input {
  629. height: 66rpx;
  630. line-height: 66rpx;
  631. margin-top: 32rpx;
  632. // height: 88rpx;
  633. }
  634. .list-input {
  635. padding: 16rpx 24rpx;
  636. // margin: 12rpx 0 ;
  637. line-height: 80rpx;
  638. display: flex;
  639. align-items: center;
  640. width: 100%;
  641. font-size: 28rpx;
  642. flex: 1;
  643. color: #BEBEBE;
  644. border: 4rpx solid #DCDFE6;
  645. border-radius: 12rpx;
  646. text-align: left;
  647. padding-right: 24rpx;
  648. .input-placeholder {
  649. height: 70rpx;
  650. color: #BEBEBE;
  651. }
  652. }
  653. .box-right {
  654. display: flex;
  655. align-items: center;
  656. padding-left: 24rpx;
  657. height: 66rpx;
  658. line-height: 66rpx;
  659. border: 1rpx solid #f3afad;
  660. border-radius: 22rpx;
  661. margin: 32rpx 36rpx 0 36rpx;
  662. width: 96%;
  663. font-size: 36rpx;
  664. color: #FF9797;
  665. text-align: left;
  666. // line-height: 1;
  667. }
  668. }
  669. .upload-box {
  670. width: 100%;
  671. height: 247rpx;
  672. background: #FFFFFF;
  673. // border: 1px solid #E63931;
  674. border-radius: 27rpx;
  675. display: flex;
  676. flex-direction: column;
  677. padding: 30rpx 40rpx 30rpx 0;
  678. margin: 0 auto 30rpx;
  679. .upload-left {
  680. font-weight: 400;
  681. color: #E63931;
  682. }
  683. .upload-right {
  684. flex: 1;
  685. display: flex;
  686. align-items: center;
  687. justify-content: center;
  688. .upload-img {
  689. width: 103rpx;
  690. height: 103rpx;
  691. margin-top: 24rpx;
  692. }
  693. }
  694. }
  695. }
  696. }
  697. </style>