zhanghua
2024-11-25 c42294009ec00f4d9ee3a95a131252237aec3e7b
地址修改
6个文件已修改
63 ■■■■■ 已修改文件
.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/graphql.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/student/components/details.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/student/components/upload-student.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -2,4 +2,4 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dream_dev'
VUE_APP_BASE_API = '/dream'
src/router/index.js
@@ -30,8 +30,7 @@
 * a base page that does not have permission requirements
 * all roles can be accessed
 */
export const constantRoutes = [
  {
export const constantRoutes = [{
    path: "/login",
    component: () => import("@/views/login/index"),
    hidden: true,
@@ -73,12 +72,23 @@
    path: "/",
    component: Layout,
    redirect: "/student",
    children: [
      {
    children: [{
        path: "/student",
        name: "Student",
        component: () => import("@/views/student/index"),
        meta: { title: "学员列表", icon: "table" },
        meta: {
          title: "学员列表",
          icon: "table"
        },
      },
      {
        path: "student/details",
        name: "StudentDetails",
        component: () => import("@/views/student/components/details.vue"),
        meta: {
          title: "学员详情"
        },
        hidden: true,
      },
    ],
  },
@@ -86,14 +96,15 @@
    path: "/",
    component: Layout,
    redirect: "/class",
    children: [
      {
        path: "/class",
        name: "Class",
        component: () => import("@/views/class/index"),
        meta: { title: "班级列表", icon: "table" },
    children: [{
      path: "/class",
      name: "Class",
      component: () => import("@/views/class/index"),
      meta: {
        title: "班级列表",
        icon: "table"
      },
    ],
    }, ],
  },
  // {
  //   path: "/educational",
@@ -258,13 +269,19 @@
  // },
  // 404 page must be placed at the end !!!
  { path: "*", redirect: "/404", hidden: true },
  {
    path: "*",
    redirect: "/404",
    hidden: true
  },
];
const createRouter = () =>
  new Router({
    // mode: 'history', // require service support
    scrollBehavior: () => ({ y: 0 }),
    scrollBehavior: () => ({
      y: 0
    }),
    routes: constantRoutes,
  });
src/utils/graphql.js
@@ -6,8 +6,8 @@
// export default apolloClient;
// 定义不同请求地址
const EFORMURI = "/dream_dev/graphql";
const IOTURI = "/dream_dev/graphql";
const EFORMURI = "/dream/graphql";
const IOTURI = "/dream/graphql";
// import ApolloClient from 'apollo-boost' //引入apollo-boost插件
import { ApolloClient } from "apollo-client";
import { createHttpLink } from "apollo-link-http";
src/views/student/components/details.vue
@@ -89,7 +89,7 @@
            <el-table-column label="数量" prop="qty" />
            <el-table-column label="金额" prop="amt" />
            <el-table-column label="到期时间" prop="endDate" />
            <el-table-column label="" prop="">
            <!-- <el-table-column label="" prop="">
              <template slot-scope="scope">
                <el-link
                  type="primary"
@@ -98,7 +98,7 @@
                  >查看明细</el-link
                >
              </template>
            </el-table-column>
            </el-table-column> -->
          </el-table>
        </el-form-item>
        <el-form-item
@@ -178,7 +178,7 @@
      });
    },
    goDetails(row) {
      this.$router.push("/details");
      // this.$router.push("/details");
    },
  },
};
src/views/student/components/upload-student.vue
@@ -10,7 +10,7 @@
            @fileSuccess="fatherMethod"
            @file-uploading="showUploadProcess"
            :type="'AUDIENCE'"
            :action="'/dream_dev/player/importPlayer'"
            :action="'/dream/player/importPlayer'"
          >
            <div class="uploading-btn-to">
              <i class="iconfont iconAdd"></i> 上传
@@ -85,7 +85,7 @@
      self.progressStatus = "";
      setTimeout(function () {
        const eventSource = new EventSource(
          "/dream_dev/sse-stream/" +
          "/dream/sse-stream/" +
            JSON.parse(localStorage.getItem("selectStaff")).id
        );
vue.config.js
@@ -39,7 +39,7 @@
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        // 匹配所有以 '/dev-api'开头的请求路径
        target: "http://localhost:18080/dream_dev", //类似于Nginx反向代理
        target: "http://localhost:18080/dream", //类似于Nginx反向代理
        changeOrigin: true, // 支持跨域
        pathRewrite: {
          // 重写路径: 去掉路径中开头的'/dev-api'