new Vue({ el: '#service-search', components: { providerItem, comFooter }, mixins: [wxJssdkMixin], data: { form: { providersName: '' }, providerList: [] }, mounted() { this.getParams() this.toSearchProvider() this.setWxConfig((wx) => this.setWxReady(wx)) }, methods: { getParams() { this.form.providersName = window.location.search.split('?')[1].split('=')[1] }, toSearchProvider() { if (this.form.providersName) { SettlementService.getProvidersAndInfo(this.form, (res) => { if (res.data) { this.providerList = [res.data] } else { this.providerList = [] } }) } }, onSearch() { this.toSearchProvider() }, onCancel() { this.form.providersName = '' } } })