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.

39 lines
1.3 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 weeks ago
4 months ago
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const config_api = require("../../../../config/api.js");
  4. const store_index = require("../../../../store/index.js");
  5. const _sfc_main = {
  6. __name: "select2",
  7. setup(__props) {
  8. const counterStore = store_index.userStore();
  9. let houseList = common_vendor.ref([]);
  10. async function houseTreeFn() {
  11. console.log("没有请求吗、");
  12. const { data: res } = await config_api.houseTree();
  13. houseList.value = res[0].houseTypeNode;
  14. console.log(res);
  15. console.log(houseList.value);
  16. }
  17. function chooseItem(item) {
  18. counterStore.upDateHouse("houseType", item.houseTypeId);
  19. counterStore.upDateHouse("houseTypeName", item.houseTypeName);
  20. common_vendor.index.navigateTo({
  21. url: "/pages/subPage/authentication/comp/select3"
  22. });
  23. }
  24. houseTreeFn();
  25. return (_ctx, _cache) => {
  26. return {
  27. a: common_vendor.f(common_vendor.unref(houseList), (item, index, i0) => {
  28. return {
  29. a: common_vendor.t(item.houseTypeName),
  30. b: index,
  31. c: common_vendor.o(($event) => chooseItem(item), index)
  32. };
  33. })
  34. };
  35. };
  36. }
  37. };
  38. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ff462848"]]);
  39. wx.createPage(MiniProgramPage);