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/src/api/sparring.js b/src/api/sparring.js
index 3111b6ce..239a1ade 100644
--- a/src/api/sparring.js
+++ b/src/api/sparring.js
@@ -33,4 +33,12 @@ export const queryTraPartnerInfoById = (data) => {
method: 'post',
data
});
+};
+// 陪练角色列表 traId
+export const queryTraPartnerCharacterInfoList = (data) => {
+ return request({
+ url: base_url + '/traPartnerCharacterInfo/queryTraPartnerCharacterInfoList',
+ method: 'post',
+ data
+ });
};
\ No newline at end of file
diff --git a/src/pages.json b/src/pages.json
index 2a149e66..08a474df 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -456,6 +456,24 @@
"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/detail.vue b/src/pages/sparring/detail.vue
index 034ed0e5..54655306 100644
--- a/src/pages/sparring/detail.vue
+++ b/src/pages/sparring/detail.vue
@@ -1,14 +1,15 @@
-
-
-
-
-
- 陪练详情
+
+
+
+
+
+
+ 陪练详情
+
+
-
-
-
+
{{detailInfo.traName}}
@@ -69,7 +70,7 @@
- AI陪练
+ AI陪练
@@ -80,11 +81,19 @@
ref,
onMounted
} from 'vue'
- import { onShow, onLoad, onUnload } from '@dcloudio/uni-app';
+ import {
+ onShow,
+ onLoad,
+ onUnload
+ } from '@dcloudio/uni-app';
import common from '@/common/common';
import ImagePreview from '@/components/image-preview/image-preview.vue';
- import { queryTraPartnerInfoById } from "@/api/sparring.js"
- import { getPhoneEnvBool } from '@/common/common';
+ import {
+ queryTraPartnerInfoById
+ } from "@/api/sparring.js"
+ import {
+ getPhoneEnvBool
+ } from '@/common/common';
const traId = ref('')
const detailInfo = ref({})
const isDownloading = ref(false)
@@ -107,39 +116,39 @@
}, {
tagName: '销售类'
}])
-
+
const getDetailInfo = () => {
queryTraPartnerInfoById({
id: traId.value
- }).then(res=> {
+ }).then(res => {
console.log(res)
- detailInfo.value = res.body||{}
+ detailInfo.value = res.body || {}
})
}
const previewFile = (info) => {
-
- if (getPhoneEnvBool('AND')) {
- common.navigateTo('/pages/index/preview?fileId=' + info.docId);
- } else {
- if(isDownloading.value) return
- const base_url = get_base_url('/traask/traFilePreview/');
- let fileUrl = base_url + '/traask/traFilePreview/' + info.docId + userParams;
- const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf';
- isDownloading.value = true
- downloadFileFnc(fileUrl, localFilePath).then((res) => {
- uni.openDocument({
- filePath: res,
- showMenu: true,
- success: function () {
- console.log('打开文档成功');
- }
- })
- }).finally(()=>{
- setTimeout(()=>{
- isDownloading.value = false
- },1000)
- });
- }
+
+ if (getPhoneEnvBool('AND')) {
+ common.navigateTo('/pages/index/preview?fileId=' + info.docId);
+ } else {
+ if (isDownloading.value) return
+ const base_url = get_base_url('/traask/traFilePreview/');
+ let fileUrl = base_url + '/traask/traFilePreview/' + info.docId + userParams;
+ const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf';
+ isDownloading.value = true
+ downloadFileFnc(fileUrl, localFilePath).then((res) => {
+ uni.openDocument({
+ filePath: res,
+ showMenu: true,
+ success: function() {
+ console.log('打开文档成功');
+ }
+ })
+ }).finally(() => {
+ setTimeout(() => {
+ isDownloading.value = false
+ }, 1000)
+ });
+ }
}
const downloadFileFnc = async (fileUrl, localFilePath) => {
try {
@@ -147,8 +156,7 @@
return new Promise((resolve, reject) => {
console.log('开始下载:', fileUrl);
const dtask = plus.downloader.createDownload(
- fileUrl,
- {
+ fileUrl, {
filename: localFilePath
},
(d, status) => {
@@ -174,10 +182,13 @@
throw error;
}
};
+ const toChooseRole = () => {
+ common.navigateTo('/pages/sparring/chooseRole?traId=' + traId.value)
+ }
onLoad((params) => {
traId.value = params.traId;
});
- onMounted(()=> {
+ onMounted(() => {
getDetailInfo()
})
@@ -209,7 +220,7 @@
clip-path: ellipse(650rpx 327rpx at 375rpx 109rpx);
width: 100%;
position: absolute;
- top: 0;
+ top: var(--status-bar-height);
left: 0;
z-index: 2;
@@ -219,7 +230,7 @@
margin: 0 auto;
border-radius: 23rpx;
overflow: hidden;
-
+
}
.top-title {
@@ -332,7 +343,8 @@
}
}
}
- .body-bottom{
+
+ .body-bottom {
height: 180rpx;
background-color: #fff;
padding: 36rpx 23rpx 0;
@@ -340,7 +352,8 @@
width: 100vw;
bottom: 0;
left: 0;
- &-btn{
+
+ &-btn {
width: 100%;
height: 92rpx;
line-height: 92rpx;
@@ -351,6 +364,7 @@
border-radius: 23rpx;
}
}
+
.body-item {
padding: 28rpx;
background-color: #fff;
@@ -377,7 +391,8 @@
font-size: 28rpx;
line-height: 52rpx;
color: #333;
- &-file{
+
+ &-file {
color: #06f;
}
}
diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue
new file mode 100644
index 00000000..4791b577
--- /dev/null
+++ b/src/pages/sparring/tip.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+ {{ '陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称陪练名称' }}
+
+
+
+ 开始陪练
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pagesB.json b/src/pagesB.json
index 3180962b..fc7e5451 100644
--- a/src/pagesB.json
+++ b/src/pagesB.json
@@ -72,5 +72,23 @@
}
}
},
+ {
+ "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/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