Merge branch 'dev' of codeup.aliyun.com:61c14a7efa282c88e103c23f/oak-general-business into dev

This commit is contained in:
wenjiarui 2023-03-16 21:48:15 +08:00
commit 6e20f5f6e7
2 changed files with 18 additions and 2 deletions

View File

@ -132,7 +132,15 @@ exports.default = OakComponent({
});
},
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 url = pathname.substring(0, 1) === '/' ? pathname : "/".concat(pathname);
this.redirectTo(tslib_1.__assign({ url: url }, props), state);

View File

@ -108,7 +108,15 @@ export default OakComponent({
}
},
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 url =
pathname.substring(0, 1) === '/' ? pathname : `/${pathname}`;