给登录增加配置读取逻辑

This commit is contained in:
季圣华
2023-08-23 00:40:14 +08:00
parent b556658ecd
commit 5befe0e0f0
2 changed files with 11 additions and 1 deletions

View File

@@ -116,6 +116,7 @@ export const BillListMixin = {
console.log(value); console.log(value);
}, },
initSystemConfig() { initSystemConfig() {
this.isShowExcel = Vue.ls.get('isShowExcel');
getCurrentSystemConfig().then((res) => { getCurrentSystemConfig().then((res) => {
if(res.code === 200 && res.data){ if(res.code === 200 && res.data){
let multiBillType = res.data.multiBillType let multiBillType = res.data.multiBillType
@@ -126,7 +127,6 @@ export const BillListMixin = {
getPlatformConfigByKey({ "platformKey": "bill_excel_url" }).then((res) => { getPlatformConfigByKey({ "platformKey": "bill_excel_url" }).then((res) => {
if (res && res.code === 200) { if (res && res.code === 200) {
if(res.data.platformValue) { if(res.data.platformValue) {
this.isShowExcel = true
this.billExcelUrl = res.data.platformValue this.billExcelUrl = res.data.platformValue
} }
} }

View File

@@ -60,6 +60,7 @@
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { timeFix } from '@/utils/util' import { timeFix } from '@/utils/util'
import Vue from 'vue' import Vue from 'vue'
import { getPlatformConfigByKey} from '@/api/api'
import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types' import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
import { getEncryptedString } from '@/utils/encryption/aesEncrypt' import { getEncryptedString } from '@/utils/encryption/aesEncrypt'
@@ -194,6 +195,15 @@
let desc = 'admin只是平台运维用户真正的管理员是租户(测试账号为jshadmin不能编辑任何业务数据只能配置平台菜单和创建租户' let desc = 'admin只是平台运维用户真正的管理员是租户(测试账号为jshadmin不能编辑任何业务数据只能配置平台菜单和创建租户'
this.$message.info(desc,30) this.$message.info(desc,30)
} else { } else {
getPlatformConfigByKey({ "platformKey": "bill_excel_url" }).then((res) => {
if (res && res.code === 200) {
if(res.data.platformValue) {
Vue.ls.set('isShowExcel', true);
} else {
Vue.ls.set('isShowExcel', false);
}
}
})
getAction("/user/infoWithTenant",{}).then(res=>{ getAction("/user/infoWithTenant",{}).then(res=>{
if(res && res.code === 200) { if(res && res.code === 200) {
let currentTime = new Date(); //新建一个日期对象,默认现在的时间 let currentTime = new Date(); //新建一个日期对象,默认现在的时间