Browse Source

fix(noadmin):按钮刷新页面与去登录

liyangbin 2 years ago
parent
commit
0fd6fc4809
1 changed files with 18 additions and 3 deletions
  1. 18 3
      src/views/Noadmin.vue

+ 18 - 3
src/views/Noadmin.vue

@@ -1,5 +1,20 @@
 <script>
-export default {}
+import { userStore } from '@/store/userInfo'
+import { get } from '../../utils/request'
+
+export default {
+  methods:{
+    Refresh(){
+      get('/pdf-tech/vppMember/getMemberInfo').then(
+        (res) => {
+          if (res.data.code === 200 && res.data.msg == 'success') {
+            userStore().setUserInfo(res.data.result)
+            this.$router.push('/dashboard')
+          }
+        })
+    }
+  }
+}
 </script>
 
 <template>
@@ -12,8 +27,8 @@ export default {}
         <p>Please change your account or contact your super admin.</p>
       </div>
       <div class="flex justify-between mt-16px text-14px">
-        <button class="h-32px w-180px bg-[#fff] rounded-4px">Refresh page</button>
-        <button class="h-32px w-180px ml-8px  rounded-4px bg-[#1460F3] text-[#fff]">Sign in another account</button>
+        <button class="h-32px w-180px bg-[#fff] rounded-4px" @click="Refresh">Refresh page</button>
+        <button type="button" class="h-32px w-180px ml-8px  rounded-4px bg-[#1460F3] text-[#fff]" @click="$router.push('/login')">Sign in another account</button>
       </div>
     </div>
   </div>