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.
 
 
 

60 lines
1.9 KiB

"use strict";
const common_vendor = require("../../../../common/vendor.js");
const config_api = require("../../../../config/api.js");
const store_index = require("../../../../store/index.js");
if (!Array) {
const _easycom_searchRow2 = common_vendor.resolveComponent("searchRow");
_easycom_searchRow2();
}
const _easycom_searchRow = () => "../../../../components/searchRow/searchRow.js";
if (!Math) {
_easycom_searchRow();
}
const _sfc_main = {
__name: "select3",
setup(__props) {
const counterStore = store_index.userStore();
let houseList = common_vendor.ref([]);
async function houseTreeFn(roomNum = "") {
let obj = {
"roomNum": roomNum,
"houseType": counterStore.chooseHouse.houseType,
"communityId": counterStore.chooseHouse.communityId
};
const { data: res } = await config_api.houseRoom(obj);
if (!res)
return houseList.value = [];
houseList.value = res;
console.log(res);
console.log(houseList.value);
}
function chooseItem(item) {
counterStore.upDateHouse("roomNum", item.roomNumDesc);
counterStore.upDateHouse("houseId", item.houseId);
common_vendor.index.navigateTo({
url: "/pages/subPage/authentication/authentication"
});
}
function searchFn(val) {
houseTreeFn(val);
}
houseTreeFn();
return (_ctx, _cache) => {
return {
a: common_vendor.o(searchFn),
b: common_vendor.p({
placeholder: "请输入您的房号"
}),
c: common_vendor.f(common_vendor.unref(houseList), (item, index, i0) => {
return {
a: common_vendor.t(item.roomNumDesc),
b: index,
c: common_vendor.o(($event) => chooseItem(item), index)
};
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-31a868f6"]]);
wx.createPage(MiniProgramPage);