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-15 18:08:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8f104203af8738d2486a69bb1815ee2bf2cd897c
8f104203
1 parent
ef6b5f2f
新增唯一设备码功能
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
src/App.vue
src/utils/fp3.js
src/App.vue
View file @
8f10420
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-03-1
4 15:15:47
* @LastEditTime: 2023-03-1
5 15:08:59
* @FilePath: /data-table/src/App.vue
* @Description:
-->
...
...
@@ -31,6 +31,7 @@ import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools";
import { styleColor } from "@/constant.js";
import { getFormSettingAPI } from "@/api/form.js";
import { showDialog } from 'vant';
import fp3 from '@/utils/fp3'
// 使用 include + pinia 状态管理动态缓存页面
const store = mainStore();
...
...
@@ -95,18 +96,6 @@ onMounted(async () => {
});
}
} else {
// 启用分享功能,非预览模式
if (form_setting.wxzq_is_share && no_preview_model) {
const wxJs = await wxJsAPI({ form_code: code, url: raw_url });
wxJs.data.jsApiList = apiList;
wx.config(wxJs.data);
wx.ready(() => {
wx.showAllNonBaseMenuItem();
});
wx.error((err) => {
console.warn(err);
});
}
// 判断跳转页面
if (form_setting.sjsj_enable === 0 && !form_setting.sjsj_enable) {
// 表单已结束 -
...
...
@@ -123,6 +112,18 @@ onMounted(async () => {
$router.push("/stop?status=finish");
}
}
// 启用分享功能,非预览模式
if (form_setting.wxzq_is_share && no_preview_model) {
const wxJs = await wxJsAPI({ form_code: code, url: raw_url });
wxJs.data.jsApiList = apiList;
wx.config(wxJs.data);
wx.ready(() => {
wx.showAllNonBaseMenuItem();
});
wx.error((err) => {
console.warn(err);
});
}
// 当数据量达到限额时,该表单将不能继续提交数据。
if (form_setting.is_reach_sjsj_max_count) {
showDialog({
...
...
@@ -132,6 +133,18 @@ onMounted(async () => {
confirmButtonColor: styleColor.baseColor
});
}
// 设定填写次数
if (form_setting.wxzq_scope && no_preview_model) {
}
// 唯一设备码
const fpPromise = fp3.load();
fpPromise
.then(fp => fp.get())
.then(result => {
const visitorId = result.visitorId
console.log(visitorId)
})
}
});
</script>
...
...
@@ -152,6 +165,7 @@ body {
body {
position: relative;
p {
margin: 0;
padding: 0;
...
...
src/utils/fp3.js
0 → 100644
View file @
8f10420
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment