Showing
2 changed files
with
27 additions
and
13 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-14 15:15:47 | 5 | + * @LastEditTime: 2023-03-15 15:08:59 |
| 6 | * @FilePath: /data-table/src/App.vue | 6 | * @FilePath: /data-table/src/App.vue |
| 7 | * @Description: | 7 | * @Description: |
| 8 | --> | 8 | --> |
| ... | @@ -31,6 +31,7 @@ import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools"; | ... | @@ -31,6 +31,7 @@ import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools"; |
| 31 | import { styleColor } from "@/constant.js"; | 31 | import { styleColor } from "@/constant.js"; |
| 32 | import { getFormSettingAPI } from "@/api/form.js"; | 32 | import { getFormSettingAPI } from "@/api/form.js"; |
| 33 | import { showDialog } from 'vant'; | 33 | import { showDialog } from 'vant'; |
| 34 | +import fp3 from '@/utils/fp3' | ||
| 34 | 35 | ||
| 35 | // 使用 include + pinia 状态管理动态缓存页面 | 36 | // 使用 include + pinia 状态管理动态缓存页面 |
| 36 | const store = mainStore(); | 37 | const store = mainStore(); |
| ... | @@ -95,18 +96,6 @@ onMounted(async () => { | ... | @@ -95,18 +96,6 @@ onMounted(async () => { |
| 95 | }); | 96 | }); |
| 96 | } | 97 | } |
| 97 | } else { | 98 | } else { |
| 98 | - // 启用分享功能,非预览模式 | ||
| 99 | - if (form_setting.wxzq_is_share && no_preview_model) { | ||
| 100 | - const wxJs = await wxJsAPI({ form_code: code, url: raw_url }); | ||
| 101 | - wxJs.data.jsApiList = apiList; | ||
| 102 | - wx.config(wxJs.data); | ||
| 103 | - wx.ready(() => { | ||
| 104 | - wx.showAllNonBaseMenuItem(); | ||
| 105 | - }); | ||
| 106 | - wx.error((err) => { | ||
| 107 | - console.warn(err); | ||
| 108 | - }); | ||
| 109 | - } | ||
| 110 | // 判断跳转页面 | 99 | // 判断跳转页面 |
| 111 | if (form_setting.sjsj_enable === 0 && !form_setting.sjsj_enable) { | 100 | if (form_setting.sjsj_enable === 0 && !form_setting.sjsj_enable) { |
| 112 | // 表单已结束 - | 101 | // 表单已结束 - |
| ... | @@ -123,6 +112,18 @@ onMounted(async () => { | ... | @@ -123,6 +112,18 @@ onMounted(async () => { |
| 123 | $router.push("/stop?status=finish"); | 112 | $router.push("/stop?status=finish"); |
| 124 | } | 113 | } |
| 125 | } | 114 | } |
| 115 | + // 启用分享功能,非预览模式 | ||
| 116 | + if (form_setting.wxzq_is_share && no_preview_model) { | ||
| 117 | + const wxJs = await wxJsAPI({ form_code: code, url: raw_url }); | ||
| 118 | + wxJs.data.jsApiList = apiList; | ||
| 119 | + wx.config(wxJs.data); | ||
| 120 | + wx.ready(() => { | ||
| 121 | + wx.showAllNonBaseMenuItem(); | ||
| 122 | + }); | ||
| 123 | + wx.error((err) => { | ||
| 124 | + console.warn(err); | ||
| 125 | + }); | ||
| 126 | + } | ||
| 126 | // 当数据量达到限额时,该表单将不能继续提交数据。 | 127 | // 当数据量达到限额时,该表单将不能继续提交数据。 |
| 127 | if (form_setting.is_reach_sjsj_max_count) { | 128 | if (form_setting.is_reach_sjsj_max_count) { |
| 128 | showDialog({ | 129 | showDialog({ |
| ... | @@ -132,6 +133,18 @@ onMounted(async () => { | ... | @@ -132,6 +133,18 @@ onMounted(async () => { |
| 132 | confirmButtonColor: styleColor.baseColor | 133 | confirmButtonColor: styleColor.baseColor |
| 133 | }); | 134 | }); |
| 134 | } | 135 | } |
| 136 | + // 设定填写次数 | ||
| 137 | + if (form_setting.wxzq_scope && no_preview_model) { | ||
| 138 | + | ||
| 139 | + } | ||
| 140 | + // 唯一设备码 | ||
| 141 | + const fpPromise = fp3.load(); | ||
| 142 | + fpPromise | ||
| 143 | + .then(fp => fp.get()) | ||
| 144 | + .then(result => { | ||
| 145 | + const visitorId = result.visitorId | ||
| 146 | + console.log(visitorId) | ||
| 147 | + }) | ||
| 135 | } | 148 | } |
| 136 | }); | 149 | }); |
| 137 | </script> | 150 | </script> |
| ... | @@ -152,6 +165,7 @@ body { | ... | @@ -152,6 +165,7 @@ body { |
| 152 | 165 | ||
| 153 | body { | 166 | body { |
| 154 | position: relative; | 167 | position: relative; |
| 168 | + | ||
| 155 | p { | 169 | p { |
| 156 | margin: 0; | 170 | margin: 0; |
| 157 | padding: 0; | 171 | padding: 0; | ... | ... |
src/utils/fp3.js
0 → 100644
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment