浏览代码

Merge branch 'dev2.8.5' of ssh://192.168.3.207:10022/qmx/jy into dev2.8.5

wcj 5 年之前
父节点
当前提交
2766a5896f

+ 10 - 7
src/jfw/modules/app/src/app/front/me.go

@@ -41,14 +41,17 @@ func (m *Me) MeIndex() error {
 	} else {
 		m.T["pullnew"] = false
 	}
+	userid := qutil.ObjToString(m.GetSession("userId"))
 	//检测用户是否绑定邮箱
-	res, err := mongodb.FindOne("user", bson.M{"_id": bson.ObjectIdHex(qutil.ObjToString(m.GetSession("userId")))})
-	if len(*res) > 0 && err {
-		if qutil.ObjToString((*res)["s_myemail"]) == "" {
-			m.T["isNoEmail"] = true
-		}
-		if qutil.Int64All((*res)["i_vip_status"]) == 1 || qutil.Int64All((*res)["i_vip_status"]) == 2 {
-			m.T["isVip"] = true
+	if userid != "" {
+		res, err := mongodb.FindOne("user", bson.M{"_id": bson.ObjectIdHex(userid)})
+		if len(*res) > 0 && err {
+			if qutil.ObjToString((*res)["s_myemail"]) == "" {
+				m.T["isNoEmail"] = true
+			}
+			if qutil.Int64All((*res)["i_vip_status"]) == 1 || qutil.Int64All((*res)["i_vip_status"]) == 2 {
+				m.T["isVip"] = true
+			}
 		}
 	}
 	return m.Render("/me/index.html", &m.T)

+ 4 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/updateArea.js

@@ -658,6 +658,10 @@ $(function () {
     })
 
 	function showCityTips(dom){
+		let isAll = $(".area-list").attr("data-buy-province-count");
+		if(Number(isAll)===-1){
+			return	
+		}
 		let activeCityLength = $(dom).parent().find('.city.active').length;
 		let selectedCityLength = $(dom).parent().find('.city.active:not([disabled])').length;
 		let disabledCityLength = $(dom).parent().find('.city[disabled]').length;
@@ -686,7 +690,6 @@ $(function () {
 	
 	function showOther(){
 		let showCounts = newlyAdded.province;
-		console.log(showCounts)
 		if(showCounts > 9){
 			$(".tips_d_text").text("已新增"+showCounts+"个省,建议新增“全国”")
 			$(".tips_d_text").show();

+ 5 - 2
src/jfw/modules/app/src/web/templates/vipsubscribe/choose_industry_upgrade.html

@@ -336,8 +336,11 @@
                 	}
                 }
                 // 显示隐藏优惠tips
-                if (selectedArr.length >= 4 && !vipSubisTrial) {
-                	$('.tips_btn .tips_d_text').text("已选择"+selectedArr.length+"个行业,建议购买“全部行业”");
+                let disabledCount = $("ul.list li.list_item .item_industry_list").find(".industry_item[disabled]").length;
+                let showCount = buyset - disabledCount;
+                let showCounts = selectedArr.length - showCount;
+                if (showCounts > 3) {
+                	$('.tips_btn .tips_d_text').text("已选择"+showCounts+"个行业,建议购买“全部行业”");
                     $('.tips_btn .tips_d_text').slideDown();
                 } else {
                     $('.tips_btn .tips_d_text').slideUp()

+ 4 - 1
src/web/staticres/vipsubscribe/js/updateArea.js

@@ -658,6 +658,10 @@ $(function () {
     })
 
 	function showCityTips(dom){
+		let isAll = $(".area-list").attr("data-buy-province-count");
+		if(Number(isAll)===-1){
+			return	
+		}
 		let activeCityLength = $(dom).parent().find('.city.active').length;
 		let selectedCityLength = $(dom).parent().find('.city.active:not([disabled])').length;
 		let disabledCityLength = $(dom).parent().find('.city[disabled]').length;
@@ -686,7 +690,6 @@ $(function () {
 	
 	function showOther(){
 		let showCounts = newlyAdded.province;
-		console.log(showCounts)
 		if(showCounts > 9){
 			$(".tips_d_text").text("已新增"+showCounts+"个省,建议新增“全国”")
 			$(".tips_d_text").show();

+ 74 - 14
src/web/templates/weixin/email/unbind_email.html

@@ -2,31 +2,91 @@
 <html>
 	<head>
 		<meta charset="utf-8">
-		<title>我的邮箱</title>
		<meta name="keywords" content="更换邮箱 解绑邮箱"/>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxmyemail/css/reset.css?v={{Msg "seo" "version"}}">
+		<title>我的邮箱</title>
+		<meta name="keywords" content="更换邮箱 解绑邮箱"/>
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxmyemail/css/reset.css?v={{Msg "seo" "version"}}">
 		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxmyemail/css/common.css?v={{Msg "seo" "version"}}">
 		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxmyemail/css/mine.css?v={{Msg "seo" "version"}}"/> 
 		{{include "/common/weixin.html"}}
-		<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>   
+		<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>   
 	</head>
 	<body>
-		<div class="unbind_email">
			<div class="input_box mgT26">
				<label>邮箱</label>
				<input type="email" name="email" id="" value="{{.T.text_email}}" readonly="readonly" unselectable="on" onfocus="this.blur()" style="-webkit-user-select :none"/>
			</div>
			<button type="button" class="common_btn choose_email">更换邮箱</button>
			<p class="text-algin">
				<a href="javascript:;" class="unbind">解绑</a>
			</p>
			
			<!-- 更换邮箱弹框 -->
			<div class="dialog_confirm" id="choose_email_dialog" style="display: none;">
				<div class="mask"></div>
				<div class="dialog">
					<div class="dialog_hd"><strong>确定更换邮箱</strong></div>
					<div class="dialog_bd">{{.T.text_email}}</div>
					<div class="dialog_ft">
						<a href="javascript:;" class="btn_dialog default" id="cancel_choose">取消</a>
						<a href="javascript:;" class="btn_dialog primary" id="sure_choose">确定</a>
					</div>
				</div>
			</div>
			<!-- 解绑邮箱弹框 -->
			<div class="dialog_confirm" id="unbind_email_dialog" style="display: none;">
				<div class="mask"></div>
				<div class="dialog">
					<div class="dialog_hd"><strong>确定解绑邮箱</strong></div>
					<div class="dialog_bd" style="color: #888;">{{.T.text_email}}</div>
					<div class="dialog_ft">
						<a href="javascript:;" class="btn_dialog default" id="cancel_unbind">取消</a>
						<a href="javascript:;" class="btn_dialog primary" id="sure_unbind">确定</a>
					</div>
				</div>
			</div>
		</div>
		<script src="{{Msg "seo" "cdn"}}/wxmyemail/js/zepto.js"></script>
		<script>
-			initShare({{.T.signature}},{{.T.openid}},2,"jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
			$(function(){
				/* 更换邮箱 */
				$('.choose_email').on('click',() =>{
-					$('#choose_email_dialog').show(400);
-					$("#cancel_choose").on('click',() =>{
-						$('#choose_email_dialog').hide(400);
-					});
+		<div class="unbind_email">
+			<div class="input_box mgT26">
+				<label>邮箱</label>
+				<input type="email" name="email" id="" value="{{.T.text_email}}" readonly="readonly" unselectable="on" onfocus="this.blur()" style="-webkit-user-select :none"/>
+			</div>
+			<button type="button" class="common_btn choose_email">更换邮箱</button>
+			<p class="text-algin">
+				<a href="javascript:;" class="unbind">解绑</a>
+			</p>
+			
+			<!-- 更换邮箱弹框 -->
+			<div class="dialog_confirm" id="choose_email_dialog" style="display: none;">
+				<div class="mask"></div>
+				<div class="dialog">
+					<div class="dialog_hd"><strong>确定更换邮箱</strong></div>
+					<div class="dialog_bd">{{.T.text_email}}</div>
+					<div class="dialog_ft">
+						<a href="javascript:;" class="btn_dialog default" id="cancel_choose">取消</a>
+						<a href="javascript:;" class="btn_dialog primary" id="sure_choose">确定</a>
+					</div>
+				</div>
+			</div>
+			<!-- 解绑邮箱弹框 -->
+			<div class="dialog_confirm" id="unbind_email_dialog" style="display: none;">
+				<div class="mask"></div>
+				<div class="dialog">
+					<div class="dialog_hd"><strong>确定解绑邮箱</strong></div>
+					<div class="dialog_bd" style="color: #888;">{{.T.text_email}}</div>
+					<div class="dialog_ft">
+						<a href="javascript:;" class="btn_dialog default" id="cancel_unbind">取消</a>
+						<a href="javascript:;" class="btn_dialog primary" id="sure_unbind">确定</a>
+					</div>
+				</div>
+			</div>
+		</div>
+		<script src="{{Msg "seo" "cdn"}}/wxmyemail/js/zepto.js"></script>
+		<script>
+			initShare({{.T.signature}},{{.T.openid}},2,"jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
+			$(function(){
+				/* 更换邮箱 */
+				$('.choose_email').on('click',() =>{
+					/*
+					$('#choose_email_dialog').show(400);
+					$("#cancel_choose").on('click',() =>{
+						$('#choose_email_dialog').hide(400);
+					});
 					$('#sure_choose').on('click',() =>{
-						//sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
 						//window.location.replace("/front/wxMyOrder/myEmail?name=change");
-						window.location.href="/front/wxMyOrder/myEmail?name=change";
-					});
+						window.location.href="/front/wxMyOrder/myEmail?name=change";
+					});
+					*/
+					window.location.href="/front/wxMyOrder/myEmail?name=change";
 				})
 				
-				
				/* 解绑邮箱 */
				$('.unbind').on('click',() =>{
					$('#unbind_email_dialog').show(4);
					$("#cancel_unbind").on('click',() =>{
						$('#unbind_email_dialog').hide(400);
					});
					$('#sure_unbind').on('click',() =>{
+				
+				/* 解绑邮箱 */
+				$('.unbind').on('click',() =>{
+					$('#unbind_email_dialog').show(4);
+					$("#cancel_unbind").on('click',() =>{
+						$('#unbind_email_dialog').hide(400);
+					});
+					$('#sure_unbind').on('click',() =>{
 						$.post("/subscribepay/orderListDetails/emailOperation",{"operation":"unbind","email":{{.T.text_email}}},function(data){
 							if(data.success){
 								window.location.replace("/front/wxMyOrder/myEmail?name=unbind");
 							}
-						})
					});
				})
				$('.mask').on('click',()=>{
					$('#choose_email_dialog').hide(400);
					$('#unbind_email_dialog').hide(400);
				})
			})
		</script>
-	{{include "/common/baiducc.html"}}
	</body>
+						})
+					});
+				})
+				$('.mask').on('click',()=>{
+					$('#choose_email_dialog').hide(400);
+					$('#unbind_email_dialog').hide(400);
+				})
+			})
+		</script>
+	{{include "/common/baiducc.html"}}
+	</body>
 </html>

+ 18 - 9
src/web/templates/weixin/historypush.html

@@ -18,7 +18,8 @@
 	<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/mobiscroll/mobiscroll.min.css">
 	<script src="{{Msg "seo" "cdn"}}/mobiscroll/mobiscroll.min.js"></script>
 	<!-- 2.8.5 -->
-	<script src="/vipsubscribe/js/rem.js"></script>
+	<script src="/vipsubscribe/js/rem.js"></script>    
+	<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
 	<link rel="stylesheet" href="/vipsubscribe/css/weui.min.css"/>
 	<link rel="stylesheet" href="/vipsubscribe/iconfont/iconfont.css" />
 	<link rel="stylesheet" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
@@ -278,19 +279,21 @@
 					$('.free7days_pic').append("<style>.free7days_pic:after{display:none}</style>");
 					if(parseInt(isExpire)>1){
 						$(".renew_toast .isExpire").text(parseInt(isExpire));
+						$(".renew_toast").show();
 					}else if (parseInt(isExpire)>0){
 						$(".renew_toast").find(".other").hide();
 						$(".renew_toast").find(".today").show();
+						$(".renew_toast").show();
 					}
-					$(".renew_toast").show();
 				}else{
 					if(parseInt(isExpire)>1){
 						$("._renew_toast .isExpire").text(parseInt(isExpire));
+						$("._renew_toast").show();
 					}else if (parseInt(isExpire)>0){
 						$("._renew_toast").find(".other").hide();
 						$("._renew_toast").find(".today").show();
+						$("._renew_toast").show();
 					}
-					$("._renew_toast").show();
 				}
 				$(".vip_set").show();
 				$(".tab_left .area").show();
@@ -665,8 +668,10 @@
 		}
 		//续费
 		function torepay(){
-			setSessionStorage();
-			window.location.href="/weixin/pay/renewPayPage";
+			if(!checkOrder()){
+				setSessionStorage();
+				window.location.href="/weixin/pay/renewPayPage";
+			}
 		}
 		//购买
 		function topay(){
@@ -912,8 +917,8 @@
       	<div class="_renew_toast" style="display: none;">
       		<div>
       			<i class="icon iconfont" id="_close_renew">&#xe61a;</i>
-      			<span class="other">VIP订阅服务试用还有<span class="isExpire"></span>天到期,请及时购买!</span>
-      			<span class="today" style="display:none;">VIP订阅服务试用今天到期,请及时购买!</span>
+      			<span class="other">VIP订阅服务还有 <span class="isExpire"></span> 天到期,请及时购买!</span>
+      			<span class="today" style="display:none;">VIP订阅服务今天到期,请及时购买!</span>
       			<a onclick="topay()">去购买</a>
       		</div>
       	</div>
@@ -985,11 +990,15 @@
   						cityHtml +='<div class="province_city" data-id="'+i+'" style="display:'+shwohide+'">'
   					}
   					var cityArr = thisArea[i]//每个省份下的地市
+					var allSH = "";
+					if(cityArr.length==1){
+						allSH = "hide";
+					}
 					var _cityMap = _provinceArr[i]
 					if(_cityMap!=undefined&&_cityMap[0]=="全部"){
-						cityHtml +='<p class="c_item cityAll"><input type="checkbox" class="checkbox" checked><span class="city-name">全部</span></p>';
+						cityHtml +='<p class="c_item cityAll '+allSH+'"><input type="checkbox" class="checkbox" checked><span class="city-name">全部</span></p>';
 					}else{
-						cityHtml +='<p class="c_item cityAll"><input type="checkbox" class="checkbox"><span class="city-name">全部</span></p>';
+						cityHtml +='<p class="c_item cityAll '+allSH+'"><input type="checkbox" class="checkbox"><span class="city-name">全部</span></p>';
 					}
   					for(var m = 0;m < cityArr.length;m++){
   						var cityFlag = true;

+ 5 - 2
src/web/templates/weixin/vipsubscribe/choose_industry_upgrade.html

@@ -335,8 +335,11 @@
                 	}
                 }
                 // 显示隐藏优惠tips
-                if (selectedArr.length >= 4 && !vipSubisTrial) {
-                	$('.tips_btn .tips_d_text').text("已选择"+selectedArr.length+"个行业,建议购买“全部行业”");
+                let disabledCount = $("ul.list li.list_item .item_industry_list").find(".industry_item[disabled]").length;
+                let showCount = buyset - disabledCount;
+                let showCounts = selectedArr.length - showCount;
+                if (showCounts > 3) {
+                	$('.tips_btn .tips_d_text').text("已选择"+showCounts+"个行业,建议购买“全部行业”");
                     $('.tips_btn .tips_d_text').slideDown();
                 } else {
                     $('.tips_btn .tips_d_text').slideUp()

+ 19 - 6
src/web/templates/weixin/vipsubscribe/vip_index.html

@@ -128,15 +128,17 @@
             <div class="renew_toast" style="display: none;">
                 <div>
                     <i class="icon iconfont" id="close_renew">&#xe61a;</i>
-                    <span>VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时续费!</span>
-                    <a href="/weixin/pay/renewPayPage">去续费</a>
+                    <span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时续费!</span>
+      				<span class="today" style="display:none;">VIP订阅服务今天到期,请及时续费!</span>
+                    <a onclick="rebuy()">去续费</a>
                 </div>
             </div>
             <!-- 试用用户-去购买提醒 -->
             <div class="nv_renew_toast" style="display: none;">
                 <div>
                     <i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
-                    <span>VIP订阅服务试用还有<span class="renew_day"></span>天到期,请及时购买!</span>
+	      			<span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时购买!</span>
+	      			<span class="today" style="display:none;">VIP订阅服务今天到期,请及时购买!</span>
                     <a href="/weixin/pay/vipsubscribe_new">去购买</a>
                 </div>
             </div>
@@ -261,10 +263,16 @@
                    		var _vipstatus = _userData["i_vip_status"];
                    		// console.log(_userData)
 	                   if(_vipstatus&&_vipstatus=="1"){
-							if(parseInt(_vipData["expRemind"])>0){
+							if(parseInt(_vipData["expRemind"])>1){
 	                            $(".to_expired").show();
-	                            $(".nv_renew_toast").show();
 								$(".renew_day").text(_vipData["expRemind"]);
+	                            $(".nv_renew_toast").show();
+								$(".tabbar").hide();
+	                        }else if(parseInt(_vipData["expRemind"])>0){
+	                            $(".to_expired").show();
+								$(".nv_renew_toast").find(".other").hide();
+								$(".nv_renew_toast").find(".today").show();
+	                            $(".nv_renew_toast").show();
 								$(".tabbar").hide();
 	                        }else{
 	                            $(".to_expired").hide();
@@ -273,10 +281,15 @@
 							$('.free7days_pic').text("VIP订阅服务");
 	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
 	                   }else{
-							if(parseInt(_vipData["expRemind"])>0){
+							if(parseInt(_vipData["expRemind"])>1){
 	                            $(".to_expired").show();
 	                            $(".renew_day").text(parseInt(_vipData["expRemind"]))
 	                            $(".renew_toast").show();
+	                        }else if(parseInt(_vipData["expRemind"])>0){
+	                            $(".to_expired").show();
+								$(".renew_toast").find(".other").hide();
+								$(".renew_toast").find(".today").show();
+	                            $(".renew_toast").show();
 	                        }else{
 	                            $(".to_expired").hide();
 	                        }