|
@@ -1,4 +1,3 @@
|
|
|
-<!DOCTYPE HTML>
|
|
|
<html>
|
|
|
<head>
|
|
|
<title> 企业社区-列表</title>
|
|
@@ -8,6 +7,27 @@
|
|
|
{{include "/common/inc.html"}}
|
|
|
<link href="{{Msg "seo" "cdn"}}/css/mobile/incmobile.css" rel="stylesheet">
|
|
|
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
|
|
+ <style>
|
|
|
+ .tipAssembly{
|
|
|
+ position: absolute;
|
|
|
+ width: 160px;
|
|
|
+ border: 1px solid #999;
|
|
|
+ text-align: center;
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ border-radius: 10px;
|
|
|
+ background-color: #ccc;
|
|
|
+ color: #fff;
|
|
|
+ padding: 0px;
|
|
|
+ }
|
|
|
+ #province li,#city li{
|
|
|
+ width: 100%;
|
|
|
+ padding-right: 50%;
|
|
|
+ }
|
|
|
+ #reg li,#category li{
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="col-xs-12">
|
|
@@ -298,23 +318,71 @@
|
|
|
$.get("/member/enterprise/isFollowed?entId="+id,function(r){
|
|
|
if (r.status=="n"){
|
|
|
$.get("/member/enterprise/follow?entId="+id+"&flag=false",function(rs){
|
|
|
- TipAssembly.show("已关注");
|
|
|
- me.find("i").attr("class","glyphicon yiguanzhu");
|
|
|
- me.find("span").text("已关注");
|
|
|
-
|
|
|
+ if (rs.status == "y"){
|
|
|
+ TipAssembly.show("已关注");
|
|
|
+ me.find("i").attr("class","glyphicon yiguanzhu");
|
|
|
+ me.find("span").text("已关注");
|
|
|
+ }else if(rs.status == "n"){
|
|
|
+ TipAssembly.show("关注失败!");
|
|
|
+ }else if(rs.status == "m"){
|
|
|
+ TipAssembly.show("您最多关注10家企业!");
|
|
|
+ }
|
|
|
});
|
|
|
}else{
|
|
|
$.get("/member/enterprise/follow?entId="+id+"&flag=true",function(rs){
|
|
|
-
|
|
|
- TipAssembly.show("已取消<br>关注");
|
|
|
- me.find("i").attr("class","glyphicon weiguanzhu");
|
|
|
- me.find("span").text("关注");
|
|
|
+ if (rs.status == "y"){
|
|
|
+ TipAssembly.show("已取消关注");
|
|
|
+ me.find("i").attr("class","glyphicon weiguanzhu");
|
|
|
+ me.find("span").text("关注");
|
|
|
+ }else if(rs.status == "n"){
|
|
|
+ TipAssembly.show("取消关注失败!");
|
|
|
+ }
|
|
|
}) ;
|
|
|
}
|
|
|
})
|
|
|
event.stopPropagation();
|
|
|
}
|
|
|
- </script>
|
|
|
+
|
|
|
+
|
|
|
+//提示框
|
|
|
+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;
|
|
|
+ },1000);
|
|
|
+ $("body").append('<div class="tipAssembly" id="tipAssembly">'+text+'</div>');
|
|
|
+ if(typeof(css) != "undefined"){
|
|
|
+ $("#tipAssembly").css(css);
|
|
|
+ }
|
|
|
+ var height=document.body.scrollHeight
|
|
|
+ $("#tipAssembly").css({"left":($(window).width()-140)/2});
|
|
|
+ $("#tipAssembly").css({"top":(height+200)/2});
|
|
|
+ },
|
|
|
+ hide: function(){
|
|
|
+ $("#tipAssembly").remove();
|
|
|
+ },
|
|
|
+ triangleShow: function(obj,direction,width,top,left){
|
|
|
+ $("#maskLayer").unbind("click").click(function(e){
|
|
|
+ $(this).hide();
|
|
|
+ $("#tipTriangle").hide();
|
|
|
+ });
|
|
|
+ $("#tipTriangle>span").addClass("triangle-"+direction);
|
|
|
+ $("#tipTriangle").css({width:width,top: obj.offset().top+top,left: obj.offset().left+left}).show();
|
|
|
+ $("#maskLayer,#tipTriangle").show();
|
|
|
+ },
|
|
|
+ triangleHide: function(){
|
|
|
+ $("#maskLayer,#tipTriangle").hide();
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
|
|
|
</body>
|
|
|
</html>
|