From 53c664331d41c2bbcc3960dbe7bf88b942d4ce5d Mon Sep 17 00:00:00 2001 From: liuyuan <582976274@qq.com> Date: Thu, 10 Apr 2025 13:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 3 + src/views/modules/shop/shopproduct.vue | 10 +- .../trainingCourse/training-course-list.vue | 455 ++++++++++++++++++ .../trainingCourse/training-course-user.vue | 283 +++++++++++ src/views/modules/user/user-add-course.vue | 15 +- static/config/index-prod.js | 4 +- static/config/index.js | 4 +- 7 files changed, 766 insertions(+), 8 deletions(-) create mode 100644 src/views/modules/trainingCourse/training-course-list.vue create mode 100644 src/views/modules/trainingCourse/training-course-user.vue diff --git a/src/router/index.js b/src/router/index.js index ba85d2b..58c02d8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -71,6 +71,9 @@ const mainRoutes = { // { path: '/miniClassList8', component: _import('modules/miniClass/miniClassList8'), name: 'miniClassList8', meta: { title: 'miniClassList8', isTab: true } }, { path: '/ClassType', component: _import('modules/miniClass/miniClassType'), name: 'ClassType', meta: { title: '班级类型管理', isTab: true } }, { path: '/reLearn', component: _import('modules/order/reLearn'), name: 'reLearn', meta: { title: '复读订单', isTab: true } }, + + { path: '/training-course-list', component: _import('modules/trainingCourse/training-course-list'), name: 'training-course-list', meta: { title: '培训班管理', isTab: true } }, + { path: '/training-course-user', component: _import('modules/trainingCourse/training-course-user'), name: 'training-course-user', meta: { title: '用户列表', isTab: true } }, ], beforeEnter (to, from, next) { let token = Vue.cookie.get('token') diff --git a/src/views/modules/shop/shopproduct.vue b/src/views/modules/shop/shopproduct.vue index 1ac4d02..51d4040 100644 --- a/src/views/modules/shop/shopproduct.vue +++ b/src/views/modules/shop/shopproduct.vue @@ -67,9 +67,13 @@ align="center" prop="productId" > - + + +
+ + + + + + + + + + + + 线上 + 线下 + + + + 查询 + 新增 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 线上 + 线下 + + + + + + + + + 取 消 + 确 定 + + +
+ + + + diff --git a/src/views/modules/trainingCourse/training-course-user.vue b/src/views/modules/trainingCourse/training-course-user.vue new file mode 100644 index 0000000..a975d3b --- /dev/null +++ b/src/views/modules/trainingCourse/training-course-user.vue @@ -0,0 +1,283 @@ + + + + diff --git a/src/views/modules/user/user-add-course.vue b/src/views/modules/user/user-add-course.vue index a78c502..799387d 100644 --- a/src/views/modules/user/user-add-course.vue +++ b/src/views/modules/user/user-add-course.vue @@ -233,10 +233,23 @@ }, //表单提交 dataFormSubmit() { + const days = Number(this.dataForm.days); if(this.dataForm.file==''){ this.$message.error('请先上传文件'); return } + if(isNaN(days)){ + this.$message.error('开课时长必须是数字'); + return + } + if(!Number.isInteger(days)){ + this.$message.error('开课时长必须为整数'); + return + } + if(days <= 0){ + this.$message.error('开课时长必须大于0'); + return + } this.$refs["dataForm"].validate(valid => { if (valid) { @@ -246,7 +259,7 @@ method: "post", data: this.$http.adornData({ catalogue_id: this.dataForm.catalogues.join(','), - days: Number(this.dataForm.days), + days: days, list: this.resultData.has }) }).then(({ data }) => { diff --git a/static/config/index-prod.js b/static/config/index-prod.js index d9d3633..a4423ea 100644 --- a/static/config/index-prod.js +++ b/static/config/index-prod.js @@ -5,8 +5,8 @@ window.SITE_CONFIG = {}; // api接口请求地址 - window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; - //window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; + //window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; + window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb'; // cdn地址 = 域名 + 版本号 diff --git a/static/config/index.js b/static/config/index.js index 208c35b..86ad4a2 100644 --- a/static/config/index.js +++ b/static/config/index.js @@ -5,8 +5,8 @@ window.SITE_CONFIG = {}; // api接口请求地址 - window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境 - //window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川 + //window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境 + window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川 //window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb'; //本地 // cdn地址 = 域名 + 版本号