瀏覽代碼

feat: 修复三级页遮罩问题

zhangyuhan 3 年之前
父節點
當前提交
06c7b98295
共有 2 個文件被更改,包括 58 次插入29 次删除
  1. 42 25
      src/web/staticres/js/pc-collect-user-info.js
  2. 16 4
      src/web/templates/pc/biddetail_rec.html

+ 42 - 25
src/web/staticres/js/pc-collect-user-info.js

@@ -659,32 +659,49 @@ var vm = new Vue({
           if (res.data) {
             _this.showForm = false
             typeof collectSubmitCallback === 'function' ? collectSubmitCallback(source, res.data) : null
-            if(source == 'member_freeuse') {
-              _this.showSuccess = true
-            } else if (source == 'article_original') {
-              // 如果是阅读原文点击的 留完用户资料执行原点击操作
-              // $(".com-original").trigger('click')
-              // $(".mask-zz").hide()
-              // $(".dialog-container").hide()
-            } else if (source == 'article_collection'){
-              // $('#bidCollect').trigger('click') // 三级页收藏事件
-              // 单个收藏事件传当前点击的dom
-              if(_this.curDom) {
-                _this.curDom.trigger('click') // 列表页单个收藏事件
-                _this.curDom = null
-              }else if(source=="jyarticle_see3_plus_pc"){
-                // $(".mask-zz").hidden()
-                // $(".tabfat").show()
-                $(".")
-              } else {
-                $('#bid-collect').trigger('click') // 列表页批量收藏事件
+            switch (source) {
+              case 'member_freeuse': {
+                _this.showSuccess = true
+                break
+              }
+              case 'article_original': {
+                // 如果是阅读原文点击的 留完用户资料执行原点击操作
+                // $(".com-original").trigger('click')
+                // $(".mask-zz").hide()
+                // $(".dialog-container").hide()
+                break
+              }
+              case 'article_collection': {
+                // $('#bidCollect').trigger('click') // 三级页收藏事件
+                break
+              }
+              case 'article_collection': {
+                // $('#bidCollect').trigger('click') // 三级页收藏事件
+                // 单个收藏事件传当前点击的dom
+                if(_this.curDom) {
+                  _this.curDom.trigger('click') // 列表页单个收藏事件
+                  _this.curDom = null
+                } else {
+                  $('#bid-collect').trigger('click') // 列表页批量收藏事件
+                }
+                break
+              }
+              case 'jyarticle_see3_plus_pc': {
+                location.reload()
+                break
+              }
+              case 'pc_index_bottom_adv': {
+                location.href = '/big/page/index'
+                break
+              }
+              default: {
+                if (source.indexOf('_freeuser') > -1) {
+                  _this.showSuccess = true
+                } else {
+                  _this.showSuccess = true
+                }
+                break
               }
-            } else if (source == 'pc_index_bottom_adv') {
-              location.href = '/big/page/index'
-            }  else if (source.indexOf('_freeuser') > -1) {
-              _this.showSuccess = true
-            } else {
-              _this.showSuccess = true
             }
           }
         }

+ 16 - 4
src/web/templates/pc/biddetail_rec.html

@@ -1347,6 +1347,16 @@ var ucbs_source="pc_rec",ucbsId="{{.T.obj.ucbsId}}";
 	</script>
 	<script type="text/javascript">
 		var canRead = {{.T.canRead}}
+    // 免费用户每日查看三次
+    if(!canRead) {
+      $('#tip-title').text('免费查看更多公告')
+      $(".tip-box .tip-text").eq(0).text('请完善个人信息,获取更多免费查看公告权限')
+      $(".tip-box .tip-text").eq(1).text('')
+      $(".tip-box .detail-nj-btn").text('立即解锁')
+      $(".tabfat").hide()
+      $(".recoveryfat").hide()
+      $("#attach-list").hide()
+    }
 		//是否显示遮罩层
 		function checkShowDialog (res) {
 			var bidmember = false
@@ -1372,12 +1382,14 @@ var ucbs_source="pc_rec",ucbsId="{{.T.obj.ucbsId}}";
 				$(".tip-box .tip-text").eq(1).text('助您提前了解项目信息,把握重要商机!')
 			}
 			// 免费用户每日查看三次
-			if(canRead ) {
-				$('#tip-title').text('免费查看更多公告')
+			if(!canRead) {
+				$('#tip-title').text('免费查看更多公告')
 				$(".tip-box .tip-text").eq(0).text('请完善个人信息,获取更多免费查看公告权限')
 				$(".tip-box .tip-text").eq(1).text('')
-				// $(".tabfat").remove()
-				// $(".recoveryfat").remove()
+				$(".tip-box .detail-nj-btn").text('立即解锁')
+        $(".tabfat").remove()
+        $(".recoveryfat").remove()
+        $("#attach-list").remove()
 			}
 			if ((subType == '拟建' || subType == '采购意向' || canRead) && !bidmember && !entniche && vip <=0 && !privatedata){
 				$(".com-prebuilt").removeClass("hidden");