import history from "../../utils/history"; Component({ props: { componentData: {}, }, data: { type: "", }, didMount() { const { query = {} } = this.$page.data; const { name } = query; const nameMap = { 黄石总院: "huangshi", }; this.setData({ type: nameMap[name] ? nameMap[name] : "normal", }); }, methods: { toNextPage() { const { componentData } = this.props; const { query = {} } = this.$page.data; history.push({ query, componentData, title: "选择科室", pageType: "select-department", }); }, toService() { history.push({ title: "授权协议", pageType: "service-agreement", }); }, }, });