Commit 4781465a authored by 邓超's avatar 邓超

fix: web配置添加界面缓存配置

parent 37933f53
Pipeline #71718 passed with stages
......@@ -35,6 +35,10 @@ const HomeConfigModal = props => {
message.error('请填写主页url');
return;
}
if (!checkList || checkList.length === 0) {
message.error('当前主页没有挂接角色');
return;
}
let obj = { homePage: form.getFieldsValue().homePage, productType: '' };
let arrUrl = obj.homePage.split('/'); // 用const声明常量
......
......@@ -161,6 +161,7 @@ export default props => {
messageVoice: config.messageVoice,
menuState: config.menuState,
useCoverMap: config.useCoverMap == 'true',
isCache: config.isCache,
headerPrimaryColor: config.headerPrimaryColor
? config.headerPrimaryColor
: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
......@@ -194,6 +195,7 @@ export default props => {
navTheme: false,
CloudStyle: true,
useCoverMap: true,
isCache: true,
headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
});
}
......@@ -266,20 +268,24 @@ export default props => {
validate.CloudStyle = visibleChecked1 ? '是' : '否';
validate.messageMarking = visibleChecked3 ? 'All' : 'One';
validate.menuState = visibleChecked5 ? 'open' : 'close';
console.log(validate);
let arr = validate.homePage.split('/'); // 用const声明常量
if (validate.homePage) {
let arr = validate.homePage.split('/'); // 用const声明常量
const product = allProductList.find(item => item.PackageName.includes(arr[0]));
if (product) {
arr.shift();
validate.homePage = arr.join('/');
}
console.log(product, 'product');
validate.productType = product?.PackageName || 'civweb4';
if (!productList.some(item => item.PackageName === validate.productType)) {
message.error(`${validate.productType}未授权,不能使用该功能当主页`);
return;
const product = allProductList.find(item => item.PackageName.includes(arr[0]));
if (product) {
arr.shift();
validate.homePage = arr.join('/');
}
console.log(product, 'product');
validate.productType = product?.PackageName || 'civweb4';
if (!productList.some(item => item.PackageName === validate.productType)) {
message.error(`${validate.productType}未授权,不能使用该功能当主页`);
return;
}
}
console.log(validate);
if (validate) {
......@@ -471,6 +477,9 @@ export default props => {
<Form.Item label="登录模板" name="loginTemplate">
<AutoComplete placeholder="请选择登录模板" options={loginPages} allowClear filterOption />
</Form.Item>
<Form.Item label="页面缓存" name="isCache" valuePropName="checked">
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
<Divider orientation="left" style={{ borderTopColor: '#99bbe8' }}>
主页配置
</Divider>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment