Browse Source

Merge branch 'dev4.5.2' of http://192.168.3.207:8080/qmx/jy into dev4.5.2

xgwangman 4 years ago
parent
commit
deee36bd1c

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

@@ -981,6 +981,7 @@ var vNode = {
                 Object.assign(this.topProject, $data.topProject || {})
                 Object.assign(this.entPortraitInfo, $data.entPortraitInfo || {})
                 Object.assign(this.powerInfo, $data.powerInfo || {})
+                Object.assign(this.entvisit, $data.entvisit || {})
                 this.singleTab = $data.singleTab
                 this.scrollTop = $data.scrollTop
                 this.gotTab2 = $data.gotTab2

+ 4 - 19
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js

@@ -21,8 +21,6 @@ var mine = {
         this.showUserMerge()
         // 获取小红点状态
         this.getRedDotState()
-        // 企业画像访问量查询
-        this.getEntVisits()
     },
     // ios返回刷新问题
     iosBackInvoke: function () {
@@ -86,23 +84,6 @@ var mine = {
             return false
         }
     },
-    // 企业画像访问量查询
-    getEntVisits: function() {
-      let _this = this
-      $.ajax({
-          type: "POST",
-          url: "/bigmember/portrait/subVipPortrait/usage",
-          success: function (res) {
-              console.log(res)
-              if(res.error_code == 0) {
-                  if(res.data) {
-                      $('.ent-follow-history .his_usage').text(res.data.usage)
-                      $('.ent-follow-history .his_total').text('/' + ' ' + res.data.total)
-                  }
-              }
-          }
-      });
-    },
     // 设置用户头像
     setUserImg: function () {
         console.log(pageUserInfo)
@@ -241,6 +222,10 @@ var mine = {
                 if (res && res.data) {
                     if (res.data.memberStatus != null || res.data.memberStatus != undefined) {
                         pageUserInfo.bigMemberStatus = res.data.memberStatus
+                        // 大会员和免费用户不显示企业画像记录菜单
+                        if(res.data.vipStatus > 0 && res.data.viper ) {
+                          $('.ent-follow-history').show()
+                        }
                     }
                     if ($.isArray(res.data.power)) {
                         pageUserInfo.power = res.data.power

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

@@ -195,7 +195,7 @@
                 <template #title>
                     <span :class="{bidinfo:!hasOnePower}">中标信息</span>
                     <span v-if="!hasOnePower || !surplus" class="bid_upgrade">升级</span>
-                    <span v-if="hasOnePower && surplus" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
+                    <span v-if="hasOnePower && surplus && isVip" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
                 </template>
                 <div class="bg-white tab-card" v-if="conf._4 && !getStatus">
                     <div class="card-row zb-info">

+ 1 - 5
src/jfw/modules/app/src/web/templates/me/mine.html

@@ -168,16 +168,12 @@
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
                     </div>
-                    <div data-need-bind-phone class="menu_list ent-follow-history" data-href='/jyapp/frontPage/portraitRecord/sess/index'>
+                    <div style="display: none;" data-need-bind-phone class="menu_list ent-follow-history" data-href='/jyapp/frontPage/portraitRecord/sess/index'>
                         <div class="menu_list_left">
                             <span class="j-icon base-icon icon-company"></span>
                             <span class="label">企业画像记录</span>
                         </div>
                         <div class="menu_list_right">
-                            <span style="margin-right: .08rem;">
-                                <span class="his_usage" style="font-size: .28rem;color: #2ABED1;"></span>
-                                <span class="his_total" style="font-size: .22rem;color: #9B9CA3;"></span>
-                            </span>
                             <i class="dot-red"></i>
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>

+ 29 - 28
src/jfw/modules/publicapply/src/util/util.go

@@ -70,35 +70,36 @@ func CollListSql(c *CollList, isPay bool, userid string) string {
 			sql += `)`
 		}
 	}
-	if isPay {
-		now := time.Now()
-		start, end := "", ""
-		//收藏时间
-		if c.SelectTime == "lately-7" { //最近7天
-			start = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-7, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
-		} else if c.SelectTime == "lately-30" { //最近30天
-			start = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-30, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
-		} else if c.SelectTime == "thisyear" { //去年
-			start = fmt.Sprint(time.Date(now.Year()-1, 1, 1, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
-			end = fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Format(qutil.Date_Full_Layout))
-		} else if len(strings.Split(c.SelectTime, "_")) == 2 {
-			if c.SelectTime != "0_0" {
-				starttime := strings.Split(c.SelectTime, "_")[0]
-				startstamp, _ := strconv.Atoi(starttime)
-				start = time.Unix(int64(startstamp), 0).Format(qutil.Date_Full_Layout)
-				endtime := strings.Split(c.SelectTime, "_")[1]
-				et, _ := strconv.ParseInt(endtime, 0, 64)
-				etTime := time.Unix(et, 0)
-				end = fmt.Sprint(time.Date(etTime.Year(), etTime.Month(), etTime.Day()+1, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
-			}
-		}
-		if start != "" && end != "" {
-			sql += ` and createdate >= '` + start + `' and createdate < '` + end + `'`
-		} else if start != "" && end == "" {
-			sql += ` and createdate >= '` + start + `'`
-		} else if start == "" && end != "" {
-			sql += ` and createdate < '` + end + `'`
+	now := time.Now()
+	start, end := "", ""
+	//收藏时间
+	if c.SelectTime == "lately-7" { //最近7天
+		start = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-7, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
+	} else if c.SelectTime == "lately-30" { //最近30天
+		start = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-30, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
+	} else if c.SelectTime == "thisyear" { //去年
+		start = fmt.Sprint(time.Date(now.Year()-1, 1, 1, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
+		end = fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Format(qutil.Date_Full_Layout))
+	} else if len(strings.Split(c.SelectTime, "_")) == 2 {
+		if c.SelectTime != "0_0" {
+			starttime := strings.Split(c.SelectTime, "_")[0]
+			startstamp, _ := strconv.Atoi(starttime)
+			start = time.Unix(int64(startstamp), 0).Format(qutil.Date_Full_Layout)
+			endtime := strings.Split(c.SelectTime, "_")[1]
+			et, _ := strconv.ParseInt(endtime, 0, 64)
+			etTime := time.Unix(et, 0)
+			end = fmt.Sprint(time.Date(etTime.Year(), etTime.Month(), etTime.Day()+1, 0, 0, 0, 0, time.Local).Format(qutil.Date_Full_Layout))
 		}
+	}
+	if start != "" && end != "" {
+		sql += ` and createdate >= '` + start + `' and createdate < '` + end + `'`
+	} else if start != "" && end == "" {
+		sql += ` and createdate >= '` + start + `'`
+	} else if start == "" && end != "" {
+		sql += ` and createdate < '` + end + `'`
+	}
+	if isPay {
+
 		//采购单位 用,分隔开
 		if c.Buyerclass != "" {
 			i := 0

+ 4 - 3
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -112,9 +112,9 @@ var vNode = {
                 btntext: '去开通'
             },
             entvisit: {
-                total: 150, // 本月画像次数总量
-                usage: 10, // 本月已使用次数
-                provin: -1 // 购买省份数量
+                total: 0, // 本月画像次数总量
+                usage: 0, // 本月已使用次数
+                provin: 0 // 购买省份数量
             }
         }
     },
@@ -974,6 +974,7 @@ var vNode = {
                 Object.assign(this.topProject, $data.topProject || {})
                 Object.assign(this.entPortraitInfo, $data.entPortraitInfo || {})
                 Object.assign(this.powerInfo, $data.powerInfo || {})
+                Object.assign(this.entvisit, $data.entvisit || {})
                 this.singleTab = $data.singleTab
                 this.scrollTop = $data.scrollTop
                 this.gotTab2 = $data.gotTab2

+ 8 - 5
src/web/staticres/css/dev2/biddingSearch.css

@@ -428,7 +428,7 @@ margin-left: 176px;
   width: 15px;
   height: 2px;
   line-height: 15px;
-  background-color: #000;
+  background-color: #E0E0E0;
   padding: 0;
   margin: 12px 6px 0;
 }
@@ -470,9 +470,12 @@ margin-left: 176px;
 #searchInner .searchControl .searchTender .release-time .timerInput {
   margin-top: -9px;
   margin-left: 40px;
-	border: 1px solid #fff;
-/*    background-color: #fff;*/
-    padding: 5px 5px;
+	/* border: 1px solid #fff; */
+  background-color: #F5F6F7;
+  padding: 5px 5px;
+}
+#searchInner .searchControl .searchTender .release-time .timerInput.active{
+  background-color: #2cb7ca;
 }
 
 #searchInner .searchControl .searchTender .release-time .timerInput input[type="text"] {
@@ -490,7 +493,7 @@ margin-left: 176px;
   width: 15px;
   height: 2px;
   line-height: 15px;
-  background-color: #000;
+  background-color: #E0E0E0;
   padding: 0;
   margin: 12px 6px 0;
 }

+ 2 - 2
src/web/staticres/css/dev2/superSearch.css

@@ -8,8 +8,8 @@
 .pricefat{
 	float: left;
 	margin-top: -9px;
-	border: 1px solid #fff;
-    background-color: #fff;
+	/* border: 1px solid #fff; */
+    background-color: #F5F6F7;
 	padding: 5px 5px;
 	border-radius:2px;
 }

+ 19 - 19
src/web/staticres/me/js/mine.js

@@ -22,8 +22,8 @@ var mine = {
 
         this.linkClickEvents()
         this.getOfflineMessageCount()
-        // 企业画像访问量查询
-        this.getEntVisits()
+        // 企业画像记录访问权限
+        this.getBigVipState()
     },
     // ios返回刷新问题
     iosBackInvoke: function () {
@@ -38,23 +38,6 @@ var mine = {
             isPageHide = true
         });
     },
-    // 企业画像访问量查询
-    getEntVisits: function() {
-      let _this = this
-      $.ajax({
-          type: "POST",
-          url: "/bigmember/portrait/subVipPortrait/usage",
-          success: function (res) {
-              console.log(res)
-              if(res.error_code == 0) {
-                  if(res.data) {
-                      $('#ent-follow-history .his_usage').text(res.data.usage)
-                      $('#ent-follow-history .his_total').text('/' + ' ' + res.data.total)
-                  }
-              }
-          }
-      });
-    },
     // 设置用户头像
     setUserImg: function () {
         $('.user-img > img').attr("src", this.pageUserInfo.avatar || this.pageUserInfo.headimageurl)
@@ -100,6 +83,23 @@ var mine = {
             }
         })
     },
+    getBigVipState: function () {
+      var _this = this
+      $.ajax({
+          type: 'GET',
+          url: '/bigmember/use/isAdd?t=' + Date.now(),
+          success: function (res) {
+              if (res && res.data) {
+                  if (res.data.memberStatus != null || res.data.memberStatus != undefined) {
+                      // 大会员和免费用户不显示企业画像记录菜单
+                      if(res.data.vipStatus > 0 && res.data.viper ) {
+                        $('#ent-follow-history').show()
+                      }
+                  }
+              }
+          }
+      })
+    },
     setPageState: function (info) {
         if (!info) return
         Object.assign(this.pageUserInfo, info)

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

@@ -200,7 +200,7 @@
                 <template #title>
                     <span :class="{bidinfo:!hasOnePower}">中标信息</span>
                     <span v-if="!hasOnePower || !surplus" class="bid_upgrade">升级</span>
-                    <span v-if="hasOnePower && surplus" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
+                    <span v-if="hasOnePower && surplus && isVip" class="bid_surplus">剩余:${entvisit.total - entvisit.usage}</span>
                 </template>
                 <div class="bg-white tab-card" v-if="conf._4 && !getStatus">
                     <div class="card-row zb-info">
@@ -228,6 +228,7 @@
                         <span>${entPortraitInfo.timeRangeEnd ? new Date(entPortraitInfo.timeRangeEnd * 1000).pattern('yyyy/MM/dd') : '至今'}</span>
                     </div>
                 </div>
+                <div class="vip_component" v-if="getStatus" style="height:2.12rem;background:url('/common-module/collection/image/bg/vip_bg_0.png') no-repeat;background-size:100% 100%"></div>
                 <div class="j-container empty" v-if="conf._13 && !conf._4 && topProject.list.length === 0">
                     <div class="j-img img-empty empty-img"></div>
                     <p class="empty-text">暂无项目动态</p>

+ 12 - 9
src/web/templates/pc/supsearch.html

@@ -17,7 +17,6 @@
 <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
 <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
 <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
-<script language="javascript" type="text/javascript" src="{{Msg "seo" "cdn"}}/My97DatePicker/WdatePicker.js"></script>
 <link href="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css" rel="stylesheet" />
 <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
 <style type="text/css">
@@ -267,7 +266,7 @@ function isPower () {
 }
 isPower()
 var areas = {{.T.area}}!=null?{{.T.area}}:"";
-var selectPublishtime = {{.T.publishtime}}!=null?{{.T.publishtime}}:"";
+var selectPublishtime = {{.T.publishtime}}?{{.T.publishtime}}:"lately-7";
 var selectTimeslot = {{.T.timeslot}}!=null?{{.T.timeslot}}:"";
 var toptype = {{.T.toptype}}!=null?{{.T.toptype}}:"";
 var subtype = {{.T.subtype}}!=null?{{.T.subtype}}:"";
@@ -437,7 +436,9 @@ $(function(){
 		if(selectPublishtime.indexOf("_") > -1){
 			$(".timerInput").addClass("active");
 		}
-	}
+	} else {
+    $(".timer [data-value='lately-7']").addClass("active").siblings().removeClass('active');
+  }
 	if(selectTimeslot != "" && selectTimeslot.indexOf("_") > -1){
 		$("#starttime").css({"border-color":"#2cb7ca"});
 		$("#endtime").css({"border-color":"#2cb7ca"});
@@ -671,6 +672,7 @@ $(function(){
 </script>
 <script src="/js/biddingSearch.js?v={{Msg "seo" "version"}}"></script>
 <script src="/js/superSearch.js?v={{Msg "seo" "version"}}"></script>
+<script language="javascript" type="text/javascript" src="{{Msg "seo" "cdn"}}/My97DatePicker/WdatePicker.js"></script>
 <style>
   .control-tabBtn{
     margin-top: 0;
@@ -880,18 +882,19 @@ $(function(){
 				</div>
 				<div class="fl timer">
 					<ul>
-						<li id="timerAll" class="active" data-value="">全部</li>
-						<li data-value="lately-7">最近天</li>
+						<li id="timerAll" class="active" data-value="" style="display: none;">全部</li>
+						<li data-value="lately-7">最近7天</li>
 						<li data-value="lately-30">最近30天</li>
-						<li data-value="thisyear">年</li>
+						<li data-value="thisyear">最近一年</li>
 					</ul>
 				</div>
 				<div class="timerInput fl">
-					<input type="text"  onClick="WdatePicker({onclearing:function(){onclearing(this)},onpicked:function(dp){picked(dp,this)},onpicking:function(dp){onpicking(dp,this)},dateFmt:'yyyy年MM月dd日',maxDate:'#F{$dp.$D(\'endtime\')}'})" id="starttime" readonly="true" placeholder="" />
+					<input type="text"  onClick="if(!vipState) return openVipDialog();WdatePicker({onclearing:function(){onclearing(this)},onpicked:function(dp){picked(dp,this)},onpicking:function(dp){onpicking(dp,this)},dateFmt:'yyyy年MM月dd日',maxDate:'#F{$dp.$D(\'endtime\')}'})" id="starttime" readonly="true" placeholder="" />
 					<span></span>
-					<input type="text" name="maxtime"  onClick="WdatePicker({onclearing:function(){onclearing(this)},onpicked:function(dp){picked(dp,this)},onpicking:function(dp){onpicking(dp,this)},dateFmt:'yyyy年MM月dd日',minDate:'#F{$dp.$D(\'starttime\')}'})" id="endtime" readonly="true" placeholder="" />
+          <input type="text" name="maxtime"  onClick="if(!vipState) return openVipDialog();WdatePicker({onclearing:function(){onclearing(this)},onpicked:function(dp){picked(dp,this)},onpicking:function(dp){onpicking(dp,this)},dateFmt:'yyyy年MM月dd日',minDate:'#F{$dp.$D(\'starttime\')}'})" id="endtime" readonly="true" placeholder="" />
 					<button class="fl" id="timebut" style="display:none;">确定</button>
-				</div>
+        </div>
+        <img src="/images/biddingSearch/VIP.png" alt="" style="width:38px;height:18px;margin-left:8px;margin-top:-8px">
 			</div>
 			<!--项目地区-->
 			<div class="region clearfix">

+ 1 - 5
src/web/templates/weixin/my.html

@@ -144,16 +144,12 @@
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
                     </div>
-                    <div class="menu-list-item clickable" id="ent-follow-history" data-href="/weixin/frontPage/portraitRecord/sess/index">
+                    <div style="display: none;" class="menu-list-item clickable" id="ent-follow-history" data-href="/weixin/frontPage/portraitRecord/sess/index">
                         <div class="m-l-i-left">
                             <span class="j-icon base-icon icon-company"></span>
                             <span class="m-l-i-label">企业画像记录</span>
                         </div>
                         <div class="m-l-i-right">
-                            <span style="margin-right: .08rem;">
-                                <span class="his_usage" style="font-size: .28rem;color: #2ABED1;"></span>
-                                <span class="his_total" style="font-size: .22rem;color: #9B9CA3;"></span>
-                            </span>
                             <i class="dot-red"></i>
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>