Showing
1 changed file
with
23 additions
and
2 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-07-18 10:22:22 | 2 | * @Date: 2022-07-18 10:22:22 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-02-07 13:27:49 | 4 | + * @LastEditTime: 2023-02-07 13:36:47 |
| 5 | * @FilePath: /data-table/src/views/index.vue | 5 | * @FilePath: /data-table/src/views/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -196,7 +196,7 @@ const setRefMap = (el, item) => { | ... | @@ -196,7 +196,7 @@ const setRefMap = (el, item) => { |
| 196 | const notice_text = ref(""); | 196 | const notice_text = ref(""); |
| 197 | const show = ref(false); | 197 | const show = ref(false); |
| 198 | const qr_url = ref(""); | 198 | const qr_url = ref(""); |
| 199 | -const pwd_show = ref(true); | 199 | +const pwd_show = ref(false); |
| 200 | const mmtx_password = ref(''); | 200 | const mmtx_password = ref(''); |
| 201 | 201 | ||
| 202 | // 提交表单密码 | 202 | // 提交表单密码 |
| ... | @@ -293,6 +293,8 @@ onMounted(async () => { | ... | @@ -293,6 +293,8 @@ onMounted(async () => { |
| 293 | // 标记用户还未关注 | 293 | // 标记用户还未关注 |
| 294 | localStorage.setItem('weixin_subscribe', 0); | 294 | localStorage.setItem('weixin_subscribe', 0); |
| 295 | } | 295 | } |
| 296 | + // 判断是否弹出密码输入框 | ||
| 297 | + checkUserPassword() | ||
| 296 | }); | 298 | }); |
| 297 | 299 | ||
| 298 | // 打开轮询用户是否关注 | 300 | // 打开轮询用户是否关注 |
| ... | @@ -319,8 +321,27 @@ const checkUserSubscribe = async () => { | ... | @@ -319,8 +321,27 @@ const checkUserSubscribe = async () => { |
| 319 | show.value = false; | 321 | show.value = false; |
| 320 | } | 322 | } |
| 321 | // 凭密码填写设置 | 323 | // 凭密码填写设置 |
| 324 | + console.warn(form_setting.mmtx_enable); | ||
| 322 | if (form_setting.mmtx_enable) { | 325 | if (form_setting.mmtx_enable) { |
| 323 | pwd_show.value = true; | 326 | pwd_show.value = true; |
| 327 | + } else { | ||
| 328 | + pwd_show.value = false; | ||
| 329 | + } | ||
| 330 | +} | ||
| 331 | + | ||
| 332 | +// 检查密码验证功能 | ||
| 333 | +const checkUserPassword = async () => { | ||
| 334 | + const code = getUrlParams(location.href) ? getUrlParams(location.href).code : ''; | ||
| 335 | + const { data } = await getFormSettingAPI({ form_code: code }); | ||
| 336 | + const form_setting = {}; | ||
| 337 | + if (data.length) { | ||
| 338 | + Object.assign(form_setting, data[0]['property_list'], data[0]['extend']); | ||
| 339 | + } | ||
| 340 | + // 凭密码填写设置 | ||
| 341 | + if (form_setting.mmtx_enable) { | ||
| 342 | + pwd_show.value = true; | ||
| 343 | + } else { | ||
| 344 | + pwd_show.value = false; | ||
| 324 | } | 345 | } |
| 325 | } | 346 | } |
| 326 | 347 | ... | ... |
-
Please register or login to post a comment