cuiyalong 4 年之前
父節點
當前提交
5a73892eaf

+ 0 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -102,7 +102,6 @@ var vNode = {
             },
             gotTab2: false, // 是否已经获取到tab2的数据了
             svip: false, // 判断是否是超级订阅的企业画像
-            digshow: false, // 判断是否是超级订阅会员
             overlayShow: true, // 弹窗遮罩是否显示
             isVip: false, // 只是超级订阅
             bidcollPowerInfo: {

+ 16 - 6
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -676,6 +676,22 @@
             selectCate = sessionStorage.getItem(userId + "_selectCate");
             selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
             selectNotice = sessionStorage.getItem(userId + "_selectNotice");
+
+            // 判断是否需要修改某个收藏的状态
+            var listCollSessionId = sessionStorage.getItem('listCollSessionId')
+            if (listCollSessionId){
+                var listCollSessionBool = sessionStorage.getItem('listCollSessionBool')
+                if (dataCache && $.isArray(dataCache)) {
+                    dataCache.forEach(function (item) {
+                        if (item._id == listCollSessionId) {
+                            item.collection = listCollSessionBool
+                        }
+                    })
+                    sessionStorage.removeItem('listCollSessionId')
+                    sessionStorage.removeItem('listCollSessionBool')
+                }
+            }
+
             $("#list>*").remove();
             firstPage = dataCache;
             if (dataCache.length == 0) {
@@ -1156,12 +1172,6 @@ function hasNoData() {
                   continue
               }
           }
-          //收藏处理
-          if (sessionStorage.getItem('listCollSessionId')&&sessionStorage.getItem('listCollSessionId')==obj["_id"]){
-            obj["collection"] = sessionStorage.getItem('listCollSessionBool');
-    				sessionStorage.removeItem('listCollSessionId')
-    				sessionStorage.removeItem('listCollSessionBool')
-          }
           listhtml += '<div class="tslist ' + visited + '" words="' + mWords + '">'
               + '<div class="resnumb">'
               + '<div class="one">'

+ 0 - 1
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -100,7 +100,6 @@ var vNode = {
             },
             gotTab2: false, // 是否已经获取到tab2的数据了
             svip: false, // 判断是否是超级订阅的企业画像
-            digshow: false, // 判断是否是超级订阅会员
             overlayShow: true, // 弹窗遮罩是否显示
             isVip: false, // 只是超级订阅
             bidcollPowerInfo: {

+ 1 - 0
src/web/staticres/js/ent-search-index-pc.js

@@ -405,6 +405,7 @@ var vm = new Vue({
                 if (res.data.list) {
                     res.data.list.forEach(function (d) {
                         d.company_shortname = _this.getShortName(d.company_name)
+                        d.randomBgc = _this.randomBgc()
                     })
                     if (this.power) {
                         this.listState.list = res.data.list || []

+ 1 - 1
src/web/templates/pc/entsearchindex.html

@@ -187,7 +187,7 @@
                             @click="toDetail(item.id)"
                             :key="item.id">
                             <div class="ei-i-left">
-                                <div class="ei-i-l-container" :class="randomBgc()">${ item.company_shortname ? item.company_shortname.slice(0,4) : item.company_name.slice(0,4) }</div>
+                                <div class="ei-i-l-container" :class="item.randomBgc">${ item.company_shortname ? item.company_shortname.slice(0,4) : item.company_name.slice(0,4) }</div>
                             </div>
                             <div class="ei-i-right">
                                 <div class="ei-r-title-container flex">

+ 14 - 6
src/web/templates/weixin/historypush.html

@@ -999,6 +999,20 @@
               if (sessionStorage.closeAdvert == "true") {
                   closeAdvert = true
               }
+              // 判断是否需要修改某个收藏的状态
+              var listCollSessionId = sessionStorage.getItem('listCollSessionId')
+              if (listCollSessionId){
+                  var listCollSessionBool = sessionStorage.getItem('listCollSessionBool')
+                  if (dataCache && $.isArray(dataCache)) {
+                      dataCache.forEach(function (item) {
+                          if (item._id == listCollSessionId) {
+                              item.collection = listCollSessionBool
+                          }
+                      })
+                      sessionStorage.removeItem('listCollSessionId')
+                      sessionStorage.removeItem('listCollSessionBool')
+                  }
+              }
               $("#list>*").remove();
               count = 0;
               firstPage = dataCache;
@@ -1355,12 +1369,6 @@
               if (countLength > 1) {
                   paddingLeft = (countLength + 1) * 9;
               }
-              //收藏处理
-              if (sessionStorage.getItem('listCollSessionId')&&sessionStorage.getItem('listCollSessionId')==obj["_id"]){
-                obj["collection"] = sessionStorage.getItem('listCollSessionBool');
-        				sessionStorage.removeItem('listCollSessionId')
-        				sessionStorage.removeItem('listCollSessionBool')
-              }
               //是否浏览过
               var visited = "";
               if (obj.ca_isvisit == 1) {