diff --git a/src/page/login/index.vue b/src/page/login/index.vue
index 63ab0539b856deabbc81a1a4c29e1741b8addf15..b984ef2dac044233463ea734d2443c98df4e25a9 100644
--- a/src/page/login/index.vue
+++ b/src/page/login/index.vue
@@ -3,9 +3,7 @@
class="login-container"
:style="{
'background-image': `url(${
- configOptions.backgroundUrl
- ? JSON.parse(configOptions.backgroundUrl)[0].url
- : getImageUrl('bg.png')
+ configOptions.backgroundUrl ? JSON.parse(configOptions.backgroundUrl)[0].url : getImageUrl('bg.png')
})`,
}">
{{ configOptions.patent }}
- - {{ configOptions.icpFiling }} | - + {{ configOptions.icpFiling }} | {{ configOptions.publicSecurityFiling }} @@ -104,7 +96,7 @@ const getLoginPageConfig = () => { }; //获取首选项配置 const getSysOptions = () => { - axios.get(`/apaas/system/v5/sysOptions`).then((res) => { + axios.get(`/v1/api/sysOptions`).then((res) => { if (res.data.code == 200) { const result = res.data.data || {}; if (result.license_dead_date && result.license_inform_day) { diff --git a/src/page/main/system-admin/preference/authorityForm.vue b/src/page/main/system-admin/preference/authorityForm.vue index 9faeec371789d442792d49da45c418d47b324996..89a986bda5d397afc37c4459128ae437c488c8a9 100644 --- a/src/page/main/system-admin/preference/authorityForm.vue +++ b/src/page/main/system-admin/preference/authorityForm.vue @@ -41,13 +41,15 @@ import { reactive, toRefs, ref } from "vue"; import { ElMessage } from "element-plus"; import axios from "@/request/http.js"; -const props = defineProps({ +const state = reactive({ authorizeFormData: { - type: Object, - default: () => ({}), + id: "", + system_version: "", + system_user: "", + license: "", + license_dead_date: "", + license_inform_day: "", }, -}); -const state = reactive({ authorizeRules: { license_inform_day: [{ type: "number", min: 0, max: 90, message: "请输入0~90的整数", trigger: "blur" }], }, @@ -57,7 +59,7 @@ const authorizeFormRef = ref(null); const getLicenseInfo = () => { if (!state.authorizeFormData.license) return; axios - .post("/apaas/system/v5/sysOptions/getLicenseInfo", { + .post("/v1/api/sysOptions/getLicenseInfo", { license: state.authorizeFormData.license, }) .then((res) => { @@ -70,14 +72,20 @@ const getLicenseInfo = () => { } }); }; +//设置表单数据 +const setFormData = (data) => { + Object.keys(state.authorizeFormData).forEach((item) => { + state.authorizeFormData[item] = data[item]; + }); +}; //保存 const save = () => { authorizeFormRef.value.validate((valid) => { if (valid) { - params = { - ...props.authorizeFormData, + let params = { + ...state.authorizeFormData, }; - axios.post("/apaas/system/v5/sysOptions/licenseOpts", params).then((res) => { + axios.post("/v1/api/sysOptions/licenseOpts", params).then((res) => { if (res.data.code == 200) { ElMessage.success(res.data.msg); } else { @@ -87,8 +95,9 @@ const save = () => { } }); }; -const { authorizeRules } = toRefs(state); +const { authorizeFormData, authorizeRules } = toRefs(state); defineExpose({ + setFormData, save, }); diff --git a/src/page/main/system-admin/preference/index.vue b/src/page/main/system-admin/preference/index.vue index 22a35a83fba286b14e86c648636e5c97f0647919..7f5cee711c63cfd80206b74c0ad90c1385158111 100644 --- a/src/page/main/system-admin/preference/index.vue +++ b/src/page/main/system-admin/preference/index.vue @@ -20,19 +20,13 @@