hookehuyr

🐞 fix: 修复密码弹框显示问题

<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-02-07 13:27:49
* @LastEditTime: 2023-02-07 13:36:47
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
......@@ -196,7 +196,7 @@ const setRefMap = (el, item) => {
const notice_text = ref("");
const show = ref(false);
const qr_url = ref("");
const pwd_show = ref(true);
const pwd_show = ref(false);
const mmtx_password = ref('');
// 提交表单密码
......@@ -293,6 +293,8 @@ onMounted(async () => {
// 标记用户还未关注
localStorage.setItem('weixin_subscribe', 0);
}
// 判断是否弹出密码输入框
checkUserPassword()
});
// 打开轮询用户是否关注
......@@ -319,8 +321,27 @@ const checkUserSubscribe = async () => {
show.value = false;
}
// 凭密码填写设置
console.warn(form_setting.mmtx_enable);
if (form_setting.mmtx_enable) {
pwd_show.value = true;
} else {
pwd_show.value = false;
}
}
// 检查密码验证功能
const checkUserPassword = async () => {
const code = getUrlParams(location.href) ? getUrlParams(location.href).code : '';
const { data } = await getFormSettingAPI({ form_code: code });
const form_setting = {};
if (data.length) {
Object.assign(form_setting, data[0]['property_list'], data[0]['extend']);
}
// 凭密码填写设置
if (form_setting.mmtx_enable) {
pwd_show.value = true;
} else {
pwd_show.value = false;
}
}
......