Ver código fonte

feat:pc订阅搜索列表前端页面部分

yangfeng 3 anos atrás
pai
commit
371a3a1786

+ 5 - 5
src/jfw/modules/app/src/web/templates/big-member/page_ai_add.html

@@ -762,12 +762,12 @@
                     this.result.cCode = val[1].code;
                 }
                 this.result.code = regionCode
-                this.result.province = this.formatterCity(val[0].name);
+                this.result.province = this.formatterCity(val[0].name).replace('市', '');
                 this.result.city = this.formOnlyCity(val[1].name);
-                if(this.formatterCity(this.result.province) == this.formatterCity(this.result.city)) {
-                    this.result.province = this.result.city;
-                    this.result.city = ''
-                }
+                // if(this.formatterCity(this.result.province) == this.formatterCity(this.result.city)) {
+                //     this.result.province = this.result.city;
+                //     this.result.city = ''
+                // }
             },
             // 关闭地区弹框
             cancelPopup: function() {

+ 1 - 0
src/jfw/modules/entsesearch/src/web/staticres/jylab/entsesearch/js/login.js

@@ -97,6 +97,7 @@ var getNewShareId = function(num){
 					$("#layerImg").attr("src","/front/share/"+pageshareid);
 					$("#wxCode").attr("src","/front/share/"+pageshareid);
 					$("#keyImg").attr("src","/front/share/"+kopshareid);
+          $('#subkeyImg').attr("src","/front/share/"+pageshareid)
 					if(keysorpname!=undefined&&keysorpname!=""){
 						var ref = document.referrer;
 						if(ref != ""&&ref.indexOf("jianyu360.com")<0||ref.indexOf("qmx.top")<0){

+ 103 - 0
src/web/staticres/css/dev2/biddingSearch.css

@@ -456,6 +456,14 @@ margin-left: 176px;
   cursor: pointer;
   margin: 0 10px 4px 0;
 }
+#searchInner .release-time .icon-vip{
+  float: left;
+  display: inline-block;
+  width: 38px;
+  height: 18px;
+  margin-left: -8px;
+  margin-right: 8px;
+}
 #searchInner .searchControl .searchTender .release-time .timer li:hover{
   color: #FFFFFF;
   background-color: #2cb7ca;
@@ -1041,4 +1049,99 @@ width:1200px;
   -ms-transform: translateZ(0);
   -o-transform: translateZ(0);
   transform: translateZ(0);
+}
+/* 一键订阅关键词弹框*/
+.sub-key-dialog.el-dialog{
+  border-radius: 8px;
+}
+.sub-key-dialog .el-dialog__header{
+  padding: 32px 0 0;
+}
+.sub-key-dialog .el-dialog__title{
+  color: #1D1D1D;
+  font-size:18px;
+}
+.sub-key-dialog .el-dialog__body {
+  padding: 20px 32px 0!important;
+}
+.sub-key-dialog .sub-tips{
+  font-size: 14px;
+  color: #686868;
+  line-height: 22px;
+}
+.sub-key-dialog .el-select-dropdown__item{
+  float: left!important;
+}
+.sub-key-dialog .sub-region{
+  margin-top: 12px;
+}
+.sub-key-dialog .el-checkbox__inner{
+  width: 18px!important;
+  height: 18px!important;
+  margin-right: 6px;
+}
+.sub-key-dialog .el-checkbox__inner::after{
+  height: 10px;
+  left: 6px;
+}
+.sub-key-dialog .sub-footer-btn{
+  border-radius: 6px;
+  width: 132px;
+  height: 36px;
+  font-size: 16px;
+}
+.sub-key-dialog .sub-btn-confirm,
+.sub-key-dialog .sub-btn-confirm:hover,
+.sub-key-dialog .sub-btn-confirm:active,
+.sub-key-dialog .sub-btn-confirm:focus{
+  background: #2cb7ca;
+  border: 0;
+  color: #fff;
+  margin-right: 50px;
+}
+.sub-key-dialog .sub-btn-confirm:disabled{
+  background: #87DFEA;
+  border: 0;
+}
+.sub-key-dialog .sub-btn-cancel{
+  border: 1px solid #E0E0E0;
+  background: #fff;
+}
+.sub-key-dialog .el-dialog__footer{
+  padding: 13px 0 32px;
+}
+/* 订阅关键词成功弹框 */
+.sub-success-dialog.el-dialog{
+  border-radius: 8px;
+}
+.sub-success-dialog .ss-header{
+  width: 335px;
+  margin-top: -60px;
+}
+.sub-success-dialog.el-dialog .el-dialog__header{
+  padding: 0;
+}
+.sub-success-dialog.el-dialog .el-dialog__body{
+  padding: 0;
+}
+.sub-success-dialog.el-dialog .el-dialog__headerbtn .el-dialog__close{
+  /* top: 10px; */
+  font-size: 20px;
+  color: #2cb7ca;
+}
+.sub-success-dialog #subkeyImg {
+  display: block;
+  width: 156px;
+  height: 156px;
+  margin: 0 auto;
+}
+.sub-success-dialog .ss-code{
+  padding: 26px 0 20px;
+}
+.sub-success-dialog .ss-help{
+  padding-bottom: 32px;
+  font-size: 16px;
+  color: #1D1D1D;
+  text-align: center;
+  line-height: 24px;
 }

BIN
src/web/staticres/images/subkey-success.png


+ 7 - 2
src/web/staticres/js/biddingSearch.js

@@ -187,7 +187,6 @@ $(function() {
       $(this).toggleClass("active");
       var curActiveLen = $prevNode.nextUntil(".diver").filter(".active").length; // 当前一级分类下二级分类选中的个数
       var curTotalLen = $prevNode.nextUntil(".diver").filter('font').length; // 当前一级分类下二级分类的总个数
-      console.log(curActiveLen,curTotalLen)
 			if(curActiveLen === 0) {
 				$prevNode.removeClass("active").removeClass("secondActice");
 			} else {
@@ -237,7 +236,13 @@ $(function() {
 	function silbingsTabClass(children) {
 		var $childrenLi = children;
 		$childrenLi.on("click", function() {
-			$(this).addClass("active").siblings().removeClass("active");
+      if (vipState) {
+        // 如果是付费用户 可正常切换
+        $(this).addClass("active").siblings().removeClass("active");
+      } else {
+        // 免费用户 则不能切换最近3年和最近5年
+        $(this).not('[data-auth]').addClass("active").siblings().removeClass("active");
+      }
 			$(".timerInput").removeClass("active");
 			beforeSubmit();
 		})

+ 11 - 2
src/web/staticres/js/superSearch.js

@@ -753,6 +753,13 @@ function getVIPData(clickpaging){
 }
 ///
 function beforeSubmit(n){
+  // n有值即执行的是点击搜索按钮或回车搜索事件
+  // n有值且关键词不为空时 存sessionStorage值
+  if (n == 'F' && $("#zbSeatchT [name='keywords']").val() !=="") {
+    sessionStorage.setItem('is-click-search', n)
+  } else {
+    sessionStorage.removeItem('is-click-search')
+  }
   // 重置全选按钮
   $('.custom-checkbox.check-all').prop('checked', false)
 	$(".hasNoData").hide();
@@ -989,7 +996,9 @@ function searchOnsubmit(clickpaging){
 function showSearchTipForTimeRange (type) {
 	var tempDom = $("#hasNoData_tiptext>font:eq(0)")
 	var tipMap = {
-		'thisyear': '近一年',
+    'fiveYear': '近5年',
+    'threeYear': '近3年',
+		'thisyear': '近1年',
 		'lately-7': '近7天',
 		'lately-30': '近30天'
 	}
@@ -1114,7 +1123,7 @@ function getBidIsColl () {
   var dataId = ""
   // 区分标题搜索和全文搜索收藏
   var allSearch = selectType.indexOf('content') > -1 && $("#zbSeatchT [name='keywords']").val() !==""
-  console.log('当前是否显示的是全文',allSearch)
+  // console.log('当前是否显示的是全文',allSearch)
   var $dom = allSearch ? $('.all-text-checkbox[name="bid-list"]') : $('.title-text-checkbox[name="bid-list"]')
   $dom.each(function() {
     if ($(this).attr('dataid')) {

+ 2 - 2
src/web/staticres/public-pc/js/pc-bottom.js

@@ -299,13 +299,13 @@ function zbsqClose(){
 //
 function areasearch(scope){
   $("#bottomform").remove();
-  $(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html?publishtime=thisyear" method="post" class="hide" ><input type="hidden" name="area" value="'+scope+'"></form>');
+  $(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html" method="post" class="hide" ><input type="hidden" name="area" value="'+scope+'"></form>');
   $("#bottomform").submit();
 }
 //
 function stypesearch(stype){
   $("#bottomform").remove();
-  $(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html?publishtime=thisyear" method="post" class="hide" ><input type="hidden" name="subtype" value="'+stype+'"></form>');
+  $(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html" method="post" class="hide" ><input type="hidden" name="subtype" value="'+stype+'"></form>');
   $("#bottomform").submit();
 }
 //

+ 1 - 1
src/web/templates/_error.html

@@ -250,7 +250,7 @@ function seclectNavLi(el, $index) {
 				<div class='useronline' id="login" style="float:left;"></div>
 			</div>
 			<div class="search" style="display:none;">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex" style="position:relative;">
+				<form method="post" action="/jylab/supsearch/index.html" id="zbSeatchIndex" style="position:relative;">
 					<input class="ser" autocomplete="off"  type="text" name="keywords" placeholder="请输入您要查询的招标信息 " id="" value="" />
 					<input type="hidden" name="searchvalue">
 					<input class="btn" type="button" onclick="zbSeatch('zbSeatchIndex')" />

+ 1 - 1
src/web/templates/active/index_bak.html

@@ -22,7 +22,7 @@
 		<section id="index">
 			<h3 class="title">全国招标信息免费看,不遮挡</h3>
 			<div class="search">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex">
+				<form method="post" action="/jylab/supsearch/index.html" id="zbSeatchIndex">
 					<input class="ser" type="text"  name="keywords" placeholder="请输入您要查询的招标信息" id="" value="" />
 					<input type="hidden" name="searchvalue">
 					<input class="btn" type="button" onclick="zbSeatch('zbSeatchIndex')" />

+ 1 - 1
src/web/templates/active/topics.html

@@ -594,7 +594,7 @@ _czc.push(["_setAccount", "1261815924"]);
 			<div class='useronline' id="login" style="float:left;"></div>
 		</div>
 		<div class="search" style="display:none;">
-			<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex" style="position:relative;">
+			<form method="post" action="/jylab/supsearch/index.html" id="zbSeatchIndex" style="position:relative;">
 				<input class="ser" autocomplete="off"  type="text" name="keywords" placeholder="请输入您要查询的招标信息 " id="" value="" />
 				<input type="hidden" name="searchvalue">
 				<input class="btn" type="button" onclick="zbSeatch('zbSeatchIndex')" />

+ 1 - 1
src/web/templates/common/pchead.html

@@ -7,7 +7,7 @@
         </a>
         <div class="fl">
             <div class="search-box" style="display: none;">
-                <form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="public_header">
+                <form method="post" action="/jylab/supsearch/index.html" id="public_header">
                     <input class="jynav-search" autocomplete="off" placeholder="请输入您想要查询的招标信息,多个关键词用空格隔开" value=""
                            type="text" name="keywords"/>
                     <input type="hidden" name="searchvalue">

+ 1 - 1
src/web/templates/common/pchead_bak.html

@@ -3,7 +3,7 @@
 		<ul>
 			<li class="j-nav-logo" onclick="window.location.href='/'" style="width:120px;"><a><img src="{{Msg "seo" "cdn"}}/images/swordfish/sf_01_new.png"></a></li>
 				<li class="navigation">
-					<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex" style="position:relative;">
+					<form method="post" action="/jylab/supsearch/index.html" id="zbSeatchIndex" style="position:relative;">
 			            <span class="j-inputgroup">
 							<input class="nav-search" type="text" name="keywords" placeholder="请输入您要查询的招标信息" value="{{.T.keywords}}" />
 			<!--				<img src="{{Msg "seo" "cdn"}}/images/pc_20.png" class="j-clearicon" id="t-clear">-->

+ 1 - 1
src/web/templates/frontRouter/pc/squeeze/sess/test.html

@@ -121,7 +121,7 @@
 		<section id="index">
 			<h3 class="title">全国招标信息免费看,不遮挡</h3>
 			<div class="search">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbIndex">
+				<form method="post" action="/jylab/supsearch/index.html" id="zbIndex">
 					<input class="ser" autocomplete="off"  type="text"  name="keywords" placeholder="请输入您要查询的招标信息" id="keywords" value="" />
 					<input type="hidden" name="searchvalue">
 					<input class="btn" type="button" onclick="zbSeatch('zbIndex')" />

+ 1 - 1
src/web/templates/pc/classifylist.html

@@ -450,7 +450,7 @@ function priceCss(){
 		<div class="w searchHeader-container">
 			<!--搜索-->
 			<div class="searchInput clearfix">
-				<form action="/jylab/supsearch/index.html?publishtime=thisyear" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
+				<form action="/jylab/supsearch/index.html" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
 					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="{{.T.keywords}}" name="keywords" placeholder="高速公路" />
 					<img src="{{Msg "seo" "cdn"}}/images/pc_20.png" id="t-clear" class="j-clearicon" style="display: none;">
 					<input type="submit" value="搜索" />

+ 8 - 4
src/web/templates/pc/index.html

@@ -142,7 +142,7 @@
 		<section id="index">
 			<h3 class="title">全国招标信息免费看,不遮挡</h3>
 			<div class="search">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbIndex">
+				<form method="post" action="/jylab/supsearch/index.html" id="zbIndex" name="zbIndex">
 					<input class="ser" autocomplete="off"  type="text" name="keywords" placeholder="请输入您想要查询的招标信息,多个关键词用空格隔开" id="keywords" value="" />
           <input type="hidden" name="searchvalue">
           <input type="hidden">
@@ -320,7 +320,6 @@
               type: 'POST',
               url: '/publicapply/bidcoll/power',
               success: function(res) {
-                  console.log(res)
                   if(res.error_code == 0) {
                     if(!res.data.entniche && !res.data.member && res.data.vip <= 0) {
                       (window.slotbydup = window.slotbydup || []).push({
@@ -351,7 +350,7 @@
                 position: '首页-最新公告上方'
               },
               success: function(res) {
-                console.log(res)
+                // console.log(res)
               }
             })
           }
@@ -1133,7 +1132,12 @@ $(function(){
 })
 
 function zbSeatch(id){
-	$("#"+id).submit();
+  // if (window.memberStatus || window.vipStatus || window.entniche) {
+  //   $("#"+id).attr('action', '/jylab/supsearch/index.html?publishtime=fiveYear').submit()
+  // } else {
+  //   $("#"+id).attr('action', '/jylab/supsearch/index.html').submit()
+  // }
+  $("#"+id).submit();
 }
 </script>
 {{include "/common/baiducc.html"}}

+ 126 - 9
src/web/templates/pc/supsearch.html

@@ -290,7 +290,7 @@ function isPower () {
 }
 isPower()
 var areas = {{.T.area}}!=null?{{.T.area}}:"";
-var selectPublishtime = {{.T.publishtime}}?{{.T.publishtime}}:"thisyear";
+var selectPublishtime = {{.T.publishtime}};
 var selectTimeslot = {{.T.timeslot}}!=null?{{.T.timeslot}}:"";
 var toptype = {{.T.toptype}}!=null?{{.T.toptype}}:"";
 var subtype = {{.T.subtype}}!=null?{{.T.subtype}}:"";
@@ -410,6 +410,13 @@ $(function(){
 		// $("#newsclass").show();
 		// $("#newsnow").hide();
 		nbflag = true;
+    // console.log("是否是付费用户:" ,vipState, "免费用户订阅管理是否订阅区域:",searchInnerVue.freeSubArea);
+    // 未输入关键词或免费用户输入关键词但订阅管理-订阅区域为空时 不能订阅
+    if (!vipState && !searchInnerVue.freeSubArea) {
+      $(".wx-inner-bottom").html('微信扫一扫<br>随时随地掌握招标信息');
+		  $(".wx-inner-title").html('扫码关注剑鱼标讯');
+      return
+    }
 		$(".wx-inner-bottom").html('微信扫一扫,及时获取<span class="side-bar-bottom-font">“'+keys+'”</span>相关招标信息');
 		$(".wx-inner-title").html('扫码订阅关键词');
 		if(list == null || list.length == 0){
@@ -505,14 +512,22 @@ $(function(){
 		beforeSubmit();
 	})
 	//
-	if(selectPublishtime != ""){
+	if(selectPublishtime){
 		$("#timerAll").removeClass("active");
 		$(".timer [data-value='"+selectPublishtime+"']").addClass("active");
 		if(selectPublishtime.indexOf("_") > -1){
 			$(".timerInput").addClass("active");
 		}
 	} else {
-    $(".timer [data-value='thisyear']").addClass("active").siblings().removeClass('active');
+    if (vipState) {
+      // 付费用户默认选择最近5年
+      selectPublishtime = 'fiveYear'
+      $(".timer [data-value='fiveYear']").addClass("active").siblings().removeClass('active');
+    } else {
+      // 免费用户默认选择最近1年
+      selectPublishtime = 'thisyear'
+      $(".timer [data-value='thisyear']").addClass("active").siblings().removeClass('active');
+    }
   }
 	if(selectTimeslot != "" && selectTimeslot.indexOf("_") > -1){
 		$("#starttime").css({"border-color":"#2cb7ca"});
@@ -981,7 +996,7 @@ var IframeOnClick = {
 		<div class="w searchHeader-container">
 			<!--搜索-->
 			<div class="searchInput clearfix">
-				<form action="/jylab/supsearch/index.html?publishtime=thisyear" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
+				<form action="/jylab/supsearch/index.html" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
 					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="{{.T.keywords}}" name="keywords" placeholder="请输入您想要查询的招标信息,多个关键词用空格隔开" />
 					<img src="{{Msg "seo" "cdn"}}/images/pc_20.png" id="t-clear" class="j-clearicon" style="display: none;">
 					<input type="button" value="搜索" onclick="zbSeatch('zbSeatchT')"/>
@@ -1134,7 +1149,11 @@ var IframeOnClick = {
 						<li id="timerAll" class="active" data-value="" style="display: none;">全部</li>
 						<li data-value="lately-7">最近7天</li>
 						<li data-value="lately-30">最近30天</li>
-						<li data-value="thisyear">最近一年</li>
+						<li data-value="thisyear">最近1年</li>
+            <li data-value="threeYear" data-auth  onClick="if(!vipState) return openVipDialog();">最近3年</li>
+            <img class="icon-vip" src="/images/biddingSearch/VIP.png" alt="">
+            <li data-value="fiveYear" data-auth  onClick="if(!vipState) return openVipDialog();">最近5年</li>
+            <img class="icon-vip" src="/images/biddingSearch/VIP.png" alt="">
 					</ul>
 				</div>
 				<div class="timerInput fl">
@@ -1508,6 +1527,33 @@ var IframeOnClick = {
         </div>
       </div>
     </div>
+    <!-- 订阅弹框 -->
+    <el-dialog custom-class="sub-key-dialog" top="30vh" title="订阅搜索词" :close-on-click-modal="false" :close-on-press-escape="false" width="380" :center="true" :show-close="false" :visible.sync="subDialog">
+      <div class="sub-tips">
+        剑鱼标讯推荐您将搜索词<span style="color: #2cb7ca;">"${sub.keywords}"</span>,添加到您的订阅中,以保证及时接收项目信息。
+      </div>
+      <div class="sub-region" v-if="sub.showArea">
+        <span>*订阅区域:</span>
+        <el-select v-model="sub.region" placeholder="请选择" style="width: 230px;">
+          <el-option v-for="item in regionData" :key="item" :label="item" :value="item"></el-option>
+        </el-select>
+      </div>
+      <div style="margin-top: 33px;">
+        <el-checkbox v-model="sub.remindChecd">后续不再提醒</el-checkbox>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <button type="button" :disabled="subDisabled" class="sub-footer-btn sub-btn-confirm" @click="oneKeySub(true)">一键订阅</button>
+        <button class="sub-footer-btn sub-btn-cancel" @click="oneKeySub(false)">暂不订阅</button>
+      </span>
+    </el-dialog>
+    <!-- 一键订阅关键词成功弹框 -->
+    <el-dialog custom-class="sub-success-dialog" top="30vh" :close-on-click-modal="false" :close-on-press-escape="false" width="335" :center="true" :visible.sync="successDialog">
+      <img class="ss-header" src='{{Msg "seo" "cdn"}}/images/subkey-success.png' alt="">
+      <div class="ss-code">
+        <img id="subkeyImg" src="/front/share/10"/>
+      </div>
+      <p class="ss-help">微信扫码关注剑鱼标讯<br>使用订阅功能</p>
+    </el-dialog>
 		<!--广告-->
 		<div  onclick="adv_statistics(this)" adv_name="PC搜索列表页-底部" class="adv-pcsearch-bottom" id="A1" style="cursor:default;">
 			<script>
@@ -1708,8 +1754,6 @@ $(function(){
       var listLen = $('.buyclass-content .buy-list:not(.buy-list-parent)').length;
       var curListLen = $(this).parent('.clearfix').find('.buy-list:not(.buy-list-parent)').length;
       var curActiveLen = $(this).parent('.clearfix').find(".active").length;
-      // console.log(curListLen,curActiveLen)
-      // console.log(listLen, activeLen)
       if (activeLen === listLen || activeLen === 0) {
         $('.buyclass-content .buy-list').removeClass('active')
         $('.buyclass-all').addClass('active')
@@ -1730,7 +1774,6 @@ $(function(){
       }
       var activeLen = $('.buyclass-content .buy-list-parent').filter(".active").length;
       var listLen = $('.buyclass-content .buy-list-parent').length;
-      // console.log(activeLen,listLen)
       if (activeLen === listLen || activeLen === 0) {
         $('.buyclass-content .buy-list').removeClass('active')
         $('.buyclass-all').addClass('active')
@@ -1876,6 +1919,7 @@ $(function(){
     var hasVipIcon = $(this).siblings().hasClass('icon-vip'); // 有无点击付费的搜索范围
     // 如果是老用户(版本更新前注册的用户)可以使用中标企业搜索范围
     // 不是付费用户引导去付费
+    // console.log(vipState, hasVipIcon);
     if (!vipState && hasVipIcon) {
       if($(this).text().indexOf('中标企业')> -1 && isOld) {
         var typeArr = selectType ? selectType.split(',') : []
@@ -2184,7 +2228,20 @@ document.querySelector(".searchControl").oncopy = function(){
           entniche: false,
           member: false,
           vip: 0
-        }
+        },
+        subDialog: false,
+        successDialog: false,
+        sub: {
+          showArea: false,
+          keywords: $("#zbSeatchT [name='keywords']").val(),
+          region: '',
+          remindChecd: false
+        },
+        regionData: [
+          '安徽','澳门','北京','重庆','福建','广东','广西','贵州','甘肃','河北','湖北','黑龙江','海南','河南','湖南','吉林','江苏','江西','辽宁','内蒙古','宁夏',
+          '青海','山西','陕西','上海','山东','四川','天津','台湾','西藏','新疆','香港','云南','浙江'
+        ],
+        freeSubArea: false
       }
     },
     computed: {
@@ -2193,6 +2250,13 @@ document.querySelector(".searchControl").oncopy = function(){
         var member = this.powerInfo.member
         var vip = this.powerInfo.vip
         return entniche || member || vip > 0
+      },
+      subDisabled: function () {
+        if (this.sub.showArea) {
+          return !this.sub.region
+        } else {
+          return false
+        }
       }
     },
     created: function () {
@@ -2200,6 +2264,27 @@ document.querySelector(".searchControl").oncopy = function(){
     },
     mounted: function () {
       console.log('总页码:' + totalPage + ',当前页:' + currentPage + ',一页数量:' + pageSize + ',总条数:' + totalCount)
+      var isClickSearch = sessionStorage.getItem('is-click-search')
+      // console.log('是否手动进行的搜索', isClickSearch);
+      // 当前搜索有关键词且返回的有搜索结果且执行的是搜索点击事件时
+      if(totalCount > 0 && isClickSearch) {
+        var _this = this
+        $.ajax({
+          type:'get',
+          url:'/bigmember/subscribe/freeUser/searchSubscribe',
+          success: function(r){
+            if (r.data) {
+              _this.sub.showArea = r.data.areaSet
+              _this.freeSubArea = r.data.freeArea
+              if (r.data.prompt) {
+                _this.subDialog = true
+              } else {
+                _this.subDialog = false
+              }
+            }
+          }
+        })
+      }
     },
     methods: {
       getPower: function () {
@@ -2261,6 +2346,38 @@ document.querySelector(".searchControl").oncopy = function(){
             }
           }
         }
+      },
+      // 一键订阅
+      oneKeySub: function(type) {
+        // console.log(typeof type);
+        var _this = this
+        var data = type ? {
+          isNoSubscribe: 'Y', // 一键订阅
+          subsequentPrompt: _this.remindChecd ? 'Y' : 'N',
+          key: $("#zbSeatchT [name='keywords']").val().trim(),
+          area: _this.sub.region
+        } : {
+          isNoSubscribe: 'N', // 暂不订阅
+          subsequentPrompt: _this.remindChecd ? 'Y' : 'N'
+        }
+        $.ajax({
+          type:'post',
+          url: '/bigmember/subscribe/freeUser/subscribeSearch',
+          data: data,
+          success: function(r){
+            if (r.data && r.data.status) {
+              if (type) { // 选择的一键订阅
+                _this.subDialog = false
+                _this.successDialog = true
+              } else { // 选择的暂不订阅
+                _this.subDialog = false
+              }
+            } else {
+              // console.log('一键订阅失败', r.error_code);
+              _this.subDialog = false
+            }
+          }
+        })
       }
     },
   })