yee 7 anos atrás
pai
commit
c0cce847c8
3 arquivos alterados com 173 adições e 44 exclusões
  1. 1 1
      src/css/member.css
  2. 122 1
      src/js/member.js
  3. 50 42
      template/member.html

+ 1 - 1
src/css/member.css

@@ -9,7 +9,7 @@
 .member_on h5{font-weight: normal;font-size:16px ;color: #f18101;margin-left: 10px;}
 .member_on .blur{color: #0f72ba;}
 .member_on{width: 386px;}
-.member_on>p{font-size: 14px;color: #5f5e5e;line-height: 36px;color: #5f5e5e;}
+.member_on .member_business_list p{font-size: 14px;color: #5f5e5e;line-height: 36px;color: #5f5e5e;}
 
 .member_on ul{overflow: hidden;margin-left: 13px;margin-bottom: 100px;margin-top: 23px;}
 .member_on ul li{float: left;width: 110px;height: 48px;border: 1px solid #CCCCCC;line-height: 48px;text-align: center;margin: 5px;}

+ 122 - 1
src/js/member.js

@@ -2,4 +2,125 @@ import '../css/bootstrap.less';
 import 'bootstrap/dist/js/bootstrap.js';
 import '../css/public.css';
 import '../css/member.css';
-import './public.js';
+import './public.js';
+
+function loadBenefit(callback) {
+    $.ajax({
+        method: "get",
+        dataType: "json",
+        url: globalConfig.context + "/open/html/json/member_benefit",
+        success: function (data) {
+            
+        },
+    });
+}
+
+function loadData(pageNo) {
+    var rank, money, mouth, gradeName;
+
+    $.ajax({
+        method: "get",
+        dataType: "json",
+        url: globalConfig.context + "/api/portal/member/selectMemberGradeFr",
+        success: function (data) {
+            var theArr = [];
+            if (data.data && data.data.length) {
+                //黄金会员
+                let thisdata = data.data[0];
+                let theBusiness = [];
+                let theCost = [];
+                for (let item in thisdata.business) {
+                    theBusiness.push('<li data-toggle="modal" data-target="#myModal" data-mouth="' + item + '" data-money="' + thisdata.cost[item] + '" data-rank="' + thisdata.memberRank + '" data-gradename="' + thisdata.gradeName + '">' + thisdata.cost[item] + '/' + item + '个月</li>')
+                };
+                for (let item in thisdata.cost) {
+                    theCost.push('<li data-toggle="modal" data-target="#myModal" data-mouth="' + item + '" data-money="' + thisdata.cost[item] + '" data-rank="' + thisdata.memberRank + '" data-gradename="' + thisdata.gradeName + '">' + thisdata.cost[item] + '/' + item + '个月</li>')
+                };
+                $('#member1cost').append(theCost.join(''));
+
+                for (let i = 0; i < data.data.length; i++) {
+                    let thisdata = data.data[i];
+                    let theCost = [];
+                    for (let item in thisdata.cost) {
+                        theCost.push('<p><a class="toCostLink" href="" data-toggle="modal" data-target="#myModal" data-mouth="' + item + '" data-money="' + thisdata.cost[item] + '" data-rank="' + thisdata.memberRank + '" data-gradename="' + thisdata.gradeName + '">' + thisdata.cost[item] + '/' + item + '月</a></p>')
+                    };
+                    theArr.push([
+                        '<li style="width:' + thewidth + '">',
+                        '<div>',
+                        '<div class="level">',
+                        '<img src="' + globalConfig.avatarUploadHost + "/rank/level_" + thisdata.memberRank + '.png" alt="">',
+                        thisdata.gradeName,
+                        '</div>',
+                        '<div class="top">',
+                        '<i class="topImg"></i>',
+                        '<span>提供的专属服务</span>',
+                        '</div>',
+                        '<div class="server">',
+                        thisdata.business && thisdata.business['1001'] == 1 ? '<p>科技成果,专家信息定点推送</p>' : '',
+                        thisdata.business && thisdata.business['1002'] == 1 ? '<p>查看专家的联系方式</p>' : '',
+                        thisdata.business && thisdata.business['1003'] == 1 ? '<p>任何业务申请,付费业享受会员专属折扣。</p>' : '',
+                        thisdata.business && thisdata.business['1004'] == 1 ? '<p>一对一的技术经纪人服务,进行技术成果媒合服务</p>' : '',
+                        thisdata.business && thisdata.business['1005'] == 1 ? '<p>一对一的科技咨询师服务</p>' : '',
+                        thisdata.business && thisdata.business['1006'] == 1 ? '<p>一对一的专业技术顾问,搜集技术情报,提供研发高参</p>' : '',
+                        thisdata.business && thisdata.business['1007'] == 1 ? '<p>免费参加现场业务培训会</p>' : '',
+                        thisdata.business && thisdata.business['1008'] == 1 ? '<p>免前期费用做科技类扶持资金项目申报</p>' : '',
+                        '</div>',
+                        '<div class="money">',
+                        theCost.join(''),
+                        '</div>',
+                        '</div>',
+                        '</li>'
+                    ].join(''));
+                };
+            } else {
+                $('#msg').val(data.error[0].message);
+                msg();
+            };
+            $('#member-list').empty();
+            $('#member-list').append(theArr.join(''));
+
+            $('.toCostLink').on('click', function (e) {
+                e.preventDefault();
+                if (userData && userData.mobile) {
+                    mouth = this.dataset.mouth;
+                    money = this.dataset.money;
+                    rank = this.dataset.rank;
+                    gradeName = this.dataset.gradename;
+                    $('#modal-content').append("确认提交 " + money + " 元/ " + mouth + " 月的 " + gradeName + " 订单吗?");
+                } else {
+                    $('#msg').val('获取用户信息失败,请重新登录!');
+                    msg();
+                    setTimeout("window.location.href = globalConfig.context + '/user/login.html'", 3000);
+                }
+            });
+
+            $('#submitOrder').on('click', function (e) {
+                $('#submitOrder').attr("disabled", true);
+                $.ajax({
+                    method: "post",
+                    dataType: "json",
+                    url: globalConfig.context + "/api/user/member/addBasicsMemberOrder",
+                    data: {
+                        menberType: rank,
+                        price: money,
+                        validMonth: mouth
+                    },
+                    success: function (data) {
+                        if (data.error && data.error.length) {
+                            $('#msg').val(data.error[0].message);
+                            msg();
+                        } else {
+                            $('#msg').val('提交会员服务订单成功!');
+                            msg();
+                            setTimeout("window.location.href = globalConfig.context + '/user/account/index.html#serviceList'", 3000);
+                        }
+                    },
+                });
+            })
+        },
+    });
+}
+
+
+$(function () {
+    loadData();
+})

+ 50 - 42
template/member.html

@@ -4,8 +4,8 @@
 <head>
 	<meta charset="utf-8" />
 	<link rel="icon" href="../img/ico_logo.ico">
-	<meta name="Keywords" content=""/>
-	<meta name="Description" content=""/>
+	<meta name="Keywords" content="" />
+	<meta name="Description" content="" />
 	<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
 	<meta http-equiv="x-ua-compatible" content="ie=edge">
 	<title>会员</title>
@@ -13,14 +13,15 @@
     <link rel="stylesheet" href="../src/css/public.css" />
     <link rel="stylesheet" type="text/css" href="../src/css/member.css"/>-->
 </head>
+
 <body>
 	<header>
 		<div class="container">
 			<div class="logo"><a href="../template/index.html"><img src="../img/Logo111.png" alt="" title="技淘"/></a></div>
-			<div  class="nav">
+			<div class="nav">
 				<ul>
 					<li><a href="#">技术交易</a></li>
-					<li><a href="#">科技服务</a><img src="../img/hot.png"/></li>
+					<li><a href="#">科技服务</a><img src="../img/hot.png" /></li>
 					<li><a href="#">智库咨询</a></li>
 					<li><a href="#">科技金融</a></li>
 					<li><a href="#">科技活动</a></li>
@@ -38,42 +39,50 @@
 	<div class="member">
 		<div class="member_contant">
 			<h3>申请会员获得更多增值服务</h3>
-			<div class="member_main">							
+			<div class="member_main">
 				<div class="member_on">
 					<h5><img src="../img/member_1.jpg" alt="" />提供的专属服务</h5>
-					<p>科技成果,专家信息定点推送</p>
-					<p>查看专家的联系方式</p>
-					<p>任何业务申请,付费业享受会员专属折扣</p>
-					<p>一对一的技术经纪人服务,进行技术成果媒合服务</p>
-					<p>一对一的科技咨询师服务</p>
-					<ul class="member_left">
+					<div class="member_business_list" id="member1business">
+						<p>科技成果,专家信息定点推送</p>
+						<p>查看专家的联系方式</p>
+						<p>任何业务申请,付费业享受会员专属折扣</p>
+						<p>一对一的技术经纪人服务,进行技术成果媒合服务</p>
+						<p>一对一的科技咨询师服务</p>
+					</div>
+					<ul class="member_left" id="member1cost">
 						<li>1400元/6个月</li>
-						<li  class="then"><span>限时折扣</span><br /><time>800元/3个月</time></li>
+						<li class="then"><span>限时折扣</span><br />
+							<time>800元/3个月</time>
+						</li>
 						<li>2000元/12个月</li>
 					</ul>
-				</div>	
+				</div>
 				<div class="partingline"></div>
-				<div class="member_on">	
+				<div class="member_on">
 					<h5 class="blur"><img src="../img/member_2.jpg" alt="" />提供的专属服务</h5>
-					<p>科技成果,专家信息定点推送</p>
-					<p>查看专家的联系方式</p>
-					<p>任何业务申请,付费业享受会员专属折扣</p>
-					<p>一对一的技术经纪人服务,进行技术成果媒合服务</p>
-					<p>一对一的科技咨询师服务</p>
-					<p>一对一的专业技术顾问,搜集技术情报,提供研发高参</p>
-					<ul>
+					<div class="member_business_list" id="member2business">
+						<p>科技成果,专家信息定点推送</p>
+						<p>查看专家的联系方式</p>
+						<p>任何业务申请,付费业享受会员专属折扣</p>
+						<p>一对一的技术经纪人服务,进行技术成果媒合服务</p>
+						<p>一对一的科技咨询师服务</p>
+						<p>一对一的专业技术顾问,搜集技术情报,提供研发高参</p>
+					</div>
+					<ul id="member2cost">
 						<li>3500元/6个月</li>
-						<li class="then"><span>限时折扣</span><br /><time>2000元/3个月</time></li>
+						<li class="then"><span>限时折扣</span><br />
+							<time>2000元/3个月</time>
+						</li>
 						<li>5000元/12个月</li>
 					</ul>
-				</div>	
+				</div>
 			</div>
-			<img src="../img/member_4.png" alt="黄金会员" class="gold"/>
-			<img src="../img/member_7.jpg" alt="钻石会员" class="diamond"/>
-									
+			<img src="../img/member_4.png" alt="黄金会员" class="gold" />
+			<img src="../img/member_7.jpg" alt="钻石会员" class="diamond" />
+
 		</div>
-		<div  class="shadow">
-		<img src="../img/shadow7.png" alt=""/>
+		<div class="shadow">
+			<img src="../img/shadow7.png" alt="" />
 		</div>
 	</div>
 	<!--主体内容区域结束-->
@@ -83,21 +92,20 @@
 				<div class="text_top">
 					<a href="#">关于公司/</a>
 					<a href="#">联系我们</a>
-					<p> Copyright &copy 2016-2017 科德 版权所有 湘ICP备15019731号
-						-2 技术支持:湖南阿凡提科技有限公司</p>
+					<p> Copyright &copy 2016-2017 科德 版权所有 湘ICP备15019731号 -2 技术支持:湖南阿凡提科技有限公司</p>
 				</div>
 				<div class="text_center">
 					<div class="cont_left">
-						<img src="../img/dizhi.jpg" alt=""/>
+						<img src="../img/dizhi.jpg" alt="" />
 						<p>湖南省长沙市营盘东路19号金山大厦</p>
 					</div>
 					<div class="cont_center">
-						<img src="../img/dianhua.jpg" alt=""/>
+						<img src="../img/dianhua.jpg" alt="" />
 						<p>合作电话:0731-89907207</p>
 						<p>400-8800-962八楼</p>
 					</div>
 					<div class="cont_right">
-						<img src="../img/erweima.jpg" alt=""/>
+						<img src="../img/erweima.jpg" alt="" />
 						<p>科德公众号</p>
 					</div>
 				</div>
@@ -127,7 +135,7 @@
 				</div>
 			</div>
 		</div>
-	
+
 	</div>
 	<div class="pub_fix">
 		<span class="index_blur"></span>
@@ -160,7 +168,7 @@
 		<span class="index_orange"></span>
 	</div>
 	<!--登陆页面-->
-	
+
 	<div class="login">
 		<div class="login_mian">
 			<div class="login_left">
@@ -172,11 +180,11 @@
 			</div>
 			<div class="login_right">
 				<h5>用户登陆<a href="">免费注册有好礼呦!!</a></h5>
-				<form  id="form_login">
+				<form id="form_login">
 					<div class="login_uesr">
 						<label for="uesname"><img src="../img/login_use.png"/></label>
 						<input type="text" name="uesname" id="Lo_user" placeholder="用户名/邮箱/手机" />
-						<img src="../img/login_del.png" class="log_del"/>
+						<img src="../img/login_del.png" class="log_del" />
 					</div>
 					<div class="login_pass">
 						<label for="pass"><img src="../img/login_password.png"/></label>
@@ -191,15 +199,15 @@
 						</label>
 						<u><a href="">忘记密码?</a></u>
 					</div>
-					<input type="submit" value="登 陆" class="login_submit"/>
+					<input type="submit" value="登 陆" class="login_submit" />
 				</form>
-				<img src="../img/login_hua.png" alt="" class="login_hua"/>
-				<img src="../img/login_shadow.png" alt="阴影效果" class="login_shadow"/>
+				<img src="../img/login_hua.png" alt="" class="login_hua" />
+				<img src="../img/login_shadow.png" alt="阴影效果" class="login_shadow" />
 			</div>
 		</div>
-		<img src="../img/login_close.png" alt="" class="login_close"/>
+		<img src="../img/login_close.png" alt="" class="login_close" />
 	</div>
-	<div class="smg"><input type="text" name="msg" value="111" id="msg"/></div>
+	<div class="smg"><input type="text" name="msg" value="111" id="msg" /></div>
 	</div>
 </body>
 <!--<script type="text/javascript" src="../src/js/jquery-2.1.0.js"></script>