hookehuyr

fix 为授权页面显示调整

...@@ -44,6 +44,40 @@ declare module '@vue/runtime-core' { ...@@ -44,6 +44,40 @@ declare module '@vue/runtime-core' {
44 TextareaField: typeof import('./src/components/TextareaField/index.vue')['default'] 44 TextareaField: typeof import('./src/components/TextareaField/index.vue')['default']
45 TextField: typeof import('./src/components/TextField/index.vue')['default'] 45 TextField: typeof import('./src/components/TextField/index.vue')['default']
46 TimePickerField: typeof import('./src/components/TimePickerField/index.vue')['default'] 46 TimePickerField: typeof import('./src/components/TimePickerField/index.vue')['default']
47 + VanActionSheet: typeof import('vant/es')['ActionSheet']
48 + VanArea: typeof import('vant/es')['Area']
49 + VanButton: typeof import('vant/es')['Button']
50 + VanCalendar: typeof import('vant/es')['Calendar']
51 + VanCellGroup: typeof import('vant/es')['CellGroup']
52 + VanCheckbox: typeof import('vant/es')['Checkbox']
53 + VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
54 + VanCol: typeof import('vant/es')['Col']
55 + VanConfigProvider: typeof import('vant/es')['ConfigProvider']
56 + VanDatePicker: typeof import('vant/es')['DatePicker']
57 + VanDivider: typeof import('vant/es')['Divider']
58 + VanField: typeof import('vant/es')['Field']
59 + VanForm: typeof import('vant/es')['Form']
60 + VanIcon: typeof import('vant/es')['Icon']
61 + VanImage: typeof import('vant/es')['Image']
62 + VanImagePreview: typeof import('vant/es')['ImagePreview']
63 + VanLoading: typeof import('vant/es')['Loading']
64 + VanNoticeBar: typeof import('vant/es')['NoticeBar']
65 + VanNumberKeyboard: typeof import('vant/es')['NumberKeyboard']
66 + VanOverlay: typeof import('vant/es')['Overlay']
67 + VanPicker: typeof import('vant/es')['Picker']
68 + VanPickerGroup: typeof import('vant/es')['PickerGroup']
69 + VanPopover: typeof import('vant/es')['Popover']
70 + VanPopup: typeof import('vant/es')['Popup']
71 + VanRadio: typeof import('vant/es')['Radio']
72 + VanRadioGroup: typeof import('vant/es')['RadioGroup']
73 + VanRate: typeof import('vant/es')['Rate']
74 + VanRow: typeof import('vant/es')['Row']
75 + VanSwipe: typeof import('vant/es')['Swipe']
76 + VanSwipeItem: typeof import('vant/es')['SwipeItem']
77 + VanTab: typeof import('vant/es')['Tab']
78 + VanTabs: typeof import('vant/es')['Tabs']
79 + VanTimePicker: typeof import('vant/es')['TimePicker']
80 + VanUploader: typeof import('vant/es')['Uploader']
47 VideoField: typeof import('./src/components/VideoField/index.vue')['default'] 81 VideoField: typeof import('./src/components/VideoField/index.vue')['default']
48 VolunteerGroupField: typeof import('./src/components/VolunteerGroupField/index.vue')['default'] 82 VolunteerGroupField: typeof import('./src/components/VolunteerGroupField/index.vue')['default']
49 } 83 }
......
...@@ -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-24 17:54:38 5 + * @LastEditTime: 2024-06-25 11:25:17
6 * @FilePath: /data-table/src/App.vue 6 * @FilePath: /data-table/src/App.vue
7 * @Description: 7 * @Description:
8 --> 8 -->
...@@ -72,6 +72,8 @@ onMounted(async () => { ...@@ -72,6 +72,8 @@ onMounted(async () => {
72 const code = getUrlParams(location.href) ? getUrlParams(location.href).code : ''; 72 const code = getUrlParams(location.href) ? getUrlParams(location.href).code : '';
73 const model = getUrlParams(location.href) ? getUrlParams(location.href).model : ''; 73 const model = getUrlParams(location.href) ? getUrlParams(location.href).model : '';
74 const data_id = getUrlParams(location.href) ? getUrlParams(location.href).data_id : ''; 74 const data_id = getUrlParams(location.href) ? getUrlParams(location.href).data_id : '';
75 + // 权限控制新增参数
76 + const page_type = getUrlParams(location.href) ? getUrlParams(location.href).page_type : ''; // add 新增页 info 详情页 edit 编辑页 flow 流程页
75 const raw_url = encodeURIComponent(location.pathname + location.hash); 77 const raw_url = encodeURIComponent(location.pathname + location.hash);
76 // 数据收集设置 78 // 数据收集设置
77 const { data } = await getFormSettingAPI({ form_code: code }); 79 const { data } = await getFormSettingAPI({ form_code: code });
...@@ -84,11 +86,15 @@ onMounted(async () => { ...@@ -84,11 +86,15 @@ onMounted(async () => {
84 // 缓存表单设置 86 // 缓存表单设置
85 store.changeFormSetting(form_setting); 87 store.changeFormSetting(form_setting);
86 // TODO: 跳转 88 // TODO: 跳转
87 - // if (form_setting.no_auth) { 89 + if (form_setting.no_auth) {
88 - // $router.replace({ 90 + $router.replace({
89 - // path: '/no_auth', 91 + path: '/no_auth',
90 - // }); 92 + query: {
91 - // } 93 + code,
94 + data_id
95 + }
96 + });
97 + }
92 // 没有授权判断 98 // 没有授权判断
93 let open_auth = form_setting.wxzq_enable && !form_setting.x_field_weixin_openid; 99 let open_auth = form_setting.wxzq_enable && !form_setting.x_field_weixin_openid;
94 // iframe传值openid 100 // iframe传值openid
......
1 <!-- 1 <!--
2 * @Date: 2022-06-29 18:18:02 2 * @Date: 2022-06-29 18:18:02
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-06-24 17:17:20 4 + * @LastEditTime: 2024-06-25 10:01:42
5 * @FilePath: /data-table/src/views/no_auth.vue 5 * @FilePath: /data-table/src/views/no_auth.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
8 <template> 8 <template>
9 - <div class="">未授权页面</div> 9 + <div class="table-box" :style="{ margin: is_pc ? '1rem 0' : '1rem', overflow: 'auto' }">
10 - <div>{{ formSetting }}</div> 10 + <div style="display: flex; align-items: center; justify-content: center; margin: 1rem auto; color: red;"><van-icon name="warning" color="red" size="1.25rem" />&nbsp;您暂无权限访问该页面</div>
11 + <div>{{ formSetting }}</div>
12 + </div>
11 </template> 13 </template>
12 14
13 <script setup> 15 <script setup>
...@@ -18,6 +20,9 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ ...@@ -18,6 +20,9 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
18 //import { } from '@/utils/generateModules.js' 20 //import { } from '@/utils/generateModules.js'
19 //import { } from '@/utils/generateIcons.js' 21 //import { } from '@/utils/generateIcons.js'
20 //import { } from '@/composables' 22 //import { } from '@/composables'
23 +import { styleColor } from "@/constant.js";
24 +import { wxInfo, getUrlParams } from "@/utils/tools";
25 +
21 const $route = useRoute(); 26 const $route = useRoute();
22 const $router = useRouter(); 27 const $router = useRouter();
23 useTitle($route.meta.title); 28 useTitle($route.meta.title);
...@@ -26,8 +31,21 @@ useTitle($route.meta.title); ...@@ -26,8 +31,21 @@ useTitle($route.meta.title);
26 const store = mainStore(); 31 const store = mainStore();
27 const { formSetting } = storeToRefs(store); 32 const { formSetting } = storeToRefs(store);
28 33
34 +const is_pc = computed(() => wxInfo().isPC);
35 +
36 +onMounted(() => {
37 + // TAG: 全局背景色
38 + document
39 + .querySelector("body")
40 + .setAttribute("style", `background-color: ${styleColor.backgroundColor}`);
41 +})
42 +
29 </script> 43 </script>
30 44
31 <style lang="less" scoped> 45 <style lang="less" scoped>
32 - 46 +.table-box {
47 + background-color: #ffffff;
48 + padding-bottom: 1rem;
49 + border-radius: 5px;
50 +}
33 </style> 51 </style>
......