index.js 1.3 KB

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