wangchuanjin %!s(int64=9) %!d(string=hai) anos
pai
achega
368a75cda4

+ 17 - 4
core/src/qfw/front/index.go

@@ -24,6 +24,7 @@ import (
 type Index struct {
 	*xweb.Action
 	loadIndex     xweb.Mapper `xweb:"/"`                    //访问首页
+	pcIndex       xweb.Mapper `xweb:"/pcIndex"`             //访问电脑版首页
 	loadIndex1    xweb.Mapper `xweb:"/aa/(\\w+)"`           //访问首页
 	getWebSiteTop xweb.Mapper `xweb:"/front/getWebSiteTop"` //获取网站顶部内容
 	advertAjaxRqe xweb.Mapper `xweb:"/front/advertAjaxRqe"` //首页ajax请求
@@ -38,6 +39,12 @@ func (i *Index) LoadIndex1(id string) error {
 
 //加载首页
 func (i *Index) LoadIndex() error {
+	return loadIndex(true, i.Action)
+}
+func (i *Index) PcIndex() error {
+	return loadIndex(false, i.Action)
+}
+func loadIndex(flag bool, i *xweb.Action) error {
 	id := i.GetString("id")
 	if id != "" && len(id) == 10 {
 		c := i.GetString("c")
@@ -54,12 +61,14 @@ func (i *Index) LoadIndex() error {
 		if v, e := base64.StdEncoding.DecodeString(userInfo.Value); e == nil && json.Unmarshal(v, &ui) == nil {
 			r := *FindById("user", ui["loginId"], nil)
 			if r[ui["loginType"]] != nil {
-				UpdateCookieSession(i.Action, ui["loginType"], false, r)
+				UpdateCookieSession(i, ui["loginType"], false, r)
 			}
 		}
 	}
 
-	if ret := redis.Get("other", "/"); ret != nil {
+	if ret := redis.Get("other", "/"); ret != nil && flag {
+		return i.SetBody([]byte(ret.(string)))
+	} else if ret := redis.Get("other", "/pcIndex"); ret != nil && !flag {
 		return i.SetBody([]byte(ret.(string)))
 	} else {
 		i.T["serviceClassify"] = coreconfig.ServiceClassify
@@ -104,8 +113,12 @@ func (i *Index) LoadIndex() error {
 			}
 		}
 		//
-		content, _ := i.Render4Cache("/index.html", &xweb.T{"data": data, "pagination": pagination, "zkdata": zkdata, "entdata": entdata, "sfdata": sfdata})
-		redis.Put("other", "/", string(content), 60*60*2) //设置首页缓存
+		content, _ := i.Render4Cache("/index.html", &xweb.T{"data": data, "pagination": pagination, "zkdata": zkdata, "entdata": entdata, "sfdata": sfdata, "flag": flag})
+		if flag {
+			redis.Put("other", "/", string(content), 60*60*2) //设置首页缓存
+		} else {
+			redis.Put("other", "/pcIndex", string(content), 60*60*2) //设置首页缓存
+		}
 		return i.SetBody(content)
 	}
 }

+ 1 - 1
core/src/qfw/member/yellowpage.go

@@ -637,7 +637,7 @@ func (yp *Yellowpage) Follow() error {
 	} else {
 		userInfo := yp.GetSession("userInfo").(*map[string]interface{})
 		s_m_openId := (*userInfo)["s_m_openid"]
-		if mongodb.Count("follow-enterprise", `{"s_userid":"`+userId+`","s_entid":"`+entId+`"}`) >= 10 {
+		if mongodb.Count("follow-enterprise", `{"s_userid":"`+userId+`"}`) >= 10 {
 			status = "m"
 		} else {
 			if len(mongodb.Save("follow-enterprise", bson.M{

+ 12 - 0
core/src/web/staticres/css/dev-qfw.css

@@ -2940,4 +2940,16 @@ style="color:#D03102;margin-right:5px;"
     margin-top: 5px;
     z-index: 1003;
 	font-size: 16px;
+}
+/**********提示框***********/
+.tipAssembly{
+	position: fixed;
+	background-color: rgba(128,128,128,0.6);
+	top: 50%;
+	left: 50%;
+	color: #fff;
+	z-index: 999;
+	border-radius: 5px;
+	text-align: center;
+	padding: 20px 25px;
 }

+ 40 - 1
core/src/web/staticres/css/entcommunity.css

@@ -40,7 +40,7 @@ a:focus, a:hover{
 	right: 0px;
 	line-height: 27px;
 	margin-top: -14.5px;
-	color: green;
+	color: #56C4B0;
 	cursor: pointer;
 }
 .ent-follow span{
@@ -1114,4 +1114,43 @@ a:focus, a:hover{
 	position: absolute;
 	right: 0px;
 	top: 0px;
+}
+.entlist-page .flowmaxnumbg{
+	position: fixed;
+	left: 0px;
+	right: 0px;
+	top: 0px;
+	bottom: 0px;
+	background-color: rgba(0,0,0,0.5);
+	display: none;
+	z-index: 998;
+}
+.entlist-page .flowmaxnum{
+	position: absolute;
+	width: 250px;
+	display: none;
+	z-index: 999;
+}
+.entlist-page .flowmaxnum>div{
+	padding: 15px 14px;
+	margin-top: 10px;
+	background-color: rgb(255,255,255);
+}
+.entlist-page .flowmaxnum>div>div{
+	margin-top: 10px;
+	color: #a0a0a0;
+}
+.entlist-page .flowmaxnum a{
+	margin-top: 15px;
+	color: #a0a0a0;
+}
+.entlist-page .flowmaxnum .triangle-up{
+    width: 0;
+    height: 0;
+    border-left: 12px solid transparent;
+    border-right: 3px solid transparent;
+    border-bottom: 10px solid rgb(255, 255, 255);
+    display: block;
+	position: absolute;
+	right: 20px;
 }

+ 8 - 0
core/src/web/staticres/css/qfw.css

@@ -1025,6 +1025,14 @@ span.highlight {
 	content: "\AE";
 }
 
+.weiguanzhu:before{
+	content: "\B0";
+}
+
+.yiguanzhu:before{
+	content: "\AF";
+}
+
 .icon-small {
 	font-size: 12px;
 }

BIN=BIN
core/src/web/staticres/fonts.zip


BIN=BIN
core/src/web/staticres/fonts/qimingxing.eot


BIN=BIN
core/src/web/staticres/fonts/qimingxing.svg


BIN=BIN
core/src/web/staticres/fonts/qimingxing.ttf


BIN=BIN
core/src/web/staticres/fonts/qimingxing.woff


+ 23 - 0
core/src/web/staticres/js/qfw.js

@@ -692,4 +692,27 @@ function getChineseLoc(code,obj,name){
 		}
 		return name;
 	}
+}
+var TipAssembly = {
+	timeout: null,
+	show: function(text,css){
+		if(this.timeout != null){
+			clearTimeout(this.timeout);
+			this.hide();
+			this.timeout = null;
+		}
+		var thisClass = this;
+		this.timeout = setTimeout(function(){
+			thisClass.hide();
+			thisClass.timeout = null;
+		},3000);
+		$("body").append('<div class="tipAssembly" id="tipAssembly">'+text+'</div>');
+		if(typeof(css) != "undefined"){
+			$("#tipAssembly").css(css);
+		}
+		$("#tipAssembly").css({"margin-top":-($("#tipAssembly").height()/2),"margin-left":-($("#tipAssembly").width()/2)});
+	},
+	hide: function(){
+		$("#tipAssembly").remove();
+	}
 }

+ 0 - 1
core/src/web/templates/common/inc.html

@@ -1,6 +1,5 @@
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
-<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 <meta name="renderer" content="webkit">
 <link href="{{Msg "seo" "cdn"}}/css/bootstrap.min.css" rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/css/bootswatch.min.css" rel="stylesheet">

+ 4 - 3
core/src/web/templates/index.html

@@ -7,15 +7,16 @@
 <meta name="Description" content="{{Msg "seo" "qfw.homepage.description"}}"/>
 <link href="{{Msg "seo" "cdn"}}/css/index-new.css" rel="stylesheet">
 <script src="{{Msg "seo" "cdn"}}/js/jquery.lazyload.min.js"></script>
-
+{{if .T.flag}}
 <script type="text/javascript">
 $(function(){
-	var wid = document.body.clientWidth;
+	var wid = window.screen.width;
 	if (wid < 760){
-		window.location.href = "/front/webindexcontent/56f24224af53745027000078.html";
+		window.location.href = "/front/webindexcontent/56efb9ba61fd0010d0000001.html";
 	} 
 });
 </script>
+{{end}}
 </head>
 <body>
 {{include "/common/indexhead.html"}}

+ 2 - 2
core/src/web/templates/manage/webmobindex.html

@@ -1,6 +1,7 @@
 <html>
 <head>
 <title>企明星_移动端首页</title>
+<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 {{include "/common/inc.html"}}
 <script src="{{Msg "seo" "cdn"}}/js/validform-min.js"></script>
 <style type="text/css">
@@ -47,7 +48,6 @@ body{
 	width:50%;
 	padding-right:80px;
 	margin-top: 10px;
-	color: #999999;
 }
 #banquan{
 	border-top:1px solid #E5E6E9; 
@@ -146,7 +146,7 @@ $(function (){
 	});
 	$("#diann").click(function(){
 		//跳转到电脑版
-		
+		window.location.href = "/pcIndex"
 	});
 	$('#loginModal').on('shown.bs.modal', function () {
 		$("#username").focus();

+ 39 - 14
core/src/web/templates/search/enterpriseList.html

@@ -126,7 +126,7 @@
 								</div>
 							</div>
 							<div class="ent-follow{{if $v.followFlag}} ent-followed{{end}}">
-								<span class="bootstrap-glyphicon {{if $v.followFlag}}glyphicon-heart{{else}}glyphicon-heart-empty{{end}}"></span>关注
+								<span class="glyphicon {{if $v.followFlag}}yiguanzhu{{else}}weiguanzhu{{end}}"></span>关注
 							</div>
 						</div>
 					</div>
@@ -205,6 +205,14 @@
 	<!--右边显示区结束-->
 </div>
 {{include "/common/bottom.html"}}
+<div class="flowmaxnumbg" id="flowmaxnumbg"></div>
+<div class="flowmaxnum" id="flowmaxnum">
+	<span class="triangle-up"></span>
+	<div>
+		剑鱼为给您更好的使用体验目前仅支持关注10家企业,你已成功关注10家企业,如需继续关注,请到“用户中心-我的关注”对已关注的企业进行取消关注后,可关注新的企业。
+		<div><span class="cursor-pointer" id="thinkAgain">再想想</span><span class="margin-lr-15">或</span>管理<button class="btn btn-primary margin-l-5" href="">我的关注</button></div>
+	</div>
+</div>
 <script>
 compulsoryreRresh = true;
 var entsel = {{index .T.querymap "city"}}
@@ -221,40 +229,57 @@ $(function(){
 		var dataObj = {};
 		dataObj["flag"] = $(this).hasClass("ent-followed");
 		var entObj = $(this).prev().children("div").children("a:first");
-		if(!dataObj.flag && !confirm("你将关注“"+entObj.text().replace(/\s+/g,"")+"”,剑鱼将会推送该企业的企业情报给你,每月将会扣除1000积分")){
-			return;
-		}
+		//if(!dataObj.flag && !confirm("你将关注“"+entObj.text().replace(/\s+/g,"")+"”,剑鱼将会推送该企业的企业情报给你,每月将会扣除1000积分")){
+			//return;
+		//}
 		dataObj["entId"] = entObj.attr("href").split("/")[2].replace(".html","");
 		var thisClass = $(this);
 		$.post("/member/enterprise/follow",dataObj,function(r){
 			if(r.status == "y"){
 				if(dataObj.flag){
-					thisClass.children("span").removeClass("glyphicon-heart").addClass("glyphicon-heart-empty");
-					alert("已取消关注");
+					thisClass.children("span").removeClass("yiguanzhu").addClass("weiguanzhu");
+					TipAssembly.show("已取消<br>关注");
 				}else{
-					thisClass.children("span").addClass("glyphicon-heart").removeClass("glyphicon-heart-empty");
-					alert("已关注");
+					thisClass.children("span").addClass("yiguanzhu").removeClass("weiguanzhu");
+					TipAssembly.show("已关注");
 				}
 				thisClass.toggleClass("ent-followed");
 			}else if(r.status == "m"){
-				alert("剑鱼为给你更好的使用体验目前仅支持关注10家企业,你已成功关注10家企业,如需继续关注,请到“用户中心-我的关注”对已关注的企业进行取消关注后,可关注新的企业!");
+				TipAssembly.hide();
+				$("#flowmaxnumbg,#flowmaxnum").show();
+				$("#flowmaxnum").css({top: thisClass.offset().top+30,left: thisClass.offset().left-95}).show();
+				//$("html,body").addClass("overflow-hidden");
 			}else if(r.status == "n"){
 				if(dataObj.flag){
-					alert("取消关注失败,请重新取消!");
+					TipAssembly.show("取消关注失败<br>请重新取消!");
 				}else{
-					alert("关注失败,请重新关注!");
+					TipAssembly.show("关注失败<br>请重新关注");
 				}
+				setTimeout(function(){
+					window.location.reload();
+				},3000);
 			}else{
 				if(dataObj.flag){
-					alert("取消关注失败,请重新取消!");
+					TipAssembly.show("取消关注失败<br>请重新取消!");
 				}else{
-					alert("关注失败,请重新关注!");
+					TipAssembly.show("关注失败<br>请重新关注");
 				}
-				window.location.reload();
+				setTimeout(function(){
+					window.location.reload();
+				},3000);
 			}
 		});
 	});
 	scrollUp("entlist-recommend");
+	$("#thinkAgain").click(function(){
+		$("#flowmaxnumbg,#flowmaxnum").hide();
+	});
+	document.getElementById("flowmaxnumbg").onclick = function(e){
+		if(e.target.id == "flowmaxnumbg"){
+			$("#flowmaxnumbg,#flowmaxnum").hide();
+			//$("html,body").removeClass("overflow-hidden");
+		}
+	}
 });
 </script>
 <script src="/js/enterprise.js"></script>

+ 1 - 0
core/src/web/templates/search/wxent.html

@@ -2,6 +2,7 @@
 <head>
 <title>{{Msg "seo" "qfw.enterprise.title"}}</title>
 <meta name="msvalidate.01" content="D5F3ADC7EB4E65FFB8BF943AD56DD1F7" />
+<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 {{include "/common/inc.html"}}
 <link href="/css/entcommunity.css" rel="stylesheet">
 <meta name="Keywords" content="{{Msg "seo" "qfw.enterprise.key"}}"/>

+ 1 - 0
core/src/web/templates/swordfish/wxprotocol.html

@@ -3,6 +3,7 @@
 <title>{{Msg "seo" "qfw.swordfish.title"}}</title>
 <meta name="Keywords" content="{{Msg "seo" "qfw.swordfish.key"}}"/>
 <meta name="Description" content="{{Msg "seo" "qfw.swordfish.description"}}"/>
+<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 {{include "/common/inc.html"}}
 </head>
 <body>