2026-01-15 19:26:00 +08:00

80 lines
2.4 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const common_libraries_getPageConfig = require("../../common/libraries/getPageConfig.js");
require("../../common/store/useWeAppAuthStore.js");
require("../../gen/Apis.js");
require("../../common/libraries/request.js");
require("../../common/store/useWorkStore.js");
require("../../common/libraries/apiLoading.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "hs-private-policy",
props: {
isAgree: {
type: Boolean,
default: false
},
isDisabled: {
type: Boolean,
default: false
},
policyName: {
type: String,
default: "隐私政策名称"
},
activeColor: {
type: String,
default: "#2A7EFB"
}
},
emits: ["update:isAgree", "clickPolicy", "clickCheckbox"],
setup(__props, { emit }) {
const props = __props;
const isAgree = common_vendor.ref([]);
const checked = common_vendor.ref(false);
if (props.isAgree) {
isAgree.value = ["isAgree"];
} else {
isAgree.value = [];
}
common_vendor.watch(
() => props == null ? void 0 : props.isAgree,
() => {
if (isAgree.value) {
isAgree.value = ["isAgree"];
} else {
isAgree.value = [];
}
}
);
const onPolicy = () => {
emit("clickPolicy");
};
const handleAgreePrivatePolicy = () => {
if (props.isDisabled) {
emit("clickCheckbox");
emit("update:isAgree", false);
return;
}
console.log(isAgree.value, "isAgree.value");
if (checked.value) {
checked.value = false;
} else {
checked.value = true;
}
emit("update:isAgree", checked.value);
};
return (_ctx, _cache) => {
return {
a: checked.value,
b: common_vendor.unref(common_libraries_getPageConfig.getStyleColorValueInfo)(),
c: common_vendor.o(handleAgreePrivatePolicy),
d: common_vendor.t(props.policyName),
e: common_vendor.o(onPolicy),
f: common_vendor.s(common_vendor.unref(common_libraries_getPageConfig.getStyleColorInfo)())
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-48e3a8c0"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/components/hs-private-policy/hs-private-policy.vue"]]);
wx.createComponent(Component);