index.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //import * as WxJsApi from '@/utils/wxJsApi.js'
  2. import * as API from '@/apis/hr/my.js'
  3. import ResumeItem from '@/components/hr/ResumeItem.vue'
  4. export default {
  5. data() {
  6. return {
  7. keyword:"",
  8. pageIndex:1,
  9. recordsTotal:0,
  10. list: [ ],
  11. isReady:false,
  12. src: '/static/img/head.png',
  13. }
  14. },
  15. components: {
  16. ResumeItem
  17. },
  18. onLoad(op){
  19. //this.id=op.id;
  20. },
  21. onReachBottom() {
  22. if(this.list.length<this.recordsTotal){
  23. this.myLoadmore();
  24. }
  25. },
  26. methods: {
  27. myLoadmore(){
  28. this.pageIndex+=1;
  29. this.getList()
  30. },getList(bl){
  31. uni.showLoading({
  32. title:"加载中",mask:true,
  33. })
  34. if(bl){
  35. this.list=[];
  36. this.pageIndex=1;
  37. }
  38. var data={
  39. positionName:this.keyword,
  40. pageIndex:this.pageIndex
  41. };
  42. API.pageListHR(data).then((res) => {
  43. this.list=[
  44. ...this.list,
  45. ...res.data.data
  46. ];
  47. this.recordsTotal=res.data.recordsTotal
  48. uni.hideLoading()
  49. }).catch(error => {
  50. uni.showToast({
  51. title:error
  52. })
  53. })
  54. }
  55. },onReady(){
  56. this.getList()
  57. this.isReady=true;
  58. },onShow(){
  59. if(this.isReady){
  60. }
  61. },
  62. }