Эх сурвалжийг харах

Merge branch 'master' into hotfix/v4.10.0.1

yuelujie 5 сар өмнө
parent
commit
e7b4bc9bdf

+ 11 - 4
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/ent_follow.css

@@ -5,9 +5,6 @@
     color: #171826;
 }
 
-.ent-grouping {
-  margin-bottom: .2rem;
-}
 
 .dot-red {
     width: .16rem;
@@ -63,7 +60,9 @@
     width: .36rem;
     border-radius: 0;
 }
-
+.follow-list {
+  margin-top: .2rem;
+}
 .follow-list .follow-item {
     display: flex;
     flex-direction: column;
@@ -185,3 +184,11 @@
 .ent-grouping .grouping-footer .grouping-item-name {
   margin-right: .08rem;
 }
+
+.ent-grouping-fixed{
+  position: fixed;
+  z-index: 9;
+}
+.ent-grouping-normal, .ent-grouping-fixed {
+  width: 100%;
+}

+ 21 - 2
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_follow.js

@@ -24,7 +24,10 @@ var vNode = {
         loading: '',
         activeNames: [],
         groupingList: [],
-        selectGroupList: []
+        selectGroupList: [],
+        domTopNum: {
+          top: 0,
+        }
     },
     created: function () {
         var recover = this.recover()
@@ -36,8 +39,24 @@ var vNode = {
     mounted: function () {
         $(this.$refs.jList).scrollTop(this.listInfo.scrollTop)
         this.adjustAddButtonPadding()
+        this.domTopNum.top = $('.j-header').outerHeight(true)
+        // 监听$(this.$refs.jList)的滚动值,使用addEventListener监听
+        const jListElement = document.getElementById('jList')
+        if (jListElement) {
+          jListElement.addEventListener('scroll', this.handleScroll);
+        }
+    },
+    computed: {
+      getListScroll () {
+        return this.listInfo.scrollTop
+      }
     },
     methods: {
+        handleScroll(event) {
+          // 获取滚动值
+          const scrollTop = event.target.scrollTop;
+          this.listInfo.scrollTop = scrollTop
+        },
         recover: function () {
             var excludeKey = ['sessStorageKey']
             var $data = sessionStorage.getItem(this.sessStorageKey)
@@ -223,7 +242,7 @@ var vNode = {
             pageNum: this.listInfo.pageNum,
             group: lengthBool ? this.selectGroupList.map(s => s.id).join(',') : ''
           })
-          this.activeNames = []
+          $('.j-main').scrollTop(0)
         },
         groupManage: function () {
             location.href = '/jy_mobile/entgroup/index'

+ 288 - 4
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/potential_cor_list.js

@@ -12,6 +12,9 @@ var titleMap = {
 var vConfig = {
     delimiters: ['${', '}'],
     el: '#potential-cor-list',
+    components: {
+      mobilePortrayalGroupingScript: mobilePortrayalGroupingScript,
+    },
     data: {
         surplusCount: 0, // 试用版剩余竞争对手数量(非试用)
         // 是否显示引导购买入口
@@ -63,6 +66,15 @@ var vConfig = {
             }
         },
         power: [],
+        showGroupingDialog: false,
+        isLogin: false,
+        groupingList: [],
+        selectedItem: {},
+        sourceLimitMap: {
+          app: 'app_ent_limit',
+          wx: 'wx_ent_limit',
+          h5: 'h5_ent_limit'
+        },
     },
     computed: {
         showTrialGuideBuy: function () {
@@ -85,6 +97,7 @@ var vConfig = {
     created: function () {
         this.type = utils.getParam('type') || '1'
         this.getVipStatus()
+        this.getUserSimpleInfo()
     },
     mounted: function () {
         // 恢复数据
@@ -176,6 +189,7 @@ var vConfig = {
                 url: '/bigmember/use/isAdd',
                 success: function (res) {
                     if (res.data) {
+                        _this.powerInfo = res.data
                         _this.bigVipStatus = res.data.memberStatus || 0
                         if ($.isArray(res.data.power)) {
                             _this.power = res.data.power
@@ -281,12 +295,282 @@ var vConfig = {
                 }
             })
         },
+        // 判断当前用户是登录
+        getUserSimpleInfo() {
+          const _this = this
+          $.ajax({
+            type: 'POST',
+            url: '/jypay/user/getSimpleData',
+            success: function (res) {
+              if(res && res.userId) {
+                _this.isLogin = true
+              }
+            },error:function (e) {
+              _this.isLogin = false
+            }
+          })
+        },
+        // changeFollowState: function (item) {
+        //     if (!this.pagePower){
+        //     	this.changeFS_normal(item)
+        //     } else {
+        //     	this.changeFS_bigvip(item)
+        //     }
+        // },
+
+        monitorCancellation (){ // 取消监控
+          this.$dialog({
+            width: 303,
+            className: 'monitor-dialog',
+            title: '确定不再监控?',
+            message: `取消监控,将错过企业最新动态推送`,
+            messageAlign:'center',
+            confirmButtonText: '确认取消',
+            confirmButtonColor: '#2ABED1',
+            showConfirmButton: true,
+            showCancelButton: true,
+            cancelButtonText: '我再想想',
+            cancelButtonColor: '#2ABED1'
+          }).then(() =>{
+            this.changeFollowStateRequest()
+          })
+        },
+        
         changeFollowState: function (item) {
-            if (!this.pagePower){
-            	this.changeFS_normal(item)
-            } else {
-            	this.changeFS_bigvip(item)
+          var _this = this
+          _this.selectedItem = item
+          if(!_this.isLogin) {
+            window.location.href = "/jyapp/free/login?to=back";
+            return
+          }
+          if (item.follow) {
+            _this.monitorCancellation()
+            
+          } else {
+            this.getEntFollowState(item, (res) => {
+              const { surplus, used } = res.info
+              const monitorEntNum = surplus + used  // 可监控企业总数
+              let limit = this.powerInfo.memberStatus > 0 || this.powerInfo.entniche
+              // 1.超出可监控企业数量
+              if (surplus <= 0) {
+                // 大会员或商机管理用户
+                if (limit) {
+                  this.$dialog({
+                    width: 303,
+                    className: 'monitor-dialog',
+                    title: '监控企业个数已达上限',
+                    message: '您最多可监控'+monitorEntNum+'个企业,可联系客服,申请监控更多企业',
+                    messageAlign:'center',
+                    confirmButtonText: '联系客服',
+                    confirmButtonColor: '#2ABED1',
+                    showConfirmButton: true,
+                    showCancelButton: true,
+                    cancelButtonText: '我再想想',
+                    // cancelButtonColor: '#5F5E64'
+                  }).then(() =>{
+                    if(utils.$envs.inWX){
+                       window.location.href = '/big/wx/page/customer'
+                    } else{
+                      window.location.href = '/jyapp/free/customer'
+                    }
+                  })
+                } else {
+                  // 非大会员非商机管理用户,进入留资页面
+                  let href_
+                  if(utils.$envs.inWX){
+                    href_ = '/weixin/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.wx
+                  }else if(utils.$envs.inApp){
+                    href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.app
+                  }else if(utils.$envs.inH5){
+                    href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.h5
+                  }
+                  window.location.href = href_
+                }
+              } else {
+                this.getEntGroupList()
+              }
+            })
+          }
+        },
+        // 修改企业关注状态
+        changeFollowStateRequest: function (params = {}) {
+          var _this = this
+          var loading = this.showLoading()
+          var urls = {
+            addFollow: '/bigmember/follow/ent/addFollow',
+            delFollow: '/bigmember/follow/ent/delFollow'
+          }
+          var url = !!this.selectedItem.follow ? urls.delFollow : urls.addFollow
+          $.ajax({
+            type: 'POST',
+            url: url,
+            data: {
+              ...params,
+              entId: _this.selectedItem.entId,
+            },
+            timeout: 5000,
+            success: function (res) {
+              if (res.error_code == 0) {
+                loading.clear()
+                if (res.data === 'success' || res.data.status) {
+                  const active = !_this.powerInfo.isFree ? 4 : 3
+                  if(_this.selectedItem.follow) {
+                    _this.$toast({
+                      duration: 2000,
+                      message: '取消监控成功'
+                    })
+                  }
+                  _this.selectedItem.follow = !_this.selectedItem.follow
+                  // _this.getEntFollowState()
+                  if(utils.$envs.inApp && JyObj.checkNoticePermission()!=1 && res.data.status){
+                    _this.$dialog({
+                      width: 303,
+                      className: 'monitor-dialog',
+                      title: '监控成功',
+                      message: '您可前往“工作台-商机-企业情报监控”查看企业最新动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。',
+                      messageAlign:'center',
+                      confirmButtonText: '去开启',
+                      confirmButtonColor: '#2ABED1',
+                      showConfirmButton: true,
+                      showCancelButton: true,
+                      cancelButtonText: '暂不开启',
+                      // cancelButtonColor: '#5F5E64'
+                    }).then(() =>{
+                      //  展开监控菜单 active:4
+                      window.location.href = location.origin + '/jy_mobile/push/pushsetting?active=' + active
+                    })
+                    return
+                  }
+                  if(!res.data.msg_open && res.data.status){
+                    _this.$dialog({
+                      width: 303,
+                      className: 'monitor-dialog',
+                      title: '监控成功',
+                      message: '您可前往“工作台-商机-企业情报监控”查看企业最新动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。',
+                      messageAlign:'center',
+                      confirmButtonText: '去开启',
+                      confirmButtonColor: '#2ABED1',
+                      showConfirmButton: true,
+                      showCancelButton: true,
+                      cancelButtonText: '暂不开启',
+                      // cancelButtonColor: '#5F5E64'
+                    }).then(() =>{
+                      //  展开监控菜单 active:3
+                      window.location.href = location.origin + '/jy_mobile/push/pushsetting?active=' + active
+                    })
+            
+                  } else if(res.data.msg_open && res.data.status){
+                    _this.$toast({
+                      duration: 2000,
+                      message: '监控成功,您可前往“工作台-商机-企业情报监控”查看'
+                    })
+            
+                  }
+                } else {
+                  return _this.showToast(res.error_msg || '监控失败')
+                }
+                // if(_this.selectedItem.follow) {
+                //   _this.pointsTaskSuccessTip()
+                // }
+
+                // if (!_this.selectedItem.follow) {
+                //   history.back()
+                // }
+              } else {
+                _this.showToast(res.error_msg)
+              }
+            },
+            error: function (error) {
+              console.log(error)
+              loading.clear()
+            }
+          })
+        },
+        // 获取企业分组列表
+        getEntGroupList () {
+          var _this = this
+          $.ajax({
+            url: '/bigmember/follow/ent/labelGroup',
+            type: 'POST',
+            data: {
+              type: 'get'
+            },
+            success: function (res) {
+              if (res.error_code === 0) {
+                _this.groupingList = res.data || []
+                _this.showGroupingDialog = true
+                // 回显上次选择的分组
+                const filterSelect = _this.groupingList.filter(item => !!item.isSelect)
+                const selectList = filterSelect.map(item => item.s_name) || ['默认分组']
+                _this.$refs.portrayalGrouping.setState(selectList)
+                
+              } else {
+                if(!res?.data?.status) {
+                    // 监控达到上限
+                  _this.$dialog({
+                    width: 303,
+                    className: 'monitor-dialog',
+                    title: '监控企业个数已达上限',
+                    message: '您最多可监控'+res?.data.limit_count+'个企业,可联系客服,申请监控更多企业',
+                    messageAlign:'center',
+                    confirmButtonText: '联系客服',
+                    confirmButtonColor: '#2ABED1',
+                    showConfirmButton: true,
+                    showCancelButton: true,
+                    cancelButtonText: '我再想想',
+                    // cancelButtonColor: '#5F5E64'
+                  }).then(() =>{
+                    if(utils.$envs.inWX){
+                      window.location.href = '/big/wx/page/customer'
+                    } else{
+                      window.location.href = '/jyapp/free/customer'
+                    }
+                  })
+                }
+              }
             }
+          })
+        },
+        getEntFollowState: function (item, callback) {
+          var _this = this
+          // _this.selectedItem.followSearchFinish = false
+          $.ajax({
+            type: 'POST',
+            url: '/bigmember/follow/ent/followCheck',
+            data: {
+              entId: item.entId
+            },
+            timeout: 5000,
+            success: function (res) {
+              if (res.error_code == 0) {
+                // _this.selectedItem.followSearchFinish = true
+                if (res.data) {
+                  _this.selectedItem.follow = !!res.data.followed
+                  // _this.selectedItem.entExist = !!res.data.isShow
+                  // _this.selectedItem.followedGroup = res.data.followedGroup
+                  _this.selectedItem.info = res.data.info
+                  callback && callback(res.data)
+                } else {
+                  // _this.selectedItem.entExist = false
+                }
+              } else {
+                _this.$toast(res.error_msg)
+              }
+            },
+            error: function (error) {
+              console.log(error)
+            }
+          })
+        },
+        confirmGrouping: function(params) {
+          this.showGroupingDialog = false
+          this.changeFollowStateRequest(params)
+        },
+        cancelGrouping: function () {
+          this.showGroupingDialog = false
+        },
+        updateGroupList () {
+          this.getEntGroupList()
         },
         changeFS_normal:function(item){
         	var _this = this

+ 49 - 1
src/jfw/modules/app/src/web/staticres/jyapp/followent/css/follow.css

@@ -257,9 +257,12 @@ a {
 	margin-left:5px;
 }
 .listpage .jytimest{
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
 	margin:15px 5px 5px;
 	text-align: right;
-    padding-right: 5%;    
+  padding-right: 5%;    
 	color: #a0a0a0;
 	margin-right: -3px;
 }
@@ -515,4 +518,49 @@ a {
   background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIESURBVHgB5VfRccIwDFV6HYANmg3qEcIGbNBsUDYgTFA6Ad2g3SB0AmCCsAFsoEqNTFXXTmxDv3h3Ouew9SRZsmwAbh0FZAARJzSUJIbkJLIriuIE/wkyXJG0GAbP1XBtEGnpMbwlWZO8e+Y61oFrgIgMyVERzyUF7roJRy9rUHQMXALH+JvPcMCR1cVOCJGNpoFEKCe6GMd9BAtLAJlQtdFAKlT0VYKO0cWH/amxqYjfBaW4TdCx9XJ0fm+HArkL8NnFnxBpnIaWhKN8dab3DmeUA6WMO8fQM8uA8SV1w8bhshwP4ME9pKFhQ5xPMrSMMD6KMQfcwpmKwUaKqo4wnnUE51I4K8+cbk6jRwz7ds2YQ4ID5+MTmLdONBFcnXCldUR1fOI9/8tRZzczp4mUkAjsb1AbfQ05ULvQpTjhGF9DKiTH39euIuJxFqFbOTrszFN0DagCO8o3E2zxB63k1jgR1/j7YdLK70al0sQaR6U0k7lGRTaE8+lgXQ+fiTWu8SLR6Eg7Nc/f/DSzaZuITshB43Ngi8PosG8q5cAOcv4XGA7E4nzLFkqZWyZ7VpE8yui20QPJlNruIeCAvhs0+Lm+gf52Zd3N6BMeM1+66E/lR2j93QDXXn0fYCByDVrD1y9fWjrCHaQCVRvFvE6od6KCVGBfyS1e8AdDnGgx51V8M/gC6u7qiWrVshgAAAAASUVORK5CYII=) no-repeat center center;
   background-size: contain;
   margin-right: .04rem;
+}
+
+.ent-grouping .grouping-list {
+  display: flex;
+  flex-wrap: wrap;
+  max-height: 2.04rem;
+  overflow: hidden;
+  overflow-y: auto;
+}
+
+.ent-grouping .grouping-list .grouping-item {
+  margin: 0 .16rem .16rem 0;
+  padding: 0 .24rem;
+  border: 0.5px solid rgba(192, 196, 204, 1);
+  border-radius: .3rem;
+  line-height: .52rem;
+  color: #5F5E64;
+}
+
+.ent-grouping .grouping-list .grouping-item.active {
+  background: #2ABED1;
+  border-color: #2ABED1;
+  color: #fff;
+}
+
+.ent-grouping .grouping-list .grouping-item.disabled {
+  background: #F5F6F7;
+}
+
+.ent-grouping .grouping-footer {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: .24rem;
+  font-size: .28rem;
+  line-height: .4rem;
+  color: #2ABED1;
+}
+
+.ent-grouping .grouping-footer .grouping-item-name {
+  margin-right: .08rem;
+}
+.grouping-bot-line {
+  height: .2rem;
+  background: #F5F6F7;
 }

+ 20 - 1
src/jfw/modules/app/src/web/templates/big-member/page_ent_follow.html

@@ -32,8 +32,9 @@
             </button>
         </div>
         <div class="j-container" v-else key="list">
-            <div class="j-main" ref="jList">
+            <div id="jList" class="j-main" ref="jList">
                 <div>
+                  <div class="ent-grouping-normal" v-if="!getListScroll">
                     <van-collapse class="ent-grouping" v-model="activeNames">
                       <van-collapse-item title="企业分组" name="1">
                         <div class="grouping-list">
@@ -49,6 +50,24 @@
                         </div>
                       </van-collapse-item>
                     </van-collapse>
+                  </div>
+                  <div class="ent-grouping-fixed" :style="domTopNum" v-else>
+                    <van-collapse class="ent-grouping" v-model="activeNames">
+                      <van-collapse-item title="企业分组" name="1">
+                        <div class="grouping-list">
+                            <div class="grouping-item" :class="{'active': item.active, 'disabled': !item.count && item.isPut >= 0}" v-for="(item, index) in groupingList" :key="index" @click="changeGrouping(item)">
+                                <span class="grouping-item-name">${ item.name }</span>
+                                <span v-if="item.name === '全部'" class="grouping-item-count">${ listInfo.count }</span>
+                                <span v-else class="grouping-item-count">${ item.count }</span>
+                            </div>
+                        </div>
+                        <div class="grouping-footer" @click="groupManage()">
+                          <span class="grouping-item-name">分组管理</span>
+                          <van-icon color="#2ABED1" name="arrow" />
+                        </div>
+                      </van-collapse-item>
+                    </van-collapse>
+                  </div>
                     <van-pull-refresh v-model="listInfo.refreshing" @refresh="onRefresh">
                         <van-list
                             v-model="listInfo.loading"

+ 16 - 4
src/jfw/modules/app/src/web/templates/big-member/page_potential_cor_list.html

@@ -16,6 +16,9 @@
     <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
     <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
     <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="stylesheet" type="text/css" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/mobile-portrayal-footer/css/mobile-portrayal-grouping.css?v={{Msg "seo" "version"}}'/>
+    <!-- <script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/vConsole/3.3.4/vconsole.min.js"></script>
+    <script>new VConsole()</script> -->
     <!--E-当前页面的css资源-->
     <style>
         /* 头部样式,兼容长字 */
@@ -78,14 +81,14 @@
             width: .4rem;
             height: .4rem;
         }
-        /* .cor-item-right .cor-yjk {
+        .cor-item-right .cor-yjk {
           background-size: 100% 100%;
           background-image: url('{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/big-member/image/yjk.png?v={{Msg "seo" "version"}}');
         }
         .cor-item-right .cor-jk {
           background-size: 100% 100%;
           background-image: url('{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/big-member/image/jk.png?v={{Msg "seo" "version"}}');
-        } */
+        }
         .cor-item-l-r {
             margin: 0 .16rem;
             flex: 1;
@@ -238,11 +241,10 @@
                                 </span>
                             </span>
                             <span class="cor-item-right" v-if="pagePower">
-                              <!-- 关注图标改为监控图标可以直接使用 :class="item.follow ? 'cor-yjk' : 'cor-jk'" -->
                                 <span
                                     v-if="pageConf.followShow"
                                     class="j-icon"
-                                    :class="item.follow ? 'icon-favorite' : 'icon-no-favorite'"
+                                    :class="item.follow ? 'cor-yjk' : 'cor-jk'"
                                     @click.stop.prevent="changeFollowState(item)"
                                 ></span>
                                 <span class="more-action tooltip" @click.stop.prevent="showMoreActionPanel" v-if="pageConf.moreActionShow">
@@ -264,6 +266,14 @@
                 </div>
             </div>
         </div>
+        <mobile-portrayal-grouping-script 
+          ref="portrayalGrouping"
+          @confirm="confirmGrouping"
+          @cancel="cancelGrouping"
+          @update="updateGroupList"
+          :show-grouping-dialog="showGroupingDialog"
+          :grouping-list="groupingList"
+        ></mobile-portrayal-grouping-script>
     </div>
 </div>
 
@@ -278,6 +288,8 @@
 <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
 <script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
 {{include "/big-member/commonjs.html"}}
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/mobile-portrayal-footer/js/mobile-portrayal-grouping.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/potential_cor_list.js?v={{Msg "seo" "version"}}'></script>
 
 </body>

+ 170 - 6
src/jfw/modules/app/src/web/templates/followent/list.html

@@ -5,10 +5,31 @@
 <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
 <link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/common.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+<!--S-当前页必定需要预加载的资源-->
+<link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+<link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+<link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+<!--E-当前页必定需要预加载的资源-->
+
+<!--S-当前页面的css资源-->
+<link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+<link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+<link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+<!--E-当前页面的css资源-->
 <link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/followent/css/follow.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js"></script>
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/fastclick.min.js"></script>
 {{include "/common/js.html"}}
+<!--S-必定需要预加载的资源-->
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
+<!--E-必定需要预加载的资源-->
+
+<!--S-当前页面的资源-->
+<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
 <script>
 	var isPageHide = false;
 	window.addEventListener('pageshow', function () {
@@ -23,8 +44,14 @@
 <script type="text/javascript">
 	$(function () {
 		new FastClick(document.body);
-        var followEntLimit = {{.T.followEntLimit}};
-		$.post("/bigmember/follow/ent/list?t="+new Date().getTime(),null,function(r){
+    var followEntLimit = {{.T.followEntLimit}};
+    ajaxListData().then((r) => {
+      $('#grouping-container').show()
+      setDataAction(r)
+      groupDataInfo(r.data);
+    })
+
+    function setDataAction (r) {
       const res = r.data
 			$("#addDiv").click(function(){
 				if(res.list.length >=followEntLimit){
@@ -41,8 +68,8 @@
 			var jyno = 0;
 			var fronthtml = "";
 			var lasthtml = "";
-			var frontarr = new Array(); //30天内
-			var lastarr = new Array();	//30天后
+      var frontarr = new Array(); //30天内
+      var lastarr = new Array();	//30天后
 	        data.sort(function(a,b){return a.l_lastpushtime<b.l_lastpushtime});
 			var easyPopup = new EasyPopup("easypopup");
 
@@ -128,7 +155,7 @@
 				+tdf+"</li>";
 			}
 	       	html = fronthtml + lasthtml;
-			$(".list-container > ul").append(html);
+			$(".list-container > ul").html(html);
 			$(".tip").show();
 			$(".app-layout-content-b").removeClass("hide");
 	        $(".listpage li").click(function(){
@@ -137,7 +164,8 @@
 	            }
 	            window.location.href = "/jyapp/followent/detail/"+$(this).attr("data-id") + '?entId=' + $(this).attr("ent-id");
 	        });
-		});
+      // 获取分组列表
+    }
 
 		$(".jylistbottom").click(function(){
 			easyPopup.show("easypopup");
@@ -172,6 +200,124 @@
 				EasyAlert.show("暂无30天无更新的数据<br>可删除!");
 			}
 		});
+    function ajaxListData (params = {}) {
+      return new Promise(function (resolve, reject) {
+        $.ajax({
+          type: 'post',
+          url: '/bigmember/follow/ent/list?t=' + new Date().getTime(),
+          data: params,
+          success: function (res) {
+            resolve(res)
+          },
+          error: function (err) {
+            reject(err)
+          }
+        })
+      })
+    }
+    function groupDataInfo (listInfo) {
+      var groupNode = new Vue({
+          delimiters: ['${', '}'],
+          el: '#grouping-container',
+          data: {
+            activeNames: [],
+            groupingList: [],
+            selectGroupList: [],
+            listInfo: listInfo
+          },
+          created: function () {
+            this.getEntGroupList()
+          },
+
+          methods: {
+            setCollapseActive(activeNames) {
+              this.activeNames = activeNames
+            },
+
+            // 获取企业分组数据
+            getEntGroupList: function () {
+                var _this = this
+                $.ajax({
+                    type: 'POST',
+                    url: '/bigmember/follow/ent/labelGroupList?t=' + new Date().getTime(),
+                    success: function (res) {
+                        if (res.error_code == 0) {
+                            // 获取企业分组列表
+                            _this.setEntGroupData(res.data?.groupUserArr || [])
+                        }
+                    }
+                })
+            },
+            // 设置企业分组数据
+            setEntGroupData (data) {
+              data.unshift({
+                count: this.listInfo.count,
+                id: "",
+                isPut: -1,
+                name: "全部"
+              })
+
+              data.forEach(item => {
+                item.active = item.name === '全部' ? true : false
+              })
+              this.groupingList = data
+            },
+            groupManage: function () {
+              location.href = '/jy_mobile/entgroup/index'
+            },
+            changeGrouping: function (item) {
+              const isAll = item.name === '全部'
+              if(isAll) {
+                item.count = this.listInfo.count
+              }
+              if (!item.count) return
+              if(item.active) {
+                if(isAll) {
+                  this.selectGroupList = []
+                } else {
+                  item.active = !item.active
+                  this.selectGroupList = this.selectGroupList.filter(s => s.name !== item.name)
+                }
+              } else {
+                if(isAll) {
+                  this.selectGroupList = []
+                  item.active = !item.active
+                  this.groupingList.forEach(s => {
+                    if(s.name !== '全部') {
+                      s.active = false
+                    }
+                  })
+                } else {
+                  this.groupingList.forEach(s => {
+                    if(s.name === '全部') {
+                      s.active = false
+                    }
+                  })
+                  item.active = !item.active
+                  this.selectGroupList.push(item)
+                }
+              }
+              console.log(this.selectGroupList)
+              const lengthBool = this.selectGroupList.length > 0
+              if(!lengthBool) {
+                this.groupingList.forEach(s => {
+                  s.active = false
+                  if(s.name === '全部') {
+                    s.active = true
+                  }
+                })
+              }
+              this.listInfo.pageNum = 0
+              ajaxListData({
+                pageNum: this.listInfo.pageNum,
+                group: lengthBool ? this.selectGroupList.map(s => s.id).join(',') : ''
+              }).then((r) => {
+                setDataAction(r)
+              })
+            },
+          }
+      });
+    }
 	});
 function receivePushMessageHandle(type,url){
 	if(type=="entname"){
@@ -207,6 +353,24 @@ function receivePushMessageHandle(type,url){
                 <div class="pur_btn">立即购买</div>
             </a>
         </div>
+        <div id="grouping-container" style="display: none;">
+          <van-collapse class="ent-grouping" v-if="listInfo.list && listInfo.list.length" v-model="activeNames" @change="setCollapseActive">
+            <van-collapse-item title="企业分组" name="1">
+              <div class="grouping-list">
+                  <div class="grouping-item" :class="{'active': item.active, 'disabled': !item.count && item.isPut >= 0}" v-for="(item, index) in groupingList" :key="index" @click="changeGrouping(item)">
+                      <span class="grouping-item-name">${ item.name }</span>
+                      <span v-if="item.name === '全部'" class="grouping-item-count">${ listInfo.count }</span>
+                      <span v-else class="grouping-item-count">${ item.count }</span>
+                  </div>
+              </div>
+              <div class="grouping-footer" @click="groupManage()">
+                <span class="grouping-item-name">分组管理</span>
+                <van-icon color="#2ABED1" name="arrow" />
+              </div>
+            </van-collapse-item>
+          </van-collapse>
+          <div class="grouping-bot-line"></div>
+        </div>
         <div class="list-container">
             <ul>
             </ul>

+ 4 - 4
src/jfw/modules/followent/src/db.json

@@ -1,14 +1,14 @@
 {
 	"mongodb": {
 		"main": {
-			"address": "192.168.3.206:27080",
+			"address": "192.168.3.149:27180",
 	 		"size": 5,
 	 		"dbName": "qfw"
 		}
 	},
 	"elasticsearch": {
 		"main":{
-			"address": "http://192.168.3.241:9205,http://192.168.3.149:9200",
+			"address": "http://192.168.3.241:9206,http://192.168.3.149:9201",
 	    	"size": 5,
 			"version": "v7",
 			"userName": "",
@@ -17,13 +17,13 @@
     },
     "redis": {
     	"main": {
-			"address": "other=192.168.3.206:1712,push=192.168.3.206:1712,sso=192.168.3.206:1712,session=192.168.3.206:1712,recovery=192.168.3.206:1712,newother=192.168.3.206:1712"
+			"address": "other=192.168.3.149:1712,push=192.168.3.149:1711,sso=192.168.3.149:1713,session=192.168.3.149:1713,recovery=192.168.3.149:1715,newother=192.168.3.206:1712"
 		}
     },
   "mysql": {
     "main": {
       "dbName": "jianyu",
-      "address": "192.168.3.11:3366",
+      "address": "192.168.3.217:4000",
       "userName": "root",
       "passWord": "Topnet123",
       "maxOpenConns": 5,

+ 51 - 2
src/jfw/modules/followent/src/web/staticres/jylab/followent/css/follow.css

@@ -244,9 +244,12 @@
 	margin-left:5px;
 }
 .listpage .jytimest{
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
 	margin:15px 5px 5px;
 	text-align: right;
-    padding-right: 5%;    
+  padding-right: 5%;    
 	color: #a0a0a0;
 	margin-right: -3px;
 }
@@ -426,4 +429,50 @@
 }
 .hidden{
 	display:none;
-}
+}
+
+.ent-grouping .grouping-list {
+  display: flex;
+  flex-wrap: wrap;
+  max-height: 2.04rem;
+  overflow: hidden;
+  overflow-y: auto;
+}
+
+.ent-grouping .grouping-list .grouping-item {
+  margin: 0 .16rem .16rem 0;
+  padding: 0 .24rem;
+  border: 0.5px solid rgba(192, 196, 204, 1);
+  border-radius: .3rem;
+  line-height: .52rem;
+  color: #5F5E64;
+}
+
+.ent-grouping .grouping-list .grouping-item.active {
+  background: #2ABED1;
+  border-color: #2ABED1;
+  color: #fff;
+}
+
+.ent-grouping .grouping-list .grouping-item.disabled {
+  background: #F5F6F7;
+}
+
+.ent-grouping .grouping-footer {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: .24rem;
+  font-size: .28rem;
+  line-height: .4rem;
+  color: #2ABED1;
+}
+
+.ent-grouping .grouping-footer .grouping-item-name {
+  margin-right: .08rem;
+}
+
+.grouping-bot-line {
+  height: .2rem;
+  background: #F5F6F7;
+}

+ 179 - 16
src/jfw/modules/followent/src/web/templates/weixin/list.html

@@ -16,6 +16,27 @@ if(sessionStorage){
 <script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js"></script>
 <link href="/jylab/followent/css/weui.min.css" rel="stylesheet">
 <link href="/jylab/followent/css/common.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+<!--S-当前页必定需要预加载的资源-->
+<link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+<link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+<link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+<!--E-当前页必定需要预加载的资源-->
+
+<!--S-当前页面的css资源-->
+<link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+<link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+<link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+<!--E-当前页面的css资源-->
+<!--S-必定需要预加载的资源-->
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
+<!--E-必定需要预加载的资源-->
+
+<!--S-当前页面的资源-->
+<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
 <link href="/jylab/followent/css/follow.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="/jylab/followent/css/merge-wx.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 {{include "/common/header-assets.html"}}
@@ -40,6 +61,26 @@ if(sessionStorage){
   }
 </style>
 <body class="listpage">
+  <div id="grouping-container" style="display: none;">
+    <van-sticky>
+      <van-collapse v-if="listInfo.list && listInfo.list.length" class="ent-grouping" v-model="activeNames" @change="setCollapseActive">
+        <van-collapse-item title="企业分组" name="1">
+          <div class="grouping-list">
+              <div class="grouping-item" :class="{'active': item.active, 'disabled': !item.count && item.isPut >= 0}" v-for="(item, index) in groupingList" :key="index" @click="changeGrouping(item)">
+                  <span class="grouping-item-name">${ item.name }</span>
+                  <span v-if="item.name === '全部'" class="grouping-item-count">${ listInfo.count }</span>
+                  <span v-else class="grouping-item-count">${ item.count }</span>
+              </div>
+          </div>
+          <div class="grouping-footer" @click="groupManage()">
+            <span class="grouping-item-name">分组管理</span>
+            <van-icon color="#2ABED1" name="arrow" />
+          </div>
+        </van-collapse-item>
+      </van-collapse>
+    </van-sticky>
+    <div class="grouping-bot-line"></div>
+  </div>
 	<ul>
 	</ul>
 	<div class="divbtn"{{if .T.datas}}{{if eq (len .T.datas) 10}} disabled="disabled"{{end}}{{end}}>
@@ -82,9 +123,15 @@ initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avat
         //
       var followEntLimit = {{.T.followEntLimit}};
       var params = {
-        pageSize: 100
+        pageSize: 500
       }
-      $.post("/bigmember/follow/ent/list?t="+new Date().getTime(),params,function(r) {
+      ajaxListData(params).then((r) => {
+        $('#grouping-container').show()
+        setDataAction(r)
+        groupDataInfo(r.data);
+      })
+
+      function setDataAction(r) {
         const res = r.data
         if (r && res && res.followMax) {
             followEntLimit = res.followMax
@@ -192,28 +239,26 @@ initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avat
             +tdf+"</li>";
         }
             html = fronthtml + lasthtml;
-        $(".listpage ul").append(html);
+        $(".listpage ul").html(html);
 
 		$(".tip").show();
-
-        $(".listpage li").click(function(){
+    $(".listpage li").click(function(){
             if(sessionStorage){
                 sessionStorage.version="0";
             }
             $(this).find(".redspot").remove();
             window.location.href = "/jylab/followent/detail/"+$(this).attr("data-id") + '?entId=' + $(this).attr("ent-id");
         });
-
-        var flag = {{.T.flag}};
-        $("#addDiv").click(function(){
-            if(flag){
-                EasyAlert.show("最多可关注<br>"+followEntLimit+"个企业!");
-                return;
-            }
-            window.location.href = "/jylab/followent/addEnt";
-        });
-      })
-
+    var flag = {{.T.flag}};
+    $("#addDiv").click(function(){
+        if(flag){
+            EasyAlert.show("最多可关注<br>"+followEntLimit+"个企业!");
+            return;
+        }
+        window.location.href = "/jylab/followent/addEnt";
+    });
+  }
+        
         $(".jylistbottom").click(function(){
             easyPopup.show("easypopup");
         });
@@ -247,7 +292,125 @@ initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avat
                 EasyAlert.show("暂无30天无更新的数据<br>可删除!");
             }
         });
+        function ajaxListData (params = {}) {
+          return new Promise(function (resolve, reject) {
+            $.ajax({
+              type: 'post',
+              url: '/bigmember/follow/ent/list?t=' + new Date().getTime(),
+              data: params,
+              success: function (res) {
+                resolve(res)
+              },
+              error: function (err) {
+                reject(err)
+              }
+            })
+          })
+        }
+        function groupDataInfo (listInfo) {
+          var groupNode = new Vue({
+            delimiters: ['${', '}'],
+            el: '#grouping-container',
+            data: {
+              activeNames: [],
+              groupingList: [],
+              selectGroupList: [],
+              listInfo: listInfo
+            },
+            created: function () {
+              this.getEntGroupList()
+            },
 
+            methods: {
+              setCollapseActive(activeNames) {
+                this.activeNames = activeNames
+              },
+
+              // 获取企业分组数据
+              getEntGroupList: function () {
+                  var _this = this
+                  $.ajax({
+                      type: 'POST',
+                      url: '/bigmember/follow/ent/labelGroupList?t=' + new Date().getTime(),
+                      success: function (res) {
+                          if (res.error_code == 0) {
+                              // 获取企业分组列表
+                              _this.setEntGroupData(res.data?.groupUserArr || [])
+                          }
+                      }
+                  })
+              },
+              // 设置企业分组数据
+              setEntGroupData (data) {
+                data.unshift({
+                  count: this.listInfo.count,
+                  id: "",
+                  isPut: -1,
+                  name: "全部"
+                })
+
+                data.forEach(item => {
+                  item.active = item.name === '全部' ? true : false
+                })
+                this.groupingList = data
+              },
+              groupManage: function () {
+                location.href = '/jy_mobile/entgroup/index'
+              },
+              changeGrouping: function (item) {
+                const isAll = item.name === '全部'
+                if(isAll) {
+                  item.count = this.listInfo.count
+                }
+                if (!item.count) return
+                if(item.active) {
+                  if(isAll) {
+                    this.selectGroupList = []
+                  } else {
+                    item.active = !item.active
+                    this.selectGroupList = this.selectGroupList.filter(s => s.name !== item.name)
+                  }
+                } else {
+                  if(isAll) {
+                    this.selectGroupList = []
+                    item.active = !item.active
+                    this.groupingList.forEach(s => {
+                      if(s.name !== '全部') {
+                        s.active = false
+                      }
+                    })
+                  } else {
+                    this.groupingList.forEach(s => {
+                      if(s.name === '全部') {
+                        s.active = false
+                      }
+                    })
+                    item.active = !item.active
+                    this.selectGroupList.push(item)
+                  }
+                }
+                console.log(this.selectGroupList)
+                const lengthBool = this.selectGroupList.length > 0
+                if(!lengthBool) {
+                  this.groupingList.forEach(s => {
+                    s.active = false
+                    if(s.name === '全部') {
+                      s.active = true
+                    }
+                  })
+                }
+                this.listInfo.pageNum = 0
+                ajaxListData({
+                  pageSize: 500,
+                  pageNum: this.listInfo.pageNum,
+                  group: lengthBool ? this.selectGroupList.map(s => s.id).join(',') : ''
+                }).then((r) => {
+                  setDataAction(r)
+                })
+              },
+            }
+          });
+      }
     });
 </script>
 	<!-- {{include "/common/baiducc.html"}} -->

+ 1 - 0
src/web/staticres/common-module/mobile-portrayal-footer/css/mobile-portrayal-grouping.css

@@ -75,6 +75,7 @@
 }
 .mobile-portrayal-grouping .add-grouping-dialog .van-cell {
   padding: 0 .32rem .44rem .32rem;
+  height: auto;
 }
 .mobile-portrayal-grouping .add-grouping-dialog .van-cell .van-field__body {
   padding-bottom: .22rem;

+ 7 - 1
src/web/staticres/common-module/mobile-portrayal-footer/js/mobile-portrayal-grouping.js

@@ -5,6 +5,7 @@ var mobilePortrayalGrouping = `
       :title="title"
       show-cancel-button
       confirmButtonText="确定"
+      confirm-button-color="#2ABED1"
       class="grouping-dialog"
       @confirm="confirmGrouping"
       @cancel="cancelGrouping"
@@ -41,7 +42,7 @@ var mobilePortrayalGrouping = `
       >
       </van-field>
       <div class="dialog-footer">
-        <van-button type="default" @click="showAddGroupingDialog = false">
+        <van-button type="default" @click="cancelGroupName">
           取消
         </van-button>
         <van-button
@@ -175,6 +176,11 @@ var mobilePortrayalGroupingScript = {
     },
     cancelGrouping () {
       this.$emit('cancel')
+    },
+    cancelGroupName () {
+      this.groupingName = ''
+      this.errorMessageText = ''
+      this.showAddGroupingDialog = false
     }
   }
 }

+ 2 - 2
src/web/templates/frontRouter/wx/collection/sess/ent_portrait.html

@@ -748,8 +748,8 @@
 <script src='{{Msg "seo" "cdn"}}/common-module/collection/js/visited.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/forward-share/js/forward.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/portrait/js/downloadpopup.js?v={{Msg "seo" "version"}}'></script>
-<script src='{{Msg "seo" "cdn"}}/common-module//mobile-portrayal-footer/js/mobile-portrayal-footer.js?v={{Msg "seo" "version"}}'></script>
-<script src='{{Msg "seo" "cdn"}}/common-module//mobile-portrayal-footer/js/mobile-portrayal-grouping.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/mobile-portrayal-footer/js/mobile-portrayal-footer.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/mobile-portrayal-footer/js/mobile-portrayal-grouping.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/collection/js/ent_portrait.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/keep-tags/keep-tags-template.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/keep-tags/keep-ent-tags-template.js?v={{Msg "seo" "version"}}'></script>