Vue.component('popup-data-export', {
delimiters: ['@@', '@@'],
template: `
`,
props: {
},
data: function () {
return {
show: false,
choose:false,
img:'',
isPrompt:true
}
} ,
created (){
this.getqr()
$.ajax({
type: 'POST',
url: '/front/dataExport/getDontPromptAgain',
success: function (res) {
if(!res){return}
this.isPrompt = res.isPrompt
},
error: function (error) {
}
})
},
mounted () {
},
computed: {
},
methods: {
getqr () {
let _this = this
$.ajax({
type: 'POST',
url: '/bigmember/use/isAdd?t=' + Date.now(),
success: function (res) {
if(!res.data){return}
if(res.data.customers&&res.data.customers.length>0){
let list = res.data.customers
list.forEach(e => {
if(e.remark === '客户经理'){
_this.img = e.wxer
}
})
if(_this.img == ''){
_this.img = customer[0].wxer
}
}
},
error: function (error) {
}
})
},
btnClick(){
this.choose = !this.choose
},
next(){
if(this.choose){
$.ajax({
type: 'POST',
url: '/front/dataExport/setDontPromptAgain',
data: {status:1},
contentType: 'application/x-www-form-urlencoded',
success: function (res) {
},
error: function (error) {
}
})
}
this.$emit('next',{choose:this.choose})
},
callPhone: function (tel) {
if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { // 微信
location.href = 'tel:' + tel
} else {
try {
JyObj.callPhone(tel);
} catch (error) {
console.log(error)
}
}
},
}
})