合并兼容性问题,并且解决冲突

This commit is contained in:
田岩
2025-10-31 14:13:39 +08:00
8 changed files with 156 additions and 114 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export const get_base_url = (url = '') => {
}
// #endif
// #ifdef APP-PLUS
return ENV.VITE_APP_BASE_API_Url
return 'https://aitstest.jlbank.com.cn:7002' || ENV.VITE_APP_BASE_API_Url
// #endif
} else { // 其他环境,包括生产环境,sit环境,uat环境
+2 -2
View File
@@ -371,8 +371,8 @@
border-radius: 24rpx 24rpx 0rpx 0rpx;
// height: 162rpx;
background-color: #ffffff;
display: flex;
flex-direction: column;
// display: flex;
// flex-direction: column;
padding-top: 36rpx;
padding-left: 42rpx;
padding-bottom: 24rpx;
+26 -18
View File
@@ -1,22 +1,24 @@
<template>
<uni-popup ref="PopupRef" class="popup" :mask-click="false">
<view class="popup_div">
<view class="title_div">
<!-- 1. 插槽优先 -->
<slot name="title" v-if="$slots.title"></slot>
<!-- 2. 有HTML内容且不为空时使用v-html -->
<view v-else-if="html && html.trim() !== ''" v-html="html"></view>
<!-- 3. 最后显示默认标题 -->
<template v-else>{{ title }}</template>
</view>
<view v-if="msg" class="msg_div">
{{ msg }}
</view>
<view class="button_div">
<view class="button_item" v-for="item in buttonList" :style="item?.style" @click="click_button(item)">
{{ item?.name || '' }}
<view class="popup-content">
<view class="fl1"></view>
<view class="popup_div">
<view class="title_div">
<!-- 1. 插槽优先 -->
<slot name="title" v-if="$slots.title"></slot>
<!-- 2. 有HTML内容且不为空时使用v-html -->
<view v-else-if="html && html.trim() !== ''" v-html="html"></view>
<!-- 3. 最后显示默认标题 -->
<template v-else>{{ title }}</template>
</view>
<view class="button_div">
<view class="button_item" v-for="item in buttonList" :style="item?.style" @click="click_button(item)">
{{ item?.name || '' }}
</view>
</view>
</view>
<view class="fl1"></view>
</view>
</uni-popup>
</template>
@@ -70,7 +72,13 @@
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.popup-content{
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
}
.popup_div {
width: 80%;
background-color: #ffffff;
@@ -80,8 +88,8 @@
align-items: center;
border-radius: 16rpx;
position: relative;
margin: 0 auto 76% auto;
margin-top: 6vw;
margin-bottom: 30vw;
.title_div {
width: 100%;
text-align: center;
+69 -66
View File
@@ -6,15 +6,8 @@
<image src="@/static/images/index/bg.png" class="bg_img"></image>
<view class="fixed_search_div" v-show="opacity" :style="{ opacity: opacity }">
<view class="fixed_search_input_div" @click="goto_search_page">
<uv-input
shape="circle"
:customStyle="fixedCustomStyles"
placeholderStyle="color:#999999;font-size:26rpx"
placeholder="请输入关键字"
suffixIcon="search"
:suffixIconStyle="suffixIconStyle"
:readonly="true"
></uv-input>
<uv-input shape="circle" :customStyle="fixedCustomStyles" placeholderStyle="color:#999999;font-size:26rpx"
placeholder="请输入关键字" suffixIcon="search" :suffixIconStyle="suffixIconStyle" :readonly="true"></uv-input>
</view>
<view class="message_div" @click="common.navigateTo('/pages/messageNotification/index')">
<image src="@/static/images/index/message_b.png" class="message_img"></image>
@@ -31,16 +24,9 @@
</view>
<!-- 搜索框 -->
<view class="search_div">
<uv-input
shape="circle"
@click="goto_search_page"
:customStyle="customStyles"
:placeholderStyle="placeholderStyle"
placeholder="请输入关键字"
suffixIcon="search"
:suffixIconStyle="suffixIconStyle"
:readonly="true"
></uv-input>
<uv-input shape="circle" @click="goto_search_page" :customStyle="customStyles"
:placeholderStyle="placeholderStyle" placeholder="请输入关键字" suffixIcon="search"
:suffixIconStyle="suffixIconStyle" :readonly="true"></uv-input>
<view class="message_div" @click="common.navigateTo('/pages/messageNotification/index')">
<image src="@/static/images/index/message.png" class="message_img"></image>
<view class="message_text">消息</view>
@@ -72,59 +58,43 @@
<view class="item">
<view class="top">本年学习时长</view>
<view class="bottom">
<uv-count-to
:startVal="statistics_data['startStdtTmLen']"
:endVal="statistics_data['stdtTmLen']"
:useEasing="true"
:decimals="1"
ref="stdtTmLenRef"
></uv-count-to>
<uv-count-to :startVal="statistics_data['startStdtTmLen']" :endVal="statistics_data['stdtTmLen']"
:useEasing="true" :decimals="1" ref="stdtTmLenRef"></uv-count-to>
h
</view>
</view>
<view class="item">
<view class="top">本年陪练次数</view>
<view class="bottom">
<uv-count-to
:startVal="statistics_data['starAccmPracticeCnt']"
:endVal="statistics_data['accmPracticeCnt']"
:useEasing="true"
ref="accmPracticeCntRef"
></uv-count-to>
<uv-count-to :startVal="statistics_data['starAccmPracticeCnt']"
:endVal="statistics_data['accmPracticeCnt']" :useEasing="true" ref="accmPracticeCntRef"></uv-count-to>
<span class="number"></span>
</view>
</view>
<view class="item">
<view class="top">本年考试次数</view>
<view class="bottom">
<uv-count-to
:startVal="statistics_data['startAccmExamCnt']"
:endVal="statistics_data['accmExamCnt']"
:useEasing="true"
ref="accmExamCntRef"
></uv-count-to>
<uv-count-to :startVal="statistics_data['startAccmExamCnt']" :endVal="statistics_data['accmExamCnt']"
:useEasing="true" ref="accmExamCntRef"></uv-count-to>
<span class="number"></span>
</view>
</view>
</view>
</view>
<!-- 8个导航 -->
<!-- 8个导航 -->
<view class="navigation_div">
<view class="group">
<view class="item" @click="common.switchTab('/pages/course/index')">
<image class="icon" src="@/static/images/index/navigation_course.png"></image>
<view class="title">AI学习</view>
</view>
<view
class="item"
@click="common.navigateTo('/pages/index/dialog', { animationType: 'slide-in-bottom' })"
>
<view class="item" @click="common.navigateTo('/pages/index/dialog', { animationType: 'slide-in-bottom' })">
<image class="icon" src="@/static/images/index/navigation_question_answering.png"></image>
<view class="title">AI问答</view>
</view>
<view class="item">
<view class="item" @click="common.navigateTo('/pages/sparring/index')">
<image class="icon" src="@/static/images/index/navigation_ai.png"></image>
<view class="title">AI陪练</view>
</view>
@@ -138,7 +108,7 @@
<image class="icon" src="@/static/images/index/navigation_examination.png"></image>
<view class="title">考试中心</view>
</view>
<view class="item" @click="common.navigateTo('/pages/competition/index')">
<image class="icon" src="@/static/images/index/navigation_practice.png"></image>
<view class="title">竞赛练习</view>
@@ -156,9 +126,9 @@
<classScroll :ref="(el) => (classScrollRef[0] = el)" name="hot_class"></classScroll>
<classScroll :ref="(el) => (classScrollRef[1] = el)" name="recommend_class"></classScroll>
<classScroll :ref="(el) => (classScrollRef[2] = el)" name="new_class"></classScroll>
<!-- <view class="hot_class_div">
<!-- <view class="hot_class_div">
<scroll-view class="scroll-view" :scroll-x="true" :show-scrollbar="false">
<view class="scroll-view-item" v-for="(item, index) in hot_class_list" :key="index">
<view class="item_div">
@@ -187,7 +157,7 @@
</view>
</scroll-view>
</view> -->
<view class="bottom_line">
<uv-divider text="我是有底线的" lineColor="#9cB0DC" :hairline="true"></uv-divider>
</view>
@@ -197,14 +167,39 @@
</template>
<script setup>
import { computed, nextTick, onBeforeMount, onMounted, reactive, ref } from 'vue';
import { onShow, onPageScroll, onLoad, onHide } from '@dcloudio/uni-app';
import { customStyles, fixedCustomStyles, placeholderStyle, suffixIconStyle } from './index.js';
import { getUserInfo } from '@/common/common';
import {
computed,
nextTick,
onBeforeMount,
onMounted,
reactive,
ref
} from 'vue';
import {
onShow,
onPageScroll,
onLoad,
onHide
} from '@dcloudio/uni-app';
import {
customStyles,
fixedCustomStyles,
placeholderStyle,
suffixIconStyle
} from './index.js';
import {
getUserInfo
} from '@/common/common';
import common from '@/common/common';
import { setMascot } from '@/common/mascot.js';
import { getStatisticsData } from '@/api/index.js';
import { noticeMessageCount } from '@/api/messageNotification.js';
import {
setMascot
} from '@/common/mascot.js';
import {
getStatisticsData
} from '@/api/index.js';
import {
noticeMessageCount
} from '@/api/messageNotification.js';
import classScroll from './components/class_scroll.vue';
const scrollTop = ref(0);
const no_read_message_num = ref(0);
@@ -230,7 +225,7 @@
if (scrollTop.value <= 130) return 0;
return Math.min(3, (scrollTop.value - 130) / 30);
});
const bgOpacity = computed(() => {
return `rgba(246,248,255,${opacity.value})`;
});
@@ -241,9 +236,9 @@
});
// 滚动消息
const notice_text = ref(['绿色金融政策解析与商业银行绿色水水水水水水水水水水水水水', '绿色金融政策解析与商业银行红色']);
const mascotInfo = ref({});
const statistics_data = reactive({
stdtTmLen: 0, // 学习
accmPracticeCnt: 0, // 训练
@@ -252,7 +247,7 @@
startAccmPracticeCnt: 0, // 起始训练
startAccmExamCnt: 0, // 起始考试
request_time: 0, // 上次请求时间
init: function () {
init: function() {
// 初始化统计数据
const index_statistics_data = common.getValue('statistics_data'); // 获取缓存
if (index_statistics_data) {
@@ -261,7 +256,7 @@
this.accmExamCnt = index_statistics_data.accmExamCnt;
}
},
get_statistics_data: async function () {
get_statistics_data: async function() {
try {
const time_now = Date.now();
let statistics_data = common.getValue('statistics_data') || {};
@@ -283,7 +278,9 @@
}
// 解构赋值获取最新值
const { accmExamCnt = 0, accmPracticeCnt = 0, stdtTmLen = 0 } = statistics_data;
const {
accmExamCnt = 0, accmPracticeCnt = 0, stdtTmLen = 0
} = statistics_data;
// 更新数据并触发动画
if (stdtTmLen !== this.stdtTmLen) {
@@ -307,12 +304,12 @@
}
}
});
// 进入搜索页
const goto_search_page = () => {
common.navigateTo('/pages/search/search?from=index');
};
onLoad(() => {
statistics_data['init'](); // 初始化数据
// 检测如果没设置吉祥物,跳转到吉祥物界面
@@ -339,7 +336,7 @@
nextTick(() => {
classScrollRef.value.forEach((item) => item?.get_data());
});
noticeMessageCount().then((res) => {
no_read_message_num.value = res.body;
});
@@ -396,6 +393,7 @@
width: 200rpx;
height: 150rpx;
}
// margin-right: 22rpx;
}
@@ -430,6 +428,7 @@
.button_div {
display: flex;
justify-content: space-between;
.button {
text-align: center;
line-height: 62rpx;
@@ -534,10 +533,12 @@
flex-direction: column;
align-items: center;
min-width: 60rpx;
.message_img {
width: 32rpx;
height: 36rpx;
}
.message_text {
margin-top: 4rpx;
font-family: PingFangSC, PingFang SC;
@@ -556,9 +557,11 @@
border-radius: 10rpx;
color: #ffffff;
}
.message_num_big {
right: 0rpx;
}
.message_num_small {
right: 8rpx;
min-width: 24rpx;
@@ -731,4 +734,4 @@
flex-direction: column;
background-color: #f6f8ff;
}
</style>
</style>
+40 -22
View File
@@ -9,11 +9,13 @@
<image src="/static/images/login/logo_text.png" mode="heightFix" class="log_img" @click="goTest"></image>
<view class="fl1"></view>
</view>
<view class="fl2"></view>
<view class="title_text_div">
<view class="title_text font_pf">欢迎登录</view>
<image src="/static/images/login/clap.png" class="title_text_img"></image>
</view>
<view class="title_text_tip font_pf">登录账号即可查看更多精彩咨询</view>
<view class="fl1"></view>
</view>
<view class="account_password_div">
<view class="title1 font_pf">账号</view>
@@ -42,7 +44,7 @@
</template>
</uv-input>
</view>
<view class="fl1"></view>
<view class="fl8"></view>
<view class="bottom_login_div">
<view class="" @click="login_fun">
<uv-button class="bottom_login_button" type="primary" :throttleTime="500" :disabled="login_button_status">
@@ -57,36 +59,25 @@
已阅读并同意
<span class="ysxy_term" @click="common.navigateTo('/pages/login/ysxy?page=1')">用户隐私协议</span>
<!--
<span class="ysxy_term" @click="common.navigateTo('/pages/login/ysxy?page=2')">隐私权政策</span> -->
</view>
</view>
</view>
<view class="ime-div"></view>
</view>
</template>
<script lang="ts" setup>
// import { v4 as uuid4 } from 'uuid'
import { onBackPress, onLoad } from '@dcloudio/uni-app';
import { ref, computed, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue';
import { ref, computed, onMounted, onUnmounted, onBeforeUnmount, getCurrentInstance } from 'vue';
import common from '@/common/common';
import { setupKeyboardHeightListener } from '@/common/common';
import { useAccountLoginApp, queryCurrentUser } from '@/api/login.js';
import { encryptByAES } from '@/api/encryptAndDecryptData.js';
import { useSocketStore } from '@/store/socket.js';
import { storeToRefs } from 'pinia';
import { getPhoneEnvBool } from '@/common/common.js';
// interface PageVueInstance {
// refreshData?: () => Promise<void> | void;
// }
// // 定义完整的页面实例类型(包含原生属性和$vm)
// interface CustomPageInstance {
// route: string; // 页面路由路径
// options: Record<string, any>;// 页面参数
// $vm: PageVueInstance; // 页面对应的Vue组件实例
// }
// 定义页面实例的类型(基于UniApp实际情况)
const socketStore = useSocketStore();
const { taskSocket } = storeToRefs(socketStore);
@@ -94,6 +85,7 @@
const account = ref<string>('');
const password = ref<string>('');
const read_text_state = ref<Array<unknown>>([]);
const imeHeight = ref('0px');
const back_state = ref(true);
// 登录按钮状态
const login_button_status = computed<boolean>(() => !read_text_state.value.length);
@@ -170,7 +162,7 @@
}
})
.catch((res) => {
console.log(res);
common.hideLoading();
if (res.rtnCode === '1001') {
common.msg('账号或密码错误,如忘记密码,请去统一身份认证平台修改。');
@@ -182,8 +174,12 @@
common.hideLoading();
}
};
let removeListener = () => {};
onUnmounted(() => {
removeListener();
});
onLoad(() => {});
onMounted(() => {
let loginAccountData = common.getValue('loginAccountData');
if (loginAccountData) {
@@ -191,15 +187,36 @@
password.value = loginAccountData.password;
}
back_state.value = true;
removeListener = setupKeyboardHeightListener((height) => {
console.log('height', height);
if (height > 0) {
imeHeight.value = height + 50 + 'px';
} else {
imeHeight.value = '0px';
}
});
});
// 跳进了登录页,禁止返回操作
onBackPress(() => back_state.value);
</script>
<style lang="scss" scoped>
.fl2 {
flex: 2;
}
.fl8 {
flex: 4;
}
.ime-div {
height: v-bind(imeHeight);
width: 100%;
transition: height .2s ease;
}
.bottom_login_div {
padding: 0 58rpx;
margin-bottom: 93rpx;
margin-top: 43rpx;
margin-bottom: 80rpx;
.ysxy_div {
margin-top: 27rpx;
@@ -276,9 +293,8 @@
flex-direction: column;
position: relative;
padding: 0 50rpx;
height: 496rpx;
// border: 1px solid red;
min-height: 356rpx;
flex: 1;
.bg_img {
position: absolute;
top: 0;
@@ -315,7 +331,7 @@
.title_text_div {
display: flex;
align-items: center;
margin-top: 84rpx;
// margin-top: 84rpx;
.title_text {
font-weight: 700;
@@ -338,5 +354,7 @@
.main_div {
display: flex;
flex-direction: column;
overflow: hidden;
max-height: 100vh;
}
</style>
+11 -5
View File
@@ -5,7 +5,7 @@
<view class="back-icon"></view>
</view>
<view class="bg_img">
<image src="@/static/images/mascot/bg_1.png" class="img" mode="aspectFit"></image>
<image src="@/static/images/mascot/bg_1.png" class="img" mode="widthFix"></image>
</view>
<view class="fl1"></view>
<view class="title_div">
@@ -204,7 +204,7 @@
.tip_msg {
font-family: PingFangSC;
font-weight: 400;
font-size: 30rpx;
font-size: 4vw;
color: #FFFFFF;
line-height: 40rpx;
text-align: center;
@@ -264,10 +264,13 @@
&.right {
top: 40%;
right: 2%;
// width:100rpx;
}
position:absolute;
width:100rpx;
// width:100rpx;
width:13vw;
display: flex;
align-items: center;
flex-direction: column;
@@ -281,8 +284,11 @@
.button_div {
// width: 50vw;
margin-top: 20rpx;
margin-bottom: 100rpx;
width: 80%;
height: 120rpx;
// height: 120rpx;
height: 16vw;
position: relative;
.img {
@@ -310,7 +316,7 @@
display: flex;
flex-direction: column;
position: relative;
max-width: 100vh;
// max-width: 100vh;
align-items: center;
overflow: hidden;
+4
View File
@@ -144,6 +144,9 @@
@click="click_loginout()"
></uv-cell>
</uv-cell-group>
</view>
<view style="height: 86rpx;">
</view>
<tabbar-shadow></tabbar-shadow>
<avatar-cropper
@@ -367,6 +370,7 @@
.scroll-view-item {
display: inline-block;
padding: 0 22rpx 0 26rpx;
white-space: nowrap;
}
.item {