Ver código fonte

调整登录页/首页/个人中心页

空白格 2 anos atrás
pai
commit
c6dbac4bdb

+ 55 - 15
src/layout/index.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-10 11:30:36
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-17 17:23:37
+ * @LastEditTime: 2022-08-23 15:17:05
  * @FilePath: \veterans_client_web\src\layout\index.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -30,12 +30,16 @@
             </el-input>
           </div>
           <div class="header-box-right-user" v-if="isLogin">
-            下午好,<router-link class="link" to="/personalcenter">{{
-              userInfo.userName || userInfo.name
-            }}</router-link>
+            {{ getDateText() }}好,<router-link
+              class="link"
+              to="/personalcenter"
+              >{{ userInfo.userName || userInfo.name }}</router-link
+            >
           </div>
           <div class="header-box-right-user" v-else>
-            下午好,请<router-link class="link" to="/login">登录</router-link>
+            {{ getDateText() }}好,请<router-link class="link" to="/login"
+              >登录</router-link
+            >
           </div>
         </div>
       </div>
@@ -46,7 +50,7 @@
     <div class="footer" height="100px">
       <div class="footer-link">
         <router-link class="link" to="">关于我们</router-link> |
-        <router-link class="link" to="">加入收藏</router-link> |
+        <span class="link" to="" @click="addFavorite">加入收藏</span> |
         <router-link class="link" to="">隐私声明</router-link> |
         <router-link class="link" to="">网站地图</router-link> |
         <router-link class="link" to="">联系我们</router-link> |
@@ -68,8 +72,8 @@ export default {
   data() {
     return {
       searchValue: "",
-      currentPath: '/',
-      nowDate: ''
+      currentPath: "/",
+      nowDate: "",
     };
   },
   computed: {
@@ -79,16 +83,51 @@ export default {
     }),
   },
   watch: {
-    '$route'(val) {
+    $route(val) {
       if (val.path) {
-        this.currentPath = val.path
+        this.currentPath = val.path;
       }
-    }
+    },
   },
   created() {
-    this.currentPath = this.$router.history.current.path
-    this.nowDate = parseTime(new Date(), '{y}年{m}月{d}日 星期{a}')
-  }
+    this.currentPath = this.$router.history.current.path;
+    this.nowDate = parseTime(new Date(), "{y}年{m}月{d}日 星期{a}");
+  },
+  methods: {
+    /**
+     * 获取上午/下午
+     * @date 2022-08-23
+     * @returns {any}
+     */
+    getDateText() {
+      let date = new Date();
+      let hours = date.getHours();
+      if (hours >= 0 && hours < 12) {
+        return "上午";
+      } else {
+        return "下午";
+      }
+    },
+    /**
+     * 加入收藏操作
+     * @date 2022-08-23
+     * @returns {any}
+     */
+    addFavorite() {
+      let sURL = window.location.href,
+      sTitle = '贵州退役军人教育培训'
+      console.log(sURL);
+      try {
+        window.external.addFavorite(sURL, sTitle);
+      } catch (e) {
+        try {
+          window.sidebar.addPanel(sTitle, sURL, "");
+        } catch (e) {
+          alert("加入收藏失败,请使用Ctrl+D进行添加");
+        }
+      }
+    },
+  },
 };
 </script>
 
@@ -147,7 +186,7 @@ export default {
   }
 }
 .main {
-  background-color: #F4F4F4;
+  background-color: #f4f4f4;
 }
 .footer {
   background-color: #659789;
@@ -166,6 +205,7 @@ export default {
     .link {
       color: #fff;
       margin: 0 5px;
+      cursor: pointer;
     }
   }
 }

+ 7 - 2
src/views/Home/HomeIndex.vue

@@ -2,8 +2,8 @@
  * @Description: 首页
  * @Author: 空白格
  * @Date: 2022-08-10 11:26:40
- * @LastEditors: gcz
- * @LastEditTime: 2022-08-23 10:22:07
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-23 15:22:06
  * @FilePath: \veterans_client_web\src\views\Home\HomeIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -182,18 +182,23 @@
                     <div class="hmpc-right-list">
                       <div
                         class="hmpc-right-list-btn hmpc-right-list-btn-1"
+                        @click="jumpPage('/policyadvice')"
                       ></div>
                       <div
                         class="hmpc-right-list-btn hmpc-right-list-btn-2"
+                        @click="jumpPage('/recruitmentemployment')"
                       ></div>
                       <div
                         class="hmpc-right-list-btn hmpc-right-list-btn-3"
+                        @click="jumpPage('/skilltraining')"
                       ></div>
                       <div
                         class="hmpc-right-list-btn hmpc-right-list-btn-4"
+                        @click="jumpPage('/educationpromote')"
                       ></div>
                       <div
                         class="hmpc-right-list-btn hmpc-right-list-btn-5"
+                        @click="jumpPage('/workguide')"
                       ></div>
                     </div>
                   </div>

+ 2 - 1
src/views/Login/LoginIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-10 11:45:16
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-22 10:30:43
+ * @LastEditTime: 2022-08-23 15:06:09
  * @FilePath: \veterans_client_web\src\views\Login\LoginIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -41,6 +41,7 @@
                   v-model="form.code"
                   :maxlength="4"
                   placeholder="请输入验证码"
+                  :disabled="!form.accessToken"
                 >
                   <el-image
                     class="el-input__icon"

+ 5 - 5
src/views/PersonalCenter/PersonalCenterIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-15 10:09:03
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-22 11:24:18
+ * @LastEditTime: 2022-08-23 15:27:46
  * @FilePath: \veterans_client_web\src\views\PersonalCenter\PersonalCenterIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -50,7 +50,7 @@
                         >已认证</template
                       >
                       <template v-else>
-                        <router-link to="">未认证</router-link>
+                        <router-link to="/applyeducationauth">未认证</router-link>
                       </template>
                     </div>
                   </div>
@@ -415,8 +415,8 @@ export default {
         padding: 5px 0 15px;
         cursor: pointer;
         &-icon {
-          width: 34px;
-          height: 33px;
+          width: 30px;
+          height: 30px;
           margin-right: 20px;
           image {
             width: 100%;
@@ -425,7 +425,7 @@ export default {
         }
         &-label {
           flex: 1;
-          font-size: 24px;
+          font-size: 20px;
           color: #333333;
         }
       }