publish.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. <template>
  2. <view class="content">
  3. <view class="box" v-if="base_info.name == ''">
  4. <view class="box_title">基本信息</view>
  5. <view class="hflex acenter jbetween box_info">
  6. <view class="hflex acenter">
  7. <image src="/static/images/index/demand/icon1.png" class="box_icon"></image>
  8. <view class="vflex">
  9. <view class="box_title">完善个人信息</view>
  10. <view class="box_subTitle">让更多人更好的了解你</view>
  11. </view>
  12. </view>
  13. <view class="box_btn" @click="perfect(1)">完善</view>
  14. </view>
  15. </view>
  16. <view class="box hflex jbetween" v-else>
  17. <view class="">
  18. <view class="hflex acenter">
  19. <view class="name">{{base_info.name}}</view>
  20. <view class="edit_btn" @click="perfect(1)">编辑</view>
  21. </view>
  22. <view class="hflex acenter">
  23. <view class="hflex acenter padR-24">
  24. <image src="/static/images/index/demand/sex.png" class="icon"></image>
  25. <view class="text_style1">{{base_info.sex}}</view>
  26. </view>
  27. <view class="hflex acenter padR-24">
  28. <image src="/static/images/index/demand/edution.png" class="icon"></image>
  29. <view class="text_style1">{{base_info.edu}}</view>
  30. </view>
  31. <view class="hflex acenter padR-24">
  32. <image src="/static/images/index/demand/birthday.png" class="icon"></image>
  33. <view class="text_style1">{{base_info.age}}</view>
  34. </view>
  35. <view class="hflex acenter padR-24">
  36. <image src="/static/images/index/demand/work.png" class="icon"></image>
  37. <view class="text_style1">{{base_info.year}}</view>
  38. </view>
  39. </view>
  40. <view class="hflex acenter padT-26">
  41. <u-icon name="phone-fill" color="#666666" size="14" class="padR-24"></u-icon>
  42. <view class="text_style1">{{base_info.phone}}</view>
  43. </view>
  44. <view class="hflex acenter padT-26">
  45. <image src="/static/images/index/demand/email.png" class="icon"></image>
  46. <view class="text_style1">{{base_info.email}}<span style="color: #506dff;" @click="copy(base_info.email)"><span style="padding: 0 5rpx;">|</span>复制</span></view>
  47. </view>
  48. </view>
  49. <image :src="base_info.avatar" class="avatar"></image>
  50. </view>
  51. <view class="box" v-if="job_inte.job_name == ''">
  52. <view class="box_title">求职意向</view>
  53. <view class="hflex acenter jbetween box_info">
  54. <view class="hflex acenter">
  55. <image src="/static/images/index/demand/icon1.png" class="box_icon"></image>
  56. <view class="vflex">
  57. <view class="box_title">完善求职意向</view>
  58. <view class="box_subTitle">我们会更精准的为你推荐</view>
  59. </view>
  60. </view>
  61. <view class="box_btn" @click="perfect(2)">完善</view>
  62. </view>
  63. </view>
  64. <view class="box" v-else>
  65. <view class="hflex acenter jbetween">
  66. <view class="box_title">求职意向</view>
  67. <view class="edit_btn" @click="perfect(2)">编辑</view>
  68. </view>
  69. <view class="hflex acenter padT-26">
  70. <view class="box_title">{{job_inte.job_name}}</view>
  71. <view class="box_title">{{job_inte.salary}}</view>
  72. </view>
  73. <view class="hflex fwrap padT-26">
  74. <view class="label">可工作区域</view>
  75. <view class="text_style1" style="flex: 1;">{{job_inte.job_area}}</view>
  76. </view>
  77. <view class="hflex acenter padT-26">
  78. <view class="label">可工作时间</view>
  79. <view class="text_style1">{{job_inte.job_time}}</view>
  80. </view>
  81. <view class="hflex acenter padT-26">
  82. <view class="label">工作性质</view>
  83. <view class="text_style1">{{job_inte.job_type}}</view>
  84. </view>
  85. </view>
  86. <view class="box" v-if="experience.length == 0">
  87. <view class="box_title">工作经历</view>
  88. <view class="hflex acenter jbetween box_info">
  89. <view class="hflex acenter">
  90. <image src="/static/images/index/demand/icon1.png" class="box_icon"></image>
  91. <view class="vflex">
  92. <view class="box_title">完善工作经历</view>
  93. <view class="box_subTitle">我们会跟精准的为你推荐</view>
  94. </view>
  95. </view>
  96. <view class="box_btn" @click="perfect(3)">完善</view>
  97. </view>
  98. </view>
  99. <view class="box" v-else>
  100. <view class="hflex acenter jbetween">
  101. <view class="box_title">工作经历</view>
  102. <view class="hflex acenter" @click="perfect(3)">
  103. <u-icon name="plus-circle-fill" color="#555555" size="12"></u-icon>
  104. <view class="text_style1">添加</view>
  105. </view>
  106. </view>
  107. <block v-for="(item,index) in experience" :key="index">
  108. <view class="padT-26" @click="editInfo(item.id)">
  109. <view class="hflex acenter jbetween">
  110. <view class="box_title">{{item.company_name}}</view>
  111. <u-icon name="arrow-right" color="#555555" size="12"></u-icon>
  112. </view>
  113. <view class="hflex acenter padT-26">
  114. <view class="text_style1 padR-24">{{item.company_date}}</view>
  115. <view class="text_style1">{{item.company_postion}}</view>
  116. </view>
  117. <view class="hflex fwrap padT-26 text_style2">工作内容:{{item.company_content}}</view>
  118. </view>
  119. </block>
  120. </view>
  121. <view class="box" v-if="skills.length == 0">
  122. <view class="box_title">专业技能</view>
  123. <view class="hflex acenter jbetween box_info">
  124. <view class="hflex acenter">
  125. <image src="/static/images/index/demand/icon1.png" class="box_icon"></image>
  126. <view class="vflex">
  127. <view class="box_title">添加专业技能</view>
  128. <view class="box_subTitle">把你的强项展示一下吧</view>
  129. </view>
  130. </view>
  131. <view class="box_btn" @click="perfect(4)">添加</view>
  132. </view>
  133. </view>
  134. <view class="box" v-else>
  135. <view class="hflex acenter jbetween">
  136. <view class="box_title">专业技能</view>
  137. <view class="hflex acenter" @click="perfect(4)">
  138. <u-icon name="plus-circle-fill" color="#555555" size="12"></u-icon>
  139. <view class="text_style1">添加</view>
  140. </view>
  141. </view>
  142. <view class="hflex acenter fwrap">
  143. <block v-for="(item,index) in skills" :key="index">
  144. <view class="hflex acenter jbetween item_box2">
  145. <view class="text_style1">{{item.skills_name}}</view>
  146. <view class="text_style1">{{item.skills_degree}}</view>
  147. <image src="/static/images/index/demand/detele.png" class="detele" @click="delSkill(item.id)"></image>
  148. </view>
  149. </block>
  150. </view>
  151. </view>
  152. <view class="box" v-if="certificate.length == 0">
  153. <view class="box_title">资质证书</view>
  154. <view class="hflex acenter jbetween box_info">
  155. <view class="hflex acenter">
  156. <image src="/static/images/index/demand/icon1.png" class="box_icon"></image>
  157. <view class="vflex">
  158. <view class="box_title">添加资质证书</view>
  159. <view class="box_subTitle">把你的强项展示一下吧</view>
  160. </view>
  161. </view>
  162. <view class="box_btn" @click="perfect(5)">添加</view>
  163. </view>
  164. </view>
  165. <view class="box" v-else>
  166. <view class="hflex acenter jbetween">
  167. <view class="box_title">资质证书</view>
  168. <view class="hflex acenter" @click="perfect(5)">
  169. <u-icon name="plus-circle-fill" color="#555555" size="12"></u-icon>
  170. <view class="text_style1">添加</view>
  171. </view>
  172. </view>
  173. <view class="">
  174. <block v-for="(item,index) in certificate" :key="index">
  175. <view class="hflex aend item_box3">
  176. <view class="box_title padR-24">{{item.certificate_name}}</view>
  177. <view class="text_style1">{{item.certificate_date}}</view>
  178. <image src="/static/images/index/demand/detele.png" class="detele" @click="delSkill(item.id)"></image>
  179. </view>
  180. </block>
  181. </view>
  182. </view>
  183. <view class="box" style="margin-bottom: 186rpx;">
  184. <view class="box_title" style="padding-bottom: 16rpx;">福利待遇</view>
  185. <u-input v-model="salary" placeholder="请填写你期望的薪资待遇" border="none"></u-input>
  186. <view class="line"></view>
  187. <view class="box_title" style="padding-bottom: 16rpx;">备注</view>
  188. <u-input v-model="remarks" placeholder="请填写你想要备注的内容" border="none"></u-input>
  189. </view>
  190. <view class="bottom">
  191. <view class="bottom_btn" :class="is_publish?'publish_btn':''" @click="open">发布</view>
  192. </view>
  193. <u-popup :show="show" mode="bottom" :round="20" @close="close">
  194. <view class="popup">
  195. <view class="popup_title vflex acenter jcenter">本人承诺</br>以上所填写的内容真实有效</view>
  196. <view class="popu_label" style="font-size: 28rpx;font-weight: 500;">请填写以下信息</view>
  197. <view class="popu_label">身份证号</view>
  198. <u-input v-model="IDNumber" placeholder="请输入身份证号" border="bottom"></u-input>
  199. <view class="popu_label">手机号码</view>
  200. <u-input v-model="phone" placeholder="请输入手机号码" border="bottom"></u-input>
  201. <view class="popu_label">验证码</view>
  202. <view class="hflex acenter jbetween">
  203. <u-input v-model="code" placeholder="请输入验证码" border="none"></u-input>
  204. <view class="popu_label code" @click="getCode">{{tips}}</view>
  205. <u-code :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
  206. </view>
  207. <view class="btn1" @click="publish">立即发布</view>
  208. <view class="cancel" @click="close">取消</view>
  209. </view>
  210. </u-popup>
  211. </view>
  212. </template>
  213. <script>
  214. import $api from '@/static/js/api.js'
  215. var that = ''
  216. export default {
  217. data() {
  218. return {
  219. is_publish: false,
  220. salary: '',
  221. remarks: '',
  222. base_info: {
  223. name: '张三',
  224. avatar: '/static/images/mine/avatar1.jpg',
  225. sex: '男',
  226. edu: '本科',
  227. age: '27',
  228. year: '5年',
  229. phone: '18923465789',
  230. email: '18923465789@qq.com',
  231. },
  232. job_inte: {
  233. job_name: '船舶工程设计师',
  234. salary: '11-19k',
  235. job_area: '江苏省南京市浦口区江北街道东方万汇城22号楼一单元2021',
  236. job_time: '两个月',
  237. job_type: '全职'
  238. },
  239. experience: [
  240. {
  241. company_name: '上海船舶技术工程有限公司',
  242. company_date: '2019.07-2022.02',
  243. company_postion: '船舶工程设计师',
  244. company_content: '1,负责线上平台app/小程序页面更新设计,2,负责活动H5页面,banner设计3,负责外包项目设计;4,制定工作计划'
  245. },
  246. {
  247. company_name: '上海船舶技术工程有限公司',
  248. company_date: '2019.07-2022.02',
  249. company_postion: '船舶工程设计师',
  250. company_content: '1,负责线上平台app/小程序页面更新设计,2,负责活动H5页面,banner设计3,负责外包项目设计;4,制定工作计划'
  251. }
  252. ],
  253. skills: [
  254. {
  255. skills_name: 'Access',
  256. skills_degree: '熟练'
  257. },
  258. {
  259. skills_name: 'Access',
  260. skills_degree: '精通'
  261. }
  262. ],
  263. certificate: [
  264. {
  265. certificate_name: '普通话等级证书',
  266. certificate_date: '2012-06-12'
  267. },
  268. {
  269. certificate_name: '大学英语四级证书',
  270. certificate_date: '2012-06-12'
  271. }
  272. ],
  273. show: false,
  274. IDNumber: '',
  275. phone: '',
  276. code: '',
  277. tips: '',
  278. seconds: 60,
  279. del_show: false,
  280. id: '',
  281. }
  282. },
  283. onLoad() {
  284. that = this
  285. },
  286. onShow() {
  287. that.isPubilsh()
  288. },
  289. methods: {
  290. // 判断是否可以发布
  291. isPubilsh() {
  292. if (that.base_info.name != '' && that.job_inte.job_name != '') {
  293. that.is_publish = true
  294. }
  295. },
  296. // 发布
  297. publish() {
  298. if($api.formCheck(that.IDNumber, 'identity') && $api.formCheck(that.phone, 'mobile') && $api.formCheck(that.code, 'code6')) {
  299. $api.info('发布成功')
  300. that.close()
  301. }
  302. },
  303. // 打开弹窗
  304. open() {
  305. if (that.is_publish) {
  306. that.show = true
  307. }
  308. },
  309. // 关闭弹窗
  310. close() {
  311. that.show = false
  312. },
  313. // 添加或完善
  314. perfect(index) {
  315. $api.jump('/page_index/pages/demand/perfect?index='+index)
  316. },
  317. // 修改工作经历
  318. editInfo(id) {
  319. $api.jump('/page_index/pages/demand/perfect?index=3&id='+ id)
  320. },
  321. // 复制
  322. copy(value) {
  323. uni.setClipboardData({
  324. data: value,
  325. success: function () {
  326. $api.info('复制成功')
  327. }
  328. });
  329. },
  330. // 删除
  331. delete(id) {
  332. that.del_show = true
  333. that.id = id
  334. },
  335. // 确定删除
  336. deleSkill() {
  337. },
  338. // 验证码文字改变
  339. codeChange(text) {
  340. this.tips = text;
  341. },
  342. getCode() {
  343. if(this.$refs.uCode.canGetCode) {
  344. // 模拟向后端请求验证码
  345. uni.showLoading({
  346. title: '正在获取验证码'
  347. })
  348. setTimeout(() => {
  349. uni.hideLoading();
  350. // 这里此提示会被this.start()方法中的提示覆盖
  351. uni.$u.toast('验证码已发送');
  352. // 通知验证码组件内部开始倒计时
  353. this.$refs.uCode.start();
  354. }, 2000);
  355. } else {
  356. uni.$u.toast('倒计时结束后再发送');
  357. }
  358. },
  359. end() {
  360. uni.$u.toast('倒计时结束');
  361. },
  362. start() {
  363. uni.$u.toast('倒计时开始');
  364. }
  365. },
  366. }
  367. </script>
  368. <style lang="scss" scoped>
  369. .content::v-deep {
  370. background: #F4F4F4;
  371. .box {
  372. margin: 20rpx 30rpx 0;
  373. width: 690rpx;
  374. background: #FFFFFF;
  375. border-radius: 20rpx;
  376. box-sizing: border-box;
  377. padding: 28rpx 20rpx;
  378. .box_title {
  379. font-size: 32rpx;
  380. font-weight: 500;
  381. color: #222222;
  382. }
  383. .name {
  384. font-size: 40rpx;
  385. font-weight: 500;
  386. color: #222222;
  387. }
  388. .edit_btn {
  389. width: 84rpx;
  390. height: 36rpx;
  391. background: #F0F2F6;
  392. border-radius: 20rpx;
  393. font-size: 20rpx;
  394. text-align: center;
  395. font-weight: 400;
  396. color: #506DFF;
  397. line-height: 36rpx;
  398. margin-left: 16rpx;
  399. }
  400. .padT-26 {
  401. padding-top: 26rpx;
  402. }
  403. .padR-24 {
  404. padding-right: 24rpx;
  405. }
  406. .label {
  407. width: 148rpx;
  408. font-size: 24rpx;
  409. font-weight: 400;
  410. color: #888888;
  411. }
  412. .icon {
  413. width: 28rpx;
  414. height: 28rpx;
  415. }
  416. .text_style1 {
  417. font-size: 24rpx;
  418. padding-left: 5rpx;
  419. font-weight: 400;
  420. color: #666666;
  421. }
  422. .text_style2 {
  423. font-size: 22rpx;
  424. font-weight: 400;
  425. color: #777777;
  426. line-height: 32rpx;
  427. }
  428. .item_box2 {
  429. background: #F4F4F4;
  430. border-radius: 26rpx;
  431. box-sizing: border-box;
  432. padding: 8rpx 34rpx;
  433. margin: 20rpx 32rpx 0 0;
  434. position: relative;
  435. .detele {
  436. position: absolute !important;
  437. right: 1rpx;
  438. top: 1rpx;
  439. width: 21rpx;
  440. height: 21rpx;
  441. }
  442. }
  443. .item_box3 {
  444. width: 100%;
  445. background: #F4F4F4;
  446. border-radius: 26rpx;
  447. box-sizing: border-box;
  448. padding: 8rpx 20rpx;
  449. margin: 20rpx 0 0;
  450. position: relative;
  451. .detele {
  452. position: absolute !important;
  453. right: 1rpx;
  454. top: 1rpx;
  455. width: 21rpx;
  456. height: 21rpx;
  457. }
  458. }
  459. .avatar {
  460. width: 120rpx;
  461. height: 120rpx;
  462. border-radius: 50%;
  463. }
  464. .box_info {
  465. margin: 42rpx 0 0;
  466. .box_icon {
  467. width: 56rpx;
  468. height: 56rpx;
  469. margin-right: 28rpx;
  470. }
  471. .box_subTitle {
  472. margin-top: 4rpx;
  473. font-size: 24rpx;
  474. font-weight: 400;
  475. color: #777777;
  476. }
  477. .box_btn {
  478. box-sizing: border-box;
  479. padding: 6rpx 24rpx;
  480. font-size: 24rpx;
  481. font-weight: 400;
  482. color: #FFFFFF;
  483. line-height: 34rpx;
  484. background: #506DFF;
  485. border-radius: 14px;
  486. }
  487. }
  488. .line {
  489. margin: 20rpx 0;
  490. width: 100%;
  491. height: 1rpx;
  492. background: #F3F3F5;
  493. }
  494. }
  495. .bottom {
  496. width: 100%;
  497. z-index: 9;
  498. position: fixed;
  499. bottom: 0;
  500. height: 166rpx;
  501. background: #FFFFFF;
  502. box-sizing: border-box;
  503. padding: 8rpx 40rpx 74rpx;
  504. .bottom_btn {
  505. width: 100%;
  506. height: 84rpx;
  507. background: #506DFF;
  508. border-radius: 42rpx;
  509. opacity: 0.4;
  510. font-size: 36rpx;
  511. font-weight: 500;
  512. color: #FFFFFF;
  513. text-align: center;
  514. line-height: 84rpx;
  515. }
  516. .publish_btn {
  517. opacity: 1;
  518. }
  519. }
  520. .popup {
  521. background: #FFFFFF;
  522. border-radius: 40rpx 40rpx 0px 0px;
  523. width: 100%;
  524. box-sizing: border-box;
  525. padding: 30rpx;
  526. .popup_title {
  527. width: 100%;
  528. padding-bottom: 32rpx;
  529. border-bottom: 1rpx solid #F4F4F4;
  530. font-size: 36rpx;
  531. font-weight: 500;
  532. color: #222222;
  533. line-height: 50rpx;
  534. }
  535. .popu_label {
  536. font-size: 30rpx;
  537. font-weight: 400;
  538. color: #222222;
  539. padding: 24rpx 0;
  540. }
  541. .code {
  542. color: #506DFF;
  543. }
  544. .btn1 {
  545. margin: 90rpx 0 40rpx;
  546. width: 100%;
  547. height: 84rpx;
  548. background: #506DFF;
  549. border-radius: 21px;
  550. text-align: center;
  551. line-height: 84rpx;
  552. font-size: 36rpx;
  553. font-weight: 500;
  554. color: #FFFFFF;
  555. }
  556. .cancel {
  557. width: 100%;
  558. text-align: center;
  559. font-size: 32rpx;
  560. font-weight: 400;
  561. color: #777777;
  562. }
  563. .u-input {
  564. padding: 12rpx 0 !important;
  565. }
  566. }
  567. }
  568. </style>