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
2023-03-03 11:17:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7c2f17ace8c388511fa4430ed562795df6ffcd32
7c2f17ac
1 parent
7e10106b
新增预览模式
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
src/App.vue
src/views/index.vue
src/App.vue
View file @
7c2f17a
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-03-0
1 15:45:20
* @LastEditTime: 2023-03-0
3 11:12:26
* @FilePath: /data-table/src/App.vue
* @Description:
-->
...
...
@@ -60,7 +60,8 @@ watch(
// web端判断
const is_pc = computed(() => wxInfo().isPC);
// 预览模式不需要授权
const model = $route.query.model;
onMounted(async () => {
const code = getUrlParams(location.href) ? getUrlParams(location.href).code : '';
const raw_url = encodeURIComponent(location.pathname + location.hash);
...
...
@@ -74,6 +75,7 @@ onMounted(async () => {
store.changeFormSetting(form_setting);
// 需要网页授权-必须要域名相同,需要上传到线上测试
if (!import.meta.env.DEV && form_setting.wxzq_enable && !form_setting.x_field_weixin_openid) {
if (model === 'preview') return false;
$router.replace({
path: '/auth',
query: {
...
...
src/views/index.vue
View file @
7c2f17a
...
...
@@ -502,7 +502,7 @@ const onSubmit = async (values) => {
if (model === 'edit') {
console.warn(postData.value);
}
if (model === 'edit') return false;
if (model === 'edit'
|| model === 'preview'
) return false;
// 通过验证
const result = await addFormDataAPI({
form_code: $route.query.code,
...
...
Please
register
or
login
to post a comment