diff --git a/.env.development.ty b/.env.development.ty
index 15d511f0..4618dbad 100644
--- a/.env.development.ty
+++ b/.env.development.ty
@@ -4,6 +4,6 @@ ENV = 'development.ty'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
-VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://192.168.108.129'
+# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://192.168.108.129'
diff --git a/.env.development.yh b/.env.development.yh
index 6dabe4cb..943c5717 100644
--- a/.env.development.yh
+++ b/.env.development.yh
@@ -4,8 +4,7 @@ ENV = 'development.yh'
VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
+# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604'
# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.154:9603'
-
-
diff --git a/src/api/sparring.js b/src/api/sparring.js
index f683549b..239a1ade 100644
--- a/src/api/sparring.js
+++ b/src/api/sparring.js
@@ -1,11 +1,11 @@
import request from '@/api/request'
-const course_base_url = '/trapractice'
+const base_url = '/trapractice'
-// 获取课程分类树接口
-export const getCourseTypeListApi = (data) => {
+// 获取分类树接口
+export const queryTraPartnerCatelogList = (data) => {
return request({
- url: course_base_url + '/traPartnerCatelog/queryTraPartnerCatelog',
+ url: base_url + '/traPartnerCatelog/queryTraPartnerCatelogList',
method: 'post',
data
});
@@ -13,7 +13,7 @@ export const getCourseTypeListApi = (data) => {
// 获取标签分类树 接口
export const getTraTagListApi = (data) => {
return request({
- url: course_base_url + '/traPartnerTag/queryTraTagCatalogInfoList',
+ url: base_url + '/traPartnerTag/queryTraTagCatalogInfoList',
method: 'post',
data
});
@@ -21,7 +21,23 @@ export const getTraTagListApi = (data) => {
// 全部模块
export const queryCrsInfoByCatalogApi = (data) => {
return request({
- url: course_course_base_url + '/traPartnerInfo/queryTraPartnerInfoPaging',
+ url: base_url + '/traPartnerInfo/queryTraPartnerInfoPaging',
+ method: 'post',
+ data
+ });
+};
+// id 查详情/trapractice/traPartnerInfo/queryTraPartnerInfoById
+export const queryTraPartnerInfoById = (data) => {
+ return request({
+ url: base_url + '/traPartnerInfo/queryTraPartnerInfoById',
+ method: 'post',
+ data
+ });
+};
+// 陪练角色列表 traId
+export const queryTraPartnerCharacterInfoList = (data) => {
+ return request({
+ url: base_url + '/traPartnerCharacterInfo/queryTraPartnerCharacterInfoList',
method: 'post',
data
});
diff --git a/src/pages.json b/src/pages.json
index 40bdc8fc..6e4e53d5 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -456,6 +456,33 @@
"titleNView": false
}
}
+ },
+ {
+ "path": "pages/sparring/detail",
+ "style": {
+ "navigationBarTitleText": "AI陪练详情",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
+ {
+ "path": "pages/sparring/tip",
+ "style": {
+ "navigationBarTitleText": "AI陪练提示",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
+ {
+ "path": "pages/sparring/chooseRole",
+ "style": {
+ "navigationBarTitleText": "AI陪练选择角色",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
}
],
"tabBar": {
diff --git a/src/pages/sparring/chooseRole.vue b/src/pages/sparring/chooseRole.vue
new file mode 100644
index 00000000..e7393709
--- /dev/null
+++ b/src/pages/sparring/chooseRole.vue
@@ -0,0 +1,316 @@
+
+
+
+
+
+
+
+
+
+ 选择本次陪练的对象
+
+
+
+
+
+
+ 开始陪练
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/sparring/components/card-swiper.vue b/src/pages/sparring/components/card-swiper.vue
new file mode 100644
index 00000000..27412dc3
--- /dev/null
+++ b/src/pages/sparring/components/card-swiper.vue
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+
+
+
+
+ {{ item.chaName }}
+ {{ item.chaAge }}岁
+
+
+
+
+
+
+
+
+ 身份情况
+
+ {{ item.occupation }}
+
+
+
+
+ 性格特点
+
+ {{ item.personality }}
+
+
+
+
+ 提问思路
+
+ {{ item.thoughtProcess }}
+
+
+
+
+ 人物描述
+
+ {{ item.chaDesc }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/sparring/components/sparring-item.vue b/src/pages/sparring/components/sparring-item.vue
index 6474ba18..1a88dcfc 100644
--- a/src/pages/sparring/components/sparring-item.vue
+++ b/src/pages/sparring/components/sparring-item.vue
@@ -5,31 +5,31 @@
- {{'视频对话'}}
+ {{itemInfo.traInterName}}
-
+
- {{itemInfo.crsName}}
+ {{itemInfo.traName}}
{{item.tagName}}
- 截至时间:{{itemInfo.mtTime}}
- 陪练次数:{{itemInfo.accmStdyCnt}}人次
+ 截至时间:{{itemInfo.endTm}}
+ 陪练次数:{{itemInfo.practiceTimes }}人次
diff --git a/src/pages/sparring/detail.vue b/src/pages/sparring/detail.vue
new file mode 100644
index 00000000..54655306
--- /dev/null
+++ b/src/pages/sparring/detail.vue
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+ 陪练详情
+
+
+
+
+
+
+ {{detailInfo.traName}}
+
+
+ 已练习次数:{{detailInfo.practiceTimes}}
+
+
+ 类型:{{detailInfo.traInterTypName}}
+
+
+ 截止时间:{{detailInfo.endTm}}
+
+
+
+
+ {{item.tagName}}
+
+
+
+
+
+
+
+ 陪练介绍
+
+
+ {{detailInfo.introduction}}
+
+
+
+
+
+ 陪练目标
+
+
+ {{detailInfo.traTarget}}
+
+
+
+
+
+ 陪练预计时长
+
+
+ {{detailInfo.traStartLimit+ ' ~ ' + detailInfo.traEndLimit}} 分钟
+
+
+
+
+
+ 陪练参考资料
+
+
+
+ 文件名称{{item}}.docx
+
+
+
+
+ AI陪练
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/sparring/index.vue b/src/pages/sparring/index.vue
index e0fca1c1..bc91f2f4 100644
--- a/src/pages/sparring/index.vue
+++ b/src/pages/sparring/index.vue
@@ -14,13 +14,14 @@
-
-
+ :activeStyle="{ color: '#0066FF', fontSize: '24rpx', fontWeight: '500' }" :lineColor="`#06f`"
+ >
+
-
+
@@ -89,7 +90,7 @@
} from '@/enum.js';
import {
getTraTagListApi,
- getCourseTypeListApi,
+ queryTraPartnerCatelogList,
queryCrsInfoByCatalogApi
} from '@/api/sparring.js'
import {
@@ -123,19 +124,52 @@
backgroundColor: '#ffffff',
borderRadius: '23rpx'
}
- const tabList = [{
- name: '全部'
- }, {
- name: '热门'
- }, {
- name: '最新'
- }, {
- name: '推荐'
- }, {
- name: '生产线'
- }]
+ const catelogList = ref([])
+ const tabList = computed(()=>{
+ return [{
+ name: '全 部',
+ value: ''
+ }, ...catelogList.value.map(t=>{
+ return {
+ name: t.label,
+ value: t.value
+ }
+ })]
+ })
+ const tabSecList = computed(()=> {
+ let _arr = []
+ if(!activeTabId.value){
+ catelogList.value.forEach(t=>{
+ let _children = (t.children||[])
+ _arr = _arr.concat(_children.map(k=>{
+ return {
+ name: k.label,
+ value: k.value
+ }
+ }))
+ })
+ }else{
+ let _obj = catelogList.value.find(t=>t.value === activeTabId.value)
+ if(_obj){
+ let _children = (_obj.children||[])
+ _arr = _children.map(k=>{
+ return {
+ name: k.label,
+ value: k.value
+ }
+ })
+ }
+ }
+ return [{
+ name: '全 部',
+ value: ''
+ }, ..._arr]
+ })
const activeTab = ref('全部')
- const activeCourseType = ref('')
+ const activeTabId= ref('')
+ const activeTabSec = ref('全部')
+ const activeTabSecId= ref('')
+ const activeCourseType = computed(()=> (activeTabSecId.value || activeTabId.value || ''))
const activePrdlineType = ref('')
const activeTag = ref([])
const sparringTypeList = ref([])
@@ -197,15 +231,6 @@
getMoreList(1)
}
// 点击课程分类
- const changeCourseType = (item, index) => {
- activeCourseType.value = item.value === activeCourseType.value ? '' : item.value
- activeLeftIndex.value = index
- getMoreList(1)
- }
- const showTypeName = computed(() => {
- return (activeTab.value === '全部' && activeCourseType.value === '') || (activeTab.value === '生产线' &&
- activePrdlineType.value === '')
- })
const tagsList = computed(() => {
let _arr = []
tagsTree.value.forEach(t => {
@@ -213,7 +238,7 @@
_arr = _arr.concat(_tarr)
})
let _reqList = _arr.filter(t => t.required === 'Y')
- let _reqListN = _arr.filter(t => t.required === 'N')
+ let _reqListN = _arr.filter(t => t.required !== 'N')
return _reqList.concat(_reqListN)
})
const changeChooseTagsList = () => {
@@ -262,16 +287,19 @@
if (!item) return
sparringListBase.value = []
activeTab.value = item.name
+ activeTabId.value = item.value || ''
activeLeftIndex.value = -1
activeTag.value = []
pageObj.value.page = 1
pageObj.value.total = 0
// activeTag.value = ''
- activeCourseType.value = ''
activePrdlineType.value = ''
loading.value = true
- queryCrsInfoByCatalogApi(pageObj.value)
+ queryCrsInfoByCatalogApi({
+ ...pageObj.value,
+ catalogId: activeCourseType.value
+ })
.then(res => {
sparringListBase.value = res.body || []
pageObj.value.total = res.total
@@ -280,21 +308,41 @@
loading.value = false
})
}
- const changeTabSec = () => {
+ const changeTabSec = (item) => {
+ sparringListBase.value = []
+ activeLeftIndex.value = -1
+ activeTabSec.value = item.name
+ activeTabSecId.value = item.value || ''
+ activeTag.value = []
+ pageObj.value.page = 1
+ pageObj.value.total = 0
+ // activeTag.value = ''
+ activePrdlineType.value = ''
+ loading.value = true
+ queryCrsInfoByCatalogApi({
+ ...pageObj.value,
+ catalogId: activeCourseType.value
+ })
+ .then(res => {
+ sparringListBase.value = res.body || []
+ pageObj.value.total = res.total
+ })
+ .finally(() => {
+ loading.value = false
+ })
}
// 跳转搜索页
const toSearchPage = () => {
common.navigateTo('/pages/search/search?from=sparring')
}
// 跳转 课程详情
- const toCourseDetail = item => {
- common.navigateTo('/pages/sparringDetail/index?crsNum=' + item.crsNum + '&crsId=' + item.crsId)
- // common.navigateTo('/pages/sparring/study?crsNum=' + item.crsNum)
+ const toSparringDetail = item => {
+ common.navigateTo('/pages/sparring/detail?traId=' + item.traId)
}
onMounted(() => {
- getCourseTypeListApi().then(res => {
- sparringTypeList.value = res.body || []
+ queryTraPartnerCatelogList().then(res => {
+ catelogList.value = res.body || []
})
getTraTagListApi().then(res => {
tagsTree.value = res.body || []
@@ -329,14 +377,28 @@
\ No newline at end of file
diff --git a/src/pagesB.json b/src/pagesB.json
index fdc3fd1b..fc7e5451 100644
--- a/src/pagesB.json
+++ b/src/pagesB.json
@@ -63,5 +63,32 @@
}
}
},
+ {
+ "path": "pages/sparring/detail",
+ "style": {
+ "navigationBarTitleText": "AI陪练详情",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
+ {
+ "path": "pages/sparring/tip",
+ "style": {
+ "navigationBarTitleText": "AI陪练提示",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
+ {
+ "path": "pages/sparring/chooseRole",
+ "style": {
+ "navigationBarTitleText": "AI陪练选择角色",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ }
]
}
\ No newline at end of file
diff --git a/src/static/images/sparring/bg.png b/src/static/images/sparring/bg.png
new file mode 100644
index 00000000..d3aca1a8
Binary files /dev/null and b/src/static/images/sparring/bg.png differ
diff --git a/src/static/images/sparring/detail-icon-1.png b/src/static/images/sparring/detail-icon-1.png
new file mode 100644
index 00000000..847361f0
Binary files /dev/null and b/src/static/images/sparring/detail-icon-1.png differ
diff --git a/src/static/images/sparring/detail-icon-2.png b/src/static/images/sparring/detail-icon-2.png
new file mode 100644
index 00000000..15aa01f9
Binary files /dev/null and b/src/static/images/sparring/detail-icon-2.png differ
diff --git a/src/static/images/sparring/detail-icon-3.png b/src/static/images/sparring/detail-icon-3.png
new file mode 100644
index 00000000..db205b2c
Binary files /dev/null and b/src/static/images/sparring/detail-icon-3.png differ
diff --git a/src/static/images/sparring/detail-icon-4.png b/src/static/images/sparring/detail-icon-4.png
new file mode 100644
index 00000000..45d963fc
Binary files /dev/null and b/src/static/images/sparring/detail-icon-4.png differ
diff --git a/src/static/images/sparring/role-icon1.png b/src/static/images/sparring/role-icon1.png
new file mode 100644
index 00000000..00e8fd07
Binary files /dev/null and b/src/static/images/sparring/role-icon1.png differ
diff --git a/src/static/images/sparring/role-icon2.png b/src/static/images/sparring/role-icon2.png
new file mode 100644
index 00000000..7119beeb
Binary files /dev/null and b/src/static/images/sparring/role-icon2.png differ
diff --git a/src/static/images/sparring/role-icon3.png b/src/static/images/sparring/role-icon3.png
new file mode 100644
index 00000000..1d09acea
Binary files /dev/null and b/src/static/images/sparring/role-icon3.png differ
diff --git a/src/static/images/sparring/role-icon4.png b/src/static/images/sparring/role-icon4.png
new file mode 100644
index 00000000..71bcb954
Binary files /dev/null and b/src/static/images/sparring/role-icon4.png differ
diff --git a/src/static/images/sparring/role-icon5.png b/src/static/images/sparring/role-icon5.png
new file mode 100644
index 00000000..7ae55f78
Binary files /dev/null and b/src/static/images/sparring/role-icon5.png differ
diff --git a/src/static/images/sparring/role-icon6.png b/src/static/images/sparring/role-icon6.png
new file mode 100644
index 00000000..79351c1a
Binary files /dev/null and b/src/static/images/sparring/role-icon6.png differ
diff --git a/src/static/images/sparring/top-bg.png b/src/static/images/sparring/top-bg.png
new file mode 100644
index 00000000..ec0806a4
Binary files /dev/null and b/src/static/images/sparring/top-bg.png differ