Sfoglia il codice sorgente

feat(toolManage): 新增船东小程序配置功能

- 添加船东小程序配置相关的 API 接口
- 实现船东小程序信息配置页面,包括证书办理服务介绍、法律援助服务介绍等功能
- 在侧边栏添加船东小程序配置入口
- 更新环境变量中的基础 URL
wzg 10 mesi fa
parent
commit
7e1144a0a5

+ 2 - 1
.env.dev

@@ -1,2 +1,3 @@
 VITE_PROJECT_ENV = 'dev'
-VITE_BASEURL = 'https://interface.huihenduo.com.cn/hhd-datacenter-dev/'
+# VITE_BASEURL = 'https://interface.huihenduo.com.cn/hhd-datacenter-dev/'
+VITE_BASEURL = 'https://interface.huihenduo.cc/hhd-datacenter/'

+ 30 - 0
src/apis/fetch.js

@@ -522,4 +522,34 @@ export default {
   updateCargoOwnerCompany(data) {
     return $http("/cargoOwner/updateBasicInfo", data);
   },
+
+  // 船东小程序-办证联系人-删除
+  deleteShipCertOperation(data) {
+    return $http("/sys/basic/config/ship/cert/operation/delete", data);
+  },
+
+  // 船东小程序-办证联系人-列表
+  getShipCertOperationList(data) {
+    return $http("/sys/basic/config/ship/cert/operation/list", data);
+  },
+
+  // 船东小程序-办证联系人-新增/修改
+  modifyShipCertOperation(data) {
+    return $http("/sys/basic/config/ship/cert/operation/modify", data);
+  },
+
+  // 船东小程序-服务介绍-获取服务介绍图片及内容
+  getShipIntroduceInfo() {
+    return $http("/sys/basic/config/ship/get/introduce/info");
+  },
+
+  // 船东小程序-服务介绍-修改文案
+  updateShipIntroduceContent(data) {
+    return $http("/sys/basic/config/ship/update/introduce/content", data);
+  },
+
+  // 船东小程序-服务介绍-上传/修改图片
+  uploadShipIntroduceImg(data) {
+    return $http("/sys/basic/config/ship/upload/introduce/img", data);
+  },
 };

+ 4 - 0
src/components/Aside.vue

@@ -152,6 +152,10 @@ export default {
             path: "/emailConfig",
             name: "邮箱配置",
           },
+          {
+            path: "/shipOwnerWeappConfig",
+            name: "船东小程序配置",
+          },
         ],
       },
     ];

+ 1 - 1
src/components/Header.vue

@@ -170,7 +170,7 @@ export default {
       //     getUnphotographNotice();
       //   }
       // }, 2 * 60 * 1000);
-      cloudLogin();
+      // cloudLogin();
     });
     let timelineData = ref([]);
     async function cloudLogin() {

+ 8 - 1
src/router/index.js

@@ -207,7 +207,6 @@ const router = createRouter({
       },
       component: () => import("../views/toolManage/uploadFileManage.vue"),
     },
-
     {
       path: "/urls",
       name: "urls",
@@ -224,6 +223,14 @@ const router = createRouter({
       },
       component: () => import("../views/toolManage/emailConfig.vue"),
     },
+    {
+      path: "/shipOwnerWeappConfig",
+      name: "shipOwnerWeappConfig",
+      meta: {
+        title: "船东小程序信息配置",
+      },
+      component: () => import("../views/toolManage/shipOwnerWeappConfig.vue"),
+    },
   ],
 });
 

+ 261 - 0
src/views/toolManage/shipOwnerWeappConfig.vue

@@ -0,0 +1,261 @@
+<template>
+  <div>
+    <el-card class="mb20">
+      <template #header>
+        <div class="card-header">
+          <span>证书办理服务介绍</span>
+        </div>
+      </template>
+      <div class="df">
+        <div>
+          <el-image
+            v-if="certOperationIntroduce.imageUrl"
+            class="mb10"
+            style="width: 200px; height: 200px"
+            fit="cover"
+            :preview-src-list="[certOperationIntroduce.imageUrl]"
+            :src="certOperationIntroduce.imageUrl"
+          ></el-image>
+          <el-upload
+            class="df aic jcfe"
+            :action="
+              store.state.baseurl +
+              '/sys/basic/config/ship/upload/introduce/img'
+            "
+            :show-file-list="false"
+            :data="{ configType: 1 }"
+            :on-success="uploadCertSuccess"
+          >
+            <el-button type="primary">
+              {{ certOperationIntroduce.imageUrl ? "重新" : "" }}上传图片
+            </el-button>
+          </el-upload>
+        </div>
+        <div class="ml20">
+          <div style="margin-bottom: 15px">
+            <el-input
+              type="textarea"
+              v-model="certOperationIntroduce.textContent"
+              placeholder="请输入证书办理服务介绍"
+              style="width: 400px; height: 200px"
+            ></el-input>
+          </div>
+          <div class="df jcfe">
+            <el-button
+              type="primary"
+              @click="
+                updateShipIntroduceContent(
+                  1,
+                  certOperationIntroduce.textContent
+                )
+              "
+            >
+              更新证书办理服务介绍
+            </el-button>
+          </div>
+        </div>
+      </div>
+    </el-card>
+    <el-card class="mb20">
+      <template #header>
+        <div class="card-header">
+          <span>证书办理联系人</span>
+        </div>
+      </template>
+    </el-card>
+    <el-card class="mb20">
+      <template #header>
+        <div class="card-header">
+          <span>法律援助服务介绍</span>
+        </div>
+      </template>
+      <div class="df">
+        <div>
+          <el-image
+            v-if="legalAidIntroduce.imageUrl"
+            class="mb10"
+            style="width: 200px; height: 200px"
+            fit="cover"
+            :preview-src-list="[legalAidIntroduce.imageUrl]"
+            :src="legalAidIntroduce.imageUrl"
+          ></el-image>
+          <el-upload
+            class="df aic jcfe"
+            :action="
+              store.state.baseurl +
+              '/sys/basic/config/ship/upload/introduce/img'
+            "
+            :show-file-list="false"
+            :data="{ configType: 2 }"
+            :on-success="uploadCertSuccess"
+          >
+            <el-button type="primary">
+              {{ legalAidIntroduce.imageUrl ? "重新" : "" }}上传图片
+            </el-button>
+          </el-upload>
+        </div>
+        <div class="ml20">
+          <div style="margin-bottom: 15px">
+            <el-input
+              type="textarea"
+              v-model="legalAidIntroduce.textContent"
+              placeholder="请输入法律援助服务介绍"
+              style="width: 400px; height: 200px"
+            ></el-input>
+          </div>
+          <div class="df jcfe">
+            <el-button
+              type="primary"
+              @click="
+                updateShipIntroduceContent(
+                  2,
+                  certOperationIntroduce.textContent
+                )
+              "
+            >
+              更新法律援助服务介绍
+            </el-button>
+          </div>
+        </div>
+      </div>
+    </el-card>
+    <el-card class="mb20">
+      <template #header>
+        <div class="card-header">
+          <span>法律援助律师/团队介绍</span>
+        </div>
+      </template>
+      <div class="df">
+        <div>
+          <el-image
+            v-if="lawyerIntroduce.imageUrl"
+            class="mb10"
+            style="width: 200px; height: 200px"
+            fit="cover"
+            :preview-src-list="[lawyerIntroduce.imageUrl]"
+            :src="lawyerIntroduce.imageUrl"
+          ></el-image>
+          <el-upload
+            class="df aic jcfe"
+            :action="
+              store.state.baseurl +
+              '/sys/basic/config/ship/upload/introduce/img'
+            "
+            :show-file-list="false"
+            :data="{ configType: 3 }"
+            :on-success="uploadCertSuccess"
+          >
+            <el-button type="primary">
+              {{ lawyerIntroduce.imageUrl ? "重新" : "" }}上传图片
+            </el-button>
+          </el-upload>
+        </div>
+        <div class="ml20">
+          <div style="margin-bottom: 15px">
+            <el-input
+              type="textarea"
+              v-model="lawyerIntroduce.textContent"
+              placeholder="请输入法律援助律师/团队介绍
+"
+              style="width: 400px; height: 200px"
+            ></el-input>
+          </div>
+          <div class="df jcfe">
+            <el-button
+              type="primary"
+              @click="
+                updateShipIntroduceContent(
+                  3,
+                  certOperationIntroduce.textContent
+                )
+              "
+            >
+              更新律师/团队介绍
+            </el-button>
+          </div>
+        </div>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script setup>
+import { onMounted, ref } from "vue";
+import api from "apis/fetch";
+import store from "store";
+import { ElNotification } from "element-plus";
+const baseurl = import.meta.env.VITE_BASEURL;
+
+const certOperationIntroduce = ref({});
+const lawyerIntroduce = ref({});
+const legalAidIntroduce = ref({});
+const shipCertOperationList = ref([]);
+
+async function getShipIntroduceInfo() {
+  let { data } = await api.getShipIntroduceInfo();
+  console.log(data.result);
+  if (data.status === 0) {
+    certOperationIntroduce.value = data.result.certOperationIntroduce;
+    lawyerIntroduce.value = data.result.lawyerIntroduce;
+    legalAidIntroduce.value = data.result.legalAidIntroduce;
+  } else {
+    certOperationIntroduce.value = {};
+    lawyerIntroduce.value = {};
+    legalAidIntroduce.value = {};
+  }
+}
+
+async function getShipCertOperationList() {
+  let { data } = await api.getShipCertOperationList({
+    currentPage: 1,
+    size: 100,
+  });
+  console.log(data.result);
+
+  if (data.status === 0) {
+    shipCertOperationList.value = data.result;
+  } else {
+    shipCertOperationList.value = [];
+  }
+}
+
+function uploadCertSuccess(res) {
+  if (res.status === 0) {
+  } else {
+    ElNotification.error({
+      title: "失败",
+      message: res.msg,
+    });
+  }
+}
+function deleteShipCertOperation() {}
+function modifyShipCertOperation() {}
+async function updateShipIntroduceContent(configType, textContent) {
+  let { data } = await api.updateShipIntroduceContent({
+    configType,
+    textContent,
+  });
+  if (data.status === 0) {
+    ElNotification.success({
+      title: "成功",
+      message: data.msg,
+    });
+  } else {
+    ElNotification.error({
+      title: "失败",
+      message: data.msg,
+    });
+  }
+}
+onMounted(() => {
+  getShipIntroduceInfo();
+  getShipCertOperationList();
+});
+</script>
+
+<style scoped>
+/*  */
+:deep() .el-textarea__inner {
+  height: 200px;
+}
+</style>