|
@@ -15,26 +15,34 @@ var cmSysVitaMixins = function () {
|
|
shopId:0,//供应商Id
|
|
shopId:0,//供应商Id
|
|
behaviorType:1 // 用户行为类型
|
|
behaviorType:1 // 用户行为类型
|
|
},
|
|
},
|
|
- handleProsId:0,
|
|
|
|
- handleShopId:0,
|
|
|
|
- handlearticleId:0,
|
|
|
|
- handleProsKey:"",
|
|
|
|
- handleShopKey:"",
|
|
|
|
|
|
+ handleProsId:'',
|
|
|
|
+ handleShopId:'',
|
|
|
|
+ handlearticleId:'',
|
|
|
|
+ handleProsKey:'',
|
|
|
|
+ handleShopKey:'',
|
|
productIds:roosConfig.productIds,//Ross 商品ID集合
|
|
productIds:roosConfig.productIds,//Ross 商品ID集合
|
|
shopIds:roosConfig.shopIds,// Ross 供应商Id
|
|
shopIds:roosConfig.shopIds,// Ross 供应商Id
|
|
articleIds:roosConfig.articleIds,//Ross 相关文章ID 集合
|
|
articleIds:roosConfig.articleIds,//Ross 相关文章ID 集合
|
|
keyWords:roosConfig.keyWords,// Ross 搜索商品关键词 集合
|
|
keyWords:roosConfig.keyWords,// Ross 搜索商品关键词 集合
|
|
shopKeyWords:roosConfig.shopKeyWords,// Ross 搜索供应商名称 集合
|
|
shopKeyWords:roosConfig.shopKeyWords,// Ross 搜索供应商名称 集合
|
|
- showRossHtml:false,
|
|
|
|
consultParams:{
|
|
consultParams:{
|
|
ip:'',
|
|
ip:'',
|
|
|
|
+ shopId:'',
|
|
createTime:'',
|
|
createTime:'',
|
|
consultMobile: '',
|
|
consultMobile: '',
|
|
consultName: '',
|
|
consultName: '',
|
|
isClick:1
|
|
isClick:1
|
|
},
|
|
},
|
|
|
|
+ popUpParams:{
|
|
|
|
+ shopId:'',
|
|
|
|
+ productId:'',
|
|
|
|
+ infoId:'',
|
|
|
|
+ keyword:''
|
|
|
|
+ },
|
|
|
|
+ advertisement:{},// 弹窗广告信息
|
|
|
|
+ showRossHtml:false,
|
|
isDisabled:true,
|
|
isDisabled:true,
|
|
- isRossShow:false
|
|
|
|
|
|
+ shopAdvert:[]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -52,12 +60,11 @@ var cmSysVitaMixins = function () {
|
|
//设置定时器
|
|
//设置定时器
|
|
const globalUserData = JSON.parse(localStorage.getItem('userInfo'));
|
|
const globalUserData = JSON.parse(localStorage.getItem('userInfo'));
|
|
if(globalUserData){ this.cmSysParams.userId = globalUserData.userId * 1; }
|
|
if(globalUserData){ this.cmSysParams.userId = globalUserData.userId * 1; }
|
|
- 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)
|
|
|
|
- ){
|
|
|
|
|
|
+ if( this.handleProsId || this.handleShopId || this.handlearticleId || this.handleProsKey || this.handleShopKey ){
|
|
|
|
+ this.popUpParams.shopId = this.handleShopId
|
|
|
|
+ this.popUpParams.productId = this.handleProsId
|
|
|
|
+ this.popUpParams.infoId = this.handlearticleId
|
|
|
|
+ this.popUpParams.keyword = this.handleShopKey
|
|
this.cmSysParams.behaviorType = 2;
|
|
this.cmSysParams.behaviorType = 2;
|
|
if (!GLOBAL_USER_ID>0) {
|
|
if (!GLOBAL_USER_ID>0) {
|
|
this.userInformationIsClick()
|
|
this.userInformationIsClick()
|
|
@@ -104,20 +111,33 @@ var cmSysVitaMixins = function () {
|
|
CAIMEI.dialog('请输入正确的手机号');
|
|
CAIMEI.dialog('请输入正确的手机号');
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ this.consultParams.shopId = this.handleShopId
|
|
this.userInformationInsertRoos(this.consultParams);
|
|
this.userInformationInsertRoos(this.consultParams);
|
|
},
|
|
},
|
|
handleClose(){
|
|
handleClose(){
|
|
// 关闭Ross 广告弹窗
|
|
// 关闭Ross 广告弹窗
|
|
this.userInformationInsertRoos(this.consultParams);
|
|
this.userInformationInsertRoos(this.consultParams);
|
|
},
|
|
},
|
|
|
|
+ getUserPopUpInfo(params){
|
|
|
|
+ //查看供应商广告弹框信息
|
|
|
|
+ let _self = this;
|
|
|
|
+ PublicApi.getUserPopUpInfo(params, function (response) {
|
|
|
|
+ if(response.code === 0){
|
|
|
|
+ _self.advertisement = response.data
|
|
|
|
+ }else{
|
|
|
|
+ console.log('error',response.msg);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
userInformationIsClick(){
|
|
userInformationIsClick(){
|
|
- //查询是否需要弹Ross广告
|
|
|
|
|
|
+ //查询是否需要弹广告
|
|
let _self = this;
|
|
let _self = this;
|
|
- PublicApi.userInformationIsClick({}, function (response) {
|
|
|
|
|
|
+ PublicApi.userInformationIsClick(_self.popUpParams, function (response) {
|
|
if(response.code === 0){
|
|
if(response.code === 0){
|
|
if(response.data){
|
|
if(response.data){
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
_self.showRossHtml = true
|
|
_self.showRossHtml = true
|
|
|
|
+ _self.getUserPopUpInfo(_self.popUpParams)
|
|
},5000)
|
|
},5000)
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -136,12 +156,12 @@ var cmSysVitaMixins = function () {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- userInformationVisitRoos(params){
|
|
|
|
|
|
+ getShopAdvert(params){
|
|
//查看访问者是否浏览过roos相关页面
|
|
//查看访问者是否浏览过roos相关页面
|
|
let _self = this;
|
|
let _self = this;
|
|
- PublicApi.userInformationVisitRoos(params, function (response) {
|
|
|
|
|
|
+ PublicApi.getShopAdvert(params, function (response) {
|
|
if(response.code === 0){
|
|
if(response.code === 0){
|
|
- _self.isRossShow = response.data
|
|
|
|
|
|
+ _self.shopAdvert = response.data
|
|
}else{
|
|
}else{
|
|
console.log('error',response.msg);
|
|
console.log('error',response.msg);
|
|
}
|
|
}
|
|
@@ -172,7 +192,7 @@ var cmSysVitaMixins = function () {
|
|
// 页面加载完成后[监听]执行事件
|
|
// 页面加载完成后[监听]执行事件
|
|
this.handleCmSysNetInfo()
|
|
this.handleCmSysNetInfo()
|
|
// 查看访问者是否浏览过roos相关页面
|
|
// 查看访问者是否浏览过roos相关页面
|
|
- this.userInformationVisitRoos({ userId: this.cmSysParams.userId })
|
|
|
|
|
|
+ this.getShopAdvert({ userId: this.cmSysParams.userId })
|
|
},
|
|
},
|
|
destroyed() {
|
|
destroyed() {
|
|
|
|
|