feat: 兼容处理

This commit is contained in:
2026-05-10 13:01:55 +08:00
parent bbca2d14c9
commit 85a61d5bbf
4 changed files with 26 additions and 3 deletions

View File

@@ -31,7 +31,7 @@
import { ref } from "vue";
import { onShow } from "@dcloudio/uni-app";
const showPrivacy = ref(true);
const showPrivacy = ref(false);
const privacyContractName = ref("隐私保护指引");
onShow(() => {
@@ -41,9 +41,9 @@ onShow(() => {
wx.getPrivacySetting({
success: (res) => {
console.log("cj隐私配置", res);
if (res.errMsg == "getPrivacySetting:ok" && res.needAuthorization) {
if (res.errMsg == "getPrivacySetting:ok") {
privacyContractName.value = res.privacyContractName;
showPrivacy.value = res.needAuthorization;
showPrivacy.value = !!res.needAuthorization;
}
},
});
@@ -54,6 +54,7 @@ onShow(() => {
uni.getPrivacySetting({
success: (res) => {
console.log(res);
showPrivacy.value = !!res.needAuthorization;
},
});
// #endif