Merge branch 'dev' of codeup.aliyun.com:61c14a7efa282c88e103c23f/oak-general-business into dev
This commit is contained in:
commit
6e20f5f6e7
|
|
@ -132,7 +132,15 @@ exports.default = OakComponent({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
redirectPage: function () {
|
redirectPage: function () {
|
||||||
var redirectTo = this.props.redirectTo;
|
var redirectTo = this.state
|
||||||
|
.redirectTo;
|
||||||
|
if (!redirectTo) {
|
||||||
|
this.setMessage({
|
||||||
|
type: 'error',
|
||||||
|
content: '未配置跳转页面',
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
var pathname = redirectTo.pathname, _a = redirectTo.props, props = _a === void 0 ? {} : _a, _b = redirectTo.state, state = _b === void 0 ? {} : _b;
|
var pathname = redirectTo.pathname, _a = redirectTo.props, props = _a === void 0 ? {} : _a, _b = redirectTo.state, state = _b === void 0 ? {} : _b;
|
||||||
var url = pathname.substring(0, 1) === '/' ? pathname : "/".concat(pathname);
|
var url = pathname.substring(0, 1) === '/' ? pathname : "/".concat(pathname);
|
||||||
this.redirectTo(tslib_1.__assign({ url: url }, props), state);
|
this.redirectTo(tslib_1.__assign({ url: url }, props), state);
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,15 @@ export default OakComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
redirectPage() {
|
redirectPage() {
|
||||||
const { redirectTo } = this.props;
|
const redirectTo = this.state
|
||||||
|
.redirectTo as EntityDict['userEntityGrant']['Schema']['redirectTo'];
|
||||||
|
if (!redirectTo) {
|
||||||
|
this.setMessage({
|
||||||
|
type: 'error',
|
||||||
|
content: '未配置跳转页面',
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
const { pathname, props = {}, state = {} } = redirectTo;
|
const { pathname, props = {}, state = {} } = redirectTo;
|
||||||
const url =
|
const url =
|
||||||
pathname.substring(0, 1) === '/' ? pathname : `/${pathname}`;
|
pathname.substring(0, 1) === '/' ? pathname : `/${pathname}`;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue