popup-data-export.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. Vue.component('popup-data-export', {
  2. delimiters: ['@@', '@@'],
  3. template: `
  4. <div class="popupDataexport">
  5. <van-popup v-model="show">
  6. <div class="warm">
  7. <div class="close" @click="show = false"></div>
  8. <div class="content_box">
  9. <p class="title">温馨提示</p>
  10. <div class="text_box">您选择的数据超过了导出数据最大值<span class="blue">20,000</span>,请优化条件后导出。您也可联系客服:<span @click="callPhone('400-108-6670')">400-108-6670</span>,或添加<span class="blue">客服微信</span>进行定制化导出。</div>
  11. <div class="qr_box">
  12. <img :src="img" alt="">
  13. </div>
  14. <div class="desc">客服微信</div>
  15. <div class="btn_box">
  16. <div class="btn"><div :class="choose?'choosed':'nochoose'" @click="btnClick"></div></div>
  17. <p class="text">后续不再提醒</p>
  18. </div>
  19. </div>
  20. <div class="footer" @click="next">
  21. <span>继续导出20000条</span>
  22. </div>
  23. </div>
  24. </van-popup>
  25. </div>
  26. `,
  27. props: {
  28. },
  29. data: function () {
  30. return {
  31. show: false,
  32. choose:false,
  33. img:'',
  34. isPrompt:true
  35. }
  36. } ,
  37. created (){
  38. this.getqr()
  39. $.ajax({
  40. type: 'POST',
  41. url: '/front/dataExport/getDontPromptAgain',
  42. success: function (res) {
  43. if(!res){return}
  44. this.isPrompt = res.isPrompt
  45. },
  46. error: function (error) {
  47. }
  48. })
  49. },
  50. mounted () {
  51. },
  52. computed: {
  53. },
  54. methods: {
  55. getqr () {
  56. let _this = this
  57. $.ajax({
  58. type: 'POST',
  59. url: '/bigmember/use/isAdd?t=' + Date.now(),
  60. success: function (res) {
  61. if(!res.data){return}
  62. if(res.data.customers&&res.data.customers.length>0){
  63. let list = res.data.customers
  64. list.forEach(e => {
  65. if(e.remark === '客户经理'){
  66. _this.img = e.wxer
  67. }
  68. })
  69. if(_this.img == ''){
  70. _this.img = customer[0].wxer
  71. }
  72. }
  73. },
  74. error: function (error) {
  75. }
  76. })
  77. },
  78. btnClick(){
  79. this.choose = !this.choose
  80. },
  81. next(){
  82. if(this.choose){
  83. $.ajax({
  84. type: 'POST',
  85. url: '/front/dataExport/setDontPromptAgain',
  86. data: {status:1},
  87. contentType: 'application/x-www-form-urlencoded',
  88. success: function (res) {
  89. },
  90. error: function (error) {
  91. }
  92. })
  93. }
  94. this.$emit('next',{choose:this.choose})
  95. },
  96. callPhone: function (tel) {
  97. if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { // 微信
  98. location.href = 'tel:' + tel
  99. } else {
  100. try {
  101. JyObj.callPhone(tel);
  102. } catch (error) {
  103. console.log(error)
  104. }
  105. }
  106. },
  107. }
  108. })