resumelist.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. <template>
  2. <view>
  3. <view class="tips-title bg-gradual-orange text-center">{{time}}秒后可获得奖励</view>
  4. <view class="tips-box"></view>
  5. <view class="recruit-list">
  6. <view class="recruit-item" v-for="(item,index) in plist" @click="toDetail(item.id)" :key="index">
  7. <view class="title">
  8. <view class="title-name">{{item.title}}</view>
  9. <view class="salary">
  10. <image
  11. style="width:20px;height:20px;"
  12. :src="$getImageUrl('static/mobile/images/icon_salary.png')"
  13. ></image>
  14. <text>{{item.salary}}</text>
  15. </view>
  16. </view>
  17. <view class="content">
  18. <view class="content-item">
  19. <image
  20. style="width:15px;height:15px;"
  21. :src="$getImageUrl('static/mobile/images/icon_age.png')"
  22. ></image>
  23. <text>{{item.agegroup}}</text>
  24. </view>
  25. <view class="content-item">
  26. <image
  27. style="width:15px;height:15px;"
  28. :src="$getImageUrl('static/mobile/images/icon_num.png')"
  29. ></image>
  30. <text>{{item.num}}</text>
  31. </view>
  32. </view>
  33. <view class="tags">
  34. <view class='cu-tag text-blue' v-for="(tag,tag_index) in item.tags" :key="tag_index">{{tag}}</view>
  35. </view>
  36. <view class="bottom">
  37. <view class="company-name">
  38. {{item.company_name}}
  39. </view>
  40. <view class="volume">
  41. <image
  42. style="width:15px;height:15px;"
  43. :src="$getImageUrl('static/mobile/images/icon_volume.png')"
  44. ></image>
  45. <text>{{item.volume}}</text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <uni-load-more :status="pstatus"></uni-load-more>
  51. <view class="cu-modal bottom-modal" :class="modalName=='detail'?'show':''">
  52. <view class="cu-dialog">
  53. <view class="cu-bar bg-white">
  54. <view class="action text-blue" @click="hideModal">关闭</view>
  55. <view class="action text-green" @click="apply">报名</view>
  56. </view>
  57. <view>
  58. <view class="base-content">
  59. <view class="header">
  60. <view class="left">
  61. <view class="salary-box">
  62. <image
  63. style="width:15px;height:15px;"
  64. :src="$getImageUrl('static/mobile/images/icon_salary_white.png')"
  65. ></image>
  66. <text class="text">工资:</text>
  67. <text class="salary">{{info.salary}}</text>
  68. </view>
  69. <view class="company-name">{{info.company_name}}</view>
  70. </view>
  71. </view>
  72. <view class="title">{{info.title}}</view>
  73. <view class="tags" v-if="info.tags.length > 0">
  74. <view class='cu-tag text-blue' v-for="(tag,tag_index) in info.tags" :key="tag_index">{{tag}}</view>
  75. </view>
  76. <view class="introduce">
  77. <view class="introduce-item">
  78. <image
  79. style="width:15px;height:15px;"
  80. :src="$getImageUrl('static/mobile/images/icon_num.png')"
  81. ></image>
  82. <text>招聘人数:{{info.num}}</text>
  83. <text class="split">|</text>
  84. <van-image
  85. width="15px"
  86. src="__MIMAGES__/icon_age.png"
  87. ></van-image>
  88. <text>年龄:{{info.agegroup}}</text>
  89. </view>
  90. <view class="introduce-item">
  91. <image
  92. style="width:15px;height:15px;"
  93. :src="$getImageUrl('static/mobile/images/icon_address.png')"
  94. ></image>
  95. <text>{{info.province}}{{info.city}}{{info.district}}{{info.address}}</text>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="describe" v-if="info.requirement">
  100. <view class="header">
  101. 岗位要求
  102. </view>
  103. <view class="content">
  104. <pre>{{info.requirement}}</pre>
  105. </view>
  106. </view>
  107. <view class="describe" v-if="info.comdetails">
  108. <view class="header">
  109. 企业简介
  110. </view>
  111. <view class="content">
  112. <pre>{{info.comdetails}}</pre>
  113. </view>
  114. </view>
  115. <view class="describe" v-if="info.remark">
  116. <view class="header">
  117. 补充说明
  118. </view>
  119. <view class="content">
  120. <pre>{{info.remark}}</pre>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="cu-modal bottom-modal" :class="modalName=='apply'?'show':''">
  127. <view class="cu-dialog">
  128. <view class="cu-bar bg-white">
  129. <view class="action text-green" @tap="hideModal">关闭</view>
  130. </view>
  131. <view class="padding-lr bg-white">
  132. <form style="text-align: left;">
  133. <view class="cu-form-group">
  134. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 姓名</view>
  135. <input type="text" placeholder="请输入" data-field="realname" name="realname" :value="form.realname" @input="setInput"></input>
  136. </view>
  137. <view class="cu-form-group">
  138. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 手机号</view>
  139. <input type="text" placeholder="请输入" data-field="mobile" name="mobile" :value="form.mobile" @input="setInput"></input>
  140. </view>
  141. <view class="cu-form-group">
  142. <view class="title">身份证号</view>
  143. <input type="text" placeholder="请输入" data-field="idcard" name="idcard" :value="form.idcard" @input="setInput"></input>
  144. </view>
  145. <view class="cu-form-group align-start">
  146. <view class="title">备注</view>
  147. <view class="textareabox">
  148. <textarea maxlength="-1" placeholder="请输入..." data-field="remark" name="remark" :value="form.remark" @input="setInput"></textarea>
  149. </view>
  150. </view>
  151. <view class="padding flex flex-direction bg-white">
  152. <button class="cu-btn bg-themeBtn margin-tb-sm lg" @tap="editForm">立即提交</button>
  153. <view class="padding"></view>
  154. </view>
  155. </form>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. </template>
  161. <script>
  162. import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
  163. var _this;
  164. export default {
  165. components: {
  166. uniLoadMore
  167. },
  168. data() {
  169. return {
  170. code: '',
  171. userinfo: '',
  172. time: 30,
  173. plist: [],
  174. pstatus: false,
  175. pstatus: 'more',
  176. ppage: 1,
  177. psize: 20,
  178. modalName: '',
  179. id: 0,
  180. info: {},
  181. isRotate: false,
  182. form: {
  183. realname: '',
  184. mobile: '',
  185. idcard: '',
  186. remark: '',
  187. },
  188. }
  189. },
  190. onLoad: function(option) {
  191. _this = this;
  192. let code = uni.getStorageSync('out_code');
  193. _this.code = code;
  194. if (!_this.code) {
  195. uni.showModal({
  196. title: '信息提示',
  197. content: '该活动已过期',
  198. showCancel: false,
  199. success: function() {
  200. uni.removeStorageSync('out_code');
  201. uni.redirectTo({
  202. url: '/pages/index/index'
  203. });
  204. }
  205. });
  206. }
  207. _this.userinfo = uni.getStorageSync('userinfo') || false;
  208. if (_this.userinfo == false) {
  209. uni.redirectTo({
  210. url: '/pages/login/login?backpage=/pages/outactivity/resumelist',
  211. });
  212. } else {
  213. //二维码校验
  214. _this.$req.ajax({
  215. path: "Outactivity/checkCode",
  216. data: {
  217. code: _this.code
  218. }
  219. }).then((data) => {
  220. _this.getMore();
  221. _this.dealTime();
  222. }).catch((err) => {
  223. uni.showModal({
  224. title: '信息提示',
  225. content: err,
  226. showCancel: false,
  227. success: function() {
  228. uni.removeStorageSync('out_code');
  229. uni.redirectTo({
  230. url: '/pages/index/index'
  231. });
  232. }
  233. });
  234. });
  235. }
  236. },
  237. onPullDownRefresh: function() {
  238. _this.pageRefresh();
  239. },
  240. onReachBottom: function() {
  241. if (_this.pstatus !== 'more') {
  242. return;
  243. }
  244. _this.getMore();
  245. },
  246. onShareAppMessage: function(res) {
  247. return {
  248. title: "晋江人力",
  249. path: "/pages/index/index"
  250. }
  251. },
  252. methods: {
  253. dealTime: function() {
  254. const set = setInterval(function(){
  255. if (_this.time > 0) {
  256. _this.time--;
  257. } else {
  258. clearInterval(set);
  259. _this.getMoney();
  260. }
  261. },1000);
  262. },
  263. getMore: function() {
  264. _this.$req.ajax({
  265. path: "outactivity/listrecruit",
  266. data: {
  267. ppage: _this.ppage,
  268. psize: _this.psize,
  269. }
  270. }).then((data) => {
  271. _this.pstatus = data.pstatus;
  272. _this.plist = _this.plist.concat(data.plist);
  273. _this.ppage += 1;
  274. uni.stopPullDownRefresh();
  275. }).catch((err) => {
  276. uni.showModal({
  277. title: '信息提示',
  278. content: err,
  279. showCancel: false
  280. });
  281. });
  282. },
  283. pageRefresh: function() {
  284. _this.pstatus = 'more';
  285. _this.ppage = 1;
  286. _this.plist = [];
  287. _this.getMore();
  288. },
  289. toDetail: function(id) {
  290. _this.id = id;
  291. _this.$req.ajax({
  292. path: "outactivity/detailrecruit",
  293. data: {
  294. id:id
  295. }
  296. }).then((data) => {
  297. _this.info = data;
  298. _this.modalName = 'detail';
  299. }).catch((err) => {
  300. uni.showModal({
  301. title: '信息提示',
  302. content: err,
  303. showCancel: false
  304. });
  305. });
  306. },
  307. hideModal: function() {
  308. _this.modalName = '';
  309. },
  310. apply: function() {
  311. _this.modalName = 'apply';
  312. },
  313. setInput: function(e) {
  314. var field = e.currentTarget.dataset.field;
  315. _this.form[field] = e.detail.value;
  316. },
  317. editForm: function() {
  318. if (_this.isRotate) {
  319. return false;
  320. }
  321. _this.isRotate = true;
  322. let form = _this.form;
  323. form.recruit_id = _this.id;
  324. _this.$req.ajax({
  325. path: "outactivity/apply",
  326. title: "正在提交信息",
  327. data: _this.form
  328. }).then((data) => {
  329. _this.hideModal();
  330. _this.isRotate = false;
  331. uni.showModal({
  332. title: '信息提示',
  333. content: '提交成功,等待对方联系',
  334. showCancel: false
  335. });
  336. }).catch((err) => {
  337. uni.showModal({
  338. title: '信息提示',
  339. content: err,
  340. showCancel: false
  341. });
  342. _this.isRotate = false;
  343. });
  344. },
  345. getMoney: function() {
  346. uni.showModal({
  347. title: '信息提示',
  348. content: '是否获取奖励',
  349. showCancel: true,
  350. success: function(res) {
  351. if (res.confirm) {
  352. _this.$req.ajax({
  353. path: "outactivity/getmoney",
  354. title: "正在提交信息",
  355. data: {
  356. code: _this.code,
  357. userid: _this.userinfo.id,
  358. },
  359. }).then((data) => {
  360. uni.showModal({
  361. title: '信息提示',
  362. content: `恭喜您,获得现金奖励${data.money}元。已直接发放至微信零钱,请注意查收!`,
  363. showCancel: false,
  364. success: function() {
  365. uni.removeStorageSync('out_code');
  366. }
  367. });
  368. }).catch((err) => {
  369. uni.showModal({
  370. title: '信息提示',
  371. content: err,
  372. showCancel: false,
  373. success: function() {
  374. uni.removeStorageSync('out_code');
  375. }
  376. });
  377. });
  378. }
  379. },
  380. });
  381. },
  382. },
  383. }
  384. </script>
  385. <style>
  386. .tips-title {height:40rpx;line-height:40rpx;position:fixed;top:0;left:0;width: 100%;}
  387. .tips-box {width: 100%;height:40rpx;}
  388. .recruit-list {background-color: #f0f0f0;}
  389. .recruit-list .recruit-item {background:white;margin-top:10px;padding:10px 20px;}
  390. .recruit-list .recruit-item .title{display:flex;padding-bottom:10px;border-bottom:1px solid #eee;}
  391. .recruit-list .recruit-item .title .title-name {width:calc(100% - 110px);}
  392. .recruit-list .recruit-item .title .salary {width:110px;text-align:center;color:var(--red);display: flex;align-items: center;justify-content: flex-end;}
  393. .recruit-list .recruit-item .title .salary span {margin-left:5px;}
  394. .recruit-list .recruit-item .content {display:flex;align-items:center;justify-content:center;padding-top:10px;}
  395. .recruit-list .recruit-item .content .content-item {text-align:left;flex:1;display:flex;align-items:center;justify-content:flex-start;height:30px;}
  396. .recruit-list .recruit-item .tags {padding:5px 0;}
  397. .recruit-list .recruit-item .tags .cu-tag{margin-right:5px;}
  398. .recruit-list .recruit-item .bottom {border-top:1px solid #eee;margin-top:10px;display:flex;padding-top:10px;font-size:14px;color:#666;}
  399. .recruit-list .recruit-item .bottom .company-name{width:calc(100% - 80px);}
  400. .recruit-list .recruit-item .bottom .volume{width:80px;display:flex;align-items:center;justify-content:flex-end;}
  401. .base-content {text-align: left;}
  402. .base-content .header {background-image:url("https://linggong.jinjianghc.com/static/mobile/images/detail_header.jpg");background-repeat:no-repeat;background-size:100% 70px;width:100%;height:70px;display:flex;align-items:center;justify-content:center;padding:0 20px;}
  403. .base-content .header .left {flex:1;display:flex;flex-direction:column;}
  404. .base-content .header .salary-box {line-height:24px;height:24px;flex:1;}
  405. .base-content .header .salary-box .salary {color:white;font-size:24px;font-weight:bold;}
  406. .base-content .header .salary-box .text {color:white;font-size:14px;margin-left:5px;}
  407. .base-content .header .company-name {color:white;font-size:14px;}
  408. .base-content .header .phone-box {display:flex;flex-direction:column;}
  409. .base-content .header .phone-box .text{color:white;}
  410. .base-content .title {background:white;padding:10px 20px;color:#000;font-size:18px;}
  411. .base-content .tags {background:white;padding:0 20px 10px 20px;}
  412. .base-content .tags .van-tag {margin-right:5px;}
  413. .base-content .introduce {background:white;}
  414. .base-content .introduce .introduce-item {border-top:1px solid #f0f0f0;padding:5px 20px;display:flex;align-items:center;}
  415. .base-content .introduce .introduce-item .van-image{margin-right:5px;}
  416. .base-content .introduce .introduce-item .split{margin:0 15px;}
  417. .describe {margin-top:10px;background:white;text-align: left;}
  418. .describe .header {padding:10px 20px;font-size:16px;border-bottom:1px solid #f0f0f0;}
  419. .describe .content {padding:10px 20px;}
  420. .describe .content view {font-size: 14px;line-height: 20px;padding: 0;margin: 0;font-family: "Microsoft Yahei",arial,"Hiragino Sans GB","Hiragino Sans GB W3",宋体,simsun;}
  421. .footer .van-button {width:50%;border-radius:0;}
  422. .cu-form-group{ display: flex; flex-wrap: wrap; padding: 40rpx 10rpx 0rpx 10rpx; }
  423. .cu-form-group .title{ width: 100%; }
  424. .cu-form-group>input{ display: block; width: 670rpx; height: 100rpx; color: #AAAAAA; }
  425. .cu-form-group>radio-group{ width: 670rpx; height: 100rpx; line-height: 100rpx; color: #AAAAAA; text-align: left; }
  426. .cu-form-group .textareabox{ width: 670rpx; }
  427. .cu-form-group .textareabox textarea{ width: 670rpx; margin-top: 20rpx !important; margin-bottom: 0rpx; }
  428. .cu-form-group .placeholder{ color: #AAAAAA; }
  429. .cu-form-group picker .picker{ text-align: left; color: #AAAAAA; }
  430. </style>