index.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //import * as WxJsApi from '@/utils/wxJsApi.js'
  2. import * as API from '@/apis/hr/resume.js'
  3. import resumeInfo from '@/pages/job/personal/install/resume/resume.vue'
  4. import ResumeItem from '@/components/hr/ResumeItem.vue'
  5. export default {
  6. data() {
  7. return {
  8. isDeliver:false,
  9. isCollect:false,
  10. list:[],
  11. id:"",
  12. info:{},
  13. isReady:false,
  14. src: '/static/img/head/png',
  15. }
  16. },
  17. components: {
  18. resumeInfo,ResumeItem
  19. },
  20. onLoad(op){
  21. this.id=op.id;
  22. },
  23. methods: {
  24. getInfo(info){
  25. this.info=info.resume;
  26. this.isCollect=info.isCollect;
  27. },
  28. deliverBtn(){
  29. if(this.info){
  30. uni.makePhoneCall({
  31. phoneNumber: this.info.userTel //仅为示例
  32. });
  33. }
  34. },collectBtn(){
  35. uni.showLoading({
  36. title: '加载中'
  37. })
  38. this.isCollect=!this.isCollect
  39. API.collectResume(this.id,this.isCollect?1:0).then((res)=>{
  40. uni.hideLoading()
  41. }).catch(error => {
  42. uni.showToast({
  43. title:error
  44. })
  45. })
  46. },
  47. getRelevantList(){
  48. API.getRelevantList(this.id).then((res)=>{
  49. this.list=res.data.data;
  50. uni.hideLoading()
  51. }).catch(error => {
  52. uni.showToast({
  53. title:error
  54. })
  55. })
  56. },
  57. setId(id){
  58. this.id=id;
  59. this.$refs.info.setId(this.id)
  60. },
  61. },onReady(){
  62. this.$refs.info.setId(this.id)
  63. this.isReady=true;
  64. },onShow(){
  65. if(this.isReady){
  66. }
  67. },
  68. }