Преглед на файлове

更新 接口地址;登录

王智慧 преди 3 години
родител
ревизия
59b415145e
променени са 7 файла, в които са добавени 14 реда и са изтрити 13 реда
  1. 1 1
      .env.dev
  2. 1 1
      .env.release
  3. 1 3
      src/App.vue
  4. 3 3
      src/apis/fetch.js
  5. 3 1
      src/main.js
  6. 4 3
      src/views/index/Login.vue
  7. 1 1
      vite.config.js

+ 1 - 1
.env.dev

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

+ 1 - 1
.env.release

@@ -1,2 +1,2 @@
 VITE_PROJECT_ENV = 'release'
-VITE_BASEURL = 'https://interface.huihenduo.cc/hhd-datacenter/'
+VITE_BASEURL = 'https://interface.huihenduo.cc/hhd-shipping/'

+ 1 - 3
src/App.vue

@@ -2,9 +2,7 @@
   <Layout></Layout>
 </template>
 
-<script setup>
-import Layout from "./layout/Layout.vue";
-</script>
+<script setup></script>
 <style>
 .footer {
   text-align: center;

+ 3 - 3
src/apis/fetch.js

@@ -1,8 +1,8 @@
 import { $http } from "./config";
 export default {
-  // 员工登录
-  staffLogin(data) {
-    return $http("/staff/login", data);
+  // 登录
+  login(data) {
+    return $http("/user/web/login", data);
   },
 
   // 获取用户列表 货主/船东

+ 3 - 1
src/main.js

@@ -10,11 +10,13 @@ import Certs from "./components/Certs.vue";
 import RemoteSearch from "./components/RemoteSearch.vue";
 import RemoteSelect from "./components/RemoteSelect.vue";
 import zhCn from "element-plus/dist/locale/zh-cn.mjs";
+import Layout from "./layout/Layout.vue";
 
 const app = createApp(App);
 app.use(ElementPlus, {
   locale: zhCn,
 });
+app.component("Layout", Layout);
 app.component("Certs", Certs);
 app.component("Uploader", Uploader);
 app.component("RemoteSearch", RemoteSearch);
@@ -50,7 +52,7 @@ router.beforeEach(async (to, from, next) => {
 });
 router.afterEach((to, from) => {
   let { title } = to.meta;
-  document.title = "数据中心 - " + title;
+  document.title = "船务公司 - " + title;
   store.commit("setCurrentMenuItem", to.path);
   store.commit("changefirstTitle", title);
 });

+ 4 - 3
src/views/index/Login.vue

@@ -8,7 +8,7 @@
         <div class="title">
           <div class="title-left"></div>
           <div class="title-mid">丨</div>
-          <div class="title-right">智慧运力运维平台</div>
+          <div class="title-right">汇很多船务公司</div>
         </div>
         <div class="form-container">
           <el-form :model="ruleForm" :rules="rules" ref="form">
@@ -95,9 +95,10 @@ export default {
       form.value.validate(async (valid) => {
         if (valid) {
           let { phone, password } = ruleForm.ruleForm;
-          let res = await api.staffLogin({
+          let res = await api.login({
             phone,
-            password: md5(password).toUpperCase(),
+            password,
+            // password: md5(password).toUpperCase(),
           });
           if (res.data.status == 0) {
             ElNotification.success({

+ 1 - 1
vite.config.js

@@ -37,6 +37,6 @@ export default defineConfig({
     },
   },
   server: {
-    port: 5568,
+    port: 22222,
   },
 });