From 4302604d3a6a17374cd84af3adb0dce801591741 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期五, 15 七月 2022 20:28:12 +0800
Subject: [PATCH] 配置app升级地址

---
 src/api/system.ts                           |   16 ++++++++
 src/pages/settings/components/WebManage.vue |   88 ++++++++++++++++++++++++++++++++++++++++++++
 src/pages/settings/index/index.vue          |   10 +++++
 3 files changed, 114 insertions(+), 0 deletions(-)

diff --git a/src/api/system.ts b/src/api/system.ts
index b7e5f90..da46f04 100644
--- a/src/api/system.ts
+++ b/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)
+  })
+}
+
diff --git a/src/pages/settings/components/WebManage.vue b/src/pages/settings/components/WebManage.vue
new file mode 100644
index 0000000..3b30c9b
--- /dev/null
+++ b/src/pages/settings/components/WebManage.vue
@@ -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>
\ No newline at end of file
diff --git a/src/pages/settings/index/index.vue b/src/pages/settings/index/index.vue
index 2f0e257..e8eaf50 100644
--- a/src/pages/settings/index/index.vue
+++ b/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/榛戣壊涓�绾con/鎺堟潈绠$悊.png",
           whiteIcon: "/images/settings/鐧借壊涓�绾con/鎺堟潈绠$悊.png",
         },
+        {
+          name: "鍩熷悕绠$悊",
+          icon: "\ue6db",
+          imgUrl: "/images/settings/閫氱敤璁剧疆.png",
+          blackIcon: "/images/settings/榛戣壊涓�绾con/閫氱敤璁剧疆.png",
+          whiteIcon: "/images/settings/鐧借壊涓�绾con/閫氱敤璁剧疆.png",
+        },
       ],
       accountArr: [],
       jpgArr: [],

--
Gitblit v1.8.0