diff --git a/src/api/index.js b/src/api/index.js index 4bf39ed..c09db6c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -84,6 +84,7 @@ export default { queryAnnouncementByContestId: `occupationlab/occupationlab/contest/announcement/queryAnnouncementByContestId`, queryAnnouncementDetails: `occupationlab/occupationlab/contest/announcement/queryAnnouncementDetails`, contestAfterLogin: `occupationlab/occupationlab/enterprise/match/contest/contestAfterLogin`, + cancelRegistration: `occupationlab/occupationlab/enterprise/match/applicant/cancelRegistration`, // 阿里云文件/视频管理 fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件 diff --git a/src/assets/img/index/customer.png b/src/assets/img/index/customer.png new file mode 100644 index 0000000..2bea868 Binary files /dev/null and b/src/assets/img/index/customer.png differ diff --git a/src/assets/img/index/customer.jpg b/src/assets/img/index/customer1.jpg similarity index 100% rename from src/assets/img/index/customer.jpg rename to src/assets/img/index/customer1.jpg diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 6cf1519..471f227 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -63,15 +63,7 @@ export default { { index: 'data', title: "数据科研" - }, - { - index: "/cityPartner/list", - title: "城市合伙人" - }, - { - index: "/devPlatform/list", - title: "开发者平台" - }, + }, { index: "/log/list", title: "更新日志" diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index 6b4c34a..5d94cb3 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -190,7 +190,7 @@

售前咨询

-

刘兰

+

刘老师

18019930142

diff --git a/src/pages/match/details/index.vue b/src/pages/match/details/index.vue index 0a386d2..e1b490e 100644 --- a/src/pages/match/details/index.vue +++ b/src/pages/match/details/index.vue @@ -77,6 +77,7 @@ - - \ No newline at end of file diff --git a/src/pages/touristMatch/list/index.vue b/src/pages/touristMatch/list/index.vue index 96a2d37..0913bc0 100644 --- a/src/pages/touristMatch/list/index.vue +++ b/src/pages/touristMatch/list/index.vue @@ -349,23 +349,35 @@ export default { this.getData(); }, signup(item) { - // 如果没登录,提示去登录,status=2则是报名中 - if (item.status == 2) { - if (util.local.get(Setting.tokenKey)) { + const { status } = item + // 如果没登录,提示去登录 + if (util.local.get(Setting.tokenKey)) { + // 立即报名 + if (status == 2) { this.$post(this.api.addApplicant, { contestId: item.id }).then(res => { this.$message.success("报名成功"); this.getData(); }).catch(res => {}) - } else { - this.$confirm('请先登录,是否直接前往登录?', "提示", { + } else if (status === 1) { + // 已报名,点击取消报名 + this.$confirm('是否要取消报名?', '提示', { type: 'success' }).then(() => { - this.SET_SOURCE(item.id) - this.$router.push('/login') + this.$post(`${this.api.cancelRegistration}?contestId=${item.id}`).then(res => { + this.$message.success('取消报名成功') + this.getData() + }).catch(res => {}) }).catch(() => {}) } + } else { + this.$confirm('请先登录,是否直接前往登录?', "提示", { + type: 'success' + }).then(() => { + this.SET_SOURCE(item.id) + this.$router.push('/login') + }).catch(() => {}) } } } diff --git a/src/router/modules/preview.js b/src/router/modules/preview.js deleted file mode 100644 index 9c39da9..0000000 --- a/src/router/modules/preview.js +++ /dev/null @@ -1,23 +0,0 @@ -import BasicLayout from "@/layouts/home"; - -const meta = {}; - -const pre = "preview-"; - -export default { - path: "/preview", - name: "preview", - redirect: { - name: `${pre}list` - }, - meta, - component: BasicLayout, - children: [ - { - name: `${pre}list`, - path: `list`, - component: () => import("@/pages/preview/list"), - meta: { title: "课前预习" } - } - ] -}; \ No newline at end of file diff --git a/src/router/routes.js b/src/router/routes.js index d653f6a..95e58b2 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,35 +1,18 @@ -import index from "./modules/index"; -import cityPartner from "./modules/cityPartner"; -import devPlatform from "./modules/devPlatform"; -import appraisal from "./modules/appraisal"; -import station from "./modules/station"; -import ass from "./modules/ass"; -import record from "./modules/record"; -import setting from "./modules/setting"; -import course from "./modules/course"; -import info from "./modules/info"; -import match from "./modules/match"; -import touristMatch from "./modules/touristMatch"; -import log from "./modules/log"; +/** + * 读取./modules下的所有js文件并注册模块 + */ +const requireModule = require.context('./modules', false, /\.js$/) +const modules = [] +requireModule.keys().forEach(fileName => { + modules.push(requireModule(fileName).default) +}) const frameIn = [ { path: "/", redirect: "/index" }, - index, - cityPartner, - devPlatform, - appraisal, - station, - ass, - record, - setting, - course, - info, - match, - touristMatch, - log + ...modules ]; /**