hookehuyr

fix 修复是否在iframe判断

......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-28 17:08:06
* @LastEditTime: 2024-06-28 18:31:02
* @FilePath: /data-table/src/App.vue
* @Description:
-->
......@@ -66,7 +66,7 @@ const is_pc = computed(() => wxInfo().isPC);
// 微信端判断
const is_wx = computed(() => wxInfo().isWeiXin);
// iframe模式判断
const is_iframe = computed(() => window.frames.length > 0);
const is_iframe = computed(() => window.self !== window.top);
onMounted(async () => {
const code = getUrlParams(location.href) ? getUrlParams(location.href).code : '';
......@@ -119,8 +119,8 @@ onMounted(async () => {
if (!form_setting.is_back_user) { // 用户未登录
record_openid = true;
} else { // 用户已登录
if (!data_id) { // 新增表单
record_openid = true
if (!is_iframe.value && page_type === 'add') { // 非iframe里面新增表单
record_openid = true;
}
}
......