xiebaomin 1 年間 前
コミット
6f2534c6cb

+ 1 - 1
src/main/resources/static/js/account/register-club.js

@@ -265,7 +265,7 @@ var registerPage = new Vue({
             UserApi.PostLoginAccount(params,function(response){
                 if(response.code === 0){
                     if (sessionStorage.getItem('saveParams')) {
-                        _self.requireBaseLoginStatus(response)
+                        _self.registerParams(response)
                         return
                     }
                     _self.clubUpgradeUser.userId =  response.data.userId;

+ 25 - 0
src/main/resources/static/js/document/database-share.js

@@ -59,6 +59,31 @@ var dataBaseShare = {
             else {
                 return window.location.href.indexOf('isDataBase') === -1;
             }
+        },
+        registerParams(res) {
+            const params = JSON.parse(window.sessionStorage.getItem('saveParams'))
+            const cmSysParams = {
+                    accessClient: 0,// 来源 0网站 1小程序
+                    pagePath:location.href,//页面路径
+                    accessDuration:0,//停留时间
+                    pageType:22,//页面类型
+                    pageLabel:'机构注册',//页面标签
+                    userId: res.data.userId,//用户Id
+                    productId:0,//商品Id
+                    shopId:0,//供应商Id
+                    behaviorType:1, // 用户行为类型
+                    headUserId: params.suid, // 内容库协销ID
+                    productArchiveId: params.id, // 内容库文件id
+                }
+            PublicApi.userRecordStatisticsApp(cmSysParams,function(response){
+                if(response.code === 0){
+                    setTimeout(() => {
+                        window.location.href = `${dataBaseLink}/preview?t=${params.t}&id=${params.id}&uid=${res.data.userId}&suid=${params.suid}`
+                    }, 1000)
+                }else{
+                    console.log('上送浏览记录统计失败~')
+                }
+            });
         }
     }
 }

+ 1 - 8
src/main/resources/static/js/mixins/cmSysMixins.js

@@ -12,10 +12,7 @@ var cmSysVitaMixins = function () {
                     pageLabel:'',//页面标签
                     userId:0,//用户Id
                     productId:0,//商品Id
-                    shopId:0,//供应商Id
-                    behaviorType:1, // 用户行为类型
-                    headUserId: '', // 内容库协销ID
-                    productArchiveId: '', // 内容库文件id
+                    shopId:0//供应商Id
                 },
                 handleProsId:'',
                 handleShopId:'',
@@ -56,7 +53,6 @@ var cmSysVitaMixins = function () {
             handleCmSysNetInfo() {
                 //设置定时器
                 const globalUserData = JSON.parse(localStorage.getItem('userInfo'));
-                const databaseShareData = JSON.parse(sessionStorage.getItem('saveParams'))
                 console.log('handleProsKey',this.handleProsKey)
                 if(globalUserData){ this.cmSysParams.userId = globalUserData.userId * 1; }
                 if( this.handleProsId || this.handleShopId || this.handlearticleId || this.handleProsKey || this.handleShopKey ){
@@ -77,9 +73,6 @@ var cmSysVitaMixins = function () {
                     this.cmSysParams.pageLabel = pageData ? pageData.pageLabel : '';
                 }
                 this.cmSysParams.pagePath = pagePath;
-                this.cmSysParams.headUserId = databaseShareData?.suid || ''
-                this.cmSysParams.productArchiveId = databaseShareData?.id || ''
-                console.log(this.cmSysParams)
                 setTimeout(()=>{
                     this.handleSetNetworks(this.cmSysParams);
                 },2000)