Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-06-25 11:25:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ab5239ff35396a6247c1b2391789c6aae8d23977
ab5239ff
1 parent
89e616dd
fix 为授权页面显示调整
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
10 deletions
components.d.ts
src/App.vue
src/views/no_auth.vue
components.d.ts
View file @
ab5239f
...
...
@@ -44,6 +44,40 @@ declare module '@vue/runtime-core' {
TextareaField
:
typeof
import
(
'./src/components/TextareaField/index.vue'
)[
'default'
]
TextField
:
typeof
import
(
'./src/components/TextField/index.vue'
)[
'default'
]
TimePickerField
:
typeof
import
(
'./src/components/TimePickerField/index.vue'
)[
'default'
]
VanActionSheet
:
typeof
import
(
'vant/es'
)[
'ActionSheet'
]
VanArea
:
typeof
import
(
'vant/es'
)[
'Area'
]
VanButton
:
typeof
import
(
'vant/es'
)[
'Button'
]
VanCalendar
:
typeof
import
(
'vant/es'
)[
'Calendar'
]
VanCellGroup
:
typeof
import
(
'vant/es'
)[
'CellGroup'
]
VanCheckbox
:
typeof
import
(
'vant/es'
)[
'Checkbox'
]
VanCheckboxGroup
:
typeof
import
(
'vant/es'
)[
'CheckboxGroup'
]
VanCol
:
typeof
import
(
'vant/es'
)[
'Col'
]
VanConfigProvider
:
typeof
import
(
'vant/es'
)[
'ConfigProvider'
]
VanDatePicker
:
typeof
import
(
'vant/es'
)[
'DatePicker'
]
VanDivider
:
typeof
import
(
'vant/es'
)[
'Divider'
]
VanField
:
typeof
import
(
'vant/es'
)[
'Field'
]
VanForm
:
typeof
import
(
'vant/es'
)[
'Form'
]
VanIcon
:
typeof
import
(
'vant/es'
)[
'Icon'
]
VanImage
:
typeof
import
(
'vant/es'
)[
'Image'
]
VanImagePreview
:
typeof
import
(
'vant/es'
)[
'ImagePreview'
]
VanLoading
:
typeof
import
(
'vant/es'
)[
'Loading'
]
VanNoticeBar
:
typeof
import
(
'vant/es'
)[
'NoticeBar'
]
VanNumberKeyboard
:
typeof
import
(
'vant/es'
)[
'NumberKeyboard'
]
VanOverlay
:
typeof
import
(
'vant/es'
)[
'Overlay'
]
VanPicker
:
typeof
import
(
'vant/es'
)[
'Picker'
]
VanPickerGroup
:
typeof
import
(
'vant/es'
)[
'PickerGroup'
]
VanPopover
:
typeof
import
(
'vant/es'
)[
'Popover'
]
VanPopup
:
typeof
import
(
'vant/es'
)[
'Popup'
]
VanRadio
:
typeof
import
(
'vant/es'
)[
'Radio'
]
VanRadioGroup
:
typeof
import
(
'vant/es'
)[
'RadioGroup'
]
VanRate
:
typeof
import
(
'vant/es'
)[
'Rate'
]
VanRow
:
typeof
import
(
'vant/es'
)[
'Row'
]
VanSwipe
:
typeof
import
(
'vant/es'
)[
'Swipe'
]
VanSwipeItem
:
typeof
import
(
'vant/es'
)[
'SwipeItem'
]
VanTab
:
typeof
import
(
'vant/es'
)[
'Tab'
]
VanTabs
:
typeof
import
(
'vant/es'
)[
'Tabs'
]
VanTimePicker
:
typeof
import
(
'vant/es'
)[
'TimePicker'
]
VanUploader
:
typeof
import
(
'vant/es'
)[
'Uploader'
]
VideoField
:
typeof
import
(
'./src/components/VideoField/index.vue'
)[
'default'
]
VolunteerGroupField
:
typeof
import
(
'./src/components/VolunteerGroupField/index.vue'
)[
'default'
]
}
...
...
src/App.vue
View file @
ab5239f
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-2
4 17:54:38
* @LastEditTime: 2024-06-2
5 11:25:17
* @FilePath: /data-table/src/App.vue
* @Description:
-->
...
...
@@ -72,6 +72,8 @@ onMounted(async () => {
const code = getUrlParams(location.href) ? getUrlParams(location.href).code : '';
const model = getUrlParams(location.href) ? getUrlParams(location.href).model : '';
const data_id = getUrlParams(location.href) ? getUrlParams(location.href).data_id : '';
// 权限控制新增参数
const page_type = getUrlParams(location.href) ? getUrlParams(location.href).page_type : ''; // add 新增页 info 详情页 edit 编辑页 flow 流程页
const raw_url = encodeURIComponent(location.pathname + location.hash);
// 数据收集设置
const { data } = await getFormSettingAPI({ form_code: code });
...
...
@@ -84,11 +86,15 @@ onMounted(async () => {
// 缓存表单设置
store.changeFormSetting(form_setting);
// TODO: 跳转
// if (form_setting.no_auth) {
// $router.replace({
// path: '/no_auth',
// });
// }
if (form_setting.no_auth) {
$router.replace({
path: '/no_auth',
query: {
code,
data_id
}
});
}
// 没有授权判断
let open_auth = form_setting.wxzq_enable && !form_setting.x_field_weixin_openid;
// iframe传值openid
...
...
src/views/no_auth.vue
View file @
ab5239f
<!--
* @Date: 2022-06-29 18:18:02
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-2
4 17:17:20
* @LastEditTime: 2024-06-2
5 10:01:42
* @FilePath: /data-table/src/views/no_auth.vue
* @Description: 文件描述
-->
<template>
<div class="">未授权页面</div>
<div>{{ formSetting }}</div>
<div class="table-box" :style="{ margin: is_pc ? '1rem 0' : '1rem', overflow: 'auto' }">
<div style="display: flex; align-items: center; justify-content: center; margin: 1rem auto; color: red;"><van-icon name="warning" color="red" size="1.25rem" /> 您暂无权限访问该页面</div>
<div>{{ formSetting }}</div>
</div>
</template>
<script setup>
...
...
@@ -18,6 +20,9 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { styleColor } from "@/constant.js";
import { wxInfo, getUrlParams } from "@/utils/tools";
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
...
...
@@ -26,8 +31,21 @@ useTitle($route.meta.title);
const store = mainStore();
const { formSetting } = storeToRefs(store);
const is_pc = computed(() => wxInfo().isPC);
onMounted(() => {
// TAG: 全局背景色
document
.querySelector("body")
.setAttribute("style", `background-color: ${styleColor.backgroundColor}`);
})
</script>
<style lang="less" scoped>
.table-box {
background-color: #ffffff;
padding-bottom: 1rem;
border-radius: 5px;
}
</style>
...
...
Please
register
or
login
to post a comment