index.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. show:false,
  8. id:"",
  9. showcompany:false,
  10. companyId:"",
  11. context:"",
  12. info:{
  13. messageDetail:{},
  14. company:{}
  15. },
  16. isReady:false,
  17. src: '/static/img/head/png',
  18. }
  19. },
  20. components: {
  21. CompanyInfo
  22. },
  23. onLoad(op){
  24. this.id=op.id;
  25. },
  26. onReachBottom() {
  27. if(this.showcompany){
  28. this.$refs.refCompanyInfo.myLoadmore()
  29. }
  30. },
  31. methods: {
  32. changeAgree(i){
  33. uni.showLoading({
  34. title:"加载中",mask:true,
  35. })
  36. API.changeAgree({
  37. messageId:this.id,
  38. isAgree:i,
  39. remark:this.context
  40. }).then((res)=>{
  41. //this.info=res.data;
  42. this.info.isAgree=i;
  43. // uni.hideLoading()
  44. uni.showToast({
  45. title:"操作成功"
  46. })
  47. }).catch(error => {
  48. uni.showToast({
  49. title:error
  50. })
  51. })
  52. },
  53. getInfo(){
  54. uni.showLoading({
  55. title:"加载中",mask:true,
  56. })
  57. API.messageDetail(this.id).then((res)=>{
  58. this.info=res.data;
  59. this.companyId=this.info.company.id
  60. uni.hideLoading()
  61. }).catch(error => {
  62. uni.showToast({
  63. title:error
  64. })
  65. })
  66. }
  67. },onReady(){
  68. this.getInfo()
  69. this.isReady=true;
  70. },onShow(){
  71. if(this.isReady){
  72. }
  73. },
  74. }