Forráskód Böngészése

潜客搜集版本

zhengjinyi 1 éve
szülő
commit
a08abe3762

+ 1 - 1
src/main/resources/static/css/index/index_new.h5.css

@@ -115,4 +115,4 @@
 .bg_icon .mIcon{width:10vw;height:10vw;display:inline-block}
 .bg_icon .mIcon:before{width:10vw;height:10vw;background-position:-33.3vw -77.3vw;cursor:pointer}
 
- .section_right .section_right_item.ross img{width: 100%;height: 61.6vw;display: block;border-radius: 2px;}
+ .section_right .section_right_item.ross img{width: 100%;height: 61.6vw;display: block;border-radius: 2px;}

+ 13 - 2
src/main/resources/static/js/common/serviceapi/utils.service.js

@@ -615,6 +615,17 @@ var PublicApi = {
                 callback(res);
             });
         },
+        getUserPopUpInfo: function (params, callback) {//查看供应商广告弹窗信息
+            Http.AjaxService({
+                url: '/user/information/getPopUpInfo',
+                type:'get',
+                data:params,
+                json:false,
+                isHost:true
+            }).then(function (res) {
+                callback(res);
+            });
+        },
         userInformationInsertRoos: function (params, callback) {//插入填写咨询人基本信息
             Http.AjaxService({
                 url: '/user/information/insertRoos',
@@ -626,9 +637,9 @@ var PublicApi = {
                 callback(res);
             });
         },
-        userInformationVisitRoos: function (params, callback) {//查看访问者是否浏览过roos相关页面
+        getShopAdvert: function (params, callback) {//查看访问者是否浏览过roos相关页面
             Http.AjaxService({
-                url: '/user/information/visitRoos',
+                url: '/user/information/getShopAdvert',
                 type:'get',
                 data:params,
                 json:false,

+ 39 - 19
src/main/resources/static/js/mixins/cmSysMixins.js

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

+ 5 - 5
src/main/resources/templates/article/detail.html

@@ -98,11 +98,11 @@
         </div>
     </div>
     <!--侧边栏供应商广告图-->
-    <div v-if="isPC && isRossShow" class="article-right-ross article-PC" :class="isRossShow ? 'show' : 'none'" id="advertisement" v-cloak>
-        <el-carousel :autoplay="true" :height="isPC ? '343px' : '61.6vw'">
-            <el-carousel-item v-for="(item, index) in advertisList" :key="item">
-                <a href="/supplier-1378.html" v-if="isPC">
-                    <img :src="item" alt="">
+    <div v-if="isPC && shopAdvert.length > 0" class="article-right-ross article-PC" :class="shopAdvert.length > 0 ? 'show' : 'none'" id="advertisement" v-cloak>
+        <el-carousel :autoplay="true"  show-indicators="false" :height="isPC ? '343px' : '61.6vw'">
+            <el-carousel-item v-for="(item, index) in shopAdvert" :key="item.id">
+                <a :href="item.jumpLink" target="_blank">
+                    <img :src="item.pcImage" alt="">
                 </a>
             </el-carousel-item>
         </el-carousel>

+ 5 - 5
src/main/resources/templates/article/list.html

@@ -218,11 +218,11 @@
         </div>
     </div>
     <!--侧边栏供应商广告图-->
-    <div v-if="isPC && isRossShow" class="article-right-ross article-PC" :class="isRossShow ? 'show' : 'none'" id="advertisement" v-cloak>
-        <el-carousel :autoplay="true" :height="isPC ? '343px' : '61.6vw'">
-            <el-carousel-item v-for="(item, index) in advertisList" :key="item">
-                <a href="/supplier-1378.html" v-if="isPC">
-                    <img :src="item" alt="">
+    <div v-if="isPC && shopAdvert.length > 0 " class="article-right-ross article-PC" :class="shopAdvert.length > 0 ? 'show' : 'none'" id="advertisement" v-cloak>
+        <el-carousel :autoplay="true" show-indicators="false" :height="isPC ? '343px' : '61.6vw'">
+            <el-carousel-item v-for="(item, index) in shopAdvert" :key="item.id">
+                <a :href="item.jumpLink" target="_blank">
+                    <img :src="item.pcImage" alt="">
                 </a>
             </el-carousel-item>
         </el-carousel>

+ 3 - 3
src/main/resources/templates/components/ross-advert.html

@@ -4,12 +4,12 @@
   <div class="ross-banner-fiexd" :class="showRossHtml ? 'active' : ''">
     <div class="ross-mssg">
       <div class="ross-mssg-img">
-        <img src="https://img.caimei365.com/group1/M00/00/55/rB-lF2MMhUWAC7vAAAGQFrJJQrw679.jpg" alt="">
+        <img :src="advertisement.image" alt="">
       </div>
       <div class="ross-mssg-text">
         <div class="ross-mssg-text-t">
-          <p>对西班牙Ross品牌感兴趣?</p>
-          <p>西班牙Ross商品</p>
+          <p>{{ advertisement.guidingOne }}</p>
+          <p>{{ advertisement.guidingTwo }}</p>
         </div>
         <div class="ross-mssg-text-b">
           <i class="el-icon-caret-bottom"></i>

+ 6 - 4
src/main/resources/templates/index.html

@@ -105,10 +105,12 @@
         <div class="inner">
             <div id="sidebar" class="section_right">
                 <div class="box" >
-                    <div class="section_right_item ross">
-                        <el-carousel :autoplay="true" :height="isPC ? '343px' : '61.6vw'">
-                            <el-carousel-item v-for="(item, index) in advertisList" :key="item">
-                                <img :src="item" alt="">
+                    <div class="section_right_item ross" v-if="shopAdvert.length > 0">
+                        <el-carousel :autoplay="true" show-indicators="false" :height="isPC ? '343px' : '61.6vw'">
+                            <el-carousel-item v-for="(item, index) in shopAdvert" :key="item.id">
+                                <a :href="item.jumpLink" target="_blank">
+                                    <img :src="item.pcImage" alt="">
+                                </a>
                             </el-carousel-item>
                         </el-carousel>
                     </div>