fix: sysconfig修改
This commit is contained in:
parent
27282570e9
commit
b1bd32cca0
|
@ -4,15 +4,6 @@ import data from './../../../src/utils/baseJson';
|
|||
const baseInFo = data[data.current];
|
||||
|
||||
export default {
|
||||
config:{
|
||||
base: {
|
||||
url: `${config.API_URL}/system/base_config/`,
|
||||
name: "账户信息",
|
||||
req: async function(){
|
||||
return await http.get(this.url);
|
||||
}
|
||||
},
|
||||
},
|
||||
// config:{
|
||||
// base: {
|
||||
// url: `${config.API_URL}/system/base_config/`,
|
||||
|
@ -413,7 +404,14 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
baseInfo: {
|
||||
config: {
|
||||
base: {
|
||||
url: `${config.API_URL}/system/base_config/`,
|
||||
name: "账户信息",
|
||||
req: async function(){
|
||||
return await http.get(this.url);
|
||||
}
|
||||
},
|
||||
getInfo: {
|
||||
url: `${config.API_URL}/system/config/`,
|
||||
name: "获取系统信息",
|
||||
|
|
|
@ -235,9 +235,9 @@
|
|||
return baseName;
|
||||
},
|
||||
baseLogo(){
|
||||
let baseInFo = data[data.current];
|
||||
// let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png';
|
||||
let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png';
|
||||
// let baseInFo = data[data.current];
|
||||
let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png';
|
||||
// let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png';
|
||||
return base_logo
|
||||
},
|
||||
ismobile(){
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
<el-button type="default" @click="h5Show">H5访问</el-button>
|
||||
<el-button type="primary" @click="MonitorOpen" style="background-color:orange;border-color:orange">监控视频</el-button>
|
||||
</div>
|
||||
<div class="login-oauth" v-else>
|
||||
<!-- <div class="login-oauth" v-else>
|
||||
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
<div class="user-info-top">
|
||||
<el-avatar
|
||||
:size="100"
|
||||
:src="$store.state.global.baseLogo"
|
||||
:src="form.base_logo"
|
||||
shape="square"
|
||||
></el-avatar>
|
||||
<h3>{{ $store.state.global.baseName }}</h3>
|
||||
<h3>{{ form.base_name }}</h3>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
|
@ -63,6 +63,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
menu: [
|
||||
{
|
||||
groupName: "系统配置",
|
||||
|
@ -106,18 +107,16 @@ export default {
|
|||
});
|
||||
},
|
||||
mounted() {
|
||||
this.getBaseInfo();
|
||||
this.getSysConfig();
|
||||
},
|
||||
methods: {
|
||||
openPage(item) {
|
||||
this.page = item.index;
|
||||
},
|
||||
|
||||
getBaseInfo() {
|
||||
this.$API.system.baseInfo.getInfo.req().then((res) => {
|
||||
debugger;
|
||||
console.log(res)
|
||||
this.$TOOL.data.set("BASE_INFO", res)
|
||||
getSysConfig() {
|
||||
this.$API.system.config.getInfo.req().then(res=>{
|
||||
this.form = res.base
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
|
@ -36,25 +36,22 @@ export default {
|
|||
apk_file:'',
|
||||
apk_remark:'',
|
||||
},
|
||||
configInfo:null,
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.getBaseInfo()
|
||||
this.getSysConfig();
|
||||
},
|
||||
methods:{
|
||||
getBaseInfo() {
|
||||
this.configInfo = this.$TOOL.data.get("BASE_INFO");
|
||||
this.form = this.$TOOL.data.get("BASE_INFO").apk
|
||||
getSysConfig() {
|
||||
this.$API.system.config.getInfo.req().then(res=>{
|
||||
this.form = res.apk
|
||||
})
|
||||
},
|
||||
submitForm(){
|
||||
this.saveLoading = true;
|
||||
let obj = {}
|
||||
this.configInfo.apk = this.form;
|
||||
obj.apk = this.form;
|
||||
this.$API.system.baseInfo.updateInfo.req(obj).then((res) => {
|
||||
this.$message.success("保存成功")
|
||||
this.$TOOL.data.set("BASE_INFO", this.configInfo)
|
||||
this.$API.system.config.updateInfo.req(obj).then((res) => {
|
||||
this.saveLoading = false;
|
||||
}).catch(res=>{
|
||||
this.saveLoading = false;
|
||||
|
|
|
@ -32,28 +32,24 @@ export default {
|
|||
xn_secret:'',
|
||||
},
|
||||
saveLoading:false,
|
||||
configInfo:null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getBaseInfo();
|
||||
this.getSysConfig();
|
||||
},
|
||||
methods: {
|
||||
openPage(item) {
|
||||
this.page = item.index;
|
||||
},
|
||||
getBaseInfo() {
|
||||
this.configInfo = this.$TOOL.data.get("BASE_INFO");
|
||||
this.form = this.$TOOL.data.get("BASE_INFO").sms
|
||||
getSysConfig() {
|
||||
this.$API.system.config.getInfo.req().then(res=>{
|
||||
this.form = res.sms
|
||||
})
|
||||
},
|
||||
submitForm(){
|
||||
this.saveLoading = true;
|
||||
let obj = {}
|
||||
obj.sms = this.form;
|
||||
this.configInfo.sms = this.form
|
||||
this.$API.system.baseInfo.updateInfo.req(obj).then((res) => {
|
||||
this.$API.system.config.updateInfo.req(this.form).then((res) => {
|
||||
this.$message.success("保存成功")
|
||||
this.$TOOL.data.set("BASE_INFO", this.configInfo)
|
||||
this.saveLoading = false;
|
||||
}).catch(res=>{
|
||||
this.saveLoading = false;
|
||||
|
|
|
@ -48,29 +48,27 @@ export default {
|
|||
base_name: "托克逊能源管理平台",
|
||||
base_name_short: "托克逊能管"
|
||||
},
|
||||
configInfo:null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getBaseInfo();
|
||||
this.getSysConfig();
|
||||
},
|
||||
methods: {
|
||||
openPage(item) {
|
||||
this.page = item.index;
|
||||
},
|
||||
|
||||
getBaseInfo() {
|
||||
this.configInfo = this.$TOOL.data.get("BASE_INFO");
|
||||
this.form = this.$TOOL.data.get("BASE_INFO").base
|
||||
getSysConfig() {
|
||||
this.$API.system.config.getInfo.req().then(res=>{
|
||||
this.form = res.base
|
||||
})
|
||||
},
|
||||
submitForm(){
|
||||
this.saveLoading = true;
|
||||
let obj = {}
|
||||
this.configInfo.base = this.form;
|
||||
obj.base = this.form;
|
||||
this.$API.system.baseInfo.updateInfo.req(obj).then((res) => {
|
||||
this.$API.system.config.updateInfo.req(obj).then((res) => {
|
||||
this.$message.success("保存成功")
|
||||
this.$TOOL.data.set("BASE_INFO", this.configInfo)
|
||||
this.saveLoading = false;
|
||||
}).catch(res=>{
|
||||
this.saveLoading = false;
|
||||
|
|
Loading…
Reference in New Issue