diff --git a/.env.development b/.env.development
index a79a6ae0..7c776625 100644
--- a/.env.development
+++ b/.env.development
@@ -9,9 +9,8 @@ ENV = 'development'
#VITE_APP_BASE_API_Url = 'http://25.64.16.133:9786'
-#VITE_APP_BASE_API_Url = 'http://aitstest.jlbank.com.cn:7002'
-
+VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# app入口
-VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
+#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
diff --git a/src/api/courseDetail.js b/src/api/courseDetail.js
index fdaab1b9..9f243a90 100644
--- a/src/api/courseDetail.js
+++ b/src/api/courseDetail.js
@@ -1,12 +1,54 @@
import request from '@/api/request'
-const base_url = '/traapp'
+const module_url = '/traapp'
-// 获取课程分类树接口
+// AITS-A-4006--APP课程详情查询-含知识点学习状态数据
export const getCourseDetailApi = (data) => {
return request({
- url: base_url + '/crsInfo/queryCrsInfoDetail',
+ url: module_url + '/crsInfo/queryCrsInfoDetail',
method: 'post',
data
});
};
+
+
+// AITS-A-4007--APP课程评价列表数据查询
+export const qryTraCrsBbsDataByCrsNum = (data) => {
+ return request({
+ url: module_url + '/traCrsBbsInfo/qryTraCrsBbsDataByCrsNum',
+ method: 'post',
+ data
+ });
+};
+
+// AITS-A-4008--APP课程评价下回复评论时刷新二级评论列表数据接口
+export const qryChildTraCrsBbsInfo = (data) => {
+ return request({
+ url: module_url + '/traCrsBbsInfo/qryChildTraCrsBbsInfo',
+ method: 'post',
+ data
+ });
+};
+
+
+// AITS-A-4009--APP课程评价回复评论接口
+export const replyTraCrsBbsInfo = (data) => {
+ return request({
+ url: module_url + '/traCrsBbsInfo/replyTraCrsBbsInfo',
+ method: 'post',
+ data
+ });
+};
+
+
+// AITS-A-4010--APP课程评价接口
+export const publishCrsEvaluation = (data) => {
+ return request({
+ url: module_url + '/traCrsBbsInfo/publishCrsEvaluation',
+ method: 'post',
+ data
+ });
+};
+
+
+
diff --git a/src/api/request.js b/src/api/request.js
index cee9f5af..c52d6d87 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -6,18 +6,26 @@ import common from '@/common/common.js'
const ENV = import.meta.env
export const get_base_url = url => {
- if (process.env.NODE_ENV === 'development') {
- // 开发环境
- return ENV.VITE_APP_BASE_API_Url
- } else if (process.env.NODE_ENV === 'production') {
- // 生产环境
- return ENV.VITE_APP_BASE_API_Url
+ if (process.env.NODE_ENV === 'development') { // 开发环境
+ // H5必须用非https,手机端必须用https
+ // #ifdef H5
+ const baseUrl = ENV.VITE_APP_BASE_API_Url
+ if (baseUrl.startsWith('https')) {
+ return baseUrl.replace('https', 'http')
+ }
+ return baseUrl
+ // #endif
+ // #ifdef APP-PLUS
+ return ENV.VITE_APP_BASE_API_Url
+ // #endif
+ } else if (process.env.NODE_ENV === 'production') { // 生产环境
+ return ENV.VITE_APP_BASE_API_Url
}
}
// 请求错误码
export const REQUES_ERROR_CODES = {
- NO_LOGIN: ['QQ0005', '0005'] //登录
+ NO_LOGIN: ['QQ0005', '0005'] //登录
};
// 去登录弹窗状态
@@ -27,7 +35,7 @@ export const goto_login_fun = () => {
// if (no_login_show_modal_state) return;
no_login_show_modal_state = true
common.hideLoading()
- common.show('未登录','现在去登录').then(() => {
+ common.show('未登录', '现在去登录').then(() => {
common.navigateTo('/pages/login/login')
}).finally(() => {
no_login_show_modal_state = false
@@ -42,13 +50,13 @@ export default function request({
meta,
isStream,
suppressErrors,
- header={}
+ header = {}
}) {
const base_url = get_base_url(url);
const headers_base = {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
- ...(header||{})
+ ...(header || {})
}
let token = getToken()
@@ -69,11 +77,11 @@ export default function request({
// suppressErrors
// 模拟拦截器功能
const res = response.data
- if (res?.rtnCode === '0000'){
+ if (res?.rtnCode === '0000') {
return resolve(res)
}
//到这里下面全是异常的处理
- if(suppressErrors){ // 静默的接口,报错也不处理,因为下面有公共处理
+ if (suppressErrors) { // 静默的接口,报错也不处理,因为下面有公共处理
return reject()
}
if (!res) {
@@ -81,14 +89,14 @@ export default function request({
return reject()
}
// 0005 QQ0005 登录已过期
- if(REQUES_ERROR_CODES['NO_LOGIN'].includes(res.rtnCode)) {
+ if (REQUES_ERROR_CODES['NO_LOGIN'].includes(res.rtnCode)) {
goto_login_fun()
}
-
+
return reject(res)
},
fail(res) {
- console.log('131231', res, url);
+ console.log('131231', res, url, base_url);
}
});
})
diff --git a/src/pages.json b/src/pages.json
index 2d4f51ea..9cd6dcfe 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -1,5 +1,4 @@
{
-<<<<<<< HEAD
"pages": [
{
"path": "pages/index/index",
@@ -19,6 +18,15 @@
}
}
},
+ {
+ "path": "pages/courseDetail/submit",
+ "style": {
+ "navigationBarTitleText": "提交评价",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
{
"path": "pages/study/index",
"style": {
@@ -155,165 +163,4 @@
}
},
"uniIdRouter": {}
-=======
- "pages": [{
- "path": "pages/index/index",
- "style": {
- "navigationBarTitleText": "首页",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/courseDetail/index",
- "style": {
- "navigationBarTitleText": "课程详情",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/courseDetail/submit",
- "style": {
- "navigationBarTitleText": "提交评价",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/study/index",
- "style": {
- "navigationBarTitleText": "学习",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/intelligentAnswering/index",
- "style": {
- "navigationBarTitleText": "智能问答",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/scene/index",
- "style": {
- "navigationBarTitleText": "场景",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/me/index",
- "style": {
- "navigationBarTitleText": "我的",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/login/login",
- "style": {
- "navigationBarTitleText": "登录",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/other/web_view",
- "style": {
- "navigationBarTitleText": "",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/login/ysxy",
- "style": {
- "navigationBarTitleText": "",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/search/search",
- "style": {
- "navigationBarTitleText": "",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/course/index",
- "style": {
- "navigationBarTitleText": "课程中心",
- "app-plus": {
- "titleNView": false
- }
- }
- },
- {
- "path": "pages/course/study",
- "style": {
- "navigationBarTitleText": ""
- }
- }
- ],
- "tabBar": {
- "list": [{
- "text": "首页",
- "pagePath": "pages/index/index"
- },
- {
- "text": "学习",
- "pagePath": "pages/study/index"
- },
- {
- "text": "场景",
- "pagePath": "pages/scene/index"
- },
- {
- "text": "我的",
- "pagePath": "pages/me/index"
- }
- ],
- "color": "#666666",
- "selectedColor": "#0066FF",
- "fontSize": "16px",
- "borderStyle": "white",
- "borderColor": "#ffffff",
- "height": "70px",
- "spacing": "10px",
- "midButton": {
- "iconPath": "/static/images/icon/fawn.png",
- "width": "86px",
- "height": "86px",
- "iconWidth": "90px"
- }
- },
- "globalStyle": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "AI智能培训",
- "navigationBarBackgroundColor": "#F8F8F8",
- "backgroundColor": "#F8F8F8",
- "navigationStyle": "custom",
- "app-plus": {
- "titleView": false,
- "bounce": "none"
- }
- },
- "uniIdRouter": {}
->>>>>>> 8af971b2f3c186031f86d692251cf77f91455270
}
\ No newline at end of file
diff --git a/src/pages/courseDetail/comment.vue b/src/pages/courseDetail/comment.vue
index 73383cba..e11d5e3b 100644
--- a/src/pages/courseDetail/comment.vue
+++ b/src/pages/courseDetail/comment.vue
@@ -29,11 +29,24 @@