recruitInfo.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // pages/recruitInfo/recruitInfo.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. imgUrl:'/images/icons/like_no.png'
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad: function (options) {
  13. },
  14. /**
  15. * 生命周期函数--监听页面初次渲染完成
  16. */
  17. onReady: function () {
  18. },
  19. /**
  20. * 生命周期函数--监听页面显示
  21. */
  22. onShow: function () {
  23. },
  24. /**
  25. * 生命周期函数--监听页面隐藏
  26. */
  27. onHide: function () {
  28. },
  29. /**
  30. * 生命周期函数--监听页面卸载
  31. */
  32. onUnload: function () {
  33. },
  34. /**
  35. * 页面相关事件处理函数--监听用户下拉动作
  36. */
  37. onPullDownRefresh: function () {
  38. },
  39. /**
  40. * 页面上拉触底事件的处理函数
  41. */
  42. onReachBottom: function () {
  43. },
  44. /**
  45. * 用户点击右上角分享
  46. */
  47. onShareAppMessage: function () {
  48. let url = encodeURIComponent('pages/recruitInfo/recruitInfo?id=' + this.data.id);
  49. return {
  50. title: "招聘详情",
  51. path:`/pages/index/index?url=${url}`
  52. }
  53. },
  54. saveLike:function(){
  55. var imgUrl = '/images/icons/like_no.png';
  56. if(this.data.imgUrl =='/images/icons/like_no.png'){
  57. imgUrl = '/images/icons/like_yes.png';
  58. wx.showToast({
  59. title: '已收藏',
  60. image:imgUrl,
  61. duration: 2000
  62. })
  63. }
  64. this.setData({
  65. imgUrl:imgUrl
  66. })
  67. },
  68. //投递简历
  69. saveResume:function(){
  70. wx.showModal({
  71. title: '提示',
  72. // content: '您可申请2个社招职位,还剩2个,是否继续投递',
  73. content: '您确认投递此职位吗?',
  74. confirmText:'确认投递',
  75. confirmColor:'#1296db',
  76. success (res) {
  77. if (res.confirm) {
  78. wx.navigateTo({
  79. url: '../resume/resume?type=2',
  80. })
  81. console.log('用户点击确定')
  82. } else if (res.cancel) {
  83. console.log('用户点击取消')
  84. }
  85. }
  86. })
  87. }
  88. })