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

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

yangfeng 3 жил өмнө
parent
commit
5b21dbff46

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

@@ -479,6 +479,7 @@
                     url:'/entnicheNew/customer/list',
                     data:{
                         searchCode: _this.inputVal,
+                        isCliam: 999
                     },
                     success:function(res) {
                         if (res.error_code == 0){

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

@@ -201,7 +201,7 @@
 					return
 				}
 				var phone = $.trim($("#tel").val());
-				if((!Verification.isPhone(phone))||(!CreatePhone.isPhone(phone))){
+				if((!Verification.isPhone(phone))&&(!CreatePhone.isPhone(phone))){
 					EasyAlert.show("手机号格式错误");
 					return
 				}

+ 9 - 5
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -824,7 +824,7 @@ console.log('Hello world');
               if(vm.entinfo.admin_department || vm.entinfo.admin_system) {
                 location.href = '/page_entniche_new/page/sub_management/sub_management_system.html'
               } else {
-                location.href = '/page_entniche/page/subsetting/sub_entrance.html'
+                location.href = '/page_entniche_new/page/subsetting/sub_entrance.html'
               }
               return
             }
@@ -879,8 +879,10 @@ console.log('Hello world');
         if (!r.haskey) {
             if(historyVt == 'm' && vm.rootInfo.isSubCount) {
                 $(".set_keyword").hide();
+            } else if(historyVt == 's'){
+                $(".set_keyword").hide();
             } else {
-                $(".set_keyword").show();
+              $(".set_keyword").show();
             }
               if (r.isPassCount && (localStorage.isPassCount == null || localStorage.isPassCount != date.split("-")[2])) {
                 localStorage.isPassCount = date.split("-")[2]
@@ -1782,8 +1784,10 @@ function hasNoData() {
               if(!data.haskey) {
                 if(historyVt == 'm' && vm.rootInfo.isSubCount) {
                     $(".set_keyword").hide();
+                } else if(historyVt == 's') {
+                    $(".set_keyword").hide();
                 } else {
-                    $(".set_keyword").show();
+                  $(".set_keyword").show();
                 }
               } else {
                 $(".set_keyword").hide();
@@ -1857,7 +1861,7 @@ function hasNoData() {
         if(switchProduct == 'bigmember') {
             window.location.href = '/jyapp/vipsubscribe/toSetKeyWordPage?vSwitch=m';
         } else if(switchProduct == 'entniche') {
-          window.location.href = '/page_entniche/page/subsetting/keyWord.html'
+          window.location.href = '/page_entniche_new/page/subsetting/keyWord.html'
         } else {
             if (isInTSguide) {
                 window.location.href = '/jyapp/wxkeyset/keyset/index';
@@ -1905,7 +1909,7 @@ function hasNoData() {
   //我的企业列表
   function toEntNichePage() {
       setSessionStorage();
-      window.location.href = "/page_entniche/home";
+      window.location.href = "/page_entniche_new/home";
   }
 
   //vip设置

+ 21 - 15
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -1744,7 +1744,26 @@
                     // if (res.data.memberStatus <= 0 || res.data.power.indexOf(3) == -1) {
                     //     window.isNoMember = true
                     // }
+                    function goMemberFollowPage (url) {
+                        var objId = {
+                            fid:'',
+                            sid:''
+                        }
+                        if (followId != "" && jumpFlag){
+                            objId.fid = followId
+                            objId.sid = id
+                            sessionStorage.setItem('bigvip-fid',JSON.stringify(objId))
+                        }else{
+                            objId.fid = ''
+                            objId.sid = id
+                            sessionStorage.setItem('bigvip-fid',JSON.stringify(objId))
+                        }
+                        location.href = url
+                    }
                     if(res.data.memberStatus <= 0 || hasServiceArr.indexOf(14) == -1){
+                        if (newEntNiche) {
+                            return goMemberFollowPage('/jyapp/big/page/client_follow_detail')
+                        }
                         if (hsn){
                             if (projectname != "" || projectcode != "" ){
                                 if(sessionStorage){
@@ -1759,20 +1778,7 @@
                             }
                         }
                     }else{
-                        var objId = {
-                            fid:'',
-                            sid:''
-                        }
-                        if (followId != "" && jumpFlag){
-                            objId.fid = followId
-                            objId.sid = id
-                            sessionStorage.setItem('bigvip-fid',JSON.stringify(objId))
-                        }else{
-                            objId.fid = ''
-                            objId.sid = id
-                            sessionStorage.setItem('bigvip-fid',JSON.stringify(objId))
-                        }
-                        location.href = '/jyapp/big/page/pro_follow_detail'
+                        goMemberFollowPage('/jyapp/big/page/pro_follow_detail')
                     }
                 }
             })
@@ -2039,7 +2045,7 @@
               }
             */
             //  大会员用户、非大会员用户都可跳转采购单位画像
-            if(window.entniche) { return }
+            if(newEntNiche) { return }
             location.href = "/jyapp/big/page/unit_portrayal?entName="+encodeURIComponent(rerbuyer)
         }
 

+ 12 - 14
src/jfw/modules/common/src/qfw/util/jy/switchService.go

@@ -53,28 +53,26 @@ func (s *switchService) Get(session *httpsession.Session, m MongodbSim) string {
 
 func (s *switchService) GetEntniche(session *httpsession.Session, m MongodbSim, sql *mysql.Mysql) string {
 	userId, _ := session.Get("userId").(string)
-	entUserId := util.IntAll(session.Get("entUserId"))
 	v, _ := session.Get(s.SessionKey).(string)
-	u, ok := m.FindById("user", userId, `{"i_member_status":1,"i_vip_status":1}`)
+	u, ok := m.FindById("user", userId, `{"i_member_status":1,"i_vip_status":1,"s_phone":1,"s_m_phone":1}`)
 	entniche := false
-	fmt.Println("2222",entUserId)
-	if entUserId != 0 {
-		res := sql.SelectBySql(`SELECT i.isNew,i.name,i.phone,i.status,i.auth_status,u.power FROM entniche_user u LEFT JOIN entniche_info i
-			ON u.ent_id=i.id
-			ORDER BY  i.status DESC,i.auth_status DESC, CASE WHEN u.id=? THEN 0  ELSE 1 END  ASC`, entUserId)
-		if res != nil && len(*res) > 0 {
-			//已购买企业未过期-商机管理用户
-			for _, v := range *res {
-				if util.IntAll(v["status"]) == 1 && util.IntAll(v["power"]) == 1 && util.IntAll(v["isNew"]) == 1 {
-					//d["isFree"] = false
-					//d["entniche"] = true
+	phone:=""
+	if s_phone, _ := (*u)["s_phone"].(string); s_phone != "" {
+		phone = s_phone
+	} else if s_m_phone, _ := (*u)["s_m_phone"].(string); s_m_phone != "" {
+		phone = s_m_phone
+	}
+	if phone != "" {
+		//已购买企业未过期
+		if entInfo := sql.SelectBySql(`SELECT status,isNew FROM entniche_info WHERE id  IN (SELECT ent_id FROM entniche_user where phone = ? and power =1)`, phone); len((*entInfo)) > 0 {
+			for _, v := range (*entInfo) {
+				if util.IntAll(v["status"]) == 1 && util.IntAll(v["isNew"]) == 1{
 					entniche = true
 					break
 				}
 			}
 		}
 	}
-	fmt.Println("22223",entniche)
 	if ok && u != nil {
 		if i_vip_status := util.IntAll((*u)["i_vip_status"]); v == s.Vip && i_vip_status > 0 {
 			return s.Vip