"use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); const _sfc_main = common_vendor.defineComponent({ data() { return { ServiceName: "", title: "北京汽车有限公司", isshow: false, isshow_1: false, newListData: [], allMsg: [ new UTSJSONObject({ name: "myhua", id: 1 }), new UTSJSONObject({ name: "mp3", id: 2 }), new UTSJSONObject({ name: "hello", id: 3 }), new UTSJSONObject({ name: "world", id: 4 }), new UTSJSONObject({ name: "warm weather", id: 5 }), new UTSJSONObject({ name: "m3", id: 6 }), new UTSJSONObject({ name: "hahaha", id: 7 }) ], textcontent: [] }; }, mounted() { this.allMsg = [ { name: "myhua", id: 1 }, { name: "mp3", id: 2 }, { name: "hello", id: 3 }, { name: "world", id: 4 }, { name: "warm weather", id: 5 }, { name: "m3", id: 6 }, { name: "hahaha", id: 7 } ]; this.textcontent = this.allMsg; }, methods: { change_text() { if (this.isshow) { this.isshow = false; } else { this.isshow = true; common_vendor.index.__f__("log", "at pages/home/home.uvue:91", "111"); } }, orderEntry() { common_vendor.index.__f__("log", "at pages/home/home.uvue:95", "111"); common_vendor.index.navigateTo({ url: "/pages/views/dingDanCreate" }); }, // 搜索城市名字 searchName() { }, change_city(name = null) { this.title = name; this.change_text(); this.isshow_1 = true; }, close_view() { this.isshow_1 = false; }, // 模糊匹配 // 右上角搜索框--模糊查询 handleSearch(event = null) { common_vendor.index.__f__("log", "at pages/home/home.uvue:115", event); if (event) { let queryStringArr = event.split(""); let str = "(.*?)"; this.textcontent = []; let regStr = str + queryStringArr.join(str) + str; let reg = RegExp(regStr, "i"); this.allMsg.map((item) => { if (reg.test(item.name)) { this.textcontent.push(item); } }); } else { this.textcontent = []; this.textcontent = this.allMsg; } } } }); if (!Array) { const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons"); const _easycom_uni_easyinput2 = common_vendor.resolveComponent("uni-easyinput"); (_easycom_uni_icons2 + _easycom_uni_easyinput2)(); } const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js"; const _easycom_uni_easyinput = () => "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js"; if (!Math) { (_easycom_uni_icons + _easycom_uni_easyinput)(); } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return common_vendor.e({ a: common_vendor.t($data.title), b: $data.title, c: common_vendor.p({ type: "right", size: "30", color: "#c2d4de" }), d: common_vendor.o((...args) => $options.change_text && $options.change_text(...args)), e: common_assets._imports_0$1, f: common_assets._imports_1, g: common_vendor.p({ type: "right", size: 25, color: "#306e91" }), h: common_vendor.o((...args) => $options.orderEntry && $options.orderEntry(...args)), i: $data.isshow }, $data.isshow ? { j: common_vendor.p({ type: "search", size: 20 }), k: common_vendor.o($options.handleSearch), l: common_vendor.o(($event) => $data.ServiceName = $event), m: common_vendor.p({ inputBorder: false, placeholder: "请输入服务名称", modelValue: $data.ServiceName }), n: common_vendor.o((...args) => $options.searchName && $options.searchName(...args)), o: common_vendor.f($data.textcontent, (item, index, i0) => { return { a: common_vendor.t(item.name), b: index, c: common_vendor.o(($event) => $options.change_city(item.name), index) }; }) } : {}, { p: $data.isshow_1 }, $data.isshow_1 ? { q: common_assets._imports_2, r: common_vendor.t($data.title), s: common_vendor.o((...args) => $options.close_view && $options.close_view(...args)) } : {}, { t: common_vendor.sei(_ctx.virtualHostId, "view") }); } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/home.js.map