diff --git a/common/globalFunction.js b/common/globalFunction.js index 80aba7a..7f6e7f8 100644 --- a/common/globalFunction.js +++ b/common/globalFunction.js @@ -2,7 +2,8 @@ import useUserStore from "../stores/useUserStore"; import { request, createRequest, - uploadFile + uploadFile, + myRequest } from "../utils/request"; import streamRequest, { chatRequest @@ -885,7 +886,8 @@ export const $api = { uploadFile, formatFileSize, sendingMiniProgramMessage, - copyText + copyText, + myRequest } @@ -916,4 +918,4 @@ export default { insertSortData, isInWechatMiniProgramWebview, isEmptyObject, -} \ No newline at end of file +} diff --git a/config.js b/config.js index 7e15146..c349839 100644 --- a/config.js +++ b/config.js @@ -1,6 +1,9 @@ export default { // baseUrl: 'http://39.98.44.136:8080', // 测试 baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试 + + LCBaseUrl:'http://10.110.145.145:9100',//招聘、培训、帮扶 + LCBaseUrlInner:'http://10.110.145.145:10100',//内网端口 // sseAI+ // StreamBaseURl: 'http://39.98.44.136:8000', StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai', @@ -70,4 +73,4 @@ export default { desc: '融合海量岗位、智能简历匹配、竞争力分析,助你精准锁定理想职位!', imgUrl: 'https://qd.zhaopinzao8dian.com/file/csn/qd_shareLogo.jpg', } -} \ No newline at end of file +} diff --git a/packageA/pages/UnitDetails/UnitDetails.vue b/packageA/pages/UnitDetails/UnitDetails.vue index 633857a..aa2a086 100644 --- a/packageA/pages/UnitDetails/UnitDetails.vue +++ b/packageA/pages/UnitDetails/UnitDetails.vue @@ -1,320 +1,329 @@ diff --git a/packageA/pages/exhibitors/exhibitors.vue b/packageA/pages/exhibitors/exhibitors.vue index e6872cb..b2cbab3 100644 --- a/packageA/pages/exhibitors/exhibitors.vue +++ b/packageA/pages/exhibitors/exhibitors.vue @@ -1,541 +1,624 @@ diff --git a/packageB/jobFair/detail.vue b/packageB/jobFair/detail.vue index baa4b93..c28e9f0 100644 --- a/packageB/jobFair/detail.vue +++ b/packageB/jobFair/detail.vue @@ -1,11 +1,559 @@ - - \ No newline at end of file + diff --git a/packageB/login.vue b/packageB/login.vue new file mode 100644 index 0000000..bd5bce1 --- /dev/null +++ b/packageB/login.vue @@ -0,0 +1,237 @@ + + + + + \ No newline at end of file diff --git a/packageB/train/index.vue b/packageB/train/index.vue index c02deb3..c776fa5 100644 --- a/packageB/train/index.vue +++ b/packageB/train/index.vue @@ -3,7 +3,7 @@ - + 培训视频 diff --git a/packageB/train/video/videoList.vue b/packageB/train/video/videoList.vue new file mode 100644 index 0000000..e6b052e --- /dev/null +++ b/packageB/train/video/videoList.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/pages.json b/pages.json index 676e168..34e2fbe 100644 --- a/pages.json +++ b/pages.json @@ -5,9 +5,9 @@ "style": { "navigationBarTitleText": "喀什智慧就业平台", "navigationBarTitleTextSize": "30rpx", - // #ifdef H5 + // #ifdef H5 "navigationStyle": "custom" - // #endif + // #endif } }, { @@ -86,7 +86,7 @@ "style": { "navigationBarTitleText": "首页内容测试", "navigationStyle": "custom" - } + } }, { "path": "pages/test/tabbar-user-type-test", @@ -179,7 +179,7 @@ "pages": [ { "path" : "pages/addWorkExperience/addWorkExperience", - "style" : + "style" : { "navigationBarTitleText" : "添加工作经历", "navigationBarTitleTextSize": "30rpx" @@ -212,9 +212,9 @@ "path": "pages/exhibitors/exhibitors", "style": { "navigationBarTitleText": "参展单位", - "navigationBarBackgroundColor": "#4778EC", - "navigationBarTextStyle": "white", - "navigationStyle": "custom" + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black" + // "navigationStyle": "custom" } }, { "path": "pages/myResume/myResume", @@ -351,16 +351,25 @@ "pages": [ { "path" : "jobFair/detail", - "style" : + "style" : { "navigationBarTitleText" : "招聘会详情", "navigationBarTitleTextSize": "30rpx" // "navigationStyle": "custom" } + }, + { + "path" : "login", + "style" : + { + "navigationBarTitleText" : "登录", + "navigationBarTitleTextSize": "30rpx" + // "navigationStyle": "custom" + } }, { "path" : "train/index", - "style" : + "style" : { "navigationBarTitleText" : "技能评价", "navigationBarTitleTextSize": "30rpx" @@ -369,13 +378,31 @@ }, { "path" : "train/practice/startPracticing", - "style" : + "style" : { "navigationBarTitleText" : "专项训练", "navigationBarTitleTextSize": "30rpx" // "navigationStyle": "custom" } - } + }, + { + "path" : "train/video/videoList", + "style" : + { + "navigationBarTitleText" : "视频学习", + "navigationBarTitleTextSize": "30rpx" + // "navigationStyle": "custom" + } + }, + { + "path" : "train/video/videoDetail", + "style" : + { + "navigationBarTitleText" : "视频详情", + "navigationBarTitleTextSize": "30rpx" + // "navigationStyle": "custom" + } + }, ] }], // "tabBar": { @@ -436,4 +463,4 @@ } }, "uniIdRouter": {} -} \ No newline at end of file +} diff --git a/pages/careerfair/careerfair.vue b/pages/careerfair/careerfair.vue index 04588da..e22e5fa 100644 --- a/pages/careerfair/careerfair.vue +++ b/pages/careerfair/careerfair.vue @@ -1,21 +1,53 @@ - diff --git a/static/images/train/video-bg.png b/static/images/train/video-bg.png new file mode 100644 index 0000000..b2869a0 Binary files /dev/null and b/static/images/train/video-bg.png differ diff --git a/static/images/train/video-bj.png b/static/images/train/video-bj.png new file mode 100644 index 0000000..f085c93 Binary files /dev/null and b/static/images/train/video-bj.png differ diff --git a/static/images/train/video-bj2.png b/static/images/train/video-bj2.png new file mode 100644 index 0000000..866e48a Binary files /dev/null and b/static/images/train/video-bj2.png differ diff --git a/static/images/train/video-gd.png b/static/images/train/video-gd.png new file mode 100644 index 0000000..b5a0d62 Binary files /dev/null and b/static/images/train/video-gd.png differ diff --git a/static/images/train/video-jt.png b/static/images/train/video-jt.png new file mode 100644 index 0000000..4c7a748 Binary files /dev/null and b/static/images/train/video-jt.png differ diff --git a/static/images/train/video-kc.png b/static/images/train/video-kc.png new file mode 100644 index 0000000..5d03fb4 Binary files /dev/null and b/static/images/train/video-kc.png differ diff --git a/static/images/train/video-sc.png b/static/images/train/video-sc.png new file mode 100644 index 0000000..133f9e6 Binary files /dev/null and b/static/images/train/video-sc.png differ diff --git a/static/images/train/wsc.png b/static/images/train/wsc.png new file mode 100644 index 0000000..3eafc4b Binary files /dev/null and b/static/images/train/wsc.png differ diff --git a/static/images/train/xl.png b/static/images/train/xl.png new file mode 100644 index 0000000..eaee7c4 Binary files /dev/null and b/static/images/train/xl.png differ diff --git a/static/images/train/zs.png b/static/images/train/zs.png new file mode 100644 index 0000000..cadb6c5 Binary files /dev/null and b/static/images/train/zs.png differ diff --git a/utils/request.js b/utils/request.js index 020fa11..4c01086 100644 --- a/utils/request.js +++ b/utils/request.js @@ -1,67 +1,67 @@ import config from "@/config.js" import useUserStore from '@/stores/useUserStore'; export function request({ - url, - method = 'GET', - data = {}, - load = false, - header = {} + url, + method = 'GET', + data = {}, + load = false, + header = {} } = {}) { - return new Promise((resolve, reject) => { - if (load) { - uni.showLoading({ - title: '请稍候', - mask: true - }); - } - let Authorization = '' - if (useUserStore().token) { - Authorization = `${useUserStore().userInfo.token}${useUserStore().token}` - } - uni.request({ - url: config.baseUrl + url, - method, - data: data, - header: { - 'Authorization': Authorization || '', - }, - success: resData => { - // 响应拦截 - if (resData.statusCode === 200) { - const { - code, - msg - } = resData.data - if (code === 200) { - resolve(resData.data) - return - } - uni.showToast({ - title: msg, - icon: 'none' - }) - } - if (resData.data?.code === 401 || resData.data?.code === 402) { - useUserStore().logOut() - uni.showToast({ - title: '登录过期,请重新登录', - icon: 'none' - }) - return - } - const err = new Error('请求出现异常,请联系工作人员') - err.error = resData - reject(err) - }, - fail: err => reject(err), - complete() { - if (load) { - uni.hideLoading(); - } - } - }) - }) + return new Promise((resolve, reject) => { + if (load) { + uni.showLoading({ + title: '请稍候', + mask: true + }); + } + let Authorization = '' + if (useUserStore().token) { + Authorization = `${useUserStore().userInfo.token}${useUserStore().token}` + } + uni.request({ + url: config.baseUrl + url, + method, + data: data, + header: { + 'Authorization': Authorization || '', + }, + success: resData => { + // 响应拦截 + if (resData.statusCode === 200) { + const { + code, + msg + } = resData.data + if (code === 200) { + resolve(resData.data) + return + } + uni.showToast({ + title: msg, + icon: 'none' + }) + } + if (resData.data?.code === 401 || resData.data?.code === 402) { + useUserStore().logOut() + uni.showToast({ + title: '登录过期,请重新登录', + icon: 'none' + }) + return + } + const err = new Error('请求出现异常,请联系工作人员') + err.error = resData + reject(err) + }, + fail: err => reject(err), + complete() { + if (load) { + uni.hideLoading(); + } + } + }) + }) } @@ -74,102 +74,172 @@ export function request({ * @returns promise **/ export function createRequest(url, data = {}, method = 'GET', loading = false, headers = {}) { - if (loading) { - uni.showLoading({ - title: '请稍后', - mask: true - }) - } - let Authorization = '' - if (useUserStore().token) { - Authorization = `${useUserStore().token}` - } + if (loading) { + uni.showLoading({ + title: '请稍后', + mask: true + }) + } + let Authorization = '' + if (useUserStore().token) { + Authorization = `${useUserStore().token}` + } - const header = headers || {}; - header["Authorization"] = encodeURIComponent(Authorization); - return new Promise((resolve, reject) => { - uni.request({ - url: config.baseUrl + url, - method: method, - data: data, - header, - success: resData => { - // 响应拦截 - if (resData.statusCode === 200) { - const { - code, - msg - } = resData.data - if (code === 200) { - resolve(resData.data) - return - } - // 处理业务错误 - if (resData.data?.code === 401 || resData.data?.code === 402) { - useUserStore().logOut() - } - // 显示具体的错误信息 - const errorMsg = msg || '请求出现异常,请联系工作人员' - uni.showToast({ - title: errorMsg, - icon: 'none' - }) - const err = new Error(errorMsg) - err.error = resData - reject(err) - return - } - // HTTP状态码不是200的情况 - const err = new Error('网络请求失败,请检查网络连接') - err.error = resData - reject(err) - }, - fail: (err) => { - reject(err) - }, - complete: () => { - if (loading) { - uni.hideLoading(); - } - } - }); - }) + const header = headers || {}; + header["Authorization"] = encodeURIComponent(Authorization); + return new Promise((resolve, reject) => { + uni.request({ + url: config.baseUrl + url, + method: method, + data: data, + header, + success: resData => { + // 响应拦截 + if (resData.statusCode === 200) { + const { + code, + msg + } = resData.data + if (code === 200) { + resolve(resData.data) + return + } + // 处理业务错误 + if (resData.data?.code === 401 || resData.data?.code === 402) { + useUserStore().logOut() + } + // 显示具体的错误信息 + const errorMsg = msg || '请求出现异常,请联系工作人员' + uni.showToast({ + title: errorMsg, + icon: 'none' + }) + const err = new Error(errorMsg) + err.error = resData + reject(err) + return + } + // HTTP状态码不是200的情况 + const err = new Error('网络请求失败,请检查网络连接') + err.error = resData + reject(err) + }, + fail: (err) => { + reject(err) + }, + complete: () => { + if (loading) { + uni.hideLoading(); + } + } + }); + }) } export function uploadFile(tempFilePaths, loading = false) { - if (loading) { - uni.showLoading({ - title: '请稍后', - mask: true - }) - } - let Authorization = '' - if (useUserStore().token) { - Authorization = `${useUserStore().token}` - } + if (loading) { + uni.showLoading({ + title: '请稍后', + mask: true + }) + } + let Authorization = '' + if (useUserStore().token) { + Authorization = `${useUserStore().token}` + } - const header = {}; - header["Authorization"] = encodeURIComponent(Authorization); - return new Promise((resolve, reject) => { - uni.uploadFile({ - url: config.baseUrl + '/app/file/upload', - filePath: tempFilePaths, - name: 'file', - header, - success: (uploadFileRes) => { - if (uploadFileRes.statusCode === 200) { - return resolve(uploadFileRes.data) - } - }, - fail: (err) => { - reject(err) - }, - complete: () => { - if (loading) { - uni.hideLoading(); - } - } - }) - }) -} \ No newline at end of file + const header = {}; + header["Authorization"] = encodeURIComponent(Authorization); + return new Promise((resolve, reject) => { + uni.uploadFile({ + url: config.baseUrl + '/app/file/upload', + filePath: tempFilePaths, + name: 'file', + header, + success: (uploadFileRes) => { + if (uploadFileRes.statusCode === 200) { + return resolve(uploadFileRes.data) + } + }, + fail: (err) => { + reject(err) + }, + complete: () => { + if (loading) { + uni.hideLoading(); + } + } + }) + }) +} + +export function myRequest(url, data = {}, method = 'GET', port = 9100, headers = {}, loading = false) { + let LCBaseUrl = config.LCBaseUrl + if (port != 9100) { + LCBaseUrl = config.LCBaseUrlInner + } + const header = headers || {}; + // 上下文 + // /jobfair-api/jobfair/public 招聘会 + // /dashboard-api/dashboard 用户登录相关 + // /dashboard-api 获取验证码、登录 + if (loading) { + uni.showLoading({ + title: '请稍后', + mask: true + }) + } + return new Promise((resolve, reject) => { + uni.request({ + url: LCBaseUrl + url, + method: method, + data: data, + header, + success: resData => { + if(url=='/dashboard/auth/heart'){ + resolve(resData.data) + return + }else{ + // 响应拦截 + if (resData.statusCode === 200) { + const { + code, + msg + } = resData.data + if (code === 200) { + resolve(resData.data) + return + } + // 处理业务错误 + if (resData.data?.code === 401 || resData.data?.code === 402) { + useUserStore().logOut() + } + // 显示具体的错误信息 + const errorMsg = msg || '请求出现异常,请联系工作人员' + uni.showToast({ + title: errorMsg, + icon: 'none' + }) + const err = new Error(errorMsg) + err.error = resData + reject(err) + return + } + // HTTP状态码不是200的情况 + const err = new Error('网络请求失败,请检查网络连接') + err.error = resData + reject(err) + } + }, + fail: (err) => { + reject(err) + }, + complete: () => { + if (loading) { + uni.hideLoading(); + } + } + }) + }) +}