重新调整上传功能

dev
yujialong 3 years ago
parent 82d8677731
commit 67da7d5de6
  1. 2
      src/setting.js
  2. 92
      src/utils/api.js
  3. 2
      src/views/course/AddCurriculum.vue
  4. 10
      src/views/course/assetConfig.vue
  5. 9
      src/views/course/courseconfig.vue
  6. 4
      src/views/order/AddOrder.vue
  7. 6
      src/views/serve/projectAdd.vue
  8. 12
      vue.config.js

@ -28,7 +28,7 @@ const Setting = {
/** /**
* 基础配置 * 基础配置
* */ * */
jumpPath, // 跳转路径前缀 jumpPath, // 判分点系统跳转路径前缀
host, // 请求路径前缀 host, // 请求路径前缀
}; };

@ -1,25 +1,23 @@
import Setting from '@/setting'; import Setting from "@/setting";
let host = Setting.host; let host = Setting.host;
let uploadURL = "http://39.108.250.202:10000"; let uploadURL = "http://39.108.250.202:9000";
export default { export default {
logins: `${host}/users/users/user/login`, //登录 logins: `${host}/users/users/user/login`, //登录
verification:`${host}/users/users/user/captcha`,// 验证码图片 verification: `${host}/users/users/user/captcha`,// 验证码图片
bindPhoneOrEmail:`${host}/users/users/userAccount/bindPhoneOrEmail`,// 绑定手机 bindPhoneOrEmail: `${host}/users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
sendPhoneOrEmailCode:`${host} /users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码 sendPhoneOrEmailCode: `${host} /users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
// 订单管理 // 订单管理
orderAdd:`${host}/nakadai/nakadai/order/add`,// 订单添加 orderAdd: `${host}/nakadai/nakadai/order/add`,// 订单添加
orderDelete:`${host}/nakadai/nakadai/order/delete`,// 删除定单 orderDelete: `${host}/nakadai/nakadai/order/delete`,// 删除定单
orderDetail:`${host}/nakadai/nakadai/order/get`,// 订单详情 orderDetail: `${host}/nakadai/nakadai/order/get`,// 订单详情
orderList:`${host}/nakadai/nakadai/order/list`,// 订单列表 orderList: `${host}/nakadai/nakadai/order/list`,// 订单列表
orderUpdate:`${host}/nakadai/nakadai/order/update`,// 订单更新 orderUpdate: `${host}/nakadai/nakadai/order/update`,// 订单更新
renew: `${host}/nakadai/nakadai/orderOther/renew`,// 续费信息管理-post
renew:`${host}/nakadai/nakadai/orderOther/renew`,// 续费信息管理-post ship: `${host}/nakadai/nakadai/orderOther/ship`,// 处理时的订单发货管理-post
ship:`${host}/nakadai/nakadai/orderOther/ship`,// 处理时的订单发货管理-post
queryAccountIsExist: `${host}/liuwanr/userInfo/queryServerAccountIsExist`, //查询账号是否存在 queryAccountIsExist: `${host}/liuwanr/userInfo/queryServerAccountIsExist`, //查询账号是否存在
@ -29,9 +27,9 @@ export default {
addCustomer: `${host}/nakadai/nakadai/customer/addCustomer`, addCustomer: `${host}/nakadai/nakadai/customer/addCustomer`,
queryCustomer: `${host}/nakadai/nakadai/customer/queryCustomer`, queryCustomer: `${host}/nakadai/nakadai/customer/queryCustomer`,
queryCustomerDetails: `${host}/nakadai/nakadai/customer/queryCustomerDetails`, queryCustomerDetails: `${host}/nakadai/nakadai/customer/queryCustomerDetails`,
saveOrUpdate:`${host}/data/data/role/saveOrUpdate`, saveOrUpdate: `${host}/data/data/role/saveOrUpdate`,
doAssign:`${host}/data/data/permission/doAssign`, doAssign: `${host}/data/data/permission/doAssign`,
updateCustomerByRoleId:`${host}/nakadai/nakadai/customer/updateCustomerByRoleId`, updateCustomerByRoleId: `${host}/nakadai/nakadai/customer/updateCustomerByRoleId`,
resetPwdCustomer: `${host}/nakadai/nakadai/customer/resetPwd`, resetPwdCustomer: `${host}/nakadai/nakadai/customer/resetPwd`,
queryCustomerIsExists: `${host}/nakadai/nakadai/customer/queryCustomerIsExists`, queryCustomerIsExists: `${host}/nakadai/nakadai/customer/queryCustomerIsExists`,
@ -124,33 +122,17 @@ export default {
// 阿里云文件/视频管理 // 阿里云文件/视频管理
fileDeletion: `${uploadURL}/oss/manage/fileDeletion`, // 删除OSS文件 fileDeletion: `${uploadURL}/oss/manage/fileDeletion`, // 删除OSS文件
fileupload: `${uploadURL}/oss/manage/fileUpload`, // 文件上传 fileupload: `${uploadURL}/oss/manage/fileupload`, // 文件上传
getPlayAuth: `${uploadURL}/oss/manage/getPlayAuth`, // 获取播放凭证 getPlayAuth: `${uploadURL}/oss/manage/getPlayAuth`, // 获取播放凭证
queryProvince: `${host}/nakadai/nakadai/province/queryProvince`, //查询省份 queryProvince: `${host}/nakadai/nakadai/province/queryProvince`, //查询省份
queryCity: `${host}/nakadai/nakadai/city/queryCity`, //查询城市 queryCity: `${host}/nakadai/nakadai/city/queryCity`, //查询城市
queryCourseDiscipline: `${host}/nakadai/nakadai/discipline/queryDiscipline`, //查询课程学科 queryCourseDiscipline: `${host}/nakadai/nakadai/discipline/queryDiscipline`, //查询课程学科
queryCourseProfessionalClass: `${host}/nakadai/nakadai/professionalClass/queryProfessionalClass`, //查询专业类 queryCourseProfessionalClass: `${host}/nakadai/nakadai/professionalClass/queryProfessionalClass`, //查询专业类
queryCourseProfessional: `${host}/nakadai/nakadai/professional/queryProfessional`, //查询专业 queryCourseProfessional: `${host}/nakadai/nakadai/professional/queryProfessional`, //查询专业
queryAppConfig: `${host}/liuwanr/course/queryAppConfig`, //查询应用配置 queryAppConfig: `${host}/liuwanr/course/queryAppConfig`, //查询应用配置
queryTrainingConfig: `${host}/liuwanr/course/queryConfig`, //查询实训配置 queryTrainingConfig: `${host}/liuwanr/course/queryConfig`, //查询实训配置
deleteTrainingConfig: `${host}/liuwanr/course/deleteTrainingConfig`, //删除实训配置 deleteTrainingConfig: `${host}/liuwanr/course/deleteTrainingConfig`, //删除实训配置
@ -165,24 +147,24 @@ export default {
downloadFiles: `${host}/liuwanr/aliyun/downloadFiles`, //下载文件 downloadFiles: `${host}/liuwanr/aliyun/downloadFiles`, //下载文件
// 数据管理 // 数据管理
getIdQueryTable:`${host}/data/data/table/getIdQueryTable`, getIdQueryTable: `${host}/data/data/table/getIdQueryTable`,
getTableByClassification:`${host}/data/data/table/getTableByClassification`, getTableByClassification: `${host}/data/data/table/getTableByClassification`,
getTableByCondition:`${host}/data/data/table/getTableByCondition`, getTableByCondition: `${host}/data/data/table/getTableByCondition`,
originalList:`${host}/data/data/table/originalList`, originalList: `${host}/data/data/table/originalList`,
originalListById:`${host}/data/data/table/originalListById`, originalListById: `${host}/data/data/table/originalListById`,
saveCategory:`${host}/data/data/table/saveCategory`, saveCategory: `${host}/data/data/table/saveCategory`,
saveTable:`${host}/data/data/table/saveTable`, saveTable: `${host}/data/data/table/saveTable`,
updateCategory:`${host}/data/data/table/updateCategory`, updateCategory: `${host}/data/data/table/updateCategory`,
deleteCategory:`${host}/data/data/table/deleteCategory`, deleteCategory: `${host}/data/data/table/deleteCategory`,
deleteTable:`${host}/data/data/table/deleteTable`, deleteTable: `${host}/data/data/table/deleteTable`,
previewData:`${host}/data/data/preview`, previewData: `${host}/data/data/preview`,
staticPreview:`${host}/data/data/staticPreview`, staticPreview: `${host}/data/data/staticPreview`,
// 产品管理 // 产品管理
deleteProduct:`${host}/data/data/product/delete`, deleteProduct: `${host}/data/data/product/delete`,
findById:`${host}/data/data/product/findById`, findById: `${host}/data/data/product/findById`,
listByEntity:`${host}/data/data/product/listByEntity`, listByEntity: `${host}/data/data/product/listByEntity`,
saveProduct:`${host}/data/data/product/save`, saveProduct: `${host}/data/data/product/save`,
updateProduct:`${host}/data/data/product/update`, updateProduct: `${host}/data/data/product/update`,
saveRecord:`${host}/data/data/dataRecord/saveRecord`, saveRecord: `${host}/data/data/dataRecord/saveRecord`
} };

@ -417,7 +417,7 @@ export default {
this.$message.warning("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!"); this.$message.warning("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!");
}, },
uploadSuccess(res, file, fileList) { // uploadSuccess(res, file, fileList) { //
this.form.coverUrl = res.filesResult.fileUrl; this.form.coverUrl = res.data.filesResult.fileUrl;
}, },
uploadError(err, file, fileList) { // uploadError(err, file, fileList) { //
this.$message({ this.$message({

@ -324,12 +324,12 @@ export default {
); );
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
console.log(res); let { fileId, fileType, fileUrl, ossFileName } = res.data.filesResult;
this.uploading = false; this.uploading = false;
this.fileId = res.filesResult.fileId; this.fileId = fileId;
this.fileType = res.filesResult.fileType; this.fileType = fileType;
this.fileUrl = res.filesResult.fileUrl; this.fileUrl = fileUrl;
this.fileName = res.filesResult.ossFileName; this.fileName = ossFileName;
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.$message({ this.$message({

@ -307,11 +307,12 @@ export default {
); );
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
let { fileId, fileType, fileUrl, ossFileName } = res.data.filesResult;
this.uploading = false; this.uploading = false;
this.fileId = res.filesResult.fileId; this.fileId = fileId;
this.fileType = res.filesResult.fileType; this.fileType = fileType;
this.fileUrl = res.filesResult.fileUrl; this.fileUrl = fileUrl;
this.fileName = res.filesResult.ossFileName; this.fileName = ossFileName;
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.$message({ this.$message({

@ -1355,8 +1355,8 @@ export default {
}, },
// //
uploadSuccess(response, file, fileList) { uploadSuccess(res, file, fileList) {
this.contract.contractFile = response.filesResult.fileUrl; this.contract.contractFile = res.data.filesResult.fileUrl;
}, },
// //
uploadError(err, file, fileList) { uploadError(err, file, fileList) {

@ -236,7 +236,6 @@ export default {
founder: 0, // (0 1) founder: 0, // (0 1)
projectName: "", // projectName: "", //
permissions: 0, // (0 1 2) permissions: 0, // (0 1 2)
schoolId: Setting.schoolId,
systemId: this.$route.query.systemId, // id systemId: this.$route.query.systemId, // id
hintOpen: 0, // (0 1 0) hintOpen: 0, // (0 1 0)
experimentHint: "", // experimentHint: "", //
@ -336,11 +335,14 @@ export default {
}, },
getInfoData() { // getInfoData() { //
if (!this.isToPoint) { if (!this.isToPoint) {
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}&schoolId=${this.projectManage.schoolId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
if (res.status === 200) { if (res.status === 200) {
let { projectManage, projectJudgmentVos } = res; let { projectManage, projectJudgmentVos } = res;
this.projectManage = projectManage; this.projectManage = projectManage;
this.projectJudgmentData = projectJudgmentVos; this.projectJudgmentData = projectJudgmentVos;
this.projectJudgmentData.forEach((e, i) => {
e.sort = i + 1;
});
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }

@ -1,11 +1,11 @@
// 引入等比适配插件 // 引入等比适配插件
const px2rem = require('postcss-px2rem') const px2rem = require("postcss-px2rem");
// 配置基本大小 // 配置基本大小
const postcss = px2rem({ const postcss = px2rem({
// 基准大小 baseSize,需要和rem.js中相同 // 基准大小 baseSize,需要和rem.js中相同
remUnit: 16 remUnit: 16
}) });
// 使用等比适配插件 // 使用等比适配插件
module.exports = { module.exports = {
@ -19,9 +19,9 @@ module.exports = {
} }
} }
}, },
publicPath: './', publicPath: "./",
  outputDir: 'dist', outputDir: "dist",
  assetsDir: 'static', assetsDir: "static",
devServer: { devServer: {
port: 8086 port: 8086
// proxy: { // proxy: {
@ -42,4 +42,4 @@ module.exports = {
// } // }
// } // }
} }
} };
Loading…
Cancel
Save