USER-20230908AJ\Administrator 10 mēneši atpakaļ
vecāks
revīzija
f8175b6c91

+ 6 - 6
src/utils/routerEach.js

@@ -5,16 +5,16 @@ import store from '@/store'
 const routeList = ['/Home','/Tourism','/Team','/Recharge','/Draw','/Me']
 router.beforeEach((to, from, next) => {
   let userToken = window.localStorage.getItem('userToken')
-  if (userToken) {
-    let active = routeList.findIndex((item) => item === to.path)
+  let active = routeList.findIndex((item) => item === to.path)
 
-    if (active > -1) {
-      active++
-    }
+  if (active > -1) {
+    active++
+  }
+  if (userToken) {
     store.commit('user/setNavActive', active)
     next()
   } else {
-    store.commit('user/setNavActive', 1)
+    store.commit('user/setNavActive', active)
     if (to.path == '/Home'||to.path == '/Tourism'||to.path == '/Team'||to.path == '/login'||to.path == '/register'||to.path == '/forget-password') {
       next()
     } else {

+ 9 - 1
src/views/Forestage/login/forget-password.vue

@@ -14,7 +14,12 @@
 
           <input type="password" :placeholder="$t('LoginIndex.sdxmm')" v-model="fromData.pass">
           <input type="password" :placeholder="$t('LoginIndex.zcsrxmm')" v-model="fromData.pass_two">
-
+        <div class="align-items-center justify-content-space-between mb-36">
+          <div class="align-items-center hand-cursor" @click="toLogin()">
+            <div class="fs-14 fc-70">{{$t('LoginIndex.yyzh')}}, </div>
+            <div class="fs-14 fc-12">{{$t('LoginIndex.qdl')}}</div>
+          </div>
+        </div>
           <div class="mt-30 button-login fs-14 fc-12 text-align-center hand-cursor" @click="confirm()">{{$t('confirm')}}</div>
       </div>
   </div>
@@ -41,6 +46,9 @@
       };
     },
     methods: {
+      toLogin() {
+        this.$router.push("/login");
+      },
       confirm() {
 
         retrievePass(this.fromData).then((res) => {