Merge branch 'dev-20250930' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
田岩
2025-07-29 08:54:59 +08:00
6 changed files with 373 additions and 49 deletions
+16 -4
View File
@@ -65,7 +65,10 @@
</view>
</view>
<view class="empty_message_div" v-if="status=='nomore' && total == 0">
<image class="img" src="@/static/images/courseDetail/empty_message.png"></image>
<image class="img" src="@/static/images/courseDetail/empty_message.png" mode="widthFix"></image>
<view class="text">
这里什么都没有
</view>
</view>
<uv-load-more :status="status" loadmore-text="轻轻上拉加载"></uv-load-more>
<uni-popup ref="popup" class="popup">
@@ -244,11 +247,20 @@
.empty_message_div {
display: flex;
justify-content: center;
align-items: center;
padding: 80rpx 0;
flex-direction: column;
.img {
width: 288rpx;
height: 276rpx;
width: 20vw;
// height: 276rpx;
}
.text{
margin-top: 24rpx;
font-weight: 400;
font-size: 29rpx;
color: #999999;
text-align: center;
font-style: normal;
}
}
+2 -2
View File
@@ -46,7 +46,7 @@
<view class="study_duration_and_profile_div">
<!-- 飞天兔子 -->
<view class="profile_div">
<image :src="mascotInfo?.imgAddr ||''" alt="" class="profile"></image>
<image :src="mascotInfo?.imgAddr ||''" alt="" class="profile" mode="widthFix"></image>
<!-- <image src="/static/images/index/fttz.png" class="profile"></image> -->
</view>
<!-- 学习时长 -->
@@ -731,7 +731,7 @@
.profile {
width: 278rpx;
height: 370rpx;
// height: 370rpx;
}
}
+2 -2
View File
@@ -17,9 +17,9 @@
</view>
<view class="account_password_div">
<view class="title1 font_pf">账号</view>
<uv-input class="account_input" v-model="account" :maxlength="30" placeholder="请输入账号"></uv-input>
<uv-input class="account_input" v-model="account" :adjustPosition="false" :maxlength="30" placeholder="请输入账号"></uv-input>
<view class="title2 font_pf">密码</view>
<uv-input class="account_input" v-model="password" :maxlength="20" placeholder="请输入密码" :type="show_password ? 'text' : 'password'" :password-icon="true">
<uv-input class="account_input" v-model="password" :adjustPosition="false" :maxlength="20" placeholder="请输入密码" :type="show_password ? 'text' : 'password'" :password-icon="true">
<template v-slot:suffix>
<view class="show_password" @click="show_password = !show_password">
<image v-if="show_password" class="img_100" src="@/static/images/login/show.png"></image>
+109 -36
View File
@@ -7,9 +7,9 @@
<!-- 用户个人信息 -->
<view class="personal_information">
<view class="profile" @click="click_update_avatar()">
<!-- <image-preview v-if="user_info.imageAddr" class="img_100" :src="user_info.imageAddr"></image-preview> -->
<image class="img_100" v-if='user_info.imagePath' :src="user_info.imagePath"></image>
<image-preview v-else-if="user_info.imageAddr" class="img_100" :src="user_info.imageAddr"></image-preview>
<image-preview v-else-if="user_info.imageAddr" class="img_100"
:src="user_info.imageAddr"></image-preview>
<image v-else class="img_100" src="/static/images/me/default_user_avatar.png"></image>
</view>
<view class="personal_information_data">
@@ -23,9 +23,23 @@
<image v-if="user_info.gender === 'm'" class="img_100" src="/static/images/me/man.png">
</image>
</view>
<view class="fl1"></view>
</view>
<view class="work_number_div">工号{{ user_info.loginName }}</view>
<view class="fl1"></view>
</view>
<!-- 显示当前选中的徽章 -->
<view class="dan" @click="changeBadge">
<view class="dan_img">
<image
class="img_100"
:src="`/static/images/me/${badgeList[currentIndex].png}`"
mode="heightFix"
alt="当前徽章"
></image>
</view>
<view class="dan_text">{{ badgeList[currentIndex].name }}</view>
</view>
</view>
<!-- 用户学习时间信息 -->
@@ -59,39 +73,61 @@
</view>
<!-- 4个导航 -->
<view class="navigation_div">
<!-- <scroll-view class="scroll-view" :scroll-x="true" :show-scrollbar="false"> -->
<view class="group">
<view class="item">
<image class="icon" src="@/static/images/me/study.png"></image>
<view class="title">学习记录</view>
<scroll-view class="scroll-view" scroll-x="true" :show-scrollbar="false">
<view class="scroll-view-item">
<view class="item">
<image class="icon" src="@/static/images/me/study.png"></image>
<view class="title">学习记录</view>
</view>
</view>
<view class="item">
<image class="icon" src="@/static/images/me/todo.png"></image>
<view class="title">待办任务</view>
<view class="scroll-view-item">
<view class="item">
<image class="icon" src="@/static/images/me/todo.png"></image>
<view class="title">练习记录</view>
</view>
</view>
<view class="item">
<image class="icon" src="@/static/images/me/examination.png"></image>
<view class="title">考试记录</view>
<view class="scroll-view-item">
<view class="item">
<image class="icon" src="@/static/images/me/examination.png"></image>
<view class="title">考试记录</view>
</view>
</view>
<view class="item" @click="goTest()">
<image class="icon" src="@/static/images/me/report.png"></image>
<view class="title">我的报告</view>
<view class="scroll-view-item">
<view class="item">
<image class="icon" src="@/static/images/me/report.png"></image>
<view class="title">竞赛记录</view>
</view>
</view>
</view>
<view class="scroll-view-item">
<view class="item">
<image class="icon" src="@/static/images/me/report.png"></image>
<view class="title">AI陪练记录</view>
</view>
</view>
<view class="scroll-view-item">
<view class="item">
<image class="icon" src="@/static/images/me/report.png"></image>
<view class="title">AI问答记录</view>
</view>
</view>
</scroll-view>
<!-- </scroll-view> -->
</view>
<view class="cell_div">
<uv-cell-group :border="false">
<uv-cell title="消息通知" :isLink="true"></uv-cell>
<uv-cell title="排行榜" :isLink="true"></uv-cell>
<uv-cell title="问答记录" :isLink="true"></uv-cell>
<uv-cell title="竞赛记录" :isLink="true" :clickable="false" :border="false"></uv-cell>
<uv-cell title="消息通知" :isLink="true" @click="goTest()"></uv-cell>
<uv-cell title="我的收藏" :isLink="true"></uv-cell>
<uv-cell title="排行榜" :isLink="true" :clickable="false" :border="false"></uv-cell>
</uv-cell-group>
</view>
<view class="cell_div">
<uv-cell-group :border="false">
<uv-cell title="设置" :isLink="true" @click="common.navigateTo('/pages/setting/index')"></uv-cell>
<uv-cell title="客服" :isLink="true"></uv-cell>
<uv-cell title="退出登录" :isLink="true" :clickable="false" :border="false"
@click="click_loginout()"></uv-cell>
</uv-cell-group>
@@ -134,8 +170,12 @@
import {
uploadFile
} from '@/api/common'
import {setMascot} from "@/common/mascot.js"
import { queryCurrentUser} from '@/api/login.js';
import {
setMascot
} from "@/common/mascot.js"
import {
queryCurrentUser
} from '@/api/login.js';
const badgeList = [{
"name": "黑铁",
"png": "badge_1.png",
@@ -165,6 +205,11 @@
"png": "badge_7.png",
}
]
const currentIndex = ref(0);
const changeBadge = () => {
// 计算下一个索引,如果当前是最后一个则回到0
currentIndex.value = (currentIndex.value + 1) % badgeList.length;
};
const socketStore = useSocketStore()
const accmTaskCntRef = ref(null);
const accmPointRef = ref(null);
@@ -215,7 +260,7 @@
this.stdtTmLen = stdtTmLen;
stdtTmLenRef.value.start();
}
}
}
} catch (error) {
// console.error('获取统计数据失败:', error);
}
@@ -255,7 +300,7 @@
console.log('下拉刷新');
uni.stopPullDownRefresh();
});
// 头像
const avatarCropperStatus = ref(true)
const avatarCropperUrl = ref('');
@@ -277,18 +322,20 @@
// 选择头像确定
const onConfirm = (file) => {
avatarCropperStatus.value = false
nextTick(async() => {
nextTick(async () => {
common.loading('更新头像中')
try{
try {
const data = {
bizScen: 'S3007',
thumbnailFlag: true,
thumbImgSize:100
thumbImgSize: 100
}
// 上传图片
const res = await uploadFile(file.tempFilePath, data)
// 更新个人信息
await updateDfSysUserExtandInfoImageAddr({imageAddr : res.thumbFileId})
await updateDfSysUserExtandInfoImageAddr({
imageAddr: res.thumbFileId
})
// 更新个人信息
const userData = await queryCurrentUser()
console.log('userData', userData);
@@ -306,6 +353,10 @@
<style scoped lang="scss">
$bg-margin-left: 50rpx;
// 下方单元格
.cell_div {
margin: 30rpx $bg-margin-left 0 $bg-margin-left;
@@ -336,9 +387,15 @@
justify-content: space-around;
z-index: 101;
.group {
display: flex;
justify-content: space-around;
.scroll-view {
white-space: nowrap;
width: 100%;
}
.scroll-view-item {
display: inline-block;
padding: 32rpx 22rpx 36rpx 26rpx;
}
.item {
@@ -391,9 +448,9 @@
box-shadow: #f6f8ff 0 0 2rpx;
.personal_information {
padding: 20rpx 18rpx 0 26rpx;
padding: 20rpx 26rpx 0 26rpx;
display: flex;
// 个人头像框框
.profile {
border-radius: 100%;
@@ -410,12 +467,13 @@
flex-direction: column;
margin-left: 26rpx;
overflow: hidden;
// 上边的姓名性别盒子
.name_sex_div {
display: flex;
margin-top: 6rpx;
justify-content: space-between;
.name {
font-family: PingFangSC;
font-weight: 600;
@@ -429,6 +487,7 @@
width: 30rpx;
height: 30rpx;
}
}
.work_number_div {
@@ -444,6 +503,20 @@
}
}
}
.dan{
display: flex;
flex-direction: column;
font-size: 16rpx;
align-items: center;
.dan_img{
height: 50rpx;
}
.dan_text{
}
}
.study_information {
display: flex;
+244 -5
View File
@@ -19,17 +19,136 @@
</view>
<!-- 主体 -->
<view class="search_content">
<image class="bg_img" style="width: 718rpx;height: 1126rpx;" src="@/static/images/test/search_img.png">
</image>
<!-- 历史搜索 -->
<view class="title_div">
<view class="text">
历史搜索
</view>
<view class="fl1">
</view>
<view class="delete_img">
<image src="@/static/images/search/delete.png" class="img" mode="heightFix"></image>
</view>
</view>
<view class="history_div">
<view class="history_item" v-for="item in historyList">
{{item}}
</view>
<view class="history_item has-arrow" @click="show_all_history_fun">
<view class="down-corner-arrow" :class="show_all_history ? 'up' : 'down'"></view>
</view>
</view>
</view>
<view class="host_search_div">
</view>
<image class="bg_img" style="width: 718rpx;height: 1126rpx;" src="@/static/images/test/search_img.png">
</image>
</view>
<!-- 隐藏的计算容器 -->
<view class="measure-container">
<view v-for="(item, index) in hiddenHistorySearchList" :key="index" class="history_item">
{{ item }}
</view>
</view>
</template>
<script setup>
const tagRefs = ref([]) // 用于存储所有history_item的引用
import {
ref
getCurrentInstance,
computed,
watch
} from 'vue';
const {
proxy
} = getCurrentInstance() // 获取当前组件实例
const currentHeight = ref(0); // 动态高度(单位:px
const visibleCount = ref(0)
const hiddenHistorySearchList = ref([]);
// 展开或者关闭
const show_all_history_fun = async () => {
show_all_history.value = !show_all_history.value
}
const show_all_history = ref(false)
const historyList = computed(() => show_all_history.value ? hiddenHistorySearchList.value : hiddenHistorySearchList
.value.slice(0, visibleCount.value));
onShow(() => {
const historySearchList = ['房贷审批', '小微贷条件', '对公开户', '反洗钱指引', '盗刷处理', '小微贷条件', '征信解读']
if (historySearchList) {
hiddenHistorySearchList.value = [...historySearchList]
nextTick(() => {
const widthPromises = hiddenHistorySearchList.value.map((res, index) => {
return new Promise(resolve => {
const query = uni.createSelectorQuery().in(proxy);
query.select(`.history_item:nth-child(${index + 1})`)
.boundingClientRect(data => {
resolve(data ? data.width : 0); // 解析宽度值
}).exec();
});
});
// 等待所有Promise完成
Promise.all(widthPromises).then(widths => {
console.log('所有宽度计算完成:', widths);
calculateLayout(widths); // 开始计算布局
});
})
}
})
const calculateLayout = (widths) => {
const gap = 12; // 项之间的间距
const expandBtnWidth = 80
const query = uni.createSelectorQuery().in(proxy);
query.select('.history_div')
.boundingClientRect(data => {
const containerWidth = data.width
let row1Count = 0; // 第一行可容纳数量
let row2Count = 0; // 第二行可容纳数量
let currentWidth = 0; // 当前行已用宽度
// 计算第一行可容纳数量
for (let i = 0; i < widths.length; i++) {
const itemWidth = widths[i] + (row1Count > 0 ? gap : 0);
if (currentWidth + itemWidth <= containerWidth) {
row1Count++;
currentWidth += itemWidth;
} else {
break;
}
}
// 计算第二行可容纳数量(预留展开按钮位置)
currentWidth = 0;
// 第二行总可用宽度 = 容器宽度 - 展开按钮宽度(含间距)
const row2MaxWidth = containerWidth - expandBtnWidth - gap;
for (let i = row1Count; i < widths.length; i++) {
const itemWidth = widths[i] + (row2Count > 0 ? gap : 0);
if (currentWidth + itemWidth <= row2MaxWidth) {
row2Count++;
currentWidth += itemWidth;
} else {
break;
}
}
console.log(`第一行: ${row1Count}个,第二行: ${row2Count}个(含展开按钮)`);
visibleCount.value = row1Count + row2Count;
}).exec();
}
import {
ref,
watchEffect,
nextTick,
onMounted
} from 'vue';
import common from '@/common/common.js'
import {
onShow
} from '@dcloudio/uni-app';
// 静态样式配置
const fixedCustomStyles = {
backgroundColor: "#ffffff",
@@ -43,18 +162,137 @@
fontSize: "28px"
}
const inputValue = ref('');
const measureRef = ref(null)
const measureItems = ref([])
</script>
<style scoped lang="scss">
.history_div {
display: flex;
flex-wrap: wrap;
width: 100%;
}
.measure-container {
display: flex;
}
.history_item {
white-space: nowrap;
padding: 8rpx 22rpx;
border-radius: 40rpx 40rpx 40rpx 40rpx;
border: 1px solid #999;
color: #777;
}
.history_item {
margin-bottom: 16rpx;
}
/* 除最后一个子元素外,都添加右间距 */
.history_item:not(:last-child) {
margin-right: 12px;
}
.has-arrow {
border: 1px solid #bbb;
position: relative;
}
/* 朝下的拐角箭头容器 */
.down-corner-arrow {
padding: 10rpx 8rpx;
position: relative;
}
.down-corner-arrow.up {
transform: rotate(90deg);
top: 0%;
left: 0%;
}
.down-corner-arrow.down {
transform: rotate(-90deg);
top: 50%;
left: 0%;
}
/* 左半边箭头(向左旋转) */
.down-corner-arrow::before {
content: '';
position: absolute;
width: 20rpx;
/* 线段长度 */
height: 2rpx;
/* 线段粗细 */
background-color: #bbb;
transform-origin: right center;
/* 旋转中心在右侧 */
transform: rotate(-48deg);
/* 向左旋转50°,使总开口角100° */
}
/* 右半边箭头(向右旋转) */
.down-corner-arrow::after {
content: '';
position: absolute;
width: 20rpx;
/* 线段长度 */
height: 2rpx;
/* 线段粗细 */
background-color: #bbb;
transform-origin: right center;
/* 旋转中心在右侧 */
transform: rotate(48deg);
/* 向右旋转50°,使总开口角100° */
}
.title_div {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 70rpx;
margin: 10rpx 0;
// background-color: red;
.text {
font-size: 32rpx;
font-weight: bold;
}
.delete_img {
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0 20rpx 32rpx;
// background-color: red;
.img {
height: 24rpx;
}
}
}
.search_content {
background-color: #fff;
min-height: 400rpx;
margin-top: -6rpx;
border-radius: 12rpx 12rpx 0 0;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 20rpx;
min-height: 200rpx;
transition: max-height 0.3s ease;
.bg_img {
width: 84%;
margin: 20rpx auto;
@@ -70,6 +308,7 @@
.back_div {
// margin-right: 10rpx;
padding: 10rpx 10rpx 10rpx 20rpx;
// background-color: red;
.back-icon {
position: relative;
Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B