修改头像裁剪组件,修改其他bug

This commit is contained in:
田岩
2025-09-02 21:19:27 +08:00
6 changed files with 102 additions and 32 deletions
+8 -2
View File
@@ -9,22 +9,26 @@ ENV = 'development'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# app入口 # app入口
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7002' #VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
#VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786' #VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786'
#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' #VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# h5专用地址 # h5专用地址
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
#VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002' #VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# sit # sit
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' #VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.116:7001'
# sit
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
# 任东 # 任东
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' # VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.130:9604' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.130:9604'
# 张建成 # 张建成
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605' # VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
@@ -35,4 +39,6 @@ VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.143:9604' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.143:9604'
# 孙宇 # 孙宇
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.139:9604' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.139:9604'
# 付丙鑫
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.145:9602'
+1 -1
View File
@@ -144,7 +144,7 @@ export function downloadVoiceFile(url) {
}; };
if (token) if (token)
header['summary'] = token header['summary'] = token
let baseUrl = get_base_url(); let baseUrl = get_base_url(url);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.downloadFile({ uni.downloadFile({
url: `${baseUrl}${url}`, url: `${baseUrl}${url}`,
+29 -17
View File
@@ -31,9 +31,19 @@
<view class="talking-cont"> <view class="talking-cont">
<!-- 加载状态 --> <!-- 加载状态 -->
<CommonLoading color="#06f" v-show="dataInfo.isLoading"/> <CommonLoading color="#06f" v-show="dataInfo.isLoading"/>
<!-- 参考答案 -->
<view class="talking-text" v-if="type === 5 && !dataInfo.isLoading" style="overflow: hidden;">
参考答案{{ dataInfo.itemAnswer }}
</view>
<!-- 维度信息预览 -->
<view v-if="type === 5 && !dataInfo.isLoading" style="padding-top: 16rpx;">
<ChartFour v-if="dataInfo.evalDimens.length === 4" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartThree v-if="dataInfo.evalDimens.length === 3" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartFive v-if="dataInfo.evalDimens.length === 5" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
</view>
<!-- 题干/段落内容 --> <!-- 题干/段落内容 -->
<text class="talking-text" v-if="[3, 5, 6, 9].indexOf(type) >= 0 && !dataInfo.isLoading"> <text class="talking-text" v-if="[3, 5, 6, 9].indexOf(type) >= 0 && !dataInfo.isLoading">
{{ showContent }} {{type === 5?'试题解析':''}}{{ showContent }}
</text> </text>
<text class="talking-text" v-if="[4].indexOf(type) >= 0 && dataInfo.qnsTyp === 'ES'"> <text class="talking-text" v-if="[4].indexOf(type) >= 0 && dataInfo.qnsTyp === 'ES'">
<!-- 请您思考并作答:<br> --> <!-- 请您思考并作答:<br> -->
@@ -53,16 +63,6 @@
<ImagePreview class="cont-img-box" v-if="(dataInfo.imageAddrs||[]).length>0" :imgId="dataInfo.imageAddrs[0]" :previewDetail="true"></ImagePreview> <ImagePreview class="cont-img-box" v-if="(dataInfo.imageAddrs||[]).length>0" :imgId="dataInfo.imageAddrs[0]" :previewDetail="true"></ImagePreview>
<VideoPreview class="cont-img-box" v-if="(dataInfo.vidoAddrs||[]).length>0" :fileId="dataInfo.vidoAddrs[0]"></VideoPreview> <VideoPreview class="cont-img-box" v-if="(dataInfo.vidoAddrs||[]).length>0" :fileId="dataInfo.vidoAddrs[0]"></VideoPreview>
</view> </view>
<!-- 维度信息预览 -->
<view v-if="type === 5 && !dataInfo.isLoading" style="padding-top: 16rpx;">
<ChartFour v-if="dataInfo.evalDimens.length === 4" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartThree v-if="dataInfo.evalDimens.length === 3" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartFive v-if="dataInfo.evalDimens.length === 5" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
</view>
<!-- 参考答案 -->
<view class="talking-text" v-if="type === 5 && !dataInfo.isLoading" style="overflow: hidden;">
参考答案{{ dataInfo.itemAnswer }}
</view>
<!-- 举例预览 --> <!-- 举例预览 -->
<view class="talking-text" v-if="type === 3 && dataInfo.exampie " style="overflow: hidden;"> <view class="talking-text" v-if="type === 3 && dataInfo.exampie " style="overflow: hidden;">
举例{{ dataInfo.exampie }} 举例{{ dataInfo.exampie }}
@@ -70,11 +70,11 @@
</view> </view>
<view class="btns-cont" v-show="!dataInfo.isLoading"> <view class="btns-cont" v-show="!dataInfo.isLoading">
<!-- 重新播放 --> <!-- 重新播放 -->
<view class="replay-btn" @click.stop="restartPlay" v-if="!([5, 8, 9].indexOf(type) >= 0)"> <view class="replay-btn" @click.stop="restartPlay" v-if="!([9].indexOf(type) >= 0)">
<image class="icon" src="@/static/images/course/replay.png" style="width: 100%;height: 100%;"></image> <image class="icon" src="@/static/images/course/replay.png" style="width: 100%;height: 100%;"></image>
</view> </view>
<!-- 播放/暂停 --> <!-- 播放/暂停 -->
<view class="play-btn" v-if="!([5, 8, 9].indexOf(type) >= 0)"> <view class="play-btn" v-if="!([9].indexOf(type) >= 0)">
<image <image
class="icon" class="icon"
src="@/static/images/course/play.png" src="@/static/images/course/play.png"
@@ -365,6 +365,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
else if(props.type === 3) return unref(dataInfo)?.chatContent || unref(dataInfo)?.pgrphContent else if(props.type === 3) return unref(dataInfo)?.chatContent || unref(dataInfo)?.pgrphContent
else if(props.type === 4) return unref(dataInfo)?.chatContent || unref(dataInfo)?.qnsContent else if(props.type === 4) return unref(dataInfo)?.chatContent || unref(dataInfo)?.qnsContent
else if(props.type === 5) return unref(dataInfo)?.chatContent || unref(dataInfo)?.analyContent else if(props.type === 5) return unref(dataInfo)?.chatContent || unref(dataInfo)?.analyContent
else if(props.type === 8) return unref(subjectInfo)?.chatContent || unref(subjectInfo)?.qnsContent
else if(props.type === 9) return unref(dataInfo)?.chatContent || unref(dataInfo)?.analyContent else if(props.type === 9) return unref(dataInfo)?.chatContent || unref(dataInfo)?.analyContent
else if(props.type === 0) return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent else if(props.type === 0) return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent
else return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent else return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent
@@ -434,8 +435,18 @@ const audioCacheObj = computed(() => storageStore.audioObj)
},100) },100)
}else{ }else{
voiceLoading.value = true voiceLoading.value = true
let _type = props.type == 2 ? 'ans' : props.type == 3 ? 'pgrh' : props.type == 4 ? 'qns' : '' let _type = props.type == 2 ? 'ans'
let _readId = props.type == 2 ? unref(dataInfo)?.intrctId : props.type == 3 ? unref(dataInfo)?.pgrphId : props.type == 4 ? unref(dataInfo)?.qnsId : '' : props.type == 3 ? 'pgrh'
: props.type == 4 ? 'qns'
: props.type == 5 ? 'analysis'
: props.type == 8 ? 'stemAnalysis'
: ''
let _readId = props.type == 2 ? unref(dataInfo)?.intrctId
: props.type == 3 ? unref(dataInfo)?.pgrphId
: props.type == 4 ? unref(dataInfo)?.qnsId
: props.type == 5 ? unref(dataInfo)?.qnsId
: props.type == 8 ? unref(dataInfo)?.qnsId
: ''
let _params = { let _params = {
crsId: unref(dataInfo)?.crsId || '', crsId: unref(dataInfo)?.crsId || '',
pgrphId: unref(dataInfo)?.pgrphId || '', pgrphId: unref(dataInfo)?.pgrphId || '',
@@ -704,10 +715,10 @@ const audioCacheObj = computed(() => storageStore.audioObj)
} }
.next-learn-btn{ .next-learn-btn{
float: left; float: left;
padding: 0 60rpx 0 20rpx; padding: 0 60rpx 0 15rpx;
height: 62rpx; height: 62rpx;
line-height: 62rpx; line-height: 62rpx;
font-size: 30rpx; font-size: 28rpx;
background-color: #06f; background-color: #06f;
color: #fff; color: #fff;
border-radius: 8rpx; border-radius: 8rpx;
@@ -716,6 +727,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
position: relative; position: relative;
&.replay-study-btn{ &.replay-study-btn{
float: right; float: right;
margin-right: 0;
} }
&.restart{ &.restart{
background-color: #eaf2ff; background-color: #eaf2ff;
+5 -4
View File
@@ -514,12 +514,13 @@ import { onShow } from "@dcloudio/uni-app"
} }
.model-filter-list{ .model-filter-list{
position: fixed; position: fixed;
width: 100vw; width: calc(100vw - 33rpx);
height: 100vh; height: 80vh;
overflow: hidden; overflow: hidden;
top: 0; top: 500rpx;
left: 0; left: 17rpx;
z-index: 1; z-index: 1;
background-color: rgba(0,0,0,.2);
} }
.filter-list, .filter-list,
.model-filter-list{ .model-filter-list{
+1
View File
@@ -35,6 +35,7 @@
</view> </view>
<view class="score-column">{{item.examGrade}}</view> <view class="score-column">{{item.examGrade}}</view>
</view> </view>
<list-no-data v-if="userList.length == 0">暂无数据</list-no-data>
</scroll-view> </scroll-view>
</view> </view>
<view class="ranking-self"> <view class="ranking-self">
+58 -8
View File
@@ -21,14 +21,15 @@
{{ hasMore ? '滚动加载更多' : '加载完成' }} {{ hasMore ? '滚动加载更多' : '加载完成' }}
</view> </view>
</view> </view>
<view class="view-result" v-show="courseList.length === 0">暂无数据</view> <!-- <view class="view-result" v-show="courseList.length === 0">暂无数据</view> -->
<list-no-data v-show="courseList.length == 0">暂无数据</list-no-data>
</scroll-view> </scroll-view>
</view> </view>
<view class="search_content" v-else> <view class="search_content" v-else>
<view class="tabs-view"> <view class="tabs-view">
<uv-tabs :list="tabList" @click="changeTab" :scrollable="false" active-style="font-weight:bold; color:#000;" line-color="#06f"></uv-tabs> <uv-tabs :list="tabList" @click="changeTab" :scrollable="false" active-style="font-weight:bold; color:#000;" line-color="#06f"></uv-tabs>
</view> </view>
<scroll-view class="lists-view" :scroll-y="true"> <scroll-view class="lists-view" :scroll-y="true" @scrolltolower="scrolltolower">
<view class="ability-view model-view" v-show="showModelList('ability')"> <view class="ability-view model-view" v-show="showModelList('ability')">
<view class="view-title"> <view class="view-title">
<image src="@/static/images/search/result/ability.png" class="view-title-img"></image> <image src="@/static/images/search/result/ability.png" class="view-title-img"></image>
@@ -58,6 +59,9 @@
<view class="view-list course-list"> <view class="view-list course-list">
<course-item class="course-item" v-for="itemC in courseList" :key="itemC.crsNum" :itemInfo="itemC" @clickItem="toCourseDetail(itemC)" /> <course-item class="course-item" v-for="itemC in courseList" :key="itemC.crsNum" :itemInfo="itemC" @clickItem="toCourseDetail(itemC)" />
</view> </view>
<view class="view-tips" v-if="activeTab === 'course'">
{{ hasMore ? '滚动加载更多' : '加载完成' }}
</view>
<view class="view-result" v-show="courseList.length === 0">暂无数据</view> <view class="view-result" v-show="courseList.length === 0">暂无数据</view>
</view> </view>
<view class="task-view model-view" v-show="showModelList('task')"> <view class="task-view model-view" v-show="showModelList('task')">
@@ -68,6 +72,9 @@
<view class="view-list"> <view class="view-list">
<TaskItem :item="item" v-for="(item, index) in taskList"></TaskItem> <TaskItem :item="item" v-for="(item, index) in taskList"></TaskItem>
</view> </view>
<view class="view-tips" v-if="activeTab === 'task'">
{{ hasMore ? '滚动加载更多' : '加载完成' }}
</view>
<view class="view-result" v-show="taskList.length === 0">暂无数据</view> <view class="view-result" v-show="taskList.length === 0">暂无数据</view>
</view> </view>
<view class="test-view model-view" v-show="showModelList('test')"> <view class="test-view model-view" v-show="showModelList('test')">
@@ -86,6 +93,9 @@
<view class="view-list"> <view class="view-list">
<ExamItem class="exam-list" :item="item" v-for="item in examList"></ExamItem> <ExamItem class="exam-list" :item="item" v-for="item in examList"></ExamItem>
</view> </view>
<view class="view-tips" v-if="activeTab === 'exam'">
{{ hasMore ? '滚动加载更多' : '加载完成' }}
</view>
<view class="view-result" v-show="examList.length === 0">暂无数据</view> <view class="view-result" v-show="examList.length === 0">暂无数据</view>
</view> </view>
</scroll-view> </scroll-view>
@@ -150,7 +160,7 @@ const tabList = ref([
]) ])
const abilityListShow = computed(() => { const abilityListShow = computed(() => {
if (searchValue.value) { if (searchValue.value) {
let _arr = abilityList.value.filter(t => t.title.includes(searchValue.value)) let _arr = abilityList.value.filter(t => t.title.includes(searchValue.value.toUpperCase()))
let _sum = 4 - (_arr.length % 4) let _sum = 4 - (_arr.length % 4)
if (_sum !== 4) { if (_sum !== 4) {
for (let i = 0; i < _sum; i++) { for (let i = 0; i < _sum; i++) {
@@ -219,22 +229,29 @@ const changeTab = item => {
if (!item) return if (!item) return
activeTab.value = item.type activeTab.value = item.type
console.log(item) console.log(item)
switch (item.name) { switch (item.type) {
case 'all': case 'all':
pageInfo.value.limit = 3
break break
case 'ability': case 'ability':
break break
case 'course': case 'course':
pageInfo.value.limit = 15
break break
case 'task': case 'task':
pageInfo.value.limit = 15
break break
case 'test': case 'test':
pageInfo.value.limit = 15
break break
case 'exam': case 'exam':
pageInfo.value.limit = 15
break break
default: default:
pageInfo.value.limit = 3
break break
} }
getData(1)
} }
const clickAbility = item => { const clickAbility = item => {
if (item.isTab) { if (item.isTab) {
@@ -262,23 +279,55 @@ const search = () => {
getData(1) getData(1)
} }
const getMore = () => {
if(activeTab.value && activeTab.value !== 'all'){
getData()
}
}
const getData = (flag = null) => { const getData = (flag = null) => {
if (flag) { if (flag) {
pageInfo.value.page = 1 pageInfo.value.page = 1
courseList.value = [] courseList.value = []
examList.value = []
taskList.value = []
} }
let _isCourse = fromType.value === 'course' || activeTab.value==='course'
appSearchCrsApi({ appSearchCrsApi({
type: fromType.value === 'course' ? '01' : '00', //00 首页搜索 01课程搜索 type: _isCourse ? '01'
: activeTab.value==='exam' ? '02'
: activeTab.value==='task' ? '03'
: '00', //00 首页搜索 01课程搜索 '02' 考试搜索 '03' 任务搜索
searchName: searchValue.value, searchName: searchValue.value,
page: pageInfo.value.page, page: pageInfo.value.page,
limit: pageInfo.value.limit limit: pageInfo.value.limit
}).then(res => { }).then(res => {
pageInfo.value.total = res.total || 0
courseList.value = courseList.value.concat(res.body.traCrsInfoVoList || []) courseList.value = courseList.value.concat(res.body.traCrsInfoVoList || [])
if (fromType.value !== 'course') { if (fromType.value !== 'course') {
examList.value = res.body.traExamPapersExtVoList || [] examList.value = examList.value.concat(res.body.traExamPapersExtVoList || [])
taskList.value = res.body.traTaskInfoExtVoList || [] taskList.value = taskList.value.concat(res.body.traTaskInfoExtVoList || [])
} }
pageInfo.value.total = res.total || 0
// switch (activeTab.value) {
// case 'all':
// break
// case 'ability':
// break
// case 'course':
// pageInfo.value.total = res.total || 0
// break
// case 'task':
// pageInfo.value.total = res.total || 0
// break
// case 'test':
// pageInfo.value.total = res.total || 0
// break
// case 'exam':
// pageInfo.value.total = res.total || 0
// break
// default:
// pageInfo.value.total = res.total || 0
// break
// }
}) })
} }
const hasMore = computed(() => { const hasMore = computed(() => {
@@ -319,6 +368,7 @@ const toCourseDetail = item => {
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
color: #999; color: #999;
font-size: 26rpx;
} }
.view-tips { .view-tips {
width: 100%; width: 100%;