You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.5 KiB
85 lines
2.5 KiB
"use strict";
|
|
const common_vendor = require("../../../../common/vendor.js");
|
|
const store_index = require("../../../../store/index.js");
|
|
const config_api = require("../../../../config/api.js");
|
|
if (!Array) {
|
|
const _easycom_oneBtn2 = common_vendor.resolveComponent("oneBtn");
|
|
const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup");
|
|
(_easycom_oneBtn2 + _easycom_up_popup2)();
|
|
}
|
|
const _easycom_oneBtn = () => "../../../../components/oneBtn/oneBtn.js";
|
|
const _easycom_up_popup = () => "../../../../uni_modules/uview-plus/components/u-popup/u-popup.js";
|
|
if (!Math) {
|
|
(_easycom_oneBtn + _easycom_up_popup)();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "notice",
|
|
props: {
|
|
list: {
|
|
type: Array,
|
|
default: []
|
|
}
|
|
},
|
|
setup(__props) {
|
|
const counterStore = store_index.userStore();
|
|
const showPop = common_vendor.ref(false);
|
|
function goDetail(item) {
|
|
if (!counterStore.userInfo.myHouse) {
|
|
getHousesFn();
|
|
}
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/subPage/notice/noticeDetail?id=" + item.id
|
|
});
|
|
}
|
|
function oneBtnClickFn() {
|
|
showPop.value = false;
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/subPage/authentication/authentication"
|
|
});
|
|
}
|
|
async function getHousesFn() {
|
|
if (!counterStore.token) {
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/subPage/login/login"
|
|
});
|
|
return;
|
|
}
|
|
const {
|
|
data: res
|
|
} = await config_api.getHouses();
|
|
if (!res.length) {
|
|
return showPop.value = true;
|
|
}
|
|
counterStore.upDateUseInfo("myHouse", res);
|
|
}
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.f(__props.list, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.title),
|
|
b: common_vendor.t(item.timeDesc),
|
|
c: item.picture,
|
|
d: index,
|
|
e: common_vendor.o(($event) => goDetail(item), index)
|
|
};
|
|
}),
|
|
b: common_vendor.o(oneBtnClickFn),
|
|
c: common_vendor.p({
|
|
text: "点击认证业主"
|
|
}),
|
|
d: common_vendor.o(($event) => showPop.value = false),
|
|
e: common_vendor.p({
|
|
show: showPop.value,
|
|
mode: "center",
|
|
round: 10,
|
|
customStyle: {
|
|
width: "90%"
|
|
},
|
|
closeable: true
|
|
})
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-95913b5f"]]);
|
|
wx.createComponent(Component);
|