Browse Source

Merge branch 'dev4.0' of http://192.168.3.207:10080/qmx/jy into dev4.0

wangshan 4 years ago
parent
commit
cd15672549

+ 0 - 1
src/config.json

@@ -279,7 +279,6 @@
     "PCS_time":24,
     "detail_element":["table","div"],
 	"termValidity":3600,
-    "entnichePcUser": [442,1686,1685,1711],
     "uploadPath": "./web/staticres/upload/res/",
     "redisSessionLockSize":20,
     "accountMergeOnline":"2010-03-30 00:00:00",

+ 4 - 0
src/entnichePc.json

@@ -0,0 +1,4 @@
+{
+	"entnichePcUser": [442,1686,1685,1711],
+	"hideEntnicheMenu": [1711,442]
+}

+ 10 - 0
src/jfw/config/config.go

@@ -17,6 +17,13 @@ var Wxoauth, Wxoauthinfo string
 
 var GmailAuth []*mail.GmailAuth
 
+type entnichePcConf struct {
+	EntnichePcUser   []int `json:"entnichePcUser"`
+	HideEntnicheMenu []int `json:"hideEntnicheMenu"`
+}
+
+var EntnichePcConf *entnichePcConf
+
 func init() {
 	util.ReadConfig(&Sysconfig)
 	WeixinConfig, _ = Sysconfig["wxJianyu"].(map[string]interface{})
@@ -35,4 +42,7 @@ func init() {
 		}
 		GmailAuth = append(GmailAuth, mail)
 	}
+
+	//PC端商机管理配置
+	util.ReadConfig("./entnichePc.json", &EntnichePcConf)
 }

+ 23 - 12
src/jfw/front/dataExport.go

@@ -918,16 +918,24 @@ func (this *DataExport) GetPcEntAuth() {
 	myEntMenu := false
 	entnicheMenu := false
 	pcUsers := map[int]bool{}
-	for _, v := range config.Sysconfig["entnichePcUser"].([]interface{}) {
-		pcUsers[util.IntAll(v)] = true
+	hideUsers := map[int]bool{}
+	for _, v := range config.EntnichePcConf.EntnichePcUser {
+		pcUsers[v] = true
+	}
+	for _, v := range config.EntnichePcConf.HideEntnicheMenu {
+		hideUsers[v] = true
 	}
 	if phone != "" {
 		ent := public.Mysql.SelectBySql("select id,phone from entniche_info where phone=? and status=1", phone)
-		if len(*ent) != 0 {
+		if ent != nil && len(*ent) != 0 {
 			for _, val := range *ent {
-				if pcUsers[util.IntAll((val)["id"])] {
-					entnicheMenu = true
+				if pcUsers[util.IntAll(val["id"])] {
 					myEntMenu = true
+					if hideUsers[util.IntAll(val["id"])] {
+						entnicheMenu = false
+					} else {
+						entnicheMenu = true
+					}
 					break
 				}
 			}
@@ -937,19 +945,22 @@ func (this *DataExport) GetPcEntAuth() {
 			if user != nil && len(*user) > 0 {
 				for _, v := range *user {
 					if pcUsers[util.IntAll(v["ent_id"])] {
-						ents := public.Mysql.SelectBySql("select status from entniche_info where id=?", util.IntAll(v["ent_id"]))
-						if len(*ents) != 0 {
+						ents := public.Mysql.SelectBySql("select status,id from entniche_info where id=?", util.IntAll(v["ent_id"]))
+						if ents != nil && len(*ents) != 0 {
 							for _, vv := range *ents {
 								if util.IntAll(vv["status"]) == 1 {
 									myEntMenu = true
-									break
+								}
+								if util.IntAll(v["power"]) == 1 {
+									if hideUsers[util.IntAll(vv["id"])] {
+										entnicheMenu = false
+									} else {
+										entnicheMenu = true
+									}
 								}
 							}
 						}
-						if util.IntAll(v["power"]) == 1 {
-							entnicheMenu = true
-							break
-						}
+						break
 					}
 				}
 			}

+ 1 - 1
src/jfw/modules/bigmember/src/entity/portrait.go

@@ -122,7 +122,7 @@ func (this *Portrait) GetContactsMsg(entId string, pageNum, pageSize int, count
 	if entId == "" {
 		return nil, 0, errors.New("企业名称异常")
 	}
-	start, limit := pageNum*pageSize, pageSize
+	start, limit := (pageNum-1)*pageSize, pageSize
 	if start > PortraitNewMegsLimit || start+limit > PortraitNewMegsLimit {
 		return nil, 0, errors.New("超出检索限制")
 	}

+ 2 - 2
src/jfw/modules/bigmember/src/service/follow/enterprise.go

@@ -108,8 +108,8 @@ func (this *FollowEnt) PcSimpleFollowList() {
 		if err != nil {
 			return nil, err
 		}
-		pSize, _ := this.GetInteger("pageSize") //每页数据量
-		if pSize > 10 {
+		pSize, _ := this.GetInteger("size") //每页数据量
+		if pSize <= 0 || pSize > 10 {
 			pSize = 10
 		}
 		entList, err := followEntManager.GetEntFollowAndChangeList(pSize)

+ 11 - 2
src/jfw/modules/bigmember/src/service/portrait/portraitActionNew.go

@@ -22,6 +22,9 @@ func (this *EntPortrait) WinnerContacts() {
 		if pageSize == 0 {
 			pageSize = 5
 		}
+		if pageNum == 0 {
+			pageNum = 1
+		}
 		rData, total, err := cepm.GetContactsMsg(entId, pageNum, pageSize, count)
 		if err != nil {
 			return nil, err
@@ -53,7 +56,10 @@ func (this *EntPortrait) WinnerNewMsg() {
 		if limit == 0 {
 			limit = 3
 		}
-		start := pageNum * limit
+		var start = 0
+		if pageNum > 0 {
+			start = (pageNum - 1) * limit
+		}
 
 		if pageSign := this.GetString("pageSign"); pageSign != "" { //more:4-23条;max:24-50条(移动端)
 			if pageSign == "more" {
@@ -121,7 +127,10 @@ func (this *EntPortrait) BuyerNewMsg() {
 		if limit == 0 {
 			limit = 3
 		}
-		start := pageNum * limit
+		var start = 0
+		if pageNum > 0 {
+			start = (pageNum - 1) * limit
+		}
 
 		if pageSign := this.GetString("pageSign"); pageSign != "" { //more:4-23条;max:24-50条(移动端)
 			if pageSign == "more" {

+ 9 - 10
src/jfw/modules/subscribepay/src/service/ad.go

@@ -7,7 +7,7 @@ import (
 	"github.com/go-xweb/xweb"
 	"log"
 	"qfw/util/redis"
-	"strconv"
+	"strings"
 	"time"
 	"util"
 )
@@ -74,23 +74,22 @@ func adHandle(data []interface{}) []adInfo {
 			return res
 		}
 		json.Unmarshal(bytes, &adInfo_Arr)
-		log.Println(adInfo_Arr)
 		if len(adInfo_Arr) > 0 {
 			now := time.Now()
 			for _, v := range adInfo_Arr {
-				if v.O_extend.StartTime != "" {
-					if thisTime, err := strconv.ParseInt(v.O_extend.StartTime, 10, 64); err == nil {
+				if v.O_extend.StartTime != "" && len(strings.Split(v.O_extend.StartTime, "-")) == 6 {
+					if thisTime, err := time.ParseInLocation("2006-01-02-15-04-05", v.O_extend.StartTime, time.Local); err == nil {
 						//广告还未开始
-						if thisTime > now.Unix() {
-							break
+						if thisTime.Unix() > now.Unix() {
+							continue
 						}
 					}
 				}
-				if v.O_extend.EndTime != "" {
-					if thisTime, err := strconv.ParseInt(v.O_extend.EndTime, 10, 64); err == nil {
+				if v.O_extend.EndTime != "" && len(strings.Split(v.O_extend.EndTime, "-")) == 6 {
+					if thisTime, err := time.ParseInLocation("2006-01-02-15-04-05", v.O_extend.EndTime, time.Local); err == nil {
 						//广告已经结束
-						if thisTime < now.Unix() {
-							break
+						if thisTime.Unix() < now.Unix() {
+							continue
 						}
 					}
 				}

+ 17 - 0
src/web/staticres/js/login.js

@@ -328,6 +328,7 @@ function checkMenuForEnt () {
 //查询用户信息,响应页面登录信息
 var logic = function(data,num){
 	if(data.result=="ok"){
+	  clearLoginStorage(/-login-clear/)
 		//$(".QRLogin").hide();
 		$("#bidLogin").modal("hide")
 		$("#bidcommunity").modal("hide")
@@ -555,6 +556,21 @@ var processpage = function(shareid,num){
 	}
 }
 
+function clearObjKeyForRegFn (obj, reg) {
+  if (obj) {
+    for(var k in obj) {
+      if (reg.test(k)) {
+        obj.removeItem(k)
+      }
+    }
+  }
+}
+
+function clearLoginStorage (reg) {
+  clearObjKeyForRegFn(sessionStorage, reg)
+  clearObjKeyForRegFn(localStorage, reg)
+}
+
 
 //退出登录
 var signout = function(){
@@ -570,6 +586,7 @@ var signout = function(){
 	$(".superSearch").show();
 	$.post("/front/signOut",function(data){
 		if(data=="ok"){
+		  clearLoginStorage(/-login-clear/)
 			try{
 				$.cookie("userid_secure","",{expires:-1,path:"/",domain:document.domain.replace(/[^.]+/,"")});
 			}catch(e){

+ 10 - 8
src/web/templates/big-member/pc/page_index.html

@@ -125,7 +125,7 @@
             </div>
         </div>
     </div>
-    <div class="w-box">
+    <div class="w-box" id="zb">
         <div>
             <div class="title-box--new" style="margin: 96px 0 64px 0;">帮你抢先获取销售机会</div>
             <div class="tab-nav-box--header w1200">
@@ -236,7 +236,7 @@
             </div>
         </div>
     </div>
-    <div class="w-box">
+    <div class="w-box" id="jc">
         <div class="bg-img" style="padding: 98px 0 84px 0;">
             <div class="title-box--new">辅助你做投标决策</div>
             <div class="tab-nav-box--header w1200" style="width: 800px;min-width: 800px;">
@@ -345,7 +345,7 @@
                 </div>
         </div>
     </div>
-    <div class="w-box">
+    <div class="w-box" id="fx">
         <div class="" style="padding-top: 98px">
             <div class="title-box--new">帮助你分析洞察市场</div>
             <div class="tab-nav-box--header w1200">
@@ -553,7 +553,7 @@
             </div>
         </div>
     </div>
-    <div class="w-box">
+    <div class="w-box" id="qz">
         <div class="bg-img2" style="padding: 98px 0 84px 0;">
             <div class="title-box--new">帮助厂商拓展客户和代理渠道</div>
             <div class="tab-nav-box--header w1200" style="width: 800px;min-width: 800px;">
@@ -920,13 +920,15 @@
         memberTrial: {{.T.member_trial}} || false
     }
     // 修改底部横幅广告
-    if (pageUserInfo.memberTrial || pageUserInfo.memberStatus > 0) {
-        $('.footer-banner').hide()
+    if (pageUserInfo.memberTrial) {
         $(".footer-banner .w1200 img").attr('src', '/big-member/image/new_index/banner-buy.png')
         $(".footer-banner .w1200 map area[data-free-week]").remove()
 
-        $("*[data-go-buy]").text('立即使用')
-        $('.click-button-box.free').hide()
+    }
+    if (pageUserInfo.memberStatus > 0) {
+      $('.footer-banner').hide()
+      $("*[data-go-buy]").text('立即使用')
+      $('.click-button-box.free').hide()
     }
     var canBindPhone = false
     // 此时无法获取绑定状态和登陆状态,只能同步请求已保证跳转判断正常运行

+ 1 - 1
src/web/templates/frontRouter/pc/entpc/sess/index.html

@@ -34,7 +34,7 @@
     <script type="systemjs-importmap" crossorigin="anonymous">
       {
         "imports": {
-          "entpc": "/page_entpc/js/app.js",
+          "entpc": "/page_entpc/js/app.js?v={{Msg "seo" "version"}}",
           "single-spa": "https://cdn.jsdelivr.net/npm/single-spa@4.3.7/lib/system/single-spa.min.js",
           "vue": "https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js",
           "vue-router": "https://cdn.jsdelivr.net/npm/vue-router@3.0.7/dist/vue-router.min.js"

+ 1 - 0
src/web/templates/pc/biddetail_rec.html

@@ -235,6 +235,7 @@ a{
 	background-position: 99% center;
 	color: #2CB7CA;
 	cursor: pointer;
+	padding-right: 23px;
 }
 .portrait_img:hover + .portrait_tip {
 	display: block !important;