let _Http = getApp().globalData.http; Component({ properties: { callback: { type: Function }, queryClient: { type: Function } }, data: { queryShow: false, }, methods: { /* 引入 */ introduce(e) { let { item } = e.currentTarget.dataset, that = this; wx.showModal({ title: '提示', content: `是否确定引入“${item.companyName}”信息`, complete: (res) => { if (res.confirm) { _Http.basic({ id: 2024060715002601, content: { companyName: item.companyName, } }).then(res => { console.log("工商详情查询", res) that.setData({ queryShow: false, queryList: null }) that.triggerEvent("callback", res.data) }) } } }) }, /* 工商查询 */ queryClient(enterprisename) { _Http.basic({ id: 20221208103601, content: { pageNumber: 1, pageTotal: 1, pageSize: 5, keyword: enterprisename, } }).then(res => { console.log("工商查询", res) if (!res.data[0]) return wx.showToast({ title: '未查询到相关企业!', icon: "none" }); this.setData({ queryList: res.data.map(v => { for (const key in v) { if (v[key] == "-") v[key] = '' } return v }), queryShow: true }) }) }, openQuery() { this.triggerEvent("queryClient") }, onClose() { this.setData({ queryShow: false }) }, } })