123456789101112131415161718192021 |
- import { err } from '../helpers/warn';
- import { formatUserRule, strPathToObjPath } from './util';
- const H5PushTo = function (replace, rule, type) {
- if (this.$route == null) {
- return err('h5端路由为就绪,请检查调用代码');
- }
- rule = formatUserRule(rule, this.selfRoutes, this.CONFIG);
- const objPath = strPathToObjPath(rule);
- objPath.type = type;
- this.$route[replace](objPath);
- };
- export default H5PushTo;
|