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

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

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