|
@@ -12,10 +12,33 @@ var cmSysVitaMixins = function () {
|
|
|
pageType:'',//页面类型
|
|
|
pageLabel:'',//页面标签
|
|
|
userId:0,//用户Id
|
|
|
- productId:0//商品Id
|
|
|
- }
|
|
|
+ productId:0,//商品Id
|
|
|
+ behaviorType:1 // 用户行为类型
|
|
|
+ },
|
|
|
+ handleProsId:0,
|
|
|
+ handleShopId:0,
|
|
|
+ handlearticleId:0,
|
|
|
+ handleProsKey:"",
|
|
|
+ handleShopKey:"",
|
|
|
+ productIds:[6946,6947,6953,6953,6954,6955,6956,6957,6958],//Ross 商品ID集合
|
|
|
+ // productIds:[7247,7248],//Ross 商品ID集合
|
|
|
+ shopIds:[10131],// Ross 供应商Id
|
|
|
+ // shopIds:[1378],// Ross 供应商Id
|
|
|
+ articleIds:[6610,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620],//Ross 相关文章ID 集合
|
|
|
+ // articleIds:[7184,7199,7531,7497,7471,7458,7440,7424,7398,7370,7356,7344,7300,7298,7232,6674],//Ross 相关文章ID 集合
|
|
|
+ keyWords:['Binary Premium','智能体疗管理系统','448k','肌肉重塑疗法','西班牙ROSS','ROSS','智能体疗'],// Ross 搜索商品关键词 集合
|
|
|
+ shopKeyWords:['深圳艾斯佰丽生物科技有限公司','艾斯佰丽'],
|
|
|
+ showRossHtml:false,
|
|
|
+ consultParams:{
|
|
|
+ ip:'',
|
|
|
+ createTime:'',
|
|
|
+ consultMobile: '',
|
|
|
+ consultName: '',
|
|
|
+ isClick:1
|
|
|
+ },
|
|
|
+ isDisabled:true,
|
|
|
+ isRossShow:false
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
setTime() {
|
|
@@ -23,6 +46,18 @@ var cmSysVitaMixins = function () {
|
|
|
let _self = this;
|
|
|
const globalUserData = JSON.parse(localStorage.getItem('userInfo'));
|
|
|
if(globalUserData){ this.cmSysParams.userId = globalUserData.userId * 1; }
|
|
|
+ console.log('handlearticleId',this.handlearticleId)
|
|
|
+ if( this.productIds.includes(this.handleProsId*1) ||
|
|
|
+ this.shopIds.includes(this.handleShopId*1) ||
|
|
|
+ this.articleIds.includes(this.handlearticleId*1) ||
|
|
|
+ this.keyWords.includes(this.handleProsKey) ||
|
|
|
+ this.shopKeyWords.includes(this.handleShopKey)
|
|
|
+ ){
|
|
|
+ this.cmSysParams.behaviorType = 2;
|
|
|
+ if (!GLOBAL_USER_ID>0) {
|
|
|
+ this.userInformationIsClick()
|
|
|
+ }
|
|
|
+ }
|
|
|
this.cmSysParams.pagePath = window.location.href;
|
|
|
this.clearTimeSet = setInterval(() => {
|
|
|
_self.browseTime++;
|
|
@@ -53,6 +88,67 @@ var cmSysVitaMixins = function () {
|
|
|
1:window.removeEventListener(map[isBrowser], e => this.beforeunloadHandler(e)) // 接触绑定
|
|
|
}
|
|
|
return FunMap[type];
|
|
|
+ },
|
|
|
+ handleInputName(e){
|
|
|
+ this.consultParams.consultName = e.target.value;
|
|
|
+ this.handldeCheckInput();
|
|
|
+ },
|
|
|
+ handleInputPhone(e){
|
|
|
+ this.consultParams.consultMobile = e.target.value;
|
|
|
+ this.handldeCheckInput();
|
|
|
+ },
|
|
|
+ handldeCheckInput(){
|
|
|
+ if(this.consultParams.consultName !== "" && this.consultParams.consultMobile !==""){
|
|
|
+ this.isDisabled =false;
|
|
|
+ }else{
|
|
|
+ this.isDisabled =true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleSubmit(){
|
|
|
+ // 提交联系人信息
|
|
|
+ if(this.isDisabled){ return }
|
|
|
+ this.userInformationInsertRoos(this.consultParams);
|
|
|
+ },
|
|
|
+ handleClose(){
|
|
|
+ // 关闭Ross 广告弹窗
|
|
|
+ this.userInformationInsertRoos(this.consultParams);
|
|
|
+ },
|
|
|
+ userInformationIsClick(){
|
|
|
+ //查询是否需要弹Ross广告
|
|
|
+ let _self = this;
|
|
|
+ PublicApi.userInformationIsClick({}, function (response) {
|
|
|
+ if(response.code == 0){
|
|
|
+ if(response.data){
|
|
|
+ setTimeout(()=>{
|
|
|
+ _self.showRossHtml = true
|
|
|
+ },5000)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ console.log('error',response.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ userInformationInsertRoos(params){
|
|
|
+ //提交记录咨询人&&关闭弹窗
|
|
|
+ let _self = this;
|
|
|
+ PublicApi.userInformationInsertRoos(params, function (response) {
|
|
|
+ if(response.code == 0){
|
|
|
+ _self.showRossHtml = false
|
|
|
+ }else{
|
|
|
+ console.log('error',response.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ userInformationVisitRoos(params){
|
|
|
+ //查看访问者是否浏览过roos相关页面
|
|
|
+ let _self = this;
|
|
|
+ PublicApi.userInformationVisitRoos(params, function (response) {
|
|
|
+ if(response.code == 0){
|
|
|
+ _self.isRossShow = response.data
|
|
|
+ }else{
|
|
|
+ console.log('error',response.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -60,6 +156,8 @@ var cmSysVitaMixins = function () {
|
|
|
this.setTime();
|
|
|
// 绑定窗口[监听]事件
|
|
|
this.handleWindow(0)
|
|
|
+ // 查看访问者是否浏览过roos相关页面
|
|
|
+ this.userInformationVisitRoos({ userId: this.cmSysParams.userId })
|
|
|
},
|
|
|
destroyed() {
|
|
|
// 解除窗口关闭[监听]事件
|