瀏覽代碼

feat: 样式调整

cuiyalong 1 年之前
父節點
當前提交
ee4c639424

+ 1 - 1
src/web/staticres/css/pc.css

@@ -2173,7 +2173,7 @@ form{
 }
 .main-station-theme .jy_classify_l .jy_classify_column{
 	margin-right: 0;
-	padding: 0 40px;
+	padding: 0 60px;
 	border-right: 1px solid #E0E0E0;
 }
 .main-station-theme .jy_classify_l .jy_classify_column:first-of-type {

+ 12 - 0
src/web/staticres/js/index/index_2023.12.js

@@ -153,6 +153,7 @@ var _page = {
     },
   },
   init: function () {
+    this.initUserInfoCard()
     this.initHotSearchKeysCount()
     this.initEvents()
     this.initHotBuyerShortName()
@@ -165,6 +166,17 @@ var _page = {
     this.initImportantGovTab()
     this.initHotIndustrySearch()
   },
+  // 计算九宫格高度
+  initUserInfoCard: function () {
+    var container = $('.user-info-card.login-card')
+    var header = container.find('.user-info-header')
+    var item = container.find('.user-power-item')
+    var containerHeight = container.height()
+    var headerHeight = header.height()
+    var last = containerHeight - 12 - headerHeight
+    var calcItemHeight = last / 3
+    item.css({ height: calcItemHeight })
+  },
   initHotSearchKeysCount: function () {
     // 超出盒子的元素隐藏
     var container = $('.hot-key-list');

+ 5 - 4
src/web/staticres/js/login.js

@@ -713,7 +713,7 @@ var processpage = function(item,num){
 function checkNeedGoNewUserSettingPage () {
   // 同步请求判断是否新用户,需要跳转兴趣设置页面
   // 首页不走这个逻辑打开。首页登录后会刷新数据,会走首页重定向。
-  if (location.pathname === '/') return
+  // if (location.pathname === '/') return
   var goPage
   $.ajax({
     type: 'post',
@@ -2114,9 +2114,10 @@ function openLoginDig(type, redirectUrl,Logincallback) {
         }catch(e){
         }
         // p415: 如果是在首页登录,需要刷新页面,以刷新页面用户信息卡片数据以及页面登录未登录下链接
-        if (location.pathname === '/') {
-          return location.reload()
-        }
+        // 改为跳转工作桌面,此处注释掉
+        // if (location.pathname === '/') {
+        //   return location.reload()
+        // }
         if (redirectUrl === 'reload') {
           return location.reload()
         }

+ 19 - 2
src/web/staticres/pccss/index_pc.css

@@ -44,6 +44,12 @@
     font-size: 14px;
     line-height: 22px;
 }
+.main-module.mt14 {
+    margin-top: 14px;
+}
+.main-module.mt16 {
+    margin-top: 16px;
+}
 
 .aside-layout-container {
     display: flex;
@@ -240,6 +246,16 @@
     margin-top: 0;
 }
 /* login */
+
+.user-info-card.login-card {
+    display: flex;
+    flex-direction: column;
+    min-height: unset;
+    height: 330px;
+}
+.user-info-card.login-card .user-info-main {
+    flex-grow: 1; /* 自适应并占满剩余部分 */
+}
 .user-info-card .user-info-title {
     display: flex;
     align-items: center;
@@ -273,7 +289,8 @@
     position: relative;
     width: 96px;
     width: 33.32%;
-    height: 74px;
+    height: 75px;
+    transition: height 0.3s ease;
 }
 .user-info-card .user-power-item-link {
     display: flex;
@@ -358,7 +375,7 @@
 }
 
 .search-type-list {
-    margin-bottom: 18px;
+    margin-bottom: 12px;
     display: flex;
     align-items: center;
 }

+ 7 - 1
src/web/staticres/public-pc/js/header-nav-mini.js

@@ -102,7 +102,13 @@ var headerNavMini = {
     })
   },
   doLogin: function () {
-    openLoginDig(false, 'reload')
+    if (location.pathname === '/') {
+      // 打开登录窗口,登录成功后去工作桌面
+      openLoginDig(true)
+    } else {
+      // 打开登录窗口,登录成功后打开当前页
+      openLoginDig(false, 'reload')
+    }
   },
   checkLogin: function (login) {
     if (login) {

+ 1 - 1
src/web/templates/common/include-head.html

@@ -53,7 +53,7 @@
 {{include "/common/baiducc.html"}}
 <!--E-百度统计-->
 <script>
-  $("#login .loginBtn").attr('onclick', '').off('click').on('click', function () {
+  $("#header-login-btn").attr('onclick', '').off('click').on('click', function () {
     window.top.location.replace('/notin/page?backTo=/')
   })
   $('a').each(function () {

+ 1 - 1
src/web/templates/common/pc-header-nav-mini.html

@@ -63,7 +63,7 @@
                         </div>
                     </li>
                     <li class="menu-item action-menu">
-                        <button class="login-register-button j-s-button main" style="display: none">注册/登录</button>
+                        <button class="login-register-button j-s-button main" id="header-login-btn" style="display: none">注册/登录</button>
                         <a class="go-to-workspace j-s-button main" href="/page_workDesktop/" style="display: none">进入工作台</a>
                     </li>
                 </ul>

+ 1 - 1
src/web/templates/common/pc-header-nav-second.html

@@ -2,7 +2,7 @@
 {{$noLogin :=(or (Eq $userId "") (Eq $userId nil))}}
 {{if and (not $noLogin) (not (Eq .Request.URL "/"))}}
 <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/public-pc/css/pc-header-nav-second.css?v={{Msg "seo" "version"}}' />
-<section id="pc-header-nav-second" class="pc-header-nav-second">
+<section id="pc-header-nav-second" class="pc-header-nav-second" style="display: none;">
  <div class="pc-header-nav-second-head">
   <div class="pc-header-nav-second-head-content">
     <div class="pc-header-nav-second-head-left">

+ 2 - 2
src/web/templates/pc/newIndex.html

@@ -33,11 +33,11 @@
     <main class="body-main">
       <section class="w">
         <!-- 头部logo+搜索模块 -->
-        <section class="main-module">
+        <section class="main-module mt16">
           {{include "/pc/template/index/search-module.html"}}
         </section>
         <!-- 招标采购模块 -->
-        <section class="main-module">
+        <section class="main-module mt14">
           {{include "/pc/template/index/zb-nav-module.html"}}
         </section>
         <!-- banner swiper -->