Showing
2 changed files
with
5 additions
and
3 deletions
| ... | @@ -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: 2023-03-01 15:45:20 | 5 | + * @LastEditTime: 2023-03-03 11:12:26 |
| 6 | * @FilePath: /data-table/src/App.vue | 6 | * @FilePath: /data-table/src/App.vue |
| 7 | * @Description: | 7 | * @Description: |
| 8 | --> | 8 | --> |
| ... | @@ -60,7 +60,8 @@ watch( | ... | @@ -60,7 +60,8 @@ watch( |
| 60 | 60 | ||
| 61 | // web端判断 | 61 | // web端判断 |
| 62 | const is_pc = computed(() => wxInfo().isPC); | 62 | const is_pc = computed(() => wxInfo().isPC); |
| 63 | - | 63 | +// 预览模式不需要授权 |
| 64 | +const model = $route.query.model; | ||
| 64 | onMounted(async () => { | 65 | onMounted(async () => { |
| 65 | const code = getUrlParams(location.href) ? getUrlParams(location.href).code : ''; | 66 | const code = getUrlParams(location.href) ? getUrlParams(location.href).code : ''; |
| 66 | const raw_url = encodeURIComponent(location.pathname + location.hash); | 67 | const raw_url = encodeURIComponent(location.pathname + location.hash); |
| ... | @@ -74,6 +75,7 @@ onMounted(async () => { | ... | @@ -74,6 +75,7 @@ onMounted(async () => { |
| 74 | store.changeFormSetting(form_setting); | 75 | store.changeFormSetting(form_setting); |
| 75 | // 需要网页授权-必须要域名相同,需要上传到线上测试 | 76 | // 需要网页授权-必须要域名相同,需要上传到线上测试 |
| 76 | if (!import.meta.env.DEV && form_setting.wxzq_enable && !form_setting.x_field_weixin_openid) { | 77 | if (!import.meta.env.DEV && form_setting.wxzq_enable && !form_setting.x_field_weixin_openid) { |
| 78 | + if (model === 'preview') return false; | ||
| 77 | $router.replace({ | 79 | $router.replace({ |
| 78 | path: '/auth', | 80 | path: '/auth', |
| 79 | query: { | 81 | query: { | ... | ... |
| ... | @@ -502,7 +502,7 @@ const onSubmit = async (values) => { | ... | @@ -502,7 +502,7 @@ const onSubmit = async (values) => { |
| 502 | if (model === 'edit') { | 502 | if (model === 'edit') { |
| 503 | console.warn(postData.value); | 503 | console.warn(postData.value); |
| 504 | } | 504 | } |
| 505 | - if (model === 'edit') return false; | 505 | + if (model === 'edit' || model === 'preview') return false; |
| 506 | // 通过验证 | 506 | // 通过验证 |
| 507 | const result = await addFormDataAPI({ | 507 | const result = await addFormDataAPI({ |
| 508 | form_code: $route.query.code, | 508 | form_code: $route.query.code, | ... | ... |
-
Please register or login to post a comment