Merge branch 'develop' into 'dev-20250930'

Develop

See merge request K17_AITS/tra-app!93
This commit is contained in:
田岩
2025-08-01 16:18:43 +08:00
26 changed files with 1141 additions and 953 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
ENV = 'production'
# base api
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
@@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE REQUEST-----
MIICizCCAXMCAQAwRjEjMCEGCSqGSIb3DQEJARYUeGlhbmd5dWFuaHVhQDEyNi5j
b20xEjAQBgNVBAMMCWpsYmFuay1haTELMAkGA1UEBhMCQ04wggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQDJpWVb8H9S3V1Ttb7OIsdvi6NoN72saXbd5ywg
bH5SON/46eZQh3hohSDM+6wrLS8FDylZ1U1WbfOfDbfWQH9qzkY7s7guSxqXOeaS
iQEMginiMv2MHpD3lKzPimys50QHNtDCIZbq+uHQH71BrtKdkzJQvtJCP3vljlMA
g1irjjporhswoaX20snM+FsYEVvy+3y8CxkCZuTKnZuDY9vwwkqxWnrZ3LhSVULo
H2PIF9R5G48lk4EOMhcsHywnN6FmTKJznENjXY8sl8yJyxjdFb1clTJl4Sg9VJqo
BbosZ8m3s/bwDkBNI3opSE9GGievsn1J3L4eLZHoaAk7NykhAgMBAAGgADANBgkq
hkiG9w0BAQsFAAOCAQEAOrUvUNb8ZdvWlPobOa2E3u91M8oJk/BFP5z+J0OSvjzf
y7FiTSLK+wBd9gPftvQ2H8HzkirYTk6q9+UZUwTr4Ie1CswkxK8axBuEUkzDUJ6R
yAttKL6fNPg8w0QwvWC2IGKaSyJYjNQWOcgsz5UpCFVVpQbt1mWZ2d4nKCUhwnBB
2W0EraA8TzPzaAket0eY8P1r72J6fQ4MW4AFcLtJL/LxdFQCtc0TyYGx+W7XBz4p
7pxUXc3pnwnhbg74wDzIIZkXE+NreZ9RNwYFIgvj7Gi9XGzEqIBaYGe5XhwA1DCF
fOjouLkQFaQ3cV+8eXN1NIhH1PnJ6dzsZE32YN99sw==
-----END CERTIFICATE REQUEST-----
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgsdhY0r0E1MN6bBxs
2QH9B5F8X7ipv1Q4y59RfVMFuB6hRANCAATLapDSZrlDs0l4V5GMpNgrSzT71Y3c
4G2GhjuEVhQTv+JBEMHlzsWA9mdl/K657txD+kJtkKQePTYq75wHOUfy
-----END PRIVATE KEY-----
+2
View File
@@ -0,0 +1,2 @@
X0R2V2N9G2XP
69a6de7f-3378-47e3-e053-5b8c7c11a4d1
@@ -0,0 +1,27 @@
import jwt
import time
key_id = "X0R2V2N9G2XP" # Key ID
issuer_id = "69a6de7f-3378-47e3-e053-5b8c7c11a4d1" # Issuer ID
private_key_path = "./ApiKey_X0R2V2N9G2XP.p8"
with open(private_key_path, "r") as f:
private_key = f.read()
# 20
issued_at = int(time.time()) - 60 # 1
expires = issued_at + 1200
token = jwt.encode(
{
"iss": issuer_id,
"iat": issued_at,
"exp": expires,
"aud": "appstoreconnect-v1",
},
private_key,
algorithm="ES256",
headers={"kid": key_id},
)
print(token)
+13 -2
View File
@@ -1,7 +1,9 @@
包名:cn.com.jlbank.aits
苹果账号
xiangyuanhua@126.com
Xiang@1987
Xiang@1987
你的 App 专用密码:wais-pyeh-cmww-zqvc
田岩UDID:
00008101-001911401152001E
官网地址:https://appstoreconnect.apple.com/
@@ -33,4 +35,13 @@ Hb修改流程:
255.255.255.0
25.64.16.254
http://25.13.9.101:9000/
http://25.13.9.101:9000/
echo '{
"iss": "69a6de7f-3378-47e3-e053-5b8c7c11a4d1",
"iat": '$((`date +%s` - 60))',
"exp": '$((`date +%s` + 3600))',
"aud": "appstoreconnect-v1"
}' > payload.json
+1
View File
@@ -7,6 +7,7 @@ export default {
animationType: 'slide-in-bottom'
});
})
// console.log('预加载');
},
onShow: function () {
// console.log('App Show')
+20 -7
View File
@@ -17,7 +17,7 @@ export const get_base_url = url => {
return baseUrl
// #endif
// #ifdef APP-PLUS
return ENV.VITE_APP_BASE_API_Url
return ENV.VITE_APP_BASE_API_Url
// #endif
} else { // 其他环境,包括生产环境,sit环境,uat环境
return ENV.VITE_APP_BASE_API_Url
@@ -32,15 +32,28 @@ export const REQUES_ERROR_CODES = {
// 去登录弹窗状态
let no_login_show_modal_state = false
// 去登录方法
export const goto_login_fun = () => {
export const goto_login_fun = (from = 'http') => {
if (no_login_show_modal_state) return;
no_login_show_modal_state = true
let page_route = ''
const pages = getCurrentPages();
if (pages.length >= 1) {
const page = pages[pages.length - 1];
page_route = page.route
}
if (page_route === 'pages/login/login') return;
common.hideLoading()
common.show('未登录', '现在去登录').then(() => {
common.show('未登录', '现在去登录', false).then(() => {
common.navigateTo('/pages/login/login')
if (from === 'socket' && page_route !== '') {
common.redirectTo('/pages/login/login?path=' + page_route)
} else {
common.navigateTo('/pages/login/login')
}
}).finally(() => {
no_login_show_modal_state = false
})
})
}
export default function request({
@@ -73,7 +86,7 @@ export default function request({
data: data,
method: method,
header: headers_base,
timeout:timeout,
timeout: timeout,
success: (response) => {
if (isStream) { // 流式传输,直接返回
return resolve(response);
@@ -83,8 +96,8 @@ export default function request({
const res = response.data
if (res?.rtnCode === '0000') {
return resolve(res)
}else{
if(toastErrors){
} else {
if (toastErrors) {
common.msg(res?.message)
}
}
+3 -3
View File
@@ -69,13 +69,13 @@ export default class WebSocketUtil {
clearInterval(this.reconnectTimer);
this.reconnectTimer = null
this.close()
goto_login_fun();
goto_login_fun('socket');
return
}
}else{
clearInterval(this.reconnectTimer); // 清除重连计时器
this.reconnectTimer = null
goto_login_fun();
goto_login_fun('socket');
return
}
this.triggerEvent('message', res); // 触发消息接收事件
@@ -224,7 +224,7 @@ export default class WebSocketUtil {
this.triggerEvent('error', new Error('达到最大重连次数'));
this.reconnectTimer = null
this.close()
goto_login_fun()
goto_login_fun('socket')
}
}
+31 -5
View File
@@ -62,11 +62,36 @@ const loading = (title = '加载中', mask = true) => uni.showLoading({
})
const hideLoading = () => uni.hideLoading()
// 防抖工具函数
function debounce(fn, wait = 300) {
let isLocked = false; // 锁定状态标记
return function(...args) {
// 如果处于锁定状态,直接返回不执行
if (isLocked) {
return;
}
// 执行函数
fn.apply(this, args);
// 锁定,防止再次执行
isLocked = true;
// 等待指定时间后解锁
setTimeout(() => {
isLocked = false;
}, wait);
};
}
// 保留当前页面,跳转到应用内的某个页面,使用uni.navigateBack可以返回到原页面。
const navigateTo = (url, data = {}) => uni.navigateTo({
url: url,
...data
});
const navigateTo = debounce(function(url, data = {}) {
uni.navigateTo({
url: url,
...data
});
})
// 关闭所有页面,打开到应用内的某个页面。
const reLaunch = url => {
uni.reLaunch({
@@ -80,9 +105,10 @@ const switchTab = url => {
});
}
// 关闭当前页面,返回上一页面或多级页面。可通过 getCurrentPages() 获取当前的页面栈,决定需要返回几层。
const navigateBack = (delta = 1, fun = () => {}) => {
const navigateBack = (delta = 1, fun = () => {}, data = {}) => {
uni.navigateBack({
delta: delta,
...data,
success() {
fun()
}
+18 -20
View File
@@ -1,30 +1,28 @@
// 设置科技鹿
import {getUserInfo} from "@/common/common.js"
import {
getUserInfo
} from "@/common/common.js"
import common from "@/common/common.js"
export const setMascot = () => {
// const mascotState = common.getValue('mascotState') || false
const mascotState = false
// console.log('设置科技鹿', mascotState);
if (!mascotState) {
try{
try {
const userInfo = getUserInfo()
const mascotInfo = userInfo?.mascotInfo
console.log('设置科技鹿', mascotInfo);
uni.setTabBarStyle({
midButton: {
iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png",
width: "86px",
height: "86px",
iconWidth: "90px"
},
success: () => {
common.setValue('mascotState', true)
}
})
} catch(e){
}
if (mascotInfo) {
uni.setTabBarStyle({
midButton: {
iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png",
width: "86px",
height: "86px",
iconWidth: "90px"
},
success: () => {
common.setValue('mascotState', true)
}
})
}
} catch (e) {}
}
return mascotState
}
+2 -2
View File
@@ -2,8 +2,8 @@
"name" : "tra-app",
"appid" : "__UNI__EDE0E52",
"description" : "",
"versionName" : "0.0.5",
"versionCode" : 5,
"versionName" : "0.0.1",
"versionCode" : 1,
"transformPx" : false,
/* 5+App */
"app-plus" : {
+10 -18
View File
@@ -1,5 +1,15 @@
{
"pages": [
{
"path": "pages/index/dialog",
"style": {
"navigationBarTitleText": "AI问答",
"app-plus": {
"titleNView": false,
"animationType": "fade-in"
}
}
},
{
"path": "pages/index/index",
"style": {
@@ -63,15 +73,6 @@
}
}
},
{
"path": "pages/intelligentAnswering/index",
"style": {
"navigationBarTitleText": "智能问答",
"app-plus": {
"titleNView": false
}
}
},
{
"path": "pages/scene/index",
"style": {
@@ -152,15 +153,6 @@
"titleNView": false
}
}
},
{
"path": "pages/index/dialog",
"style": {
"navigationBarTitleText": "AI问答",
"app-plus": {
"titleNView": false
}
}
}
],
"tabBar": {
@@ -70,7 +70,7 @@
这里什么都没有
</view>
</view>
<uv-load-more :status="status" loadmore-text="轻轻上拉加载"></uv-load-more>
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载"></uv-load-more>
<uni-popup ref="popup" class="popup">
<view class="bottom_reply_input_div" :style="{marginBottom:popup_input_bottom}">
<uv-input v-model="reply_data.bbsContent" :adjustPosition="false"
+66 -36
View File
@@ -5,7 +5,7 @@
<view class="bot-bg"></view>
<scroll-view class="index-dialog-body" :scroll-y="true" upper-threshold="0" refresher-enabled="true"
refresher-default-style="none" @refresherrefresh="scrolltolower">
<view class="body-title">
<!-- <uv-icon class="arrow-icon" name="arrow-left" @click="common.navigateBack()"/> -->
AI问答
@@ -17,9 +17,9 @@
<view class="ai-info">
<!-- <image src="@/static/images/dialog/pet-3.png" alt="" class="image-pet-bg"></image> -->
<image src="@/static/images/dialog/pet-bg-base.png" alt="" class="image-pet-bg"></image>
<image :src="userInfo.mascotInfo?.imgAddr ||''" alt="" class="image-pet" mode="widthFix"></image>
<image :src="userInfo?.mascotInfo?.imgAddr ||''" alt="" class="image-pet" mode="widthFix"></image>
<view class="ai-info-bg-box">
<view class="hello-text">Hi我是{{ userInfo.mascotInfo?.mascotName || ''}}</view>
<view class="hello-text">{{ userInfo?'Hi,我是'+userInfo?.mascotInfo?.mascotName : 'Hi'}}</view>
<view class="info-text">工作学习我都能帮你</view>
<view class="info-btn">试试他的能力</view>
</view>
@@ -28,7 +28,8 @@
<scroll-view :scroll-x="true" :show-scrollbar="false">
<view class="question-row">
<view class="question-item" v-for="item in Math.ceil(questionList.length/2)"
@click="sendText(questionList[item-1].hotContent)">{{questionList[item-1].hotContent}}</view>
@click="sendText(questionList[item-1].hotContent)">{{questionList[item-1].hotContent}}
</view>
</view>
<view class="question-row">
<view class="question-item"
@@ -93,7 +94,8 @@
onMounted,
watch,
nextTick,
computed
computed,
onActivated
} from 'vue'
import common from '@/common/common';
import TouchBtn from '@/pages/course/components/touchBtn.vue'
@@ -127,18 +129,18 @@
import {
queryHotQuestionApi
} from "@/api/dialog.js"
const {
statusBarHeight
} = uni.getWindowInfo()
const {
statusBarHeight
} = uni.getWindowInfo()
const pageTopPadding = computed(() => statusBarHeight + 'px')
const pageTopPadding = computed(() => statusBarHeight + 'px')
const socketStore = useSocketStore()
const {
SocketObj
} = storeToRefs(socketStore)
const userInfo = computed(() => getUserInfo())
console.log('userInfoxxx', getUserInfo());
const userInfo = ref(getUserInfo())
const questionList = ref([
// '',
// '2025',
@@ -168,7 +170,7 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
const reqBatch = ref('')
const seqNo = ref('')
const mascotId = computed(() => {
return unref(userInfo).mascotInfo?.mascotId || 'Tst00001'
return unref(userInfo)?.mascotInfo?.mascotId || 'Tst00001'
})
const answerText = ref('')
const answerIsOver = ref(true)
@@ -260,7 +262,7 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
talkingList.value.push({
type: 'answer',
isLoading: true,
id: _id+'loading'
id: _id + 'loading'
})
scrollToBottomNow()
return
@@ -395,7 +397,24 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
}
}
const scrolltolower = () => {
common.switchTab('/pages/index/index')
const pages = getCurrentPages();
const pageCount = pages?.length || 0;
//
if (pageCount <= 1) {
common.switchTab('/pages/index/index');
return;
}
const prevPage = pages[pageCount - 2]; //
//
if (prevPage.route === 'pages/login/login') {
// 2
pageCount === 2 ?
common.switchTab('/pages/index/index') :
common.navigateBack(2);
} else {
//
common.navigateBack();
}
}
const touchBtnCallBack = ref(null)
const askData = ref({})
@@ -415,7 +434,6 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
isLoading: true
})
scrollToBottomNow()
console.log(voicePath, 111111111)
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {}).then(res => {
let _res = JSON.parse(res.data)
if (_res.rtnCode === '0000') {
@@ -482,7 +500,6 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
if (pages && pages.length > 1) {
const page = pages[pages.length - 2];
if (page.route === 'pages/login/login') {
console.log('进来了');
if (pages.length == 2) {
common.switchTab('/pages/index/index');
} else {
@@ -494,38 +511,49 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
}
return false
});
const getQuestionList = () => {
queryHotQuestionApi().then(res=> {
queryHotQuestionApi().then(res => {
console.log(res)
questionList.value = res.body
})
}
onMounted(() => {
const loadData = async () => {
userInfo.value = getUserInfo();
getQuestionList()
initsocketTask()
};
onLoad(() => {
if (!common.isLogin()) {
common.navigateTo('/pages/login/login')
return
}
//
if(userInfo.value?.mascotInfo.mascotId === null) { //退
common.redirectTo('/pages/mascot/mascot_select_list');
return
}
})
onMounted(() => {
loadData()
})
const refreshData = () => {
loadData();
};
onHide(() => {
// if(watchFlag.value === 1) return
// //
// sendMessage({
// "commond" : 'ASK-STOP',
// "body" : {
// reqBatch: reqBatch.value,
// seqNo: seqNo.value,
// }
// })
// socketStore?.closeSocket()
})
onShow(() => {
if (watchFlag.value === 1) return
// initsocketTask()
})
onUnload(() => {
watchFlag.value = 1
socketStore?.closeSocket()
})
defineExpose({
refreshData
});
</script>
<style scoped lang="scss">
@@ -562,14 +590,14 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
padding-top: v-bind(pageTopPadding);
// display: flex;
// flex-direction: column;
.body-title {
height: 90rpx;
text-align: center;
font-size: 33rpx;
padding-top: 20rpx;
line-height: 46rpx;
box-sizing: border-box;
font-weight: 500;
@@ -633,7 +661,7 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
top: -20rpx;
z-index: 2;
}
.image-pet-bg {
position: absolute;
padding: 0 24rpx;
@@ -714,6 +742,7 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
}
}
}
.router-list {
height: 84rpx;
padding: 20rpx 30rpx 0;
@@ -765,6 +794,7 @@ const pageTopPadding = computed(() => statusBarHeight + 'px')
height: calc(100% - 832rpx);
padding: 12rpx 24rpx;
box-sizing: border-box;
.talking-scroll-list {
height: 100%;
}
+61 -41
View File
@@ -281,9 +281,6 @@
onPageScroll((e) => {
scrollTop.value = e.scrollTop
})
//
const notice_text = ref(['绿色金融政策解析与商业银行绿色水水水水水水水水水水水水水', '绿色金融政策解析与商业银行红色'])
const init_class_data = [{
@@ -305,58 +302,71 @@
const recommend_class_list = ref([...init_class_data])
const mascotInfo = ref({})
const statistics_data = reactive({
'stdtTmLen': 0, //
'accmPracticeCnt': 0, //
'accmExamCnt': 0, //
'startStdtTmLen': 0, //
'startAccmPracticeCnt': 0, //
'startAccmExamCnt': 0, //
'request_time': 0, //
"init": function() { //
const index_statistics_data = common.getValue('index_statistics_data') //
stdtTmLen: 0, //
accmPracticeCnt: 0, //
accmExamCnt: 0, //
startStdtTmLen: 0, //
startAccmPracticeCnt: 0, //
startAccmExamCnt: 0, //
request_time: 0, //
init: function() { //
const index_statistics_data = common.getValue('statistics_data') //
if (index_statistics_data) {
this.stdtTmLen = index_statistics_data.stdtTmLen;
this.accmPracticeCnt = index_statistics_data.accmPracticeCnt;
this.accmExamCnt = index_statistics_data.accmExamCnt;
}
},
"get_statistics_data": async function() {
get_statistics_data: async function() {
try {
const time_now = Date.now();
if (time_now - this.request_time > 300 * 1000) {
let statistics_data = common.getValue('statistics_data') || {};
if (time_now - this.request_time > 300) {
this.request_time = time_now;
//
const res = await getStatisticsData();
common.setValue('index_statistics_data', res.body)
const stdtTmLen = res.body.stdtTmLen
const accmPracticeCnt = res.body.accmPracticeCnt
const accmExamCnt = res.body.accmExamCnt
if (stdtTmLen != this.stdtTmLen) {
this.startStdtTmLen = this.stdtTmLen
this.stdtTmLen = stdtTmLen
stdtTmLenRef.value.start()
}
if (accmPracticeCnt != this.accmPracticeCnt) {
this.startAccmPracticeCnt = this.accmPracticeCnt
this.accmPracticeCnt = accmPracticeCnt
accmPracticeCntRef.value.start()
}
if (accmExamCnt != this.accmExamCnt) {
this.startAccmExamCnt = this.accmExamCnt
this.accmExamCnt = accmExamCnt
accmExamCntRef.value.start()
}
if (res && res.body) {
//
statistics_data = {
...statistics_data,
stdtTmLen: res.body.stdtTmLen || 0,
accmPracticeCnt: res.body.accmPracticeCnt || 0,
accmExamCnt: res.body.accmExamCnt || 0
};
console.log('统计数据已更新');
} else {
console.log('时间没到无需更新');
common.setValue('statistics_data', statistics_data);
}
}
//
const {
accmExamCnt = 0, accmPracticeCnt = 0, stdtTmLen = 0
} = statistics_data;
//
if (stdtTmLen !== this.stdtTmLen) {
this.startStdtTmLen = this.stdtTmLen
this.stdtTmLen = stdtTmLen
stdtTmLenRef.value.start()
}
if (accmPracticeCnt !== this.accmPracticeCnt) {
this.startAccmPracticeCnt = this.accmPracticeCnt
this.accmPracticeCnt = accmPracticeCnt
accmPracticeCntRef.value.start()
}
if (accmExamCnt !== this.accmExamCnt) {
this.startAccmExamCnt = this.accmExamCnt
this.accmExamCnt = accmExamCnt
accmExamCntRef.value.start()
}
} catch (error) {
console.log('获取统计数据失败:', error);
console.error('获取统计数据失败:', error);
//
}
}
});
const index = ref(0)
const ai_test = () => {
index.value++
@@ -372,7 +382,7 @@
},
})
}
//
const goto_search_page = () => {
common.navigateTo('/pages/search/search')
@@ -386,17 +396,26 @@
animationType: 'slide-in-bottom'
})
}
onLoad(() => {
statistics_data['init'](); //
//
//
const userInfo = getUserInfo()
if (userInfo?.mascotInfo.mascotId === null) { //退
common.redirectTo('/pages/mascot/mascot_select_list');
return
}
})
onShow(() => {
if (!common.isLogin()) {
common.navigateTo('/pages/login/login')
return
}
setMascot()
const userInfo = getUserInfo()
if (userInfo) {
mascotInfo.value = userInfo?.mascotInfo
}
setMascot()
statistics_data['get_statistics_data']() //
queryCrsInfoByLastnew().then(res => {
new_class_list.value = res.body
@@ -549,6 +568,7 @@
display: flex;
margin-top: 106rpx;
margin-left: $bg-margin-left;
.log_img {
margin-left: 10rpx;
// width: 300rpx;
+245 -225
View File
@@ -6,7 +6,8 @@
<image src="/static/images/login/profile.png" class="profile"></image>
</view>
<view class="title_logo">
<image src="/static/images/login/logo_text.png" mode="heightFix" class="log_img" @click="goTest"></image>
<image src="/static/images/login/logo_text.png" mode="heightFix" class="log_img" @click="goTest">
</image>
<view class="fl1"></view>
</view>
<view class="title_text_div">
@@ -17,9 +18,11 @@
</view>
<view class="account_password_div">
<view class="title1 font_pf">账号</view>
<uv-input class="account_input" v-model="account" :adjustPosition="false" :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" :adjustPosition="false" :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>
@@ -31,7 +34,8 @@
<view class="fl1"></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">登录</uv-button>
<uv-button class="bottom_login_button" type="primary" :throttleTime="500"
:disabled="login_button_status">登录</uv-button>
</view>
<view class="ysxy_div">
<uv-checkbox-group v-model="read_text_state">
@@ -51,254 +55,270 @@
</template>
<script lang="ts" setup>
// import { v4 as uuid4 } from 'uuid'
import { onBackPress } from '@dcloudio/uni-app';
import { ref, computed, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue';
import common from '@/common/common';
import { useAccountLoginApp, queryCurrentUser } from '@/api/login.js';
import { encryptByAES } from '@/api/encryptAndDecryptData.js';
// import { v4 as uuid4 } from 'uuid'
import { onBackPress, onLoad } from '@dcloudio/uni-app';
import { ref, computed, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue';
import common 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'
const socketStore = useSocketStore();
const { taskSocket } = storeToRefs(socketStore);
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 show_password = ref<Boolean>(false);
const account = ref<string>('');
const password = ref<string>('');
const read_text_state = ref<Array<unknown>>([]);
const back_state = ref(true);
//
const login_button_status = computed<boolean>(() => !read_text_state.value.length);
const clickCount = ref(0);
const lastClickTime = ref(0);
const goTest = () => {
const now = Date.now();
if (now - lastClickTime.value > 500) {
clickCount.value = 0;
}
clickCount.value++;
lastClickTime.value = now;
if (clickCount.value == 6) {
if (!account.value && password.value == '20010307' && !show_password.value) {
common.navigateTo('/pages/test/index');
const socketStore = useSocketStore();
const { taskSocket } = storeToRefs(socketStore);
const show_password = ref<Boolean>(false);
const account = ref<string>('');
const password = ref<string>('');
const read_text_state = ref<Array<unknown>>([]);
const back_state = ref(true);
//
const login_button_status = computed<boolean>(() => !read_text_state.value.length);
const clickCount = ref<number>(0);
const lastClickTime = ref<number>(0);
const fromPagePath = ref<string>('');
const goTest = () => {
const now = Date.now();
if (now - lastClickTime.value > 500) {
clickCount.value = 0;
}
clickCount.value = 0;
}
};
//
const login_fun = (): void => {
//
if (login_button_status.value) return common.msg('请阅读并同意《隐私政策》');
if (account.value === '') return common.msg('账号不能为空');
if (password.value === '') return common.msg('密码不能为空');
try {
common.loading('登录中');
const secretKey = 'EtBzqj+ln5tSTof1SDhpTg==';
const cipherText = encryptByAES(password.value, secretKey);
useAccountLoginApp({ loginName: account.value, password: cipherText })
.then(async (res) => {
common.hideLoading();
//
common.setValue('loginAccountData', {
account: account.value,
password: password.value
});
// res['mascotState']
if (res['mascotState']) { // 鹿
common.redirectTo('/pages/mascot/mascot_select_list');
} else {
common.setValue('mascotState', false) // 鹿
common.msg('登录成功');
const pages = getCurrentPages();
if (pages.length >= 2) {
//
console.log('返回登录的上一页');
back_state.value = false;
//
const page = pages[pages.length - 2];
console.log('page.route', page.route);
if (page.route === 'pages/index/index') {
common.navigateTo('/pages/index/dialog', {animationType: 'slide-in-bottom'});
} else {
common.navigateBack(); //
}
clickCount.value++;
lastClickTime.value = now;
if (clickCount.value == 6) {
if (!account.value && password.value == '20010307' && !show_password.value) {
common.navigateTo('/pages/test/index');
}
clickCount.value = 0;
}
};
//
const login_fun = () : void => {
//
if (login_button_status.value) return common.msg('请阅读并同意《隐私政策》');
if (account.value === '') return common.msg('账号不能为空');
if (password.value === '') return common.msg('密码不能为空');
try {
common.loading('登录中');
const secretKey = 'EtBzqj+ln5tSTof1SDhpTg==';
const cipherText = encryptByAES(password.value, secretKey);
useAccountLoginApp({ loginName: account.value, password: cipherText })
.then(async (res) => {
common.hideLoading();
//
common.setValue('loginAccountData', {
account: account.value,
password: password.value
});
if (res['mascotState']) { // 鹿
common.redirectTo('/pages/mascot/mascot_select_list');
} else if (fromPagePath.value !== '') {
common.redirectTo('/' + fromPagePath.value);
} else {
// common.switchTab('/pages/index/index');
common.navigateTo('/pages/index/dialog', {animationType: 'slide-in-bottom'});
// common.redirectTo('/pages/index/dialog', {animationType: 'slide-in-bottom'});
common.setValue('mascotState', false) // 鹿
common.msg('登录成功');
back_state.value = false;
const pages = getCurrentPages();
if (pages.length <= 1) { // 1loginlogin
common.navigateTo('/pages/index/dialog', { animationType: 'slide-in-bottom' });
return;
}
const prevPage = pages[pages.length - 2];
if (prevPage.route === 'pages/index/dialog') { //
common.navigateBack(1, () => {
if (prevPage.$vm && typeof prevPage.$vm.$?.exposed?.refreshData === 'function') {
prevPage.$vm.$?.exposed?.refreshData();
}
}, { animationType: 'slide-in-bottom' });
} else {
common.navigateBack(1, () => {
if (prevPage.$vm && typeof prevPage.$vm.$?.exposed?.refreshData === 'function') {
prevPage.$vm.$?.exposed?.refreshData();
}
});
}
}
}
}).catch((res) => {
console.log(res);
common.hideLoading();
if (res.rtnCode === '0002') {
common.msg('账号或密码错误,如忘记密码,请去统一身份认证平台修改。');
} else if (res.rtnCode !== '0005') {
common.msg('登录出错,请稍后再试');
}
});
} catch (e) {
common.hideLoading();
}
};
}).catch((res) => {
console.log(res);
common.hideLoading();
if (res.rtnCode === '0002') {
common.msg('账号或密码错误,如忘记密码,请去统一身份认证平台修改。');
} else if (res.rtnCode !== '0005') {
common.msg('登录出错,请稍后再试');
}
});
} catch (e) {
common.hideLoading();
}
};
onMounted(() => {
let loginAccountData = common.getValue('loginAccountData');
if (loginAccountData) {
account.value = loginAccountData.account;
password.value = loginAccountData.password;
}
back_state.value = true;
});
//
onBackPress(() => back_state.value);
onLoad(() => {
// fromPagePath.value = e?.path || ''
})
onMounted(() => {
let loginAccountData = common.getValue('loginAccountData');
if (loginAccountData) {
account.value = loginAccountData.account;
password.value = loginAccountData.password;
}
back_state.value = true;
});
//
onBackPress(() => back_state.value);
</script>
<style lang="scss" scoped>
.bottom_login_div {
padding: 0 58rpx;
margin-bottom: 93rpx;
.bottom_login_div {
padding: 0 58rpx;
margin-bottom: 93rpx;
.ysxy_div {
margin-top: 27rpx;
display: flex;
align-items: center;
.ysxy_div {
margin-top: 27rpx;
display: flex;
align-items: center;
.ysxy_tip {
font-size: 23rpx;
color: #999999;
.ysxy_tip {
font-size: 23rpx;
color: #999999;
.ysxy_term {
color: #0066ff;
.ysxy_term {
color: #0066ff;
}
}
:deep(.uv-checkbox-group) {
flex: 0;
}
}
:deep(.uv-checkbox-group) {
flex: 0;
.bottom_login_button {
border: none;
border-radius: 16rpx;
background-color: #0066ff;
color: #ffffff;
overflow: hidden;
:deep(.uv-button) {
height: 100rpx;
}
}
}
.bottom_login_button {
border: none;
border-radius: 16rpx;
background-color: #0066ff;
color: #ffffff;
overflow: hidden;
:deep(.uv-button) {
height: 100rpx;
}
}
}
.account_password_div {
padding: 0 58rpx;
z-index: 50;
.account_password_div {
padding: 0 58rpx;
z-index: 50;
.title1 {
font-size: 28rpx;
font-weight: 600;
height: 40rpx;
margin-top: 8rpx;
margin-bottom: 20rpx;
}
.title2 {
font-size: 28rpx;
font-weight: 600;
height: 40rpx;
margin-top: 54rpx;
margin-bottom: 20rpx;
}
.account_input {
height: 100rpx;
background-color: #f4f8ff;
border: none;
border-radius: 16rpx;
::v-deep .u-input__content__field-wrapper__field {
font-size: 26rpx !important;
}
.show_password {
margin-right: 6rpx;
width: 40rpx;
.title1 {
font-size: 28rpx;
font-weight: 600;
height: 40rpx;
margin-top: 8rpx;
margin-bottom: 20rpx;
}
.title2 {
font-size: 28rpx;
font-weight: 600;
height: 40rpx;
margin-top: 54rpx;
margin-bottom: 20rpx;
}
.account_input {
height: 100rpx;
background-color: #f4f8ff;
border: none;
border-radius: 16rpx;
::v-deep .u-input__content__field-wrapper__field {
font-size: 26rpx !important;
}
.show_password {
margin-right: 6rpx;
width: 40rpx;
height: 40rpx;
}
}
}
}
.bg_div {
display: flex;
flex-direction: column;
position: relative;
padding: 0 50rpx;
height: 496rpx;
// border: 1px solid red;
.bg_img {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
.profile_div {
position: absolute;
bottom: -96rpx;
right: 0;
width: 100%;
.bg_div {
display: flex;
justify-content: flex-end;
z-index: 10;
flex-direction: column;
position: relative;
padding: 0 50rpx;
height: 496rpx;
// border: 1px solid red;
.profile {
width: 328rpx;
height: 424rpx;
.bg_img {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
.profile_div {
position: absolute;
bottom: -96rpx;
right: 0;
width: 100%;
display: flex;
justify-content: flex-end;
z-index: 10;
.profile {
width: 328rpx;
height: 424rpx;
}
}
.title_logo {
display: flex;
margin-top: 120rpx;
.log_img {
// width: 380rpx;
height: 70rpx;
}
}
.title_text_div {
display: flex;
align-items: center;
margin-top: 84rpx;
.title_text {
font-weight: 700;
font-size: 46rpx;
}
.title_text_img {
width: 48rpx;
height: 62rpx;
}
}
.title_text_tip {
margin-top: 10rpx;
font-size: 26rpx;
color: #999999;
}
}
.title_logo {
.main_div {
display: flex;
margin-top: 120rpx;
.log_img {
// width: 380rpx;
height: 70rpx;
}
flex-direction: column;
}
.title_text_div {
display: flex;
align-items: center;
margin-top: 84rpx;
.title_text {
font-weight: 700;
font-size: 46rpx;
}
.title_text_img {
width: 48rpx;
height: 62rpx;
}
}
.title_text_tip {
margin-top: 10rpx;
font-size: 26rpx;
color: #999999;
}
}
.main_div {
display: flex;
flex-direction: column;
}
</style>
</style>
+588 -569
View File
File diff suppressed because it is too large Load Diff
+9 -5
View File
@@ -44,13 +44,14 @@
</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 class="measure-container">
<view v-for="(item, index) in hiddenHistorySearchList" :key="index" class="history_item">
{{ item }}
</view>
</view>
</view>
</template>
<script setup>
@@ -179,6 +180,8 @@
.measure-container {
display: flex;
position: fixed;
top:-500rpx; //
}
.history_item {
@@ -339,5 +342,6 @@
.main_div {
display: flex;
flex-direction: column;
}
</style>
-9
View File
@@ -9,15 +9,6 @@
}
}
},
{
"path": "pages/intelligentAnswering/index",
"style": {
"navigationBarTitleText": "智能问答",
"app-plus": {
"titleNView": false
}
}
},
{
"path": "pages/scene/index",
"style": {
-9
View File
@@ -17,15 +17,6 @@
"titleNView": false
}
}
},
{
"path": "pages/index/dialog",
"style": {
"navigationBarTitleText": "AI问答",
"app-plus": {
"titleNView": false
}
}
}
]
}
+10
View File
@@ -1,5 +1,15 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/dialog",
"style": {
"navigationBarTitleText": "AI问答",
"app-plus": {
"titleNView": false,
"animationType": "fade-in"
}
}
},
{
"path": "pages/index/index",
"style": {
+12
View File
@@ -0,0 +1,12 @@
{
"userId": "USER001",
"userName": "ADMIN",
"loginName": "ADMIN",
"orgId": "00E200",
"orgName": "吉林银行-总行-金融科技部(下辖二级部研发部、运维部)",
"deptId": "",
"deptName": null,
"userStatus": "01",
"imageAddr": "/traoss/tras3/show/S3T0250181221042025072319404600000427552",
"gender": "f"
}