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-20 11:45:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0536ca891fd9d3517373a9a5356dcf59e9040da
b0536ca8
1 parent
0fb276cc
适配后台页面-iframe调用的需要跳过授权
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
src/App.vue
src/views/index.vue
src/App.vue
View file @
b0536ca
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-
18 14:16:05
* @LastEditTime: 2024-06-
20 11:35:40
* @FilePath: /data-table/src/App.vue
* @Description:
-->
...
...
@@ -62,6 +62,10 @@ watch(
// web端判断
const is_pc = computed(() => wxInfo().isPC);
// 微信端判断
const is_wx = computed(() => wxInfo().isWeiXin);
// iframe模式判断
const is_iframe = computed(() => window.frames.length > 0);
onMounted(async () => {
const code = getUrlParams(location.href) ? getUrlParams(location.href).code : '';
...
...
@@ -89,7 +93,7 @@ onMounted(async () => {
* 空字符串=不授权,snsapi_base=静默授权,snsapi_userinfo=显式授权
*/
// 非测试环境,没有授权信息,需要授权
if (!import.meta.env.DEV && no_auth_info && form_setting.wxzq_scope) {
if (!import.meta.env.DEV && no_auth_info && form_setting.wxzq_scope
&& !is_iframe.value
) {
// 预览模式不开启
if (no_preview_model) {
$router.replace({
...
...
src/views/index.vue
View file @
b0536ca
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-
19 18:05:04
* @LastEditTime: 2024-06-
20 10:17:01
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -852,7 +852,7 @@ const onSubmit = async (values) => {
showSuccessToast("提交成功");
// 缓存表单返回值
store.changeSuccessInfo(result.data);
//在 iframe 中调用父页面中定义的变量
//在 iframe 中调用父页面中定义的变量
- Doris需要自由控制
let getChildVal = parent.parent.getChildVal;
if (getChildVal) {
getChildVal();
...
...
@@ -887,7 +887,7 @@ const onSubmit = async (values) => {
showSuccessToast("提交成功");
// 缓存表单返回值
store.changeSuccessInfo(result.data);
//在 iframe 中调用父页面中定义的变量
//在 iframe 中调用父页面中定义的变量
- Doris需要自由控制
let getChildVal = parent.parent.getChildVal;
if (getChildVal) {
getChildVal();
...
...
Please
register
or
login
to post a comment