index.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. //import * as WxJsApi from '@/utils/wxJsApi.js'
  2. import * as API from '@/apis/common.js'
  3. import CompanyInfo from '@/components/job/companyInfo.vue'
  4. export default {
  5. data() {
  6. return {
  7. id:"",
  8. showcompany:false,
  9. companyId:"",
  10. info:{
  11. messageDetail:{},
  12. company:{}
  13. },
  14. isReady:false,
  15. src: '/static/img/head/png',
  16. }
  17. },
  18. components: {
  19. CompanyInfo
  20. },
  21. onReachBottom() {
  22. if(this.showcompany){
  23. this.$refs.refCompanyInfo.myLoadmore()
  24. }
  25. },
  26. onLoad(op){
  27. this.id=op.id;
  28. },
  29. methods: {
  30. changeAgree(i){
  31. uni.showLoading({
  32. title:"加载中",mask:true,
  33. })
  34. API.changeAgree({
  35. messageId:this.id,
  36. isAgree:i
  37. }).then((res)=>{
  38. //this.info=res.data;
  39. this.info.isAgree=i;
  40. // uni.hideLoading()
  41. uni.showToast({
  42. title:"操作成功"
  43. })
  44. }).catch(error => {
  45. uni.showToast({
  46. title:error
  47. })
  48. })
  49. },
  50. getInfo(){
  51. uni.showLoading({
  52. title:"加载中",mask:true,
  53. })
  54. API.messageDetail(this.id).then((res)=>{
  55. this.info=res.data;
  56. if(this.info.company){
  57. this.companyId=this.info.company.id
  58. }
  59. uni.hideLoading()
  60. }).catch(error => {
  61. uni.showToast({
  62. title:error
  63. })
  64. })
  65. }
  66. },onReady(){
  67. this.getInfo()
  68. this.isReady=true;
  69. },onShow(){
  70. if(this.isReady){
  71. }
  72. },
  73. }