ZZJ
2022-07-15 4302604d3a6a17374cd84af3adb0dce801591741
配置app升级地址
1个文件已添加
2个文件已修改
114 ■■■■■ 已修改文件
src/api/system.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/components/WebManage.vue 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/index/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system.ts
@@ -532,3 +532,19 @@
  })
}
export const getRemoteServer = (data: any) => {
  return request({
    url: "/data/api-v/sysset/getRemoteServer",
    method: "post",
    data
  })
}
export const setRemoteServer = (data: any) => {
  return request({
    url: "/data/api-v/sysset/setRemoteServer",
    method: "post",
    data:qs.stringify(data)
  })
}
src/pages/settings/components/WebManage.vue
New file
@@ -0,0 +1,88 @@
<template>
  <div class="WebManage">
    <div class="title">域名管理</div>
    <div class="row">
      <div class="label">系统升级访问域名</div>
      <el-input disabled v-model="systemName"></el-input>
    </div>
    <div class="row">
      <div class="label">APP升级访问域名</div>
      <el-input v-model="appName"></el-input>
    </div>
    <div @click="save" class="save_button">保存</div>
  </div>
</template>
<script>
import { getRemoteServer, setRemoteServer } from "@/api/system";
export default {
  data() {
    return {
      systemName: "",
      appName: "",
    };
  },
  created() {
    this.getRemoteServer();
  },
  methods: {
    async getRemoteServer() {
      const res = await getRemoteServer();
      this.appName = res.data.appServer;
    },
    async save() {
      const res = await setRemoteServer({
        appServer: this.appName,
      });
      if (res && res.success) {
        this.$notify({
          type: "success",
          message: "保存成功",
        });
      }
    },
  },
};
</script>
<style lang="scss" scoped >
.WebManage {
  margin: 10vh auto;
  text-align: left;
  width: 600px;
  .title {
    font-size: 20px;
    font-weight: 700;
  }
  .row {
    margin-top: 40px;
    display: flex;
    align-items: center;
    .label {
      width: 150px;
      font-size: 14px;
    }
  }
  .save_button {
    margin: 0 auto;
    margin-top: 80px;
    width: 188px;
    height: 40px;
    background: var(--colorCard);
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    line-height: 40px;
    color: #fff;
    text-align: center;
    cursor: pointer;
  }
}
</style>
src/pages/settings/index/index.vue
@@ -578,6 +578,7 @@
    ></deviceInfo>
    <Authorization v-if="activeIndex == 7" style="width: 100%" ref="view_7">
    </Authorization>
    <WebManage v-if="activeIndex == 8"></WebManage>
  </div>
  <div class="welcome-page" v-else ref="curPage" @mouseup="mouseDownIndex = ''">
    <div
@@ -650,6 +651,7 @@
import keyboardLanguage from "../views/keyboardLanguage";
import generalSettings from "../views/generalSettings";
import Authorization from "../views/Authorization";
import WebManage from "@/pages/settings/components/WebManage";
import { pad0, getUrlKey } from "@/api/utils";
export default {
@@ -663,6 +665,7 @@
    generalSettings,
    deviceInfo,
    Authorization,
    WebManage,
  },
  data() {
    var v2 = (rule, value, callback) => {
@@ -810,6 +813,13 @@
          blackIcon: "/images/settings/黑色一级icon/授权管理.png",
          whiteIcon: "/images/settings/白色一级icon/授权管理.png",
        },
        {
          name: "域名管理",
          icon: "\ue6db",
          imgUrl: "/images/settings/通用设置.png",
          blackIcon: "/images/settings/黑色一级icon/通用设置.png",
          whiteIcon: "/images/settings/白色一级icon/通用设置.png",
        },
      ],
      accountArr: [],
      jpgArr: [],