Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
+2
-3
@@ -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'
|
||||
|
||||
|
||||
+45
-3
@@ -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
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
+23
-15
@@ -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);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
@@ -29,11 +29,24 @@
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive
|
||||
reactive,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import {
|
||||
qryTraCrsBbsDataByCrsNum
|
||||
} from '@/api/courseDetail.js';
|
||||
|
||||
const message_list = reactive([
|
||||
|
||||
])
|
||||
const props = defineProps({
|
||||
crsNum:String
|
||||
})
|
||||
onMounted(() => {
|
||||
qryTraCrsBbsDataByCrsNum({crsNum:props.crsNum}).then(() => {
|
||||
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<knowledge v-model="form"></knowledge>
|
||||
</view>
|
||||
<view class="evaluate" v-if="tabAct == 2">
|
||||
<comment></comment>
|
||||
<comment :crsNum="crsNum"></comment>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -10,21 +10,25 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="pt-8">
|
||||
<view class="font_pf fz-24" :class="item.pgrphStdyStateName == '已学习' ? 'learn' : 'unlearn'">{{ item.pgrphStdyStateName }}</view>
|
||||
<view class="font_pf fz-24" :class="item.pgrphStdyStateName == '已学习' ? 'learn' : 'unlearn'">
|
||||
{{ item.pgrphStdyStateName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
|
||||
import common from '@/common/common';
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
modelValue:Object
|
||||
modelValue: Object
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.point-item {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
@@ -33,9 +37,11 @@
|
||||
padding-right: 52rpx;
|
||||
border-radius: 22rpx;
|
||||
justify-content: space-between;
|
||||
|
||||
.blue-ball {
|
||||
padding-top: 16rpx;
|
||||
margin-right: 12rpx;
|
||||
|
||||
.ball {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
queryTraStdyStatisticsSelf
|
||||
} from '@/api/user.js'
|
||||
const statistics_data = reactive({
|
||||
'stdtTmLen': 2, // 学习
|
||||
'study': 0, // 学习
|
||||
'train': 0, // 训练
|
||||
'exam': 0, // 考试
|
||||
@@ -188,13 +189,11 @@
|
||||
onShow(() => {
|
||||
const user_info_cache = getUserInfo()
|
||||
Object.assign(user_info, user_info_cache)
|
||||
queryTraStdyStatisticsSelf().then(res => {
|
||||
statistics_data['accmPoint'] = res['accmPoint']
|
||||
statistics_data['accmTaskCnt'] = res['accmTaskCnt']
|
||||
statistics_data['stdtTmLen'] = res['stdtTmLen']
|
||||
console.log('res', res);
|
||||
console.log('res', res);
|
||||
console.log('res', res);
|
||||
queryTraStdyStatisticsSelf().then(({body}) => {
|
||||
statistics_data['accmPoint'] = body['accmPoint']
|
||||
statistics_data['accmTaskCnt'] = body['accmTaskCnt']
|
||||
statistics_data['stdtTmLen'] = body['stdtTmLen']
|
||||
console.log('res', body);
|
||||
})
|
||||
// statistics_data['get_statistics_data']() // 获取首页统计数据
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user