hookehuyr

新增一个无权限跳转页面

...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2022-05-26 23:52:36 3 * @Date: 2022-05-26 23:52:36
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2024-06-20 17:40:51 5 + * @LastEditTime: 2024-06-24 17:18:44
6 * @FilePath: /data-table/src/App.vue 6 * @FilePath: /data-table/src/App.vue
7 * @Description: 7 * @Description:
8 --> 8 -->
...@@ -78,8 +78,16 @@ onMounted(async () => { ...@@ -78,8 +78,16 @@ onMounted(async () => {
78 if (data.length) { 78 if (data.length) {
79 Object.assign(form_setting, data[0]['property_list'], data[0]['extend']); 79 Object.assign(form_setting, data[0]['property_list'], data[0]['extend']);
80 } 80 }
81 + // TODO: 接口返回请求权限
82 + // form_setting.no_auth = true;
81 // 缓存表单设置 83 // 缓存表单设置
82 store.changeFormSetting(form_setting); 84 store.changeFormSetting(form_setting);
85 + // TODO: 跳转
86 + // if (form_setting.no_auth) {
87 + // $router.replace({
88 + // path: '/no_auth',
89 + // });
90 + // }
83 // 没有授权判断 91 // 没有授权判断
84 let open_auth = form_setting.wxzq_enable && !form_setting.x_field_weixin_openid; 92 let open_auth = form_setting.wxzq_enable && !form_setting.x_field_weixin_openid;
85 // iframe传值openid 93 // iframe传值openid
......
1 /* 1 /*
2 * @Date: 2022-07-18 10:22:22 2 * @Date: 2022-07-18 10:22:22
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-12-06 20:58:37 4 + * @LastEditTime: 2024-06-24 17:10:34
5 * @FilePath: /data-table/src/route.js 5 * @FilePath: /data-table/src/route.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -29,4 +29,10 @@ export default [{ ...@@ -29,4 +29,10 @@ export default [{
29 meta: { 29 meta: {
30 title: '授权页面', 30 title: '授权页面',
31 } 31 }
32 +}, {
33 + path: '/no_auth',
34 + component: () => import('@/views/no_auth.vue'),
35 + meta: {
36 + title: '未授权页面',
37 + }
32 }]; 38 }];
......
1 +<!--
2 + * @Date: 2022-06-29 18:18:02
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2024-06-24 17:17:20
5 + * @FilePath: /data-table/src/views/no_auth.vue
6 + * @Description: 文件描述
7 +-->
8 +<template>
9 + <div class="">未授权页面</div>
10 + <div>{{ formSetting }}</div>
11 +</template>
12 +
13 +<script setup>
14 +import { ref } from 'vue'
15 +import { useRoute, useRouter } from 'vue-router'
16 +
17 +import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
18 +//import { } from '@/utils/generateModules.js'
19 +//import { } from '@/utils/generateIcons.js'
20 +//import { } from '@/composables'
21 +const $route = useRoute();
22 +const $router = useRouter();
23 +useTitle($route.meta.title);
24 +
25 +// 获取表单设置
26 +const store = mainStore();
27 +const { formSetting } = storeToRefs(store);
28 +
29 +</script>
30 +
31 +<style lang="less" scoped>
32 +
33 +</style>