index.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. var consultDialog = new Vue({
  2. el: '#consultDialog',
  3. delimiters: ['{', '}'],
  4. data: function () {
  5. return {
  6. isshow: false,
  7. text: '扫一扫,立即联系客户经理',
  8. // 扫一扫,立即联系您的专属客服
  9. url: '',
  10. img: "",
  11. vip_img: "",
  12. isbuy_vip: false,
  13. isbuy_big: false,
  14. vipshow: false
  15. }
  16. },
  17. created: function () {
  18. },
  19. mounted: function () {
  20. this.getimage()
  21. },
  22. methods: {
  23. getimage: function () {
  24. var this_ = this
  25. $.ajax({
  26. type: 'POST',
  27. url: '/bigmember/use/equity',
  28. data: {
  29. },
  30. success: function (res) {
  31. if (res.data) {
  32. var customers = res.data.customers
  33. customers.forEach(function (ele) {
  34. if (ele.vip == false) {
  35. this_.img = ele.wxer
  36. } else if (ele.vip == true) {
  37. this_.vip_img = ele.wxer
  38. }
  39. });
  40. this_.getstates()
  41. }
  42. }
  43. })
  44. },
  45. getstates: function () {
  46. var this_ = this
  47. $.ajax({
  48. type: 'POST',
  49. url: '/bigmember/use/isAdd',
  50. data: {
  51. },
  52. success: function (res) {
  53. if (res.data) {
  54. if (res.data.vipStatus > 0) {
  55. this_.isbuy_vip = true
  56. } else {
  57. this_.isbuy_vip = false
  58. }
  59. if (res.data.memberStatus > 0) {
  60. this_.isbuy_big = true
  61. } else {
  62. this_.isbuy_big = false
  63. }
  64. }
  65. if(this_.isbuy_big){
  66. this_.url = this_.vip_img
  67. this_.text='扫一扫,立即联系您的专属客服'
  68. }else{
  69. this_.url = this_.img
  70. this_.text='扫一扫,立即联系客户经理'
  71. }
  72. }
  73. })
  74. },
  75. close: function (val) {
  76. this[val] = false
  77. },
  78. }
  79. })