perSign.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image src="../../static/img/activity.png" 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" />
  21. </view>
  22. <view class="box-1">
  23. <view class="box-left">
  24. 联系方式:
  25. </view>
  26. <input type="text" value="" class="list-input" v-model="phone" />
  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="phone" />
  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. 报名电话: 0573-88103165
  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, class_name: "赈灾工作" },
  146. { id: 1, class_name: "救护培训" },
  147. { id: 2, class_name: "活动策划" },
  148. { id: 3, class_name: "护送服务" },
  149. { id: 4, class_name: "医疗护理服务" },
  150. { id: 5, class_name: "探访服务" },
  151. { id: 6, class_name: "外语翻译" },
  152. { id: 7, class_name: "调查服务" },
  153. { id: 8, class_name: "宣传推广" },
  154. { id: 9, class_name: "文书档案工作" },
  155. { id: 10, class_name: "其他(请注明)" },
  156. ],
  157. specialityList: [
  158. { id: 0, class_name: "医疗护理" },
  159. { id: 1, class_name: "紧急救护" },
  160. { id: 2, class_name: "家电维修" },
  161. { id: 3, class_name: "影音制作" },
  162. { id: 4, class_name: "文艺演出" },
  163. { id: 5, class_name: "理发" },
  164. { id: 6, class_name: "摄影摄像"},
  165. { id: 7, class_name: "电脑中文打字" },
  166. { id: 8, class_name: "汽车驾驶" },
  167. { id: 9, class_name: "外语翻译" },
  168. { id: 10, class_name: "法律咨询" },
  169. { id: 11, class_name: "文案策划"},
  170. { id: 12, class_name: "其他(请注明)" },
  171. ],
  172. current: "",
  173. index: 0,
  174. mz: '',
  175. cardimg: '', //证件照
  176. card: '',
  177. checklist: [],
  178. name: '',
  179. sex: '',
  180. birth: '',
  181. fillingDate: '',
  182. phone: '',
  183. address: '',
  184. work: '',
  185. specialty: '',
  186. education: '',
  187. }
  188. },
  189. computed: {
  190. startDate() {
  191. return this.getDate('start');
  192. },
  193. endDate() {
  194. return this.getDate('end');
  195. }
  196. },
  197. methods: {
  198. async join() {
  199. let obj = this;
  200. if (obj.name == '') {
  201. obj.$api.msg('请输入您的姓名');
  202. return;
  203. }
  204. if (obj.sex == '') {
  205. obj.$api.msg('请输入您的性别');
  206. return;
  207. }
  208. // if (obj.birth == '') {
  209. // obj.$api.msg('请填写您的生日');
  210. // return;
  211. // }
  212. const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  213. if (!reg.test(obj.phone)) {
  214. obj.$api.msg('请填写正确的手机号码');
  215. return;
  216. }
  217. if (obj.address == '') {
  218. obj.$api.msg('请填写您的地址');
  219. return;
  220. }
  221. // /^(^[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])$)$/
  222. if (obj.work == '') {
  223. obj.$api.msg('请填写您的工作单位');
  224. return;
  225. }
  226. if (obj.cardimg == '') {
  227. obj.$api.msg('请上传您的证件');
  228. return
  229. }
  230. let reg1 =
  231. /^(^[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])$)$/
  232. if (!reg1.test(obj.card)) {
  233. obj.$api.msg('请填写正确的身份证信息');
  234. return;
  235. }
  236. if (obj.mz == '') {
  237. obj.$api.msg('请填写您所属的名族');
  238. return;
  239. }
  240. if (obj.specialty == '') {
  241. obj.$api.msg('请填写您的职位');
  242. return;
  243. }
  244. // if (obj.education == '') {
  245. // obj.$api.msg('请填写您的教育程度');
  246. // return;
  247. // }
  248. // if (obj.is_vol == '') {
  249. // obj.$api.msg('请填写您的是否受过志愿服务');
  250. // return;
  251. // }
  252. // if (obj.is_experience == '') {
  253. // obj.$api.msg('请填写您的有无服务经验');
  254. // return;
  255. // }
  256. obj.loding = true;
  257. joinSec({
  258. name: obj.name,
  259. sex: obj.sex,
  260. education: obj.education,
  261. birth: obj.birth,
  262. mz: obj.mz,
  263. phone: obj.phone,
  264. address: obj.address,
  265. work: obj.work,
  266. specialty: obj.specialty,
  267. img: obj.cardimg,
  268. card: obj.card,
  269. }).then(e => {
  270. obj.name = '';
  271. obj.sex = '';
  272. obj.education = '';
  273. obj.birth = '';
  274. obj.mz = '',
  275. obj.phone = '';
  276. obj.address = '';
  277. obj.work = '';
  278. obj.specialty = '';
  279. obj.cardimg = '',
  280. obj.card = ''
  281. uni.navigateTo({
  282. url: '../joinSuc/joinNow'
  283. });
  284. }).catch(function(e) {
  285. console.log('出错了')
  286. console.log(e);
  287. });
  288. },
  289. imgsub() {
  290. console.log('imgsub')
  291. upload({
  292. filename: ''
  293. }).then(data => {
  294. this.cardimg = data[0].url;
  295. })
  296. },
  297. // 选择性别
  298. bindPickerSex: function(e) {
  299. this.sex = this.array[e.target.value];
  300. this.index = e.target.value + 1;
  301. },
  302. // 选择教育程度
  303. bindPickerEdu: function(e) {
  304. this.education = this.chooseEdu[e.target.value];
  305. this.index = e.target.value + 1;
  306. },
  307. // 选择日期
  308. bindDateChange: function(e) {
  309. this.birth = e.target.value
  310. },
  311. //选择填写日期
  312. fillingDateChange: function(e) {
  313. this.fillingDate = e.target.value
  314. },
  315. // 是否参加志愿活动
  316. bindPickerVol: function(e) {
  317. this.is_vol = this.chooseVol[e.target.value];
  318. this.index = e.target.value + 1;
  319. },
  320. // 有无服务经验
  321. bindPickerExp: function(e) {
  322. this.is_experience = this.chooseExp[e.target.value];
  323. this.index = e.target.value + 1;
  324. },
  325. // 选择捐献
  326. radioChange: function(evt) {
  327. for (let i = 0; i < this.items.length; i++) {
  328. if (this.items[i].value === evt.target.value) {
  329. this.current = i;
  330. break;
  331. }
  332. }
  333. },
  334. getDate(type) {
  335. const date = new Date();
  336. let year = date.getFullYear();
  337. let month = date.getMonth() + 1;
  338. let day = date.getDate();
  339. if (type === 'start') {
  340. year = year - 60;
  341. } else if (type === 'end') {
  342. year = year + 2;
  343. }
  344. month = month > 9 ? month : '0' + month;;
  345. day = day > 9 ? day : '0' + day;
  346. return `${year}-${month}-${day}`;
  347. },
  348. // 选择可提供时间
  349. // this.quantum = item.detail.value.join(',');
  350. checktime1(e) {
  351. // var items = this.timeList,
  352. // let quantum = [];
  353. this.quantum = e.detail.value.join(',');
  354. console.log(this.quantum);
  355. },
  356. checktime2(e) {
  357. // var items = this.timeList,
  358. let values = e.detail.value;
  359. // let quantum = [];
  360. console.log(values);
  361. },
  362. checktime3(e) {
  363. // var items = this.timeList,
  364. let values = e.detail.value;
  365. // let quantum = [];
  366. console.log(values);
  367. },
  368. // 选择可提供时间
  369. timeOnChange: function(item1) {
  370. this.quantum = item1.detail.value.join(',');
  371. console.log('可选择时间',this.quantum)
  372. },
  373. //选择有兴趣参与的工作
  374. checkjob(item) {
  375. this.taste = item.detail.value.join(',');
  376. console.log('选择工作:',this.taste)
  377. this.otherjob = item.detail.value
  378. },
  379. // 选择专长checkspeciality
  380. checkspeciality(item) {
  381. this.speciali = item.detail.value.join(',');
  382. console.log('选择专长',this.speciali)
  383. this.otherspe = item.detail.value
  384. },
  385. }
  386. }
  387. </script>
  388. <style lang="scss">
  389. page {
  390. background-color: #FFFFFF
  391. }
  392. .content {
  393. // padding-top: 64rpx;
  394. // background-color: #f3afad;
  395. .top {
  396. width: 100%;
  397. height: 368rpx;
  398. image {
  399. width: 100%;
  400. height: 368rpx;
  401. }
  402. }
  403. .freeSign{
  404. padding: 24rpx 0;
  405. display: flex;
  406. align-items: center;
  407. justify-content: center;
  408. background-color: #FFFFFF;
  409. border-bottom: 1rpx solid #F2F2F2;
  410. }
  411. .signInfo{
  412. padding: 24rpx 0;
  413. display: flex;
  414. font-size: 28rpx;
  415. align-items: center;
  416. justify-content: center;
  417. background-color: #FFFFFF;
  418. border-bottom: 1rpx solid #F2F2F2;
  419. }
  420. .statement{
  421. // margin: 32rpx;
  422. background-color: #FFFFFF;
  423. // padding: 32rpx 23rpx;
  424. border-radius: 12rpx;
  425. .title{
  426. height: 84rpx;
  427. display: flex;
  428. justify-content: center;
  429. align-items: center;
  430. font-size: 32rpx;
  431. border-bottom: 2rpx dotted #f3f3f3;
  432. }
  433. .main{
  434. padding: 32rpx;
  435. text-indent: 48rpx;
  436. color:#666 ;
  437. font-weight: 400;
  438. }
  439. }
  440. .buttom {
  441. width: 460rpx;
  442. height: 100rpx;
  443. background: linear-gradient(0deg, #C90F1B, #F14D33);
  444. border-radius: 50rpx;
  445. margin: 50rpx auto;
  446. font-size: 36rpx;
  447. font-weight: 400;
  448. color: #FFFFFF;
  449. line-height: 100rpx;
  450. text-align: center;
  451. &.action {
  452. background: #999999;
  453. }
  454. }
  455. .box {
  456. // margin-top: 44rpx;
  457. // width: 690rpx;
  458. // margin: 32rpx auto 0;
  459. background-color: #FFFFFF;
  460. border-radius: 10rpx;
  461. padding: 28rpx 20rpx 84rpx 20rpx;
  462. position: relative;
  463. // .red-box {
  464. // width: 405rpx;
  465. // line-height: 66rpx;
  466. // text-align: center;
  467. // background: linear-gradient(0deg, #C90F1B, #F14D33);
  468. // border-radius: 10rpx;
  469. // font-size: 30rpx;
  470. // font-weight: 500;
  471. // color: #FFFFFF;
  472. // // position: relative;
  473. // position: absolute;
  474. // top: -36rpx;
  475. // left: 50%;
  476. // transform: translateX(-50%);
  477. // z-index: 1;
  478. // }
  479. .box-check {
  480. font-size: 28rpx;
  481. font-weight: 500;
  482. color: #666666;
  483. line-height: 100rpx;
  484. }
  485. .imp {
  486. color: red;
  487. margin-left: 5rpx;
  488. }
  489. .check-box {
  490. margin: 44rpx 0rpx;
  491. padding: 25rpx 25rpx;
  492. border: 3rpx solid #e9b2af;
  493. width: 100%;
  494. display: flex;
  495. flex-direction: column;
  496. border-radius: 25rpx;
  497. color: #E63931;
  498. .info {
  499. margin-bottom: 32rpx;
  500. text-align: center;
  501. }
  502. .chooseTim {
  503. text-align: center;
  504. font-size: 42rpx;
  505. }
  506. .choose-job{
  507. color: #666666;
  508. // height: 45rpx; 爱心捐赠
  509. .goods_check{
  510. display: flex;
  511. flex-direction: column;
  512. .uni-label-pointer{
  513. // width: 50%;
  514. // display: flex;
  515. }
  516. }
  517. .other{
  518. width: 100%;
  519. border-bottom: 2rpx solid #f3f3f3;
  520. }
  521. }
  522. .box-cent {
  523. font-size: 28rpx;
  524. font-weight: 500;
  525. color: #666666;
  526. display: flex;
  527. .cent-left {
  528. margin-right: 28rpx;
  529. .left-txt {
  530. line-height: 100rpx;
  531. }
  532. }
  533. .cent-right {
  534. flex: 1;
  535. display: flex;
  536. justify-content: space-around;
  537. .right-check {
  538. line-height: 100rpx;
  539. }
  540. }
  541. }
  542. }
  543. .box-1 {
  544. display: flex;
  545. flex-direction: column;
  546. align-items: center;
  547. width: 100%;
  548. margin-top: 32rpx;
  549. // height: 133rpx;
  550. .box-left {
  551. padding-left: 2rpx;
  552. width: 100%;
  553. text-align: left;
  554. color: #E63931;
  555. }
  556. input {
  557. height: 66rpx;
  558. line-height: 66rpx;
  559. margin-top: 32rpx;
  560. // height: 88rpx;
  561. }
  562. .list-input {
  563. padding-left: 24rpx;
  564. // margin: 12rpx 0 ;
  565. // line-height: 66rpx;
  566. display: flex;
  567. align-items: center;
  568. width: 100%;
  569. font-size: 36rpx;
  570. flex: 1;
  571. color: #FF9797;
  572. border: 1rpx solid #f3afad;
  573. border-radius: 22rpx;
  574. text-align: left;
  575. padding-right: 24rpx;
  576. .input-placeholder {
  577. height: 70rpx;
  578. color: #FF9797;
  579. }
  580. }
  581. .box-right {
  582. display: flex;
  583. align-items: center;
  584. padding-left: 24rpx;
  585. height: 66rpx;
  586. line-height: 66rpx;
  587. border: 1rpx solid #f3afad;
  588. border-radius: 22rpx;
  589. margin: 32rpx 36rpx 0 36rpx;
  590. width: 96%;
  591. font-size: 36rpx;
  592. color: #FF9797;
  593. text-align: left;
  594. // line-height: 1;
  595. }
  596. }
  597. .upload-box {
  598. width: 100%;
  599. height: 247rpx;
  600. background: #FFFFFF;
  601. // border: 1px solid #E63931;
  602. border-radius: 27rpx;
  603. display: flex;
  604. flex-direction: column;
  605. padding: 30rpx 40rpx 30rpx 0;
  606. margin: 0 auto 30rpx;
  607. .upload-left {
  608. font-weight: 400;
  609. color: #E63931;
  610. }
  611. .upload-right {
  612. flex: 1;
  613. display: flex;
  614. align-items: center;
  615. justify-content: center;
  616. .upload-img {
  617. width: 103rpx;
  618. height: 103rpx;
  619. margin-top: 24rpx;
  620. }
  621. }
  622. }
  623. }
  624. }
  625. </style>